Skip to content

Instantly share code, notes, and snippets.

@firatkucuk
Created July 5, 2019 09:58
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save firatkucuk/1e2430815038309eeace8252509744f3 to your computer and use it in GitHub Desktop.
Save firatkucuk/1e2430815038309eeace8252509744f3 to your computer and use it in GitHub Desktop.
REST Endpoint standards for single page applications.

Backend:

GET     /api/some-resource/{uuid}               Get Detail of single resource
POST    /api/some-resource                      Create resource with incoming data
PUT     /api/some-resource/{uuid}               Update resource with incoming data
DELETE  /api/some-resource/{uuid}               Delete resource
GET     /api/some-resources                     List all resources with post data

XXXX    /api/some-resource/{uuid}/some-action   Perform some action for that specified resource
XXXX    /api/some-resources/some-action         Perform some action for all data

Frontend:

/some-resource/detail/{uuid}        Get Detail of single resource
/some-resource/create               Create resource with incoming data
/some-resource/update/{uuid}        Update resource with incoming data
/some-resource                      List all resources with post data

/some-resource/some-action/{uuid}   Perform some action for that specified resource
/some-resource/some-action          Perform some action for all data
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment