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=70389d9e-6638-49cd-86df-de7b4ddd4c39@https://iam-test.indigo-datacloud.eu/' -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:
|
Example request
$ curl 'http://localhost:8080/deployments?createdBy=70389d9e-6638-49cd-86df-de7b4ddd4c39@https://iam-test.indigo-datacloud.eu/' -i -H 'Accept: application/json' -H 'Authorization: Bearer <access token>'
GET /deployments?createdBy=70389d9e-6638-49cd-86df-de7b4ddd4c39@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 |
|
|
Creation date-time (http://xml2rfc.ietf.org/public/rfc/html/rfc3339.html#anchor14) |
|
|
Update date-time |
|
|
The status of the deployment. (../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 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: 1956
{
"links" : [ {
"rel" : "self",
"href" : "http://localhost:8080/deployments?createdBy=70389d9e-6638-49cd-86df-de7b4ddd4c39@https://iam-test.indigo-datacloud.eu/{&userGroup}"
} ],
"content" : [ {
"uuid" : "edb9dd7d-9f7a-4fe5-9ec8-184e1cdd7379",
"creationTime" : "2021-08-24T18:15+0000",
"updateTime" : "2021-08-24T18:15+0000",
"status" : "CREATE_FAILED",
"statusReason" : "Some reason",
"outputs" : { },
"task" : "NONE",
"callback" : "http://localhost",
"createdBy" : {
"issuer" : "https://iam-test.indigo-datacloud.eu/",
"subject" : "70389d9e-6638-49cd-86df-de7b4ddd4c39"
},
"links" : [ {
"rel" : "self",
"href" : "http://localhost:8080/deployments/edb9dd7d-9f7a-4fe5-9ec8-184e1cdd7379"
}, {
"rel" : "resources",
"href" : "http://localhost:8080/deployments/edb9dd7d-9f7a-4fe5-9ec8-184e1cdd7379/resources"
}, {
"rel" : "template",
"href" : "http://localhost:8080/deployments/edb9dd7d-9f7a-4fe5-9ec8-184e1cdd7379/template"
} ]
}, {
"uuid" : "dba8cd46-ea2d-4dfa-9559-70cc5bb75840",
"creationTime" : "2021-08-24T18:15+0000",
"updateTime" : "2021-08-24T18:15+0000",
"status" : "CREATE_COMPLETE",
"outputs" : { },
"task" : "NONE",
"callback" : "http://localhost",
"createdBy" : {
"issuer" : "https://iam-test.indigo-datacloud.eu/",
"subject" : "70389d9e-6638-49cd-86df-de7b4ddd4c39"
},
"links" : [ {
"rel" : "self",
"href" : "http://localhost:8080/deployments/dba8cd46-ea2d-4dfa-9559-70cc5bb75840"
}, {
"rel" : "resources",
"href" : "http://localhost:8080/deployments/dba8cd46-ea2d-4dfa-9559-70cc5bb75840/resources"
}, {
"rel" : "template",
"href" : "http://localhost:8080/deployments/dba8cd46-ea2d-4dfa-9559-70cc5bb75840/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 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
}'
POST /deployments 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
}
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 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: 644
{
"uuid" : "66712bbd-b542-4156-92db-c7b1625daefc",
"creationTime" : "2021-08-24T18:15+0000",
"updateTime" : "2021-08-24T18:15+0000",
"status" : "CREATE_IN_PROGRESS",
"outputs" : { },
"task" : "NONE",
"callback" : "http://localhost:8080/callback",
"links" : [ {
"rel" : "self",
"href" : "http://localhost:8080/deployments/66712bbd-b542-4156-92db-c7b1625daefc"
}, {
"rel" : "resources",
"href" : "http://localhost:8080/deployments/66712bbd-b542-4156-92db-c7b1625daefc/resources"
}, {
"rel" : "template",
"href" : "http://localhost:8080/deployments/66712bbd-b542-4156-92db-c7b1625daefc/template"
} ]
}
Get deployment
A GET
request is used to retrieve the deployment from the id.
Example request
$ curl 'http://localhost:8080/deployments/mmd34483-d937-4578-bfdb-ebe196bf82dd' -i -H 'Authorization: Bearer <access token>'
GET /deployments/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 |
|
|
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 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: 690
{
"uuid" : "mmd34483-d937-4578-bfdb-ebe196bf82dd",
"creationTime" : "2021-08-24T18:15+0000",
"updateTime" : "2021-08-24T18:15+0000",
"status" : "CREATE_FAILED",
"statusReason" : "Some reason",
"outputs" : {
"server_ip" : "10.0.0.1"
},
"task" : "NONE",
"callback" : "http://localhost",
"links" : [ {
"rel" : "self",
"href" : "http://localhost:8080/deployments/mmd34483-d937-4578-bfdb-ebe196bf82dd"
}, {
"rel" : "resources",
"href" : "http://localhost:8080/deployments/mmd34483-d937-4578-bfdb-ebe196bf82dd/resources"
}, {
"rel" : "template",
"href" : "http://localhost:8080/deployments/mmd34483-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/mmd34483-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/mmd34483-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
Delete deployment
A DELETE
request is used to delete the deployment from the id.
Example request
$ curl 'http://localhost:8080/deployments/mmd34483-d937-4578-bfdb-ebe196bf82dd' -i -X DELETE -H 'Authorization: Bearer <access token>'
DELETE /deployments/mmd34483-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/mmd34483-d937-4578-bfdb-ebe196bf82dd/extrainfo' -i -H 'Authorization: Bearer <access token>'
GET /deployments/mmd34483-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/mmd34483-d937-4578-bfdb-ebe196bf82dd/log' -i -H 'Authorization: Bearer <access token>'
GET /deployments/mmd34483-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/ba95bcbb-149b-41c2-bd25-52a22e3ff498/template' -i -H 'Authorization: Bearer <access token>'
GET /deployments/ba95bcbb-149b-41c2-bd25-52a22e3ff498/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/9df1e4c0-3114-47cc-ba5f-92b2b7dfdc8b/resources' -i -H 'Accept: application/json' -H 'Authorization: Bearer <access token>'
GET /deployments/9df1e4c0-3114-47cc-ba5f-92b2b7dfdc8b/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/9df1e4c0-3114-47cc-ba5f-92b2b7dfdc8b/resources?page=0&size=10&sort=createdAt,desc"
} ],
"content" : [ {
"uuid" : "5700159c-ac49-424b-b15f-4ad753c4113f",
"creationTime" : "2021-08-24T18:15+0000",
"updateTime" : "2021-08-24T18:15+0000",
"physicalId" : "0",
"state" : "CREATING",
"toscaNodeType" : "tosca.nodes.Compute",
"toscaNodeName" : "node_0",
"requiredBy" : [ ],
"links" : [ {
"rel" : "deployment",
"href" : "http://localhost:8080/deployments/9df1e4c0-3114-47cc-ba5f-92b2b7dfdc8b"
}, {
"rel" : "self",
"href" : "http://localhost:8080/deployments/9df1e4c0-3114-47cc-ba5f-92b2b7dfdc8b/resources/5700159c-ac49-424b-b15f-4ad753c4113f"
} ]
}, {
"uuid" : "b247bc5a-877a-4528-a058-06a82b7f7ae9",
"creationTime" : "2021-08-24T18:15+0000",
"updateTime" : "2021-08-24T18:15+0000",
"physicalId" : "1",
"state" : "CREATING",
"toscaNodeType" : "tosca.nodes.Compute",
"toscaNodeName" : "node_1",
"requiredBy" : [ ],
"links" : [ {
"rel" : "deployment",
"href" : "http://localhost:8080/deployments/9df1e4c0-3114-47cc-ba5f-92b2b7dfdc8b"
}, {
"rel" : "self",
"href" : "http://localhost:8080/deployments/9df1e4c0-3114-47cc-ba5f-92b2b7dfdc8b/resources/b247bc5a-877a-4528-a058-06a82b7f7ae9"
} ]
} ],
"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/67c3dfd2-b9a9-48f9-9c62-cfd9b1dcce9c/resources/7528379b-969e-47f2-9ca1-2b6374e5e91b' -i -H 'Authorization: Bearer <access token>'
GET /deployments/67c3dfd2-b9a9-48f9-9c62-cfd9b1dcce9c/resources/7528379b-969e-47f2-9ca1-2b6374e5e91b 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" : "7528379b-969e-47f2-9ca1-2b6374e5e91b",
"creationTime" : "2021-08-24T18:15+0000",
"updateTime" : "2021-08-24T18:15+0000",
"physicalId" : "a675f624-7014-4ad0-a3da-1ec05afa7a6d",
"state" : "CREATING",
"toscaNodeType" : "tosca.nodes.Compute",
"toscaNodeName" : "node_a675f624-7014-4ad0-a3da-1ec05afa7a6d",
"requiredBy" : [ ],
"links" : [ {
"rel" : "deployment",
"href" : "http://localhost:8080/deployments/67c3dfd2-b9a9-48f9-9c62-cfd9b1dcce9c"
}, {
"rel" : "self",
"href" : "http://localhost:8080/deployments/67c3dfd2-b9a9-48f9-9c62-cfd9b1dcce9c/resources/7528379b-969e-47f2-9ca1-2b6374e5e91b"
} ]
}
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=e56142e2-2c9d-4055-a315-4f6993109b90@https://iam-test.indigo-datacloud.eu/' -i -H 'Accept: application/json' -H 'Authorization: Bearer <access token>'
GET /schedules?createdBy=e56142e2-2c9d-4055-a315-4f6993109b90@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=e56142e2-2c9d-4055-a315-4f6993109b90@https://iam-test.indigo-datacloud.eu/"
} ],
"content" : [ {
"uuid" : "7793701f-fc8b-4ebc-9e7a-ed242dd7ecb8",
"creationTime" : "2021-08-24T18:15+0000",
"updateTime" : "2021-08-24T18:15+0000",
"status" : "RUNNING",
"replicationExpression" : "RSE_RECAS",
"fileExpression" : "scope:name*",
"callback" : "http://localhost",
"numberOfReplicas" : 1,
"createdBy" : {
"issuer" : "https://iam-test.indigo-datacloud.eu/",
"subject" : "e56142e2-2c9d-4055-a315-4f6993109b90"
},
"links" : [ {
"rel" : "self",
"href" : "http://localhost:8080/schedules/7793701f-fc8b-4ebc-9e7a-ed242dd7ecb8"
} ]
}, {
"uuid" : "31d09261-e369-44ed-b29e-8372bd78a9d7",
"creationTime" : "2021-08-24T18:15+0000",
"updateTime" : "2021-08-24T18:15+0000",
"status" : "SUSPENDED",
"replicationExpression" : "RSE_RECAS",
"fileExpression" : "scope:name*",
"callback" : "http://localhost",
"numberOfReplicas" : 1,
"createdBy" : {
"issuer" : "https://iam-test.indigo-datacloud.eu/",
"subject" : "e56142e2-2c9d-4055-a315-4f6993109b90"
},
"links" : [ {
"rel" : "self",
"href" : "http://localhost:8080/schedules/31d09261-e369-44ed-b29e-8372bd78a9d7"
} ]
} ],
"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" : "c1d125da-9dc5-47c9-a436-5b276c35f543",
"creationTime" : "2021-08-24T18:15+0000",
"updateTime" : "2021-08-24T18:15+0000",
"status" : "RUNNING",
"replicationExpression" : "RSE_RECAS",
"fileExpression" : "scope:name*",
"callback" : "http://localhost:8080/callback",
"numberOfReplicas" : 1,
"links" : [ {
"rel" : "self",
"href" : "http://localhost:8080/schedules/c1d125da-9dc5-47c9-a436-5b276c35f543"
} ]
}
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" : "2021-08-24T18:15+0000",
"updateTime" : "2021-08-24T18:15+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" : "5d6e3b3c-2104-45bc-ae4c-2df8e26b7ff1",
"creationTime" : "2021-08-24T18:15+0000",
"updateTime" : "2021-08-24T18:15+0000",
"deployment" : {
"uuid" : "42c921b3-8fe3-4d57-bcf2-5de05fde9df0",
"creationTime" : "2021-08-24T18:15+0000",
"updateTime" : "2021-08-24T18:15+0000",
"status" : "CREATE_IN_PROGRESS",
"outputs" : { },
"task" : "NONE",
"callback" : "http://localhost",
"links" : [ ]
},
"scope" : "file-scope",
"name" : "file-name",
"replicationStatus" : "REPLICATING",
"links" : [ ]
}, {
"uuid" : "caaa3946-e872-4471-8326-2b23a20b559f",
"creationTime" : "2021-08-24T18:15+0000",
"updateTime" : "2021-08-24T18:15+0000",
"deployment" : {
"uuid" : "6c9ecee9-d458-4c93-b0c0-8a3ebd6be98b",
"creationTime" : "2021-08-24T18:15+0000",
"updateTime" : "2021-08-24T18:15+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
}
}