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

GET

Used to retrieve a resource

POST

Used to create a new resource

PUT

Used to update an existing resource, including partial updates

DELETE

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

200 OK

The request completed successfully

201 Created

A new resource has been created successfully. The resource’s URI is available from response body will include the location of the resource

202 Accepted

An update to an existing resource has been accepted successfully

204 No Content

The request has been applied successfully

400 Bad Request

The request was malformed. The response body will include an error providing further information

401 Unauthorized

The request requires user authentication. The response body and the headers will include an error providing further information

403 Forbidden

The server understood the request, but is refusing to fulfill it. The response body and the headers will include an error providing further information

404 Not Found

The requested resource did not exist

409 Conflict

The request generated a conflict. The response body will include an error providing further information

500 Internal Server Error

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

code

Number

The HTTP status code

title

String

The HTTP status name

message

String

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

links[].rel

String

means relationship. In this case, it’s a self-referencing hyperlink.More complex systems might include other relationships.

links[].href

String

Is a complete URL that uniquely defines the resource.

Links to other resource:

Relation Description

self

Self-referencing hyperlink

template

Template reference hyperlink

resources

Resources reference hyperlink

When the response is paginated, the response can include also this links:

Relation Description

first

Hyperlink to the first page

prev

Hyperlink to the previous page

self

Self-referencing hyperlink

next

Self-referencing hyperlink

last

Hyperlink to the last page

Pagination

Rather than return everything from a large result, the Orchestrator response are paginated:

Path Type Description

page.size

Number

The size of the page

page.totalElements

Number

The total number of elements

page.totalPages

Number

The total number of the page

page.number

Number

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=13ef7b33-0caf-4a94-b559-85a931b5d1c5@https://iam-test.indigo-datacloud.eu/&userGroup=beta-testers' -i -H 'Accept: application/json' -H 'Authorization: Bearer <access token>'

Authentication header

Name Description

Authorization

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

createdBy

Optional parameter to filter the deployments based on who created them. The following values can be used:

  • OIDC_subject@OIDC_issuer: to ask for the deployments of a generic user

  • me: shortcut to ask for the deployments created by the user making the request

userGroup

Optional parameter to filter the deployments based on the user group

Example request

$ curl 'http://localhost:8080/deployments?createdBy=13ef7b33-0caf-4a94-b559-85a931b5d1c5@https://iam-test.indigo-datacloud.eu/&userGroup=beta-testers' -i -H 'Accept: application/json' -H 'Authorization: Bearer <access token>'
GET /deployments?createdBy=13ef7b33-0caf-4a94-b559-85a931b5d1c5@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

content[].uuid

String

The unique identifier of a resource

content[].creationTime

String

