Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:totem/cluster-deployer into feat…
Browse files Browse the repository at this point in the history
…ure_recovery

Conflicts:
	requirements.txt
  • Loading branch information
sukrit007 committed Jul 31, 2015
2 parents e0707ba + b9f76c2 commit 7f41821
Showing 1 changed file with 156 additions and 24 deletions.
180 changes: 156 additions & 24 deletions apiary.apib
Original file line number Diff line number Diff line change
Expand Up @@ -3,44 +3,176 @@ FORMAT: 1A
# cluster-deployer
API For *Totem Cluster Deployer*.

# Group Deployment
Notes related resources of the **Notes API**
# Root API [/]
## Fetch Root API [GET]
+ Request
+ Header

Accept: application/vnd.deployer.root.v1+json
+ Response 200 (application/vnd.deployer.root.v1+json)
+ Header

## Deployment Collection [/deployments]
### List all Deployments [GET]
+ Response 200 (application/json)
Access-Control-Allow-Origin: *
Link: <http://localhost:9000/schemas/root-v1#>; rel="describedBy"

[{
"id": 1, "title": "Jogging in park"
}, {
"id": 2, "title": "Pick-up posters from post-office"
}]
+ Body

{
"version": "0.2.2"
}

+ Schema

{
"$schema": "http://json-schema.org/draft-04/hyper-schema#",
"id": "#root-v1",
"links": [
{
"href": "http://localhost:9000",
"mediaType": "application/vnd.deployer.root-v1+json",
"method": "GET",
"rel": "self"
},
{
"href": "/apps",
"mediaType": "application/vnd.deployer.task.v1+json, application/vnd.deployer.app.version.v1+json",
"method": "POST",
"rel": "app-version-create",
"title": "Deploy new application version"
},
{
"href": "/apps",
"mediaType": "application/vnd.deployer.app.version-list.v1+json",
"method": "POST",
"rel": "app-list",
"title": "Lists deployed applications"
},
{
"href": "/health",
"mediaType": "application/vnd.deployer.health-v1+json",
"method": "GET",
"rel": "health",
"title": "Healthcheck for deployer"
},
{
"href": "/tasks/{task_id}",
"mediaType": "application/vnd.deployer.task.v1+json",
"method": "GET",
"rel": "tasks",
"title": "Gets task status and results"
},
{
"href": "/recovery",
"mediaType": "application/vnd.deployer.health-v1+json",
"method": "post",
"rel": "recovery",
"title": "Provides API for bulk recovery of deployments"
}
],
"properties": {
"version": {
"type": "string"
}
},
"title": "HyperSchema for root API",
"type": "object"
}

## Group Schema
## Schema Collection [/schemas]
### Fetch schema list [GET]
+ Request
+ Header

Accept: application/json
+ Response 200 (application/json)

### Create a Deployment [POST]
+ Request (application/json)
+ Header

{ "title": "Buy cheese and bread for breakfast." }
Access-Control-Allow-Origin: *

+ Response 201 (application/json)
+ Body

{ "id": 3, "title": "Buy cheese and bread for breakfast." }
[
"app-version-v1",
"recovery-v1",
"health-v1",
"root-v1",
"app-version-create-v1"
]

## Note [/notes/{id}]
A single Note object with all its details

## Schema Resource [/schemas/{name}]
+ Parameters
+ id (required, number, `1`) ... Numeric `id` of the Note to perform action with. Has example value.
+ name: root-v1 (required, string) - Schema name

### Retrieve a Note [GET]
+ Response 200 (application/json)
### Fetch schema [GET]
+ Request
+ Header

Accept: application/json

+ Response 200 (application/json)
+ Header

X-My-Header: The Value
Access-Control-Allow-Origin: *

+ Body


{
"$schema": "http://json-schema.org/draft-04/hyper-schema#",
"id": "#root-v1",
"links": [
{
"href": "http://localhost:9000",
"mediaType": "application/vnd.deployer.root-v1+json",
"method": "GET",
"rel": "self"
},
{
"href": "/apps",
"mediaType": "application/vnd.deployer.task.v1+json, application/vnd.deployer.app.version.v1+json",
"method": "POST",
"rel": "app-version-create",
"title": "Deploy new application version"
},
{
"href": "/apps",
"mediaType": "application/vnd.deployer.app.version-list.v1+json",
"method": "POST",
"rel": "app-list",
"title": "Lists deployed applications"
},
{
"href": "/health",
"mediaType": "application/vnd.deployer.health-v1+json",
"method": "GET",
"rel": "health",
"title": "Healthcheck for deployer"
},
{
"href": "/tasks/{task_id}",
"mediaType": "application/vnd.deployer.task.v1+json",
"method": "GET",
"rel": "tasks",
"title": "Gets task status and results"
},
{
"href": "/recovery",
"mediaType": "application/vnd.deployer.health-v1+json",
"method": "post",
"rel": "recovery",
"title": "Provides API for bulk recovery of deployments"
}
],
"properties": {
"version": {
"type": "string"
}
},
"title": "HyperSchema for root API",
"type": "object"
}

{ "id": 2, "title": "Pick-up posters from post-office" }

### Remove a Note [DELETE]
+ Response 204

0 comments on commit 7f41821

Please sign in to comment.