Overview
HTTP verbs
RESTful notes tries to adhere as closely as possible to standard HTTP and REST conventions in its use of HTTP verbs.
Verb | Usage |
---|---|
|
Used to retrieve a resource |
|
Used to create a new resource |
|
Used to update an existing resource, including partial updates |
|
Used to delete an existing resource |
HTTP status codes
RESTful notes tries to adhere as closely as possible to standard HTTP and REST conventions in its use of HTTP status codes.
Status code | Usage |
---|---|
|
The request completed successfully |
|
A new resource has been created successfully. The resource’s URI is available from response body will include the location of the resource |
|
An update to an existing resource has been accepted successfully |
|
The request has been applied successfully |
|
The request was malformed. The response body will include an error providing further information |
|
The request requires user authentication. The response body and the headers will include an error providing further information |
|
The server understood the request, but is refusing to fulfill it. The response body and the headers will include an error providing further information |
|
The requested resource did not exist |
|
The request generated a conflict. The response body will include an error providing further information |
|
The request generated a server error. The response body will include an error providing further information |
Errors
Whenever an error response (status code >= 400) is returned, the body will contain a JSON object that describes the problem. The error object has the following structure:
Path | Type | Description |
---|---|---|
|
|
The HTTP status code |
|
|
The HTTP status name |
|
|
A displayable message describing the error |
For example, a request that attempts to apply a not existing deployment will produce a
404 Not Found
response:
HTTP/1.1 404 Not Found
Content-Type: application/json;charset=UTF-8
Content-Length: 68
{
"code" : 404,
"title" : "Not Found",
"message" : "Message"
}
Metadata
The Orchestrator adds hypermedia and pagination metadata in the responses.
Hypermedia
The Orchestrator uses hypermedia links (atom link) to other resources in the responses. Atom link element defines a reference from an entry or feed to a Web resource.
Path | Type | Description |
---|---|---|
|
|
means relationship. In this case, it’s a self-referencing hyperlink.More complex systems might include other relationships. |
|
|
Is a complete URL that uniquely defines the resource. |
Links to other resource:
Relation | Description |
---|---|
|
Self-referencing hyperlink |
|
Template reference hyperlink |
|
Resources reference hyperlink |
When the response is paginated, the response can include also this links:
Relation | Description |
---|---|
|
Hyperlink to the first page |
|
Hyperlink to the previous page |
|
Self-referencing hyperlink |
|
Self-referencing hyperlink |
|
Hyperlink to the last page |
Pagination
Rather than return everything from a large result, the Orchestrator response are paginated:
Path | Type | Description |
---|---|---|
|
|
The size of the page |
|
|
The total number of elements |
|
|
The total number of the page |
|
|
The current page |
Authentication
In order to use this APIs the REST client must authenticate via OAuth2 bearer token (RFC 6750)
Example request
$ curl 'http://localhost:8080/deployments?createdBy=03fdbe48-8ddf-4294-8552-56bb275cdc6d@https://iam-test.indigo-datacloud.eu/&userGroup=beta-testers' -i -H 'Accept: application/json' -H 'Authorization: Bearer <access token>'
Authentication header
Name | Description |
---|---|
|
OAuth2 bearer token |
Deployment
This resource represents a TOSCA template deployment.
Get deployments
A GET
request is used to list all the deployments.
Request parameters
Parameter | Description |
---|---|
|
Optional parameter to filter the deployments based on who created them. The following values can be used:
|
|
Optional parameter to filter the deployments based on the user group |
Example request
$ curl 'http://localhost:8080/deployments?createdBy=03fdbe48-8ddf-4294-8552-56bb275cdc6d@https://iam-test.indigo-datacloud.eu/&userGroup=beta-testers' -i -H 'Accept: application/json' -H 'Authorization: Bearer <access token>'
GET /deployments?createdBy=03fdbe48-8ddf-4294-8552-56bb275cdc6d@https://iam-test.indigo-datacloud.eu/&userGroup=beta-testers HTTP/1.1
Accept: application/json
Authorization: Bearer <access token>
Host: localhost:8080
Response structure
Path | Type | Description |
---|---|---|
|
|
The unique identifier of a resource |
|
|
Creation date-time (http://xml2rfc.ietf.org/public/rfc/html/rfc3339.html#anchor14) |
|
|
Update date-time |
|
|
The status of the deployment. (http://indigo-dc.github.io/orchestrator/apidocs/it/reply/orchestrator/enums/Status.html) |
|
|
Verbose explanation of reason that lead to the deployment status (Present only if the deploy is in some error status) |
|
|
The current step of the deployment process. (http://indigo-dc.github.io/orchestrator/apidocs/it/reply/orchestrator/enums/Task.html) |
|
|
The OIDC info of the deployment’s creator. |
|
|
The user group of the deployment. |
|
|
The endpoint used by the orchestrator to notify the progress of the deployment process. |
|
|
The outputs of the TOSCA document |
Example response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 2035
{
"links" : [ {
"rel" : "self",
"href" : "http://localhost:8080/deployments?createdBy=03fdbe48-8ddf-4294-8552-56bb275cdc6d@https://iam-test.indigo-datacloud.eu/&userGroup=beta-testers"
} ],
"content" : [ {
"uuid" : "140455fc-f9ea-45df-93cf-14c30c3f6ecf",
"creationTime" : "2022-01-04T18:28+0000",
"updateTime" : "2022-01-04T18:28+0000",
"status" : "CREATE_FAILED",
"statusReason" : "Some reason",
"outputs" : { },
"task" : "NONE",
"callback" : "http://localhost",
"userGroup" : "beta-testers",
"createdBy" : {
"issuer" : "https://iam-test.indigo-datacloud.eu/",
"subject" : "03fdbe48-8ddf-4294-8552-56bb275cdc6d"
},
"links" : [ {
"rel" : "self",
"href" : "http://localhost:8080/deployments/140455fc-f9ea-45df-93cf-14c30c3f6ecf"
}, {
"rel" : "resources",
"href" : "http://localhost:8080/deployments/140455fc-f9ea-45df-93cf-14c30c3f6ecf/resources"
}, {
"rel" : "template",
"href" : "http://localhost:8080/deployments/140455fc-f9ea-45df-93cf-14c30c3f6ecf/template"
} ]
}, {
"uuid" : "a844dc74-e939-4e63-958e-eff351164141",
"creationTime" : "2022-01-04T18:28+0000",
"updateTime" : "2022-01-04T18:28+0000",
"status" : "CREATE_COMPLETE",
"outputs" : { },
"task" : "NONE",
"callback" : "http://localhost",
"userGroup" : "beta-testers",
"createdBy" : {
"issuer" : "https://iam-test.indigo-datacloud.eu/",
"subject" : "03fdbe48-8ddf-4294-8552-56bb275cdc6d"
},
"links" : [ {
"rel" : "self",
"href" : "http://localhost:8080/deployments/a844dc74-e939-4e63-958e-eff351164141"
}, {
"rel" : "resources",
"href" : "http://localhost:8080/deployments/a844dc74-e939-4e63-958e-eff351164141/resources"
}, {
"rel" : "template",
"href" : "http://localhost:8080/deployments/a844dc74-e939-4e63-958e-eff351164141/template"
} ]
} ],
"page" : {
"size" : 10,
"totalElements" : 2,
"totalPages" : 1,
"number" : 0
}
}
Create deployment
A POST
request is used to create a deployment.
Request Fields
Path | Type | Description |
---|---|---|
|
|
A string containing a TOSCA YAML-formatted template |
|
|
The input parameters of the deployment(Map of String, Object) |
|
|
The user group for which the deployment will be created (Optional, default empty string) |
|
|
The deployment callback URL (optional) |
|
|
The maximum number Cloud providers on which attempt to create the deployment (Optional, default unbounded) |
|
|
Overall timeout value, if provided, must be at least of 1 minute (Optional, default infinite) |
|
|
Provider timeout value, if provided, must be at least of 1 minute and equal or less than timeoutMins (Optional, default 14400 mins |
|
|
Whether the Orchestrator, in case of failure, will keep the resources of the last deploy attempt or not (Optional, default false) |
Example request
$ curl 'http://localhost:8080/deployments' -i -X POST -H 'Content-Type: application/json' -H 'Authorization: Bearer <access token>' -d '{
"template" : "template",
"parameters" : {
"cpus" : 1
},
"callback" : "http://localhost:8080/callback",
"timeoutMins" : 5,
"providerTimeoutMins" : 10,
"maxProvidersRetry" : 1,
"keepLastAttempt" : false,
"userGroup" : "beta-testers"
}'
POST /deployments HTTP/1.1
Content-Type: application/json
Authorization: Bearer <access token>
Host: localhost:8080
Content-Length: 256
{
"template" : "template",
"parameters" : {
"cpus" : 1
},
"callback" : "http://localhost:8080/callback",
"timeoutMins" : 5,
"providerTimeoutMins" : 10,
"maxProvidersRetry" : 1,
"keepLastAttempt" : false,
"userGroup" : "beta-testers"
}
Response structure
Path | Type | Description |
---|---|---|
|
|
The unique identifier of a resource |
|
|
Creation date-time (http://xml2rfc.ietf.org/public/rfc/html/rfc3339.html#anchor14) |
|
|
Update date-time (http://xml2rfc.ietf.org/public/rfc/html/rfc3339.html#anchor14) |
|
|
The user group the deployment has been created for. |
|
|
The status of the deployment. (http://indigo-dc.github.io/orchestrator/apidocs/it/reply/orchestrator/enums/Status.html) |
|
|
The current step of the deployment process. (http://indigo-dc.github.io/orchestrator/apidocs/it/reply/orchestrator/enums/Task.html) |
|
|
The outputs of the TOSCA document |
|
|
The endpoint used by the orchestrator to notify the progress of the deployment process. |
Example response
HTTP/1.1 201 Created
Content-Type: application/json;charset=UTF-8
Content-Length: 676
{
"uuid" : "c1f71da4-bb37-4c11-8432-531f6b859eab",
"creationTime" : "2022-01-04T18:28+0000",
"updateTime" : "2022-01-04T18:28+0000",
"status" : "CREATE_IN_PROGRESS",
"outputs" : { },
"task" : "NONE",
"callback" : "http://localhost:8080/callback",
"userGroup" : "beta-testers",
"links" : [ {
"rel" : "self",
"href" : "http://localhost:8080/deployments/c1f71da4-bb37-4c11-8432-531f6b859eab"
}, {
"rel" : "resources",
"href" : "http://localhost:8080/deployments/c1f71da4-bb37-4c11-8432-531f6b859eab/resources"
}, {
"rel" : "template",
"href" : "http://localhost:8080/deployments/c1f71da4-bb37-4c11-8432-531f6b859eab/template"
} ]
}
Get deployment
A GET
request is used to retrieve the deployment from the id.
Example request
$ curl 'http://localhost:8080/deployments/34483-d937-4578-bfdb-ebe196bf82dd' -i -H 'Authorization: Bearer <access token>'
GET /deployments/34483-d937-4578-bfdb-ebe196bf82dd HTTP/1.1
Authorization: Bearer <access token>
Host: localhost:8080
Response structure
Path | Type | Description |
---|---|---|
|
|
The unique identifier of a resource |
|
|
Creation date-time (http://xml2rfc.ietf.org/public/rfc/html/rfc3339.html#anchor14) |
|
|
Update date-time |
|
|
The status of the deployment. (http://indigo-dc.github.io/orchestrator/apidocs/it/reply/orchestrator/enums/Status.html) |
|
|
Verbose explanation of reason that lead to the deployment status (Present only if the deploy is in some error status) |
|
|
The user group the deployment was created for (as specified at creation time). |
|
|
The current step of the deployment process. (http://indigo-dc.github.io/orchestrator/apidocs/it/reply/orchestrator/enums/Task.html) |
|
|
The endpoint used by the orchestrator to notify the progress of the deployment process. |
|
|
The outputs of the TOSCA document |
Example response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 710
{
"uuid" : "34483-d937-4578-bfdb-ebe196bf82dd",
"creationTime" : "2022-01-04T18:28+0000",
"updateTime" : "2022-01-04T18:28+0000",
"status" : "CREATE_FAILED",
"statusReason" : "Some reason",
"outputs" : {
"server_ip" : "10.0.0.1"
},
"task" : "NONE",
"callback" : "http://localhost",
"userGroup" : "beta-testers",
"links" : [ {
"rel" : "self",
"href" : "http://localhost:8080/deployments/34483-d937-4578-bfdb-ebe196bf82dd"
}, {
"rel" : "resources",
"href" : "http://localhost:8080/deployments/34483-d937-4578-bfdb-ebe196bf82dd/resources"
}, {
"rel" : "template",
"href" : "http://localhost:8080/deployments/34483-d937-4578-bfdb-ebe196bf82dd/template"
} ]
}
Update deployment
A PUT
request is used to update the deployment from the id.
Example request
$ curl 'http://localhost:8080/deployments/34483-d937-4578-bfdb-ebe196bf82dd' -i -X PUT -H 'Content-Type: application/json' -H 'Authorization: Bearer <access token>' -d '{
"template" : "template",
"parameters" : {
"cpus" : 1
},
"callback" : "http://localhost:8080/callback",
"timeoutMins" : 5,
"providerTimeoutMins" : 10,
"maxProvidersRetry" : 1,
"keepLastAttempt" : false
}'
PUT /deployments/34483-d937-4578-bfdb-ebe196bf82dd HTTP/1.1
Content-Type: application/json
Authorization: Bearer <access token>
Host: localhost:8080
Content-Length: 224
{
"template" : "template",
"parameters" : {
"cpus" : 1
},
"callback" : "http://localhost:8080/callback",
"timeoutMins" : 5,
"providerTimeoutMins" : 10,
"maxProvidersRetry" : 1,
"keepLastAttempt" : false
}
Example response
HTTP/1.1 202 Accepted
Reset deployment
A PATCH
request is used to reset the deployment state given the deployment id.
Usage tips: If a deployment remains stuck in DELETE_IN_PROGRESS, you can use this PATCH request to manually reset the state of the deployment to the DELETE_FAILED state. You can then try to delete the deployment again.
Request Fields
Path | Type | Description |
---|---|---|
|
|
State of the deployment to be set forcefully. Allowed values: DELETE_FAILED |
Example request
$ curl 'http://localhost:8080/deployments/34483-d937-4578-bfdb-ebe196bf82dd' -i -X PATCH -H 'Content-Type: application/json' -H 'Authorization: Bearer <access token>' -d '{
"status" : "DELETE_FAILED"
}'
PATCH /deployments/34483-d937-4578-bfdb-ebe196bf82dd HTTP/1.1
Content-Type: application/json
Authorization: Bearer <access token>
Host: localhost:8080
Content-Length: 32
{
"status" : "DELETE_FAILED"
}
Example response
HTTP/1.1 204 No Content
Delete deployment
A DELETE
request is used to delete the deployment from the id.
Example request
$ curl 'http://localhost:8080/deployments/34483-d937-4578-bfdb-ebe196bf82dd' -i -X DELETE -H 'Authorization: Bearer <access token>'
DELETE /deployments/34483-d937-4578-bfdb-ebe196bf82dd HTTP/1.1
Authorization: Bearer <access token>
Host: localhost:8080
Example response
HTTP/1.1 204 No Content
Get deployment extended info
A GET
request is used to retrieve the extended informations associated to a deployment.
This may be VM information for cloud deployments or JOB information for QCG
Example request
$ curl 'http://localhost:8080/deployments/34483-d937-4578-bfdb-ebe196bf82dd/extrainfo' -i -H 'Authorization: Bearer <access token>'
GET /deployments/34483-d937-4578-bfdb-ebe196bf82dd/extrainfo HTTP/1.1
Authorization: Bearer <access token>
Host: localhost:8080
Example response
HTTP/1.1 200 OK
Content-Type: text/plain;charset=UTF-8
Content-Length: 1092
{
"vmProperties" : [ {
"class" : "network",
"id" : "pub_network",
"outbound" : "yes",
"provider_id" : "external"
}, {
"class" : "network",
"id" : "priv_network",
"provider_id" : "provider-2099"
}, {
"class" : "system",
"id" : "simple_node1",
"instance_name" : "simple_node1-158799480931",
"disk.0.os.flavour" : "ubuntu",
"disk.0.image.url" : "ost://api.cloud.test.com/f46f7387-a371-44ec-9a2d-16a8f2a85786",
"cpu.count" : 1,
"memory.size" : 2097152000,
"instance_type" : "m1.small",
"net_interface.1.connection" : "pub_network",
"net_interface.0.connection" : "priv_network",
"cpu.arch" : "x86_64",
"disk.0.free_size" : 10737418240,
"disk.0.os.credentials.username" : "cloudadm",
"provider.type" : "OpenStack",
"provider.host" : "api.cloud.test.com",
"provider.port" : 5000,
"disk.0.os.credentials.private_key" : "",
"state" : "configured",
"instance_id" : "11d647dc-97f1-4347-8ede-ec83e2b64976",
"net_interface.0.ip" : "192.168.1.1",
"net_interface.1.ip" : "1.2.3.4"
} ]
}
Get deployment log
A GET
request is used to retrieve the infrastructure log associated to a deployment.
Example request
$ curl 'http://localhost:8080/deployments/34483-d937-4578-bfdb-ebe196bf82dd/log' -i -H 'Authorization: Bearer <access token>'
GET /deployments/34483-d937-4578-bfdb-ebe196bf82dd/log HTTP/1.1
Authorization: Bearer <access token>
Host: localhost:8080
Example response
HTTP/1.1 200 OK
Content-Type: text/plain;charset=UTF-8
Content-Length: 14
deployment log
Get template
A GET
request is used to retrieve the template associated to a deployment.
Example request
$ curl 'http://localhost:8080/deployments/cfac041e-d5e0-4c8a-a6cc-4415e90e486b/template' -i -H 'Authorization: Bearer <access token>'
GET /deployments/cfac041e-d5e0-4c8a-a6cc-4415e90e486b/template HTTP/1.1
Authorization: Bearer <access token>
Host: localhost:8080
Example response
HTTP/1.1 200 OK
Content-Type: text/plain;charset=UTF-8
Content-Length: 1267
tosca_definitions_version: tosca_simple_yaml_1_0
repositories:
indigo_repository:
description: INDIGO Custom types repository
url: https://raw.githubusercontent.com/indigo-dc/tosca-types/master/
imports:
- indigo_custom_types:
file: custom_types.yaml
repository: indigo_repository
description: >
TOSCA test for launching a Galaxy Server also configuring the bowtie2
tool using Galaxy Tool Shed.
topology_template:
node_templates:
bowtie2_galaxy_tool:
type: tosca.nodes.indigo.GalaxyShedTool
properties:
name: bowtie2
owner: devteam
tool_panel_section_id: ngs_mapping
requirements:
- host: galaxy
galaxy:
type: tosca.nodes.indigo.GalaxyPortal
requirements:
- lrms: local_lrms
local_lrms:
type: tosca.nodes.indigo.LRMS.FrontEnd.Local
requirements:
- host: galaxy_server
galaxy_server:
type: tosca.nodes.indigo.Compute
properties:
public_ip: yes
capabilities:
host:
properties:
num_cpus: 1
mem_size: 1 GB
os:
properties:
type: linux
outputs:
galaxy_url:
value: { get_attribute: [ galaxy_server, public_address ] }
Resource
This REST resource represents a TOSCA node of the template.
Get Resources
A GET
request is used to list all the resources of a deployment.
Example request
$ curl 'http://localhost:8080/deployments/271e3298-a438-4039-af4f-d4daa5d1047c/resources' -i -H 'Accept: application/json' -H 'Authorization: Bearer <access token>'
GET /deployments/271e3298-a438-4039-af4f-d4daa5d1047c/resources HTTP/1.1
Accept: application/json
Authorization: Bearer <access token>
Host: localhost:8080
Response structure
Path | Type | Description |
---|---|---|
|
|
The unique identifier of a resource |
|
|
Creation date-time (http://xml2rfc.ietf.org/public/rfc/html/rfc3339.html#anchor14) |
|
|
Update date-time (http://xml2rfc.ietf.org/public/rfc/html/rfc3339.html#anchor14) |
|
|
The status of the resource. (http://indigo-dc.github.io/orchestrator/apidocs/it/reply/orchestrator/enums/NodeStates.html) |
|
|
The type of the represented TOSCA node |
|
|
The name of the represented TOSCA node |
|
|
The Infrastructure ID of the object |
|
|
A list of nodes that require this resource |
Example response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 1511
{
"links" : [ {
"rel" : "self",
"href" : "http://localhost:8080/deployments/271e3298-a438-4039-af4f-d4daa5d1047c/resources?page=0&size=10&sort=createdAt,desc"
} ],
"content" : [ {
"uuid" : "cf01d95c-4656-4c5e-a8cc-f9ca8e7a8edc",
"creationTime" : "2022-01-04T18:28+0000",
"updateTime" : "2022-01-04T18:28+0000",
"physicalId" : "0",
"state" : "CREATING",
"toscaNodeType" : "tosca.nodes.Compute",
"toscaNodeName" : "node_0",
"requiredBy" : [ ],
"links" : [ {
"rel" : "deployment",
"href" : "http://localhost:8080/deployments/271e3298-a438-4039-af4f-d4daa5d1047c"
}, {
"rel" : "self",
"href" : "http://localhost:8080/deployments/271e3298-a438-4039-af4f-d4daa5d1047c/resources/cf01d95c-4656-4c5e-a8cc-f9ca8e7a8edc"
} ]
}, {
"uuid" : "07c8704c-9a2a-4e9d-910e-8719a4b94f3a",
"creationTime" : "2022-01-04T18:28+0000",
"updateTime" : "2022-01-04T18:28+0000",
"physicalId" : "1",
"state" : "CREATING",
"toscaNodeType" : "tosca.nodes.Compute",
"toscaNodeName" : "node_1",
"requiredBy" : [ ],
"links" : [ {
"rel" : "deployment",
"href" : "http://localhost:8080/deployments/271e3298-a438-4039-af4f-d4daa5d1047c"
}, {
"rel" : "self",
"href" : "http://localhost:8080/deployments/271e3298-a438-4039-af4f-d4daa5d1047c/resources/07c8704c-9a2a-4e9d-910e-8719a4b94f3a"
} ]
} ],
"page" : {
"size" : 10,
"totalElements" : 2,
"totalPages" : 1,
"number" : 0
}
}
Get resource
A GET
request is used to retrieve the resource from the id.
Example request
$ curl 'http://localhost:8080/deployments/97b0792d-4e77-488f-a496-dedd8c76a5b7/resources/4e5d7334-9ec7-4071-b408-2e6c336de5d6' -i -H 'Authorization: Bearer <access token>'
GET /deployments/97b0792d-4e77-488f-a496-dedd8c76a5b7/resources/4e5d7334-9ec7-4071-b408-2e6c336de5d6 HTTP/1.1
Authorization: Bearer <access token>
Host: localhost:8080
Response structure
Path | Type | Description |
---|---|---|
|
|
The unique identifier of a resource |
|
|
Creation date-time (http://xml2rfc.ietf.org/public/rfc/html/rfc3339.html#anchor14) |
|
|
Update date-time (http://xml2rfc.ietf.org/public/rfc/html/rfc3339.html#anchor14) |
|
|
The status of the resource. (http://indigo-dc.github.io/orchestrator/apidocs/it/reply/orchestrator/enums/NodeStates.html) |
|
|
The type of the represented TOSCA node |
|
|
The name of the represented TOSCA node |
|
|
The Infrastructure ID of the object |
|
|
A list of nodes that require this resource |
Example response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 645
{
"uuid" : "4e5d7334-9ec7-4071-b408-2e6c336de5d6",
"creationTime" : "2022-01-04T18:28+0000",
"updateTime" : "2022-01-04T18:28+0000",
"physicalId" : "9b4e0ef0-8407-4030-8394-62e842c1ef18",
"state" : "CREATING",
"toscaNodeType" : "tosca.nodes.Compute",
"toscaNodeName" : "node_9b4e0ef0-8407-4030-8394-62e842c1ef18",
"requiredBy" : [ ],
"links" : [ {
"rel" : "deployment",
"href" : "http://localhost:8080/deployments/97b0792d-4e77-488f-a496-dedd8c76a5b7"
}, {
"rel" : "self",
"href" : "http://localhost:8080/deployments/97b0792d-4e77-488f-a496-dedd8c76a5b7/resources/4e5d7334-9ec7-4071-b408-2e6c336de5d6"
} ]
}
Configuration
This REST resource represents a TOSCA node of the template.
Get configuration
A GET
request is used to retrieve the endpoints of the services used by the Orchestrator.
Example request
$ curl 'http://localhost:8080/configuration' -i -H 'Accept: application/json'
GET /configuration HTTP/1.1
Accept: application/json
Host: localhost:8080
Response structure
Path | Type | Description |
---|---|---|
|
|
The URI of the Cloud Provider Ranker |
|
|
The URI of the SLAM (Service Level Agreement Manager) |
|
|
The URI of the CMDB (Change Management DataBase) |
|
|
The URI of the IM (Infrastructure Manager) |
|
|
The URI of the Monitoring Service |
|
|
The URI of the Vault Server (optional) |
Example response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 342
{
"cpr_url" : "http://deep-cpr.test.infn.it:8080",
"slam_url" : "https://deep-slam.test.infn.it:8443/rest/slam",
"cmdb_url" : "https://deep-paas-dev.test.infn.it/cmdb",
"im_url" : "https://deep-paas.test.infn.it/im",
"monitoring_url" : "https://deep-paas.test.infn.it/monitoring",
"vault_url" : "https://vault.test.infn.it:8200"
}
Deployment Schedules
This REST resource represents a deployment Schedule.
Get deployment schedules
A GET
request is used to list all the deployment schedules.
Request parameters
Parameter | Description |
---|---|
|
Optional parameter to filter the deployments based on who created them. The following values can be used:
|
Example request
$ curl 'http://localhost:8080/schedules?createdBy=93485fc3-5773-49aa-96de-b7962a54270b@https://iam-test.indigo-datacloud.eu/' -i -H 'Accept: application/json' -H 'Authorization: Bearer <access token>'
GET /schedules?createdBy=93485fc3-5773-49aa-96de-b7962a54270b@https://iam-test.indigo-datacloud.eu/ HTTP/1.1
Accept: application/json
Authorization: Bearer <access token>
Host: localhost:8080
Response structure
Path | Type | Description |
---|---|---|
|
|
The unique identifier of a resource |
|
|
The replication expression of the main replication rule |
|
|
The file expression to match newly created files |
|
|
The number of replicas of the main replication rule |
|
|
Creation date-time (http://xml2rfc.ietf.org/public/rfc/html/rfc3339.html#anchor14) |
|
|
Update date-time |
|
|
The status of the deployment schedule. (http://indigo-dc.github.io/orchestrator/apidocs/it/reply/orchestrator/enums/DeploymentScheduleStatus.html) |
|
|
The OIDC info of the deployment schedule’s creator. |
|
|
The endpoint used by the orchestrator to notify the progress of the deployment schedule event process. |
Example response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 1492
{
"links" : [ {
"rel" : "self",
"href" : "http://localhost:8080/schedules?createdBy=93485fc3-5773-49aa-96de-b7962a54270b@https://iam-test.indigo-datacloud.eu/"
} ],
"content" : [ {
"uuid" : "41efc593-ec7d-4084-81ac-cd96f8b3e809",
"creationTime" : "2022-01-04T18:28+0000",
"updateTime" : "2022-01-04T18:28+0000",
"status" : "RUNNING",
"replicationExpression" : "RSE_RECAS",
"fileExpression" : "scope:name*",
"callback" : "http://localhost",
"numberOfReplicas" : 1,
"createdBy" : {
"issuer" : "https://iam-test.indigo-datacloud.eu/",
"subject" : "93485fc3-5773-49aa-96de-b7962a54270b"
},
"links" : [ {
"rel" : "self",
"href" : "http://localhost:8080/schedules/41efc593-ec7d-4084-81ac-cd96f8b3e809"
} ]
}, {
"uuid" : "79b0c766-b0bc-4f09-996d-a1bd35c9c239",
"creationTime" : "2022-01-04T18:28+0000",
"updateTime" : "2022-01-04T18:28+0000",
"status" : "SUSPENDED",
"replicationExpression" : "RSE_RECAS",
"fileExpression" : "scope:name*",
"callback" : "http://localhost",
"numberOfReplicas" : 1,
"createdBy" : {
"issuer" : "https://iam-test.indigo-datacloud.eu/",
"subject" : "93485fc3-5773-49aa-96de-b7962a54270b"
},
"links" : [ {
"rel" : "self",
"href" : "http://localhost:8080/schedules/79b0c766-b0bc-4f09-996d-a1bd35c9c239"
} ]
} ],
"page" : {
"size" : 10,
"totalElements" : 2,
"totalPages" : 1,
"number" : 0
}
}
Create deployment schedule
A POST
request is used to create a deployment schedule.
Request Fields
Path | Type | Description |
---|---|---|
|
|
A string containing a TOSCA YAML-formatted template |
|
|
The input parameters of the deployment(Map of String, Object) |
|
|
The deployment callback URL (optional) |
|
|
The maximum number Cloud providers on which attempt to create the deployment (Optional, default unbounded) |
|
|
Overall timeout value, if provided, must be at least of 1 minute (Optional, default infinite) |
|
|
Provider timeout value, if provided, must be at least of 1 minute and equal or less than timeoutMins (Optional, default 14400 mins |
|
|
Whether the Orchestrator, in case of failure, will keep the resources of the last deploy attempt or not (Optional, default false) |
|
|
The replication expression of the main replication rule |
|
|
The file expression to match newly created files |
|
|
The number of replicas of the main replication rule |
Example request
$ curl 'http://localhost:8080/schedules' -i -X POST -H 'Content-Type: application/json' -H 'Authorization: Bearer <access token>' -d '{
"template" : "template",
"parameters" : {
"cpus" : 1
},
"callback" : "http://localhost:8080/callback",
"timeoutMins" : 5,
"providerTimeoutMins" : 10,
"maxProvidersRetry" : 1,
"keepLastAttempt" : false,
"fileExpression" : "scope:name*",
"replicationExpression" : "RSE_RECAS",
"numberOfReplicas" : 1
}'
POST /schedules HTTP/1.1
Content-Type: application/json
Authorization: Bearer <access token>
Host: localhost:8080
Content-Length: 327
{
"template" : "template",
"parameters" : {
"cpus" : 1
},
"callback" : "http://localhost:8080/callback",
"timeoutMins" : 5,
"providerTimeoutMins" : 10,
"maxProvidersRetry" : 1,
"keepLastAttempt" : false,
"fileExpression" : "scope:name*",
"replicationExpression" : "RSE_RECAS",
"numberOfReplicas" : 1
}
Response structure
Path | Type | Description |
---|---|---|
|
|
The replication expression of the main replication rule |
|
|
The file expression to match newly created files |
|
|
The number of replicas of the main replication rule |
|
|
The unique identifier of a resource |
|
|
Creation date-time (http://xml2rfc.ietf.org/public/rfc/html/rfc3339.html#anchor14) |
|
|
Update date-time (http://xml2rfc.ietf.org/public/rfc/html/rfc3339.html#anchor14) |
|
|
The status of the deployment. (http://indigo-dc.github.io/orchestrator/apidocs/it/reply/orchestrator/enums/Status.html) |
|
|
The endpoint used by the orchestrator to notify the progress of the deployment process. |
Example response
HTTP/1.1 201 Created
Content-Type: application/json;charset=UTF-8
Content-Length: 442
{
"uuid" : "d75f5b2a-a893-47f4-a559-7e27cf52ed03",
"creationTime" : "2022-01-04T18:28+0000",
"updateTime" : "2022-01-04T18:28+0000",
"status" : "RUNNING",
"replicationExpression" : "RSE_RECAS",
"fileExpression" : "scope:name*",
"callback" : "http://localhost:8080/callback",
"numberOfReplicas" : 1,
"links" : [ {
"rel" : "self",
"href" : "http://localhost:8080/schedules/d75f5b2a-a893-47f4-a559-7e27cf52ed03"
} ]
}
Get deployment schedule
A GET
request is used to retrieve a deployment schedule from the id.
Example request
$ curl 'http://localhost:8080/schedules/mmd34483-d937-4578-bfdb-ebe196bf82dd' -i -H 'Authorization: Bearer <access token>'
GET /schedules/mmd34483-d937-4578-bfdb-ebe196bf82dd HTTP/1.1
Authorization: Bearer <access token>
Host: localhost:8080
Response structure
Path | Type | Description |
---|---|---|
|
|
The unique identifier of a resource |
|
|
The replication expression of the main replication rule |
|
|
The file expression to match newly created files |
|
|
The number of replicas of the main replication rule |
|
|
Creation date-time (http://xml2rfc.ietf.org/public/rfc/html/rfc3339.html#anchor14) |
|
|
Update date-time |
|
|
The status of the deployment schedule. (http://indigo-dc.github.io/orchestrator/apidocs/it/reply/orchestrator/enums/DeploymentScheduleStatus.html) |
|
|
The endpoint used by the orchestrator to notify the progress of the deployment schedule event process. |
Example response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 428
{
"uuid" : "mmd34483-d937-4578-bfdb-ebe196bf82dd",
"creationTime" : "2022-01-04T18:28+0000",
"updateTime" : "2022-01-04T18:28+0000",
"status" : "RUNNING",
"replicationExpression" : "RSE_RECAS",
"fileExpression" : "scope:name*",
"callback" : "http://localhost",
"numberOfReplicas" : 1,
"links" : [ {
"rel" : "self",
"href" : "http://localhost:8080/schedules/mmd34483-d937-4578-bfdb-ebe196bf82dd"
} ]
}
Deployment Schedule Event
This REST resource represents a fired event of a deployment schedule.
Get Deployment Schedule Events
A GET
request is used to list all the events of a deployment schedule.
Example request
$ curl 'http://localhost:8080/schedules/mmd34483-d937-4578-bfdb-ebe196bf82dd/events' -i -H 'Authorization: Bearer <access token>'
GET /schedules/mmd34483-d937-4578-bfdb-ebe196bf82dd/events HTTP/1.1
Authorization: Bearer <access token>
Host: localhost:8080
Response structure
Path | Type | Description |
---|---|---|
|
|
The deployment created because of this event |
|
|
The unique identifier of the event |
|
|
Creation date-time (http://xml2rfc.ietf.org/public/rfc/html/rfc3339.html#anchor14) |
|
|
Update date-time (http://xml2rfc.ietf.org/public/rfc/html/rfc3339.html#anchor14) |
|
|
The scope of the file triggering the event |
|
|
The name of the file triggering the event |
|
|
The replication status of the main replication rule |
Example response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 1456
{
"links" : [ {
"rel" : "self",
"href" : "http://localhost:8080/schedules/mmd34483-d937-4578-bfdb-ebe196bf82dd/events?page=0&size=10&sort=createdAt,desc"
} ],
"content" : [ {
"uuid" : "34ba81a5-2758-437a-aee8-eb5bd983db9d",
"creationTime" : "2022-01-04T18:28+0000",
"updateTime" : "2022-01-04T18:28+0000",
"deployment" : {
"uuid" : "9b8aaa5a-0c70-4a3a-beaa-b4c8f3276340",
"creationTime" : "2022-01-04T18:28+0000",
"updateTime" : "2022-01-04T18:28+0000",
"status" : "CREATE_IN_PROGRESS",
"outputs" : { },
"task" : "NONE",
"callback" : "http://localhost",
"links" : [ ]
},
"scope" : "file-scope",
"name" : "file-name",
"replicationStatus" : "REPLICATING",
"links" : [ ]
}, {
"uuid" : "f4a26fbb-9465-4a12-93be-b30556120812",
"creationTime" : "2022-01-04T18:28+0000",
"updateTime" : "2022-01-04T18:28+0000",
"deployment" : {
"uuid" : "01ea281c-ee86-4f3c-a9af-5fa17dd2b57d",
"creationTime" : "2022-01-04T18:28+0000",
"updateTime" : "2022-01-04T18:28+0000",
"status" : "CREATE_IN_PROGRESS",
"outputs" : { },
"task" : "NONE",
"callback" : "http://localhost",
"links" : [ ]
},
"scope" : "file-scope",
"name" : "file-name",
"replicationStatus" : "REPLICATING",
"links" : [ ]
} ],
"page" : {
"size" : 10,
"totalElements" : 2,
"totalPages" : 1,
"number" : 0
}
}