Creation date-time (http://xml2rfc.ietf.org/public/rfc/html/rfc3339.html#anchor14)

content[].updateTime

String

Update date-time

content[].status

String

The status of the deployment. (http://indigo-dc.github.io/orchestrator/apidocs/it/reply/orchestrator/enums/Status.html)

content[].statusReason

String

Verbose explanation of reason that lead to the deployment status (Present only if the deploy is in some error status)

content[].task

String

The current step of the deployment process. (http://indigo-dc.github.io/orchestrator/apidocs/it/reply/orchestrator/enums/Task.html)

content[].createdBy

Object

The OIDC info of the deployment’s creator.

content[].userGroup

String

The user group of the deployment.

content[].callback

String

The endpoint used by the orchestrator to notify the progress of the deployment process.

content[].outputs

Object

The outputs of the TOSCA document

Example response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 2059

{
  "links" : [ {
    "rel" : "self",
    "href" : "http://localhost:8080/deployments?createdBy=13ef7b33-0caf-4a94-b559-85a931b5d1c5@https://iam-test.indigo-datacloud.eu/&userGroup=beta-testers"
  } ],
  "content" : [ {
    "uuid" : "08bff301-11aa-4203-8da3-3fa00a0c0b7c",
    "creationTime" : "2023-10-27T13:24+0000",
    "updateTime" : "2023-10-27T13:24+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" : "13ef7b33-0caf-4a94-b559-85a931b5d1c5"
    },
    "links" : [ {
      "rel" : "self",
      "href" : "http://localhost:8080/deployments/08bff301-11aa-4203-8da3-3fa00a0c0b7c"
    }, {
      "rel" : "resources",
      "href" : "http://localhost:8080/deployments/08bff301-11aa-4203-8da3-3fa00a0c0b7c/resources?type={type}"
    }, {
      "rel" : "template",
      "href" : "http://localhost:8080/deployments/08bff301-11aa-4203-8da3-3fa00a0c0b7c/template"
    } ]
  }, {
    "uuid" : "1ece901c-4280-4aee-a680-20d33bc1e2cb",
    "creationTime" : "2023-10-27T13:24+0000",
    "updateTime" : "2023-10-27T13:24+0000",
    "status" : "CREATE_COMPLETE",
    "outputs" : { },
    "task" : "NONE",
    "callback" : "http://localhost",
    "userGroup" : "beta-testers",
    "createdBy" : {
      "issuer" : "https://iam-test.indigo-datacloud.eu/",
      "subject" : "13ef7b33-0caf-4a94-b559-85a931b5d1c5"
    },
    "links" : [ {
      "rel" : "self",
      "href" : "http://localhost:8080/deployments/1ece901c-4280-4aee-a680-20d33bc1e2cb"
    }, {
      "rel" : "resources",
      "href" : "http://localhost:8080/deployments/1ece901c-4280-4aee-a680-20d33bc1e2cb/resources?type={type}"
    }, {
      "rel" : "template",
      "href" : "http://localhost:8080/deployments/1ece901c-4280-4aee-a680-20d33bc1e2cb/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

template

String

A string containing a TOSCA YAML-formatted template

parameters

Object

The input parameters of the deployment(Map of String, Object)

userGroup

String

The user group for which the deployment will be created (Optional, default empty string)

callback

String

The deployment callback URL (optional)

maxProvidersRetry

Number

The maximum number Cloud providers on which attempt to create the deployment (Optional, default unbounded)

timeoutMins

Number

Overall timeout value, if provided, must be at least of 1 minute (Optional, default infinite)

providerTimeoutMins

Number

Provider timeout value, if provided, must be at least of 1 minute and equal or less than timeoutMins (Optional, default 14400 mins

keepLastAttempt

Boolean

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

uuid

String

The unique identifier of a resource

creationTime

String

Creation date-time (http://xml2rfc.ietf.org/public/rfc/html/rfc3339.html#anchor14)

updateTime

String

Update date-time (http://xml2rfc.ietf.org/public/rfc/html/rfc3339.html#anchor14)

userGroup

String

The user group the deployment has been created for.

status

String

The status of the deployment. (http://indigo-dc.github.io/orchestrator/apidocs/it/reply/orchestrator/enums/Status.html)

task

String

The current step of the deployment process. (http://indigo-dc.github.io/orchestrator/apidocs/it/reply/orchestrator/enums/Task.html)

outputs

Object

The outputs of the TOSCA document

callback

String

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: 688

{
  "uuid" : "e2e0d319-df0b-4b86-8fb0-1b2e4dff62e0",
  "creationTime" : "2023-10-27T13:24+0000",
  "updateTime" : "2023-10-27T13:24+0000",
  "status" : "CREATE_IN_PROGRESS",
  "outputs" : { },
  "task" : "NONE",
  "callback" : "http://localhost:8080/callback",
  "userGroup" : "beta-testers",
  "links" : [ {
    "rel" : "self",
    "href" : "http://localhost:8080/deployments/e2e0d319-df0b-4b86-8fb0-1b2e4dff62e0"
  }, {
    "rel" : "resources",
    "href" : "http://localhost:8080/deployments/e2e0d319-df0b-4b86-8fb0-1b2e4dff62e0/resources?type={type}"
  }, {
    "rel" : "template",
    "href" : "http://localhost:8080/deployments/e2e0d319-df0b-4b86-8fb0-1b2e4dff62e0/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

uuid

String

The unique identifier of a resource

creationTime

String

Creation date-time (http://xml2rfc.ietf.org/public/rfc/html/rfc3339.html#anchor14)

updateTime

String

Update date-time

status

String

The status of the deployment. (http://indigo-dc.github.io/orchestrator/apidocs/it/reply/orchestrator/enums/Status.html)

statusReason

String

Verbose explanation of reason that lead to the deployment status (Present only if the deploy is in some error status)

userGroup

String

The user group the deployment was created for (as specified at creation time).

task

String

The current step of the deployment process. (http://indigo-dc.github.io/orchestrator/apidocs/it/reply/orchestrator/enums/Task.html)

callback

String

The endpoint used by the orchestrator to notify the progress of the deployment process.

outputs

Object

The outputs of the TOSCA document

Example response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 722

{
  "uuid" : "34483-d937-4578-bfdb-ebe196bf82dd",
  "creationTime" : "2023-10-27T13:24+0000",
  "updateTime" : "2023-10-27T13:24+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?type={type}"
  }, {
    "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

status

String

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/6c30476e-46bb-4dec-a239-892755a2b5a0/template' -i -H 'Authorization: Bearer <access token>'
GET /deployments/6c30476e-46bb-4dec-a239-892755a2b5a0/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. Resources can be filtered by tosca node type using the query parameter type (see below).

Example request

$ curl 'http://localhost:8080/deployments/f3a533aa-1f92-497e-a1f2-52acedbc9f77/resources' -i -H 'Accept: application/json' -H 'Authorization: Bearer <access token>'
GET /deployments/f3a533aa-1f92-497e-a1f2-52acedbc9f77/resources HTTP/1.1
Accept: application/json
Authorization: Bearer <access token>
Host: localhost:8080

Response structure

Path Type Description

content[].uuid

String

The unique identifier of a resource

content[].creationTime

String

Creation date-time (http://xml2rfc.ietf.org/public/rfc/html/rfc3339.html#anchor14)

content[].updateTime

String

Update date-time (http://xml2rfc.ietf.org/public/rfc/html/rfc3339.html#anchor14)

content[].state

String

The status of the resource. (http://indigo-dc.github.io/orchestrator/apidocs/it/reply/orchestrator/enums/NodeStates.html)

content[].toscaNodeType

String

The type of the represented TOSCA node

content[].toscaNodeName

String

The name of the represented TOSCA node

content[].physicalId

String

The Infrastructure ID of the object

content[].requiredBy

Array

A list of nodes that require this resource

content[].metadata

Object

Additional information

Example response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 5177

{
  "links" : [ {
    "rel" : "self",
    "href" : "http://localhost:8080/deployments/f3a533aa-1f92-497e-a1f2-52acedbc9f77/resources?page=0&size=10&sort=createdAt,desc"
  } ],
  "content" : [ {
    "uuid" : "2920f9fa-d419-40fa-b680-8727bf272803",
    "creationTime" : "2023-10-27T13:24+0000",
    "updateTime" : "2023-10-27T13:24+0000",
    "state" : "STARTED",
    "toscaNodeType" : "tosca.nodes.network.Port",
    "toscaNodeName" : "server_port1",
    "requiredBy" : [ ],
    "metadata" : { },
    "links" : [ {
      "rel" : "deployment",
      "href" : "http://localhost:8080/deployments/f3a533aa-1f92-497e-a1f2-52acedbc9f77"
    }, {
      "rel" : "self",
      "href" : "http://localhost:8080/deployments/f3a533aa-1f92-497e-a1f2-52acedbc9f77/resources/2920f9fa-d419-40fa-b680-8727bf272803"
    } ]
  }, {
    "uuid" : "08f3bb35-ad05-4a24-aedb-0bb974718d40",
    "creationTime" : "2023-10-27T13:24+0000",
    "updateTime" : "2023-10-27T13:24+0000",
    "state" : "STARTED",
    "toscaNodeType" : "tosca.nodes.network.Port",
    "toscaNodeName" : "server_port2",
    "requiredBy" : [ ],
    "metadata" : { },
    "links" : [ {
      "rel" : "deployment",
      "href" : "http://localhost:8080/deployments/f3a533aa-1f92-497e-a1f2-52acedbc9f77"
    }, {
      "rel" : "self",
      "href" : "http://localhost:8080/deployments/f3a533aa-1f92-497e-a1f2-52acedbc9f77/resources/08f3bb35-ad05-4a24-aedb-0bb974718d40"
    } ]
  }, {
    "uuid" : "7bf44446-52ae-4bba-88d1-66150ec0d000",
    "creationTime" : "2023-10-27T13:24+0000",
    "updateTime" : "2023-10-27T13:24+0000",
    "physicalId" : "0",
    "state" : "STARTED",
    "toscaNodeType" : "tosca.nodes.Compute",
    "toscaNodeName" : "server",
    "requiredBy" : [ ],
    "metadata" : {
      "VirtualMachineInfo" : "{\"vmProperties\":[{\"class\":\"network\",\"id\":\"pub_network\",\"outbound\":\"yes\",\"outports\":\"22/tcp-22/tcp\",\"provider_id\":\"public\"},{\"class\":\"network\",\"id\":\"priv_network\",\"provider_id\":\"INFN_Cloud_HSMDIS-net\"},{\"class\":\"system\",\"id\":\"simple_node\",\"instance_name\":\"simple-node-85d7d822-8ab3-11ed-b5a4-fa163ed94b64\",\"instance_tags\":\"PAAS_URL=http://localhost:8080,PAAS_DEP_UUID=11ed8ab3-6a40-968a-82b7-62f0862dbe46,PAAS_DEP_USER_EMAIL=Marica.Antonacci@ba.infn.it\",\"disk.0.os.flavour\":\"ubuntu\",\"disk.0.os.version\":\"20.04\",\"disk.0.image.url\":\"ost://keystone.cloud.infn.it/2b25c2c6-6398-45c6-9e00-3e7c58dbd750\",\"cpu.count\":1,\"memory.size\":2147483648,\"instance_type\":\"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\":\"keystone.cloud.infn.it\",\"disk.0.os.credentials.private_key\":\"-----BEGIN RSA PRIVATE KEY-----\\nMIIEowIBAAKCAQEAxTIykFKQKLinzT8QqeJplp2VwegWZGCs07Yn9Su/veJYKdpq\\ny0S/6LKyNikCwYGu2o6ZRIEtj7Per3SexalK94fGLok+HwBkoLLYP3DJu93dgarB\\nM8ze/71gQhEj1YqhWj8ff31/M40/Wf7T91fv0FUNj/aBnpQS83UKDdUp5m5criRt\\n5s7Ji3vexmZN2a6peZytbzvUChlzJKH+vVaWAkte+H5QK7kVldyRjSiOsmArk4ng\\n4xoJtW3KvVDJTR5XHgmJgPmQv7lHGZVMSxcy9tUyZxGJ7Vj4wUIqR86VadgQ8Uez\\nR/khvIIB/yNyKkuLMOMc5MhFq/FkEctqXvZKvQIDAQABAoIBADQKFjvt/esxJ99L\\nSEt8256Kwa2lYNtmg9VvGcZioDwtElUhNdOktfxjxBH06qxEW++DeEES0gI9VoP5\\nA7ln/seqBgvb3g/yW5vo9pZvXl18pGsGs+vGogbdZByrR0igSAp35AkSBlKFcPWA\\nAVIh28Cf4W9ffz9pFkM3XMrfuSn8+TF21l2bZgRFxp2BnxUR7wm9jf9+IegaHYsN\\nHMPCslV1TMX3qFQsVNh/2OUAa/cER2ADmt6uF2QfpySXdPdvhvo8TKx3APqBgHEd\\nL7xXKACvsEb/X/sshC7G7QgZ6Hug/w0Dt2Nb57WbSKJMp5BNPgoPHlcTjFI2+Xf9\\n19tEbmUCgYEA1jsBxkuJs1/bN6btGR2QQ8B4sJ6b+W6QS2KvEl0VI8b86A+qE2/U\\nVonRbV506dqhuLoIOg6vUjI7ir69IWD+k1a7O3RS8esgCopWzp7GA9gACC0nEzeB\\nF9ZAeku35V44+CEyAS+PJ/rIU0wTYVmHmyvYNvuYZW6RSGbNk1Yk/QsCgYEA66Tx\\ni1fOVgQjk+93mUJyQ4GBijPeo1GZgH4wzFx5bQTilZcKtD9eoBlAXQYy6WYin16e\\n7oLuv9P4T6a7qEtDiPWDdcgIoeqhsHMnzT2dZPFWBD/AxFLetjmLUabBlSCiF3c3\\nmd0J+BOYWEbmiIya7lt/ntgA6xBBMQNLpDAkZFcCgYEAthaBc6JQ8H3RPoRLksVm\\nEbBO5RBrUp9/VhQS6nDjvv0ribOGw+6RdNy/fU6D4SFLxE+bHn3M1viLU2q8Jtri\\nhyl5CxfcSHOpUEw1bHnXpPy7SjfWtqa+uxwIweoJ7JMhqQXOEuPxsfGew+4tqtkG\\nQgYKSPGgntZT9k4q/ciCt/ECgYBv8fYF+nq9hk3Yk6S/nD9oLnf5zdZww+0mi8xm\\n6W+OCQoTgqPFKW2spRJcnvtEwg6ko3DhYjZFz09hl5YCx26X+/qt04+2TB7wEmTQ\\nLfs93yC7+AV9vtiqvP+glJXWYKBggXRalhWMUtLG7TfLmvBnV/Ry467b/Obbf/NJ\\nVs2TFQKBgH/VMnMItvJZNouemf0OxePr5nsQKc9eQvRlcXqwhvaHgFjPVzvhUKbN\\nEHSf2PpegkPodrqHgW4l9QezO2xHNkx4LMbHZE1R6dmzi6YYkEar9JuYyzvpwpC/\\nnXxK1hrvni/13VoWc2zZUn0YcEi8HXVBby7Y8hIkrg9GAgVzbt2k\\n-----END RSA PRIVATE KEY-----\\n\",\"state\":\"stopped\",\"instance_id\":\"38e9014e-a303-4f40-92a2-fae26e1fddfa\",\"net_interface.0.dns_name\":\"vnode-0\",\"net_interface.0.ip\":\"192.168.163.69\",\"net_interface.1.ip\":\"90.147.174.56\"}]}"
    },
    "links" : [ {
      "rel" : "deployment",
      "href" : "http://localhost:8080/deployments/f3a533aa-1f92-497e-a1f2-52acedbc9f77"
    }, {
      "rel" : "self",
      "href" : "http://localhost:8080/deployments/f3a533aa-1f92-497e-a1f2-52acedbc9f77/resources/7bf44446-52ae-4bba-88d1-66150ec0d000"
    } ]
  } ],
  "page" : {
    "size" : 10,
    "totalElements" : 3,
    "totalPages" : 1,
    "number" : 0
  }
}

Request parameters

Parameter Description

type

Optional parameter to filter the resources by tosca type. It can be the exact type of the node or a parent type.

Example request

$ curl 'http://localhost:8080/deployments/559a4c14-2b36-430d-99c7-f5a500b8d0b4/resources?type=tosca.nodes.Compute' -i -H 'Accept: application/json' -H 'Authorization: Bearer <access token>'
GET /deployments/559a4c14-2b36-430d-99c7-f5a500b8d0b4/resources?type=tosca.nodes.Compute HTTP/1.1
Accept: application/json
Authorization: Bearer <access token>
Host: localhost:8080

Example response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 3968

{
  "links" : [ {
    "rel" : "self",
    "href" : "http://localhost:8080/deployments/559a4c14-2b36-430d-99c7-f5a500b8d0b4/resources?type=tosca.nodes.Compute&page=0&size=10&sort=createdAt,desc"
  } ],
  "content" : [ {
    "uuid" : "e549e4a5-581e-40bd-a466-87b9f47d534c",
    "creationTime" : "2023-10-27T13:24+0000",
    "updateTime" : "2023-10-27T13:24+0000",
    "physicalId" : "0",
    "state" : "STARTED",
    "toscaNodeType" : "tosca.nodes.Compute",
    "toscaNodeName" : "server",
    "requiredBy" : [ ],
    "metadata" : {
      "VirtualMachineInfo" : "{\"vmProperties\":[{\"class\":\"network\",\"id\":\"pub_network\",\"outbound\":\"yes\",\"outports\":\"22/tcp-22/tcp\",\"provider_id\":\"public\"},{\"class\":\"network\",\"id\":\"priv_network\",\"provider_id\":\"INFN_Cloud_HSMDIS-net\"},{\"class\":\"system\",\"id\":\"simple_node\",\"instance_name\":\"simple-node-85d7d822-8ab3-11ed-b5a4-fa163ed94b64\",\"instance_tags\":\"PAAS_URL=http://localhost:8080,PAAS_DEP_UUID=11ed8ab3-6a40-968a-82b7-62f0862dbe46,PAAS_DEP_USER_EMAIL=Marica.Antonacci@ba.infn.it\",\"disk.0.os.flavour\":\"ubuntu\",\"disk.0.os.version\":\"20.04\",\"disk.0.image.url\":\"ost://keystone.cloud.infn.it/2b25c2c6-6398-45c6-9e00-3e7c58dbd750\",\"cpu.count\":1,\"memory.size\":2147483648,\"instance_type\":\"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\":\"keystone.cloud.infn.it\",\"disk.0.os.credentials.private_key\":\"-----BEGIN RSA PRIVATE KEY-----\\nMIIEowIBAAKCAQEAxTIykFKQKLinzT8QqeJplp2VwegWZGCs07Yn9Su/veJYKdpq\\ny0S/6LKyNikCwYGu2o6ZRIEtj7Per3SexalK94fGLok+HwBkoLLYP3DJu93dgarB\\nM8ze/71gQhEj1YqhWj8ff31/M40/Wf7T91fv0FUNj/aBnpQS83UKDdUp5m5criRt\\n5s7Ji3vexmZN2a6peZytbzvUChlzJKH+vVaWAkte+H5QK7kVldyRjSiOsmArk4ng\\n4xoJtW3KvVDJTR5XHgmJgPmQv7lHGZVMSxcy9tUyZxGJ7Vj4wUIqR86VadgQ8Uez\\nR/khvIIB/yNyKkuLMOMc5MhFq/FkEctqXvZKvQIDAQABAoIBADQKFjvt/esxJ99L\\nSEt8256Kwa2lYNtmg9VvGcZioDwtElUhNdOktfxjxBH06qxEW++DeEES0gI9VoP5\\nA7ln/seqBgvb3g/yW5vo9pZvXl18pGsGs+vGogbdZByrR0igSAp35AkSBlKFcPWA\\nAVIh28Cf4W9ffz9pFkM3XMrfuSn8+TF21l2bZgRFxp2BnxUR7wm9jf9+IegaHYsN\\nHMPCslV1TMX3qFQsVNh/2OUAa/cER2ADmt6uF2QfpySXdPdvhvo8TKx3APqBgHEd\\nL7xXKACvsEb/X/sshC7G7QgZ6Hug/w0Dt2Nb57WbSKJMp5BNPgoPHlcTjFI2+Xf9\\n19tEbmUCgYEA1jsBxkuJs1/bN6btGR2QQ8B4sJ6b+W6QS2KvEl0VI8b86A+qE2/U\\nVonRbV506dqhuLoIOg6vUjI7ir69IWD+k1a7O3RS8esgCopWzp7GA9gACC0nEzeB\\nF9ZAeku35V44+CEyAS+PJ/rIU0wTYVmHmyvYNvuYZW6RSGbNk1Yk/QsCgYEA66Tx\\ni1fOVgQjk+93mUJyQ4GBijPeo1GZgH4wzFx5bQTilZcKtD9eoBlAXQYy6WYin16e\\n7oLuv9P4T6a7qEtDiPWDdcgIoeqhsHMnzT2dZPFWBD/AxFLetjmLUabBlSCiF3c3\\nmd0J+BOYWEbmiIya7lt/ntgA6xBBMQNLpDAkZFcCgYEAthaBc6JQ8H3RPoRLksVm\\nEbBO5RBrUp9/VhQS6nDjvv0ribOGw+6RdNy/fU6D4SFLxE+bHn3M1viLU2q8Jtri\\nhyl5CxfcSHOpUEw1bHnXpPy7SjfWtqa+uxwIweoJ7JMhqQXOEuPxsfGew+4tqtkG\\nQgYKSPGgntZT9k4q/ciCt/ECgYBv8fYF+nq9hk3Yk6S/nD9oLnf5zdZww+0mi8xm\\n6W+OCQoTgqPFKW2spRJcnvtEwg6ko3DhYjZFz09hl5YCx26X+/qt04+2TB7wEmTQ\\nLfs93yC7+AV9vtiqvP+glJXWYKBggXRalhWMUtLG7TfLmvBnV/Ry467b/Obbf/NJ\\nVs2TFQKBgH/VMnMItvJZNouemf0OxePr5nsQKc9eQvRlcXqwhvaHgFjPVzvhUKbN\\nEHSf2PpegkPodrqHgW4l9QezO2xHNkx4LMbHZE1R6dmzi6YYkEar9JuYyzvpwpC/\\nnXxK1hrvni/13VoWc2zZUn0YcEi8HXVBby7Y8hIkrg9GAgVzbt2k\\n-----END RSA PRIVATE KEY-----\\n\",\"state\":\"stopped\",\"instance_id\":\"38e9014e-a303-4f40-92a2-fae26e1fddfa\",\"net_interface.0.dns_name\":\"vnode-0\",\"net_interface.0.ip\":\"192.168.163.69\",\"net_interface.1.ip\":\"90.147.174.56\"}]}"
    },
    "links" : [ {
      "rel" : "deployment",
      "href" : "http://localhost:8080/deployments/559a4c14-2b36-430d-99c7-f5a500b8d0b4"
    }, {
      "rel" : "self",
      "href" : "http://localhost:8080/deployments/559a4c14-2b36-430d-99c7-f5a500b8d0b4/resources/e549e4a5-581e-40bd-a466-87b9f47d534c"
    } ]
  } ],
  "page" : {
    "size" : 10,
    "totalElements" : 1,
    "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/5a253525-9280-4475-8eea-61453e46ba94/resources/b5f60fa2-1d41-4ef4-a6cf-18851ddd4e28' -i -H 'Authorization: Bearer <access token>'
GET /deployments/5a253525-9280-4475-8eea-61453e46ba94/resources/b5f60fa2-1d41-4ef4-a6cf-18851ddd4e28 HTTP/1.1
Authorization: Bearer <access token>
Host: localhost:8080

Response structure

Path Type Description

uuid

String

The unique identifier of a resource

creationTime

String

Creation date-time (http://xml2rfc.ietf.org/public/rfc/html/rfc3339.html#anchor14)

updateTime

String

Update date-time (http://xml2rfc.ietf.org/public/rfc/html/rfc3339.html#anchor14)

state

String

The status of the resource. (http://indigo-dc.github.io/orchestrator/apidocs/it/reply/orchestrator/enums/NodeStates.html)

toscaNodeType

String

The type of the represented TOSCA node

toscaNodeName

String

The name of the represented TOSCA node

physicalId

String

The Infrastructure ID of the object

requiredBy

Array

A list of nodes that require this resource

metadata

Object

Additional information

Example response

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
Content-Length: 665

{
  "uuid" : "b5f60fa2-1d41-4ef4-a6cf-18851ddd4e28",
  "creationTime" : "2023-10-27T13:24+0000",
  "updateTime" : "2023-10-27T13:24+0000",
  "physicalId" : "1b278b4c-cf89-42a2-96ec-ee371659aa1a",
  "state" : "CREATING",
  "toscaNodeType" : "tosca.nodes.Compute",
  "toscaNodeName" : "node_1b278b4c-cf89-42a2-96ec-ee371659aa1a",
  "requiredBy" : [ ],
  "metadata" : { },
  "links" : [ {
    "rel" : "deployment",
    "href" : "http://localhost:8080/deployments/5a253525-9280-4475-8eea-61453e46ba94"
  }, {
    "rel" : "self",
    "href" : "http://localhost:8080/deployments/5a253525-9280-4475-8eea-61453e46ba94/resources/b5f60fa2-1d41-4ef4-a6cf-18851ddd4e28"
  } ]
}

Execute action on a resource

A POST request is used to perform a specific action on the resource. Currently the supported action types are: start and stop; these can be executed only on compute nodes (i.e. resources of types derived by tosca.nodes.Compute) of cloud deployments.

Request Fields

Path Type Description

type

String

The type of action to perform. Allowed values: start, stop

Example request

$ curl 'http://localhost:8080/deployments/11ed8ab3-6a40-968a-82b7-62f0862dbe46/resources/11ed8ab3-6b3a-5fdc-82b7-62f0862dbe46/actions' -i -X POST -H 'Content-Type: application/json' -H 'Authorization: Bearer <access token>' -d '{
  "type" : "stop"
}'
POST /deployments/11ed8ab3-6a40-968a-82b7-62f0862dbe46/resources/11ed8ab3-6b3a-5fdc-82b7-62f0862dbe46/actions HTTP/1.1
Content-Type: application/json
Authorization: Bearer <access token>
Host: localhost:8080
Content-Length: 21

{
  "type" : "stop"
}

Example response

HTTP/1.1 202 Accepted

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

cpr_url

String

The URI of the Cloud Provider Ranker

slam_url

String

The URI of the SLAM (Service Level Agreement Manager)

cmdb_url

String

The URI of the CMDB (Change Management DataBase)

im_url

String

The URI of the IM (Infrastructure Manager)

monitoring_url

String

The URI of the Monitoring Service

vault_url

String

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

createdBy

Optional parameter to filter the deployments based on who created them. The following values can be used:

  • OIDC_subject@OIDC_issuer: to ask for the deployments of a generic user

  • me: shortcut to ask for the deployments created by the user making the request

Example request

$ curl 'http://localhost:8080/schedules?createdBy=a8e1aaa5-c1ea-487c-90e6-e3abfafb8520@https://iam-test.indigo-datacloud.eu/' -i -H 'Accept: application/json' -H 'Authorization: Bearer <access token>'
GET /schedules?createdBy=a8e1aaa5-c1ea-487c-90e6-e3abfafb8520@https://iam-test.indigo-datacloud.eu/ HTTP/1.1
Accept: application/json
Authorization: Bearer <access token>
Host: localhost:8080

Response structure

Path Type Description

content[].uuid

String

The unique identifier of a resource

content[].replicationExpression

String

The replication expression of the main replication rule

content[].fileExpression

String

The file expression to match newly created files

content[].numberOfReplicas

Number

The number of replicas of the main replication rule

content[].creationTime

String

Creation date-time (http://xml2rfc.ietf.org/public/rfc/html/rfc3339.html#anchor14)

content[].updateTime

String

Update date-time

content[].status

String

The status of the deployment schedule. (http://indigo-dc.github.io/orchestrator/apidocs/it/reply/orchestrator/enums/DeploymentScheduleStatus.html)

content[].createdBy

Object

The OIDC info of the deployment schedule’s creator.

content[].callback

String

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=a8e1aaa5-c1ea-487c-90e6-e3abfafb8520@https://iam-test.indigo-datacloud.eu/"
  } ],
  "content" : [ {
    "uuid" : "a4c235ae-4698-4aac-a09d-80227b8c4495",
    "creationTime" : "2023-10-27T13:24+0000",
    "updateTime" : "2023-10-27T13:24+0000",
    "status" : "RUNNING",
    "replicationExpression" : "RSE_RECAS",
    "fileExpression" : "scope:name*",
    "callback" : "http://localhost",
    "numberOfReplicas" : 1,
    "createdBy" : {
      "issuer" : "https://iam-test.indigo-datacloud.eu/",
      "subject" : "a8e1aaa5-c1ea-487c-90e6-e3abfafb8520"
    },
    "links" : [ {
      "rel" : "self",
      "href" : "http://localhost:8080/schedules/a4c235ae-4698-4aac-a09d-80227b8c4495"
    } ]
  }, {
    "uuid" : "36b5d266-04b6-4271-b7af-1262d8a8db61",
    "creationTime" : "2023-10-27T13:24+0000",
    "updateTime" : "2023-10-27T13:24+0000",
    "status" : "SUSPENDED",
    "replicationExpression" : "RSE_RECAS",
    "fileExpression" : "scope:name*",
    "callback" : "http://localhost",
    "numberOfReplicas" : 1,
    "createdBy" : {
      "issuer" : "https://iam-test.indigo-datacloud.eu/",
      "subject" : "a8e1aaa5-c1ea-487c-90e6-e3abfafb8520"
    },
    "links" : [ {
      "rel" : "self",
      "href" : "http://localhost:8080/schedules/36b5d266-04b6-4271-b7af-1262d8a8db61"
    } ]
  } ],
  "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

template

String

A string containing a TOSCA YAML-formatted template

parameters

Object

The input parameters of the deployment(Map of String, Object)

callback

String

The deployment callback URL (optional)

maxProvidersRetry

Number

The maximum number Cloud providers on which attempt to create the deployment (Optional, default unbounded)

timeoutMins

Number

Overall timeout value, if provided, must be at least of 1 minute (Optional, default infinite)

providerTimeoutMins

Number

Provider timeout value, if provided, must be at least of 1 minute and equal or less than timeoutMins (Optional, default 14400 mins

keepLastAttempt

Boolean

Whether the Orchestrator, in case of failure, will keep the resources of the last deploy attempt or not (Optional, default false)

replicationExpression

String

The replication expression of the main replication rule

fileExpression

String

The file expression to match newly created files

numberOfReplicas

Number

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

replicationExpression

String

The replication expression of the main replication rule

fileExpression

String

The file expression to match newly created files

numberOfReplicas

Number

The number of replicas of the main replication rule

uuid

String

The unique identifier of a resource

creationTime

String

Creation date-time (http://xml2rfc.ietf.org/public/rfc/html/rfc3339.html#anchor14)

updateTime

String

Update date-time (http://xml2rfc.ietf.org/public/rfc/html/rfc3339.html#anchor14)

status

String

The status of the deployment. (http://indigo-dc.github.io/orchestrator/apidocs/it/reply/orchestrator/enums/Status.html)

callback

String

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" : "8899daa1-0332-4179-ad5d-84621b047d06",
  "creationTime" : "2023-10-27T13:24+0000",
  "updateTime" : "2023-10-27T13:24+0000",
  "status" : "RUNNING",
  "replicationExpression" : "RSE_RECAS",
  "fileExpression" : "scope:name*",
  "callback" : "http://localhost:8080/callback",
  "numberOfReplicas" : 1,
  "links" : [ {
    "rel" : "self",
    "href" : "http://localhost:8080/schedules/8899daa1-0332-4179-ad5d-84621b047d06"
  } ]
}

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

uuid

String

The unique identifier of a resource

replicationExpression

String

The replication expression of the main replication rule

fileExpression

String

The file expression to match newly created files

numberOfReplicas

Number

The number of replicas of the main replication rule

creationTime

String

Creation date-time (http://xml2rfc.ietf.org/public/rfc/html/rfc3339.html#anchor14)

updateTime

String

Update date-time

status

String

The status of the deployment schedule. (http://indigo-dc.github.io/orchestrator/apidocs/it/reply/orchestrator/enums/DeploymentScheduleStatus.html)

callback

String

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" : "2023-10-27T13:24+0000",
  "updateTime" : "2023-10-27T13:24+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

content[*].deployment

Object

The deployment created because of this event

content[*].uuid

String

The unique identifier of the event

content[*].creationTime

String

Creation date-time (http://xml2rfc.ietf.org/public/rfc/html/rfc3339.html#anchor14)

content[*].updateTime

String

Update date-time (http://xml2rfc.ietf.org/public/rfc/html/rfc3339.html#anchor14)

content[*].scope

String

The scope of the file triggering the event

content[*].name

String

The name of the file triggering the event

content[*].replicationStatus

String

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" : "7b7cd0c4-7d0a-4796-8e1e-38bfba2026be",
    "creationTime" : "2023-10-27T13:24+0000",
    "updateTime" : "2023-10-27T13:24+0000",
    "deployment" : {
      "uuid" : "3c2a9cd9-6a61-468a-9ea6-f6e8230933ce",
      "creationTime" : "2023-10-27T13:24+0000",
      "updateTime" : "2023-10-27T13:24+0000",
      "status" : "CREATE_IN_PROGRESS",
      "outputs" : { },
      "task" : "NONE",
      "callback" : "http://localhost",
      "links" : [ ]
    },
    "scope" : "file-scope",
    "name" : "file-name",
    "replicationStatus" : "REPLICATING",
    "links" : [ ]
  }, {
    "uuid" : "eaefcc31-3446-42e2-885d-29a7d6558529",
    "creationTime" : "2023-10-27T13:24+0000",
    "updateTime" : "2023-10-27T13:24+0000",
    "deployment" : {
      "uuid" : "18ce35a2-1abc-43df-a901-60a02acc3a56",
      "creationTime" : "2023-10-27T13:24+0000",
      "updateTime" : "2023-10-27T13:24+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
  }
}