Versions Compared

Key

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

...

The CloudSync REST API is a web-accessible, resource-oriented API that exposes operations on the key entities of the service.

The base URL of all REST API operations is the URL of the cloudsync app, plus /api/rest/. For example:

Code Block
http://example.org/cloudsync/api/rest/

All operations share the following properties:

...

Info
titleNotice
  • Unless otherwise stated, requests and responses will always be in JSON or XML format. The default format is XML unless ".json" is specified at the end of the URL or content negotiation is used to denote a preference for the "application/json" MIME type.
  • When GET is used to retrieve information about a resource, success is indicated by a 200 OK response code.
  • When POST is used to add a resource (e.g. addTask),

...

  • a successful (201 Created) response will include a Location header that provides the URI of the new resource

...

  • . The last portion of that URI will be the newly-allocated id of that resource, which is an opaque, URI-safe string.
  • When PUT is used to update a resource (e.g. updateTask), success is indicated by a 200 OK response code, and the response body will be the updated representation of the resource, as if requested via GET.
  • When DELETE is used to remove a resource (e.g. deleteTask), success is indicated by a 204 No Content response code, and the response body will be empty.

The base URL of all REST API operations is the URL of the cloudsync app, plus /api/rest/. For example:

Code Block
http://example.org/cloudsync/api/rest/
Note

The exact attributes and XML/JSON representations of the entities have not yet been determined – Only HTTP verbs and URIs are specified below.

Operations on Tasks

createTask

...