You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 5, 2021. It is now read-only.
Copy file name to clipboardExpand all lines: source/v1/index.html.md
+13-10Lines changed: 13 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -141,7 +141,7 @@ Be sure to include an `Accept: application/json` header, otherwise errors like `
141
141
### Exposed Headers
142
142
143
143
-`Content-Type`(`application/json` or the filetype, e.g. `image/png`)
144
-
-`Content-Disposition` (only for files, defaults to `attachment; filename="filename.ext"`)
144
+
-`Content-Disposition` (only for files, defaults to `inline`)
145
145
146
146
### For Pagination
147
147
See [pagination](#pagination)
@@ -161,19 +161,18 @@ See [pagination](#pagination)
161
161
```
162
162
/v1/users
163
163
```
164
-
> Get Route
164
+
> Update Route
165
165
166
166
```
167
167
/v1/users/1
168
168
```
169
169
170
170
All returned model resources have an `ETag` and `Last-Modified` header.
171
171
172
-
`ETag` are returned from get, create & update requests.
173
-
Because the ETags are weak they can be used on other routes as well.
172
+
`ETag`headers are returned from GET, Create & Update requests.
173
+
Because the ETags are weak they can also be used on other routes.
174
174
175
-
For example, when creating a new resource, the API will return an `ETag`,
176
-
this `ETag` can be used on the get route to check if the resource has been modified since creating it.
175
+
For example, when getting a resource the API will return a `ETag` header, the value of the `ETag` header can be used on the update route prevent [the lost update problem](https://www.morpheusdata.com/blog/2015-02-21-lost-update-db).
177
176
178
177
### We Also Expose CORS Headers
179
178
@@ -186,7 +185,7 @@ this `ETag` can be used on the get route to check if the resource has been modif
186
185
### Accepted Headers
187
186
188
187
-`Authorization`
189
-
-`Accept`
188
+
-`Accept` (should be set to `application/json` for all API requests)
190
189
-`Content-Type`
191
190
192
191
### For Pagination
@@ -196,10 +195,14 @@ See [pagination](#pagination)
We follow the standard as described on mozilla developer network
204
+
205
+
If you submit any of these headers the API will assume you only want to update a resource when the header condition is met, omit these if you do not care about preventing [the lost update problem](https://www.morpheusdata.com/blog/2015-02-21-lost-update-db)
0 commit comments