Defining sub-resources for your RESTful API

Defining your sub-resources: map your endpoint URLs

  • GET /tickets/123/comments: get all comments for ticket #123
  • GET /tickets/123/comments/2: get comment #2 for ticket #123
  • POST /tickets/123/comments: create a new comment for ticket #123
  • PUT /tickets/123/comments/2: update comment #2 for ticket #123
  • DELETE /tickets/123/comments/2: delete comment #2 for ticket #123

Implementing your resource relations: relations in the NoSQL world

{
id: "123456",
subject: "Message 1",
message: "This is my first message",
author: {
id: "123",
name: "Guillaume Viguier"
}
}

--

--

--

Développeur web et passionné de finances personnelles

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

TESTNET 2 IS HAPPENING NOW

New creature reveal and an ICO creature sneak-peek! Community Update, Friday February 8 2019.

“The Best Thing About Being a Developer Is the Fact That You Get Salary”

How I passed 3 AWS Certifications in 26 days and saved $24.000

The Development of Developer Team: Servant Leader is a Key

3 Steps to Optimizing System Reliability

Journey of a Mobile Dev: HNG Internship

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Guillaume Viguier-Just

Guillaume Viguier-Just

Développeur web et passionné de finances personnelles

More from Medium

Ways to create small components in React

Alternative Background Lines in Chartjs

Building a simple to-do app using React and Ruby

DrChrono EHR and API For Developers

DrChrono EHR Software