27. Overview

Spring Cloud Skipper provides a REST API that lets you access all aspects of the server. The Spring Cloud Skipper shell is a first-class consumer of the API.

27.1 HTTP Verbs

Spring Cloud Skipper tries to adhere as closely as possible to standard HTTP and REST conventions in its use of HTTP verbs. The following table shows each verb and how Skipper uses it:

VerbUsage

GET

Used to retrieve a resource.

POST

Used to create a new resource.

PUT

Used to update an existing resource, including partial updates. Also used for resources that imply the concept of restarts.

DELETE

Used to delete an existing resource.

27.2 HTTP Status Codes

Skipper adheres as closely as possible to standard HTTP and REST conventions in its use of HTTP status codes. The following table shows each status and its meaning in Skipper:

Status codeUsage

200 OK

The request completed successfully.

201 Created

A new resource has been created successfully. The resource’s URI is available from the response’s Location header.

204 No Content

An update to an existing resource has been applied successfully.

400 Bad Request

The request was malformed. The response body includes an error that provides further information.

404 Not Found

The requested resource does not exist.

27.3 Headers

Every response has the following header(s):

NameDescription

Content-Type

The Content-Type of the payload (for example application/hal+json).

27.4 Errors

PathTypeDescription

error

String

The HTTP error that occurred (for example, Bad Request).

message

String

A description of the cause of the error.

path

String

The path to which the request was made.

status

Number

The HTTP status code (for example 400).

timestamp

Number

The time, in milliseconds, at which the error occurred.

27.5 Hypermedia

Spring Cloud Skipper uses hypermedia. As a result, resources include links to other resources in their responses. More specifically, responses are in Hypertext Application from resource to resource Language (HAL) format. Links can be found beneath the _links key. Consumers of the API should not create URIs themselves. Instead they should use the links in the resources to navigate.