Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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

http://localhost:8080/ oledocstore/documents

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

http://localhost:8080/ oledocstore/documents/[uuid]

 

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

http://localhost:8080/ oledocstore/documents/

 

Method

PUT

 

Request Body

XML

Request XML

Returns

200 OK

 

 

401 Unauthorized

 

 

404 Not Found

 

 

415 Unsupported Media Type

 


Retrieve a document

URL

http://localhost:8080/ oledocstore/documents/[uuid]

Method

GET

Returns

200 OK & XML

 

401 Unauthorized

 

404 Not Found


Retrieve one or more documents:

URL

http://localhost:8080/ oledocstore/documents

Method

GET

Query string

Category=
Type=
Format=
Start=
End=

 

 

Returns

200 OK and XML

 

401 Unauthorized

 

404 Not Found


Delete a document:

URL

http://localhost:8080/ oledocstore/ documents/[uuid]

Method

 

DELETE

 

Returns

204 No Content
On success, no response body is returned.

 

401 Unauthorized

 

404 Not Found

 

415 Unsupported Media Type

Delete one or more documents

URL

http://localhost:8080/ oledocstore/ documents/

 

Method

DELETE

 

Request Body

XML

Request XML

Returns

200 OK

 

 

401 Unauthorized

 

 

404 Not Found

 

 

415 Unsupported Media Type

 

        

Discovery Services:

...