From Ocean Framework Documentation Wiki
(Redirected from The Service Resource)
Jump to: navigation, search

The Service resource has one public URL. (For information about the difference between Public and Internal URLs and HATEOAS conventions, please see API Structure and Conventions.)



(String) The name of the Service
(String) A plain-text description of the Service, documenting its use.
(String) A datetime string in GMT.
(String) A datetime string in GMT.
 "service": {
          "name": "auth",
          "description": "This service handles authentication and authorisation. It is also 
                          the registry of Services and their Resources.",
          "created_at": "2012-12-01T18:40:53Z",
          "updated_at": "2012-12-03T09:12:17Z",
          "lock_version": 21,
          "_links": {
            "self": {
              "href": "",
              "type": "application/json" },
            "resources": {
              "href": "",
              "type": "application/json" }


The following hyperlink names are used in the following subsections. To retrieve the URL and Content-Type to use, use the _links hash. Note that the URI may change, and thus you should make no inference on how to construct similar URIs from any previous URI. For more information, refer to Hyperlink URIs are Opaque. You may store hyperlink URIs in permanent storage for later use.

The hyperlinks for a Service resource are:

as always, the self hyperlink can be used to perform CRUD actions on the Service resource.
GET retrieves the collection of Resources handled by this Service.
POST creates a new Resource belonging to this Service.
returns a collection of Amazon cloud Instances associated with this Service.
if present, this is a hyperlink to the text/html documentation for the Resource. This is set in the chef-repo in the apps data bag.
the ApiUser who created this Service.
the ApiUser who last updated this Service.

GET self

Retrieves a Service resource.

The operation was successful.

GET /v1/services

Returns a collection of Services. The basic URL returns all Services in the system. You can add query arguments to the basic URL to perform matches and substring searches, and you can also group on a property.

You can match on the following property:

  • name

The following returns all Services whose name property is media:

GET /v1/services?name=media

You can also search on substrings in description by using search, for instance:

GET /v1/services?search=Groups

Pagination can also be performed using page:

GET /v1/services?page=3

The first page is 0. Page size defaults to 25, but can be changed using page_size:

GET /v1/services?page=0&page_size=100
The operation was successful. The collection is returned as a JSON array in the response body.