...
Support objects used: Request, Response
6. REST API
A concrete implementation of a REST Web service follows four basic design principles:
- Expose directory structure-like URIs.
- Transfer XML, JavaScript Object Notation (JSON), or both.
- Use HTTP methods explicitly.
- Be stateless.
DocStore API as per design principles of REST
Create one or more documents:
URL | |
Request | POST |
Returns | 201 Created & Location |
| 401 Unauthorized |
| 415 Unsupported Media Type |
|
|
Modify a document:
If the specified document does not exist, it is not created by this command.
URL |
| |
Method | PUT |
|
Request | XML | Request XML |
Returns | 200 OK |
|
| 401 Unauthorized |
|
| 404 Not Found |
|
| 415 Unsupported Media Type |
|
Modify one or more documents:
If the specified document does not exist, it is not created by this command.
URL |
| |
---|---|---|
Method | PUT |
|
Request Body | XML | Request XML |
Returns | 200 OK |
|
| 401 Unauthorized |
|
| 404 Not Found |
|
| 415 Unsupported Media Type |
|
Retrieve a document
URL | |
Method | GET |
Returns | 200 OK & XML |
| 401 Unauthorized |
| 404 Not Found |
Retrieve one or more documents:
URL | |
Method | GET |
Query string | Category= |
|
|
Returns | 200 OK and XML |
| 401 Unauthorized |
| 404 Not Found |
Delete a document:
URL | |||
Method |
| DELETE |
|
Returns | 204 No Content | ||
| 401 Unauthorized | ||
| 404 Not Found | ||
| 415 Unsupported Media Type |
Delete one or more documents
URL |
| |
Method | DELETE |
|
Request Body | XML | Request XML |
Returns | 200 OK |
|
| 401 Unauthorized |
|
| 404 Not Found |
|
| 415 Unsupported Media Type |
|
Discovery Services:
...