cosmicjs / rest-api-docs

OLD DOCS ==== Go to the new docs ===== ➡️
https://docs.cosmicjs.com
MIT License
6 stars 2 forks source link

Endpoint Update Proposal #1

Open tonyspiro opened 6 years ago

tonyspiro commented 6 years ago

The following updates can be done without breaking v1. I think it would be good to roll these out sooner than later. I'm open to suggestions.

Object Types PUT https://api.cosmicjs.com/v1/:bucket_slug/object-types/:object_type_slug

Objects POST https://api.cosmicjs.com/v1/:bucket_slug/objects GET https://api.cosmicjs.com/v1/:bucket_slug/objects?type=:type_slug GET https://api.cosmicjs.com/v1/:bucket_slug/objects/?:search_query_params PUT https://api.cosmicjs.com/v1/:bucket_slug/objects/:object_id DELETE https://api.cosmicjs.com/v1/:bucket_slug/objects/:object_id

tonyspiro commented 6 years ago

This basically means we are:

  1. Removing verbs from the endpoints (add-object, edit-object, etc) following a more standard format
  2. Removing the excess /search /object-type endpoints for Objects and simply combining them all as query params on the main /objects endpoint