Ghost/core/server/api/v2
naz cbdc91ce48
Added Location header to API's POST request responses (#12186)
refs #2635

- Adds 'Location' header to endpoints which create new resources and have corresponding `GET` endpoint as speced in JSON API - https://jsonapi.org/format/#crud-creating-responses-201. Specifically:
    /posts/
    /pages/
    /integrations/
    /tags/
    /members/
    /labels/
    /notifications/
    /invites/

- Adding the header should allow for better resource discoverability and improved logging readability
- Added `url` property to the frame constructor. Data in `url` should give enough information  to later build up the `Location` header URL for created resource.
- Added Location header to headers handler. The Location value is built up from a combination of request URL and the id that is present in the response for the resource. The header is automatically added to requests coming to `add` controller methods which return `id` property in the frame result
- Excluded Webhooks API  as there is no "GET" endpoint available to fetch the resource
2020-09-14 22:33:37 +12:00
..
utils 🐛 Fixed Tags API v2 to return posts count 2020-08-31 18:46:35 +12:00
actions.js Added v2 actions endpoint 2019-02-06 21:36:09 +01:00
authentication.js Moved config from server to shared (#11850) 2020-05-27 18:47:53 +01:00
authors-public.js Refactored common lib import to use destructuring (#11835) 2020-05-22 19:22:20 +01:00
config.js Moved config from server to shared (#11850) 2020-05-27 18:47:53 +01:00
db.js Refactored common lib import to use destructuring (#11835) 2020-05-22 19:22:20 +01:00
images.js Renamed uploads to images 2019-02-24 11:18:45 +07:00
index.js Merge branch 'master' into v3 2019-10-11 11:31:31 +01:00
integrations.js Refactored common lib import to use destructuring (#11835) 2020-05-22 19:22:20 +01:00
invites.js Extracted core/server/lib/security to @tryghost/security package 2020-08-11 14:06:50 +01:00
mail.js Refactored common lib import to use destructuring (#11835) 2020-05-22 19:22:20 +01:00
notifications.js Refactored common lib import to use destructuring (#11835) 2020-05-22 19:22:20 +01:00
oembed.js 🐛 Fixed fallback to bookmark card when pasting localhost Ghost url 2020-06-15 18:38:43 +01:00
pages-public.js Refactored common lib import to use destructuring (#11835) 2020-05-22 19:22:20 +01:00
pages.js Moved core/server/lib/url-utils to core/shared/url-utils (#11856) 2020-05-28 11:57:02 +01:00
posts-public.js Refactored common lib import to use destructuring (#11835) 2020-05-22 19:22:20 +01:00
posts.js Moved core/server/lib/url-utils to core/shared/url-utils (#11856) 2020-05-28 11:57:02 +01:00
preview.js Refactored common lib import to use destructuring (#11835) 2020-05-22 19:22:20 +01:00
redirects.js Extracted frontend code from redirects API controllers (#10798) 2019-06-21 16:50:16 +02:00
roles.js Migrated roles controller to API v2 2018-10-10 16:48:22 +02:00
schedules.js Moved core/server/lib/url-utils to core/shared/url-utils (#11856) 2020-05-28 11:57:02 +01:00
session.js Refactored common lib import to use destructuring (#11835) 2020-05-22 19:22:20 +01:00
settings-public.js Moved core/server/lib/url-utils to core/shared/url-utils (#11856) 2020-05-28 11:57:02 +01:00
settings.js Added routes.yaml content checksum storage to the db 2020-09-10 10:54:57 +12:00
site.js Moved core/server/lib/url-utils to core/shared/url-utils (#11856) 2020-05-28 11:57:02 +01:00
slack.js Refactored common lib import to use destructuring (#11835) 2020-05-22 19:22:20 +01:00
slugs.js Refactored common lib import to use destructuring (#11835) 2020-05-22 19:22:20 +01:00
tags-public.js Refactored common lib import to use destructuring (#11835) 2020-05-22 19:22:20 +01:00
tags.js Refactored common lib import to use destructuring (#11835) 2020-05-22 19:22:20 +01:00
themes.js Refactored common lib import to use destructuring (#11835) 2020-05-22 19:22:20 +01:00
users.js Refactored common lib import to use destructuring (#11835) 2020-05-22 19:22:20 +01:00
webhooks.js Added Location header to API's POST request responses (#12186) 2020-09-14 22:33:37 +12:00