Skip to content

Deployment Type Handler Service API v1.0.0

This schema defines the REST API for the Deployment Type Handler service

Contact: Cloud Operations

Operations

Tag: deploymentTypeHandler

list-deployment-type-handler-types

Operation Id: list-deployment-type-handler-types

Action: GET /handler-types

Summary: Get a list of available Deployment Type Handlers implementations

Parameters

Name In Type Required Description
byType query array[string] false 'Filter deployment types by deployment type identifier'

Responses

Status Meaning Description Schema
200 OK OK Inline
400 Bad Request Bad Request Problem
401 Unauthorized Unauthorized Problem
422 Unprocessable Entity Unprocessable Entity Problem
500 Internal Server Error Internal Server Error Problem

Status Code 200

Name Type Required Restrictions Description
anonymous [DeploymentTypeHandlerType] false none none
» id DeploymentTypeHandlerTypeId false none The unique identifier of a deployment type handler implementation
» parameters [DeploymentTypeHandlerTypeParameter] false none none
»» type string true none none
»» name string true none none
»» required boolean false none none
»» allowedValues [any] false none none
»» default any false none none

Example responses

200 Response

[
  {
    "id": "spacelift.v1",
    "parameters": [
      {
        "type": "string",
        "name": "p1",
        "required": true,
        "allowedValues": [
          "v1",
          "v2",
          "v3"
        ]
      },
      {
        "type": "keyvault-secret",
        "name": "kv1",
        "required": true
      },
      {
        "type": "integer",
        "name": "i1"
      }
    ]
  },
  {
    "id": "docker.v1",
    "parameters": [
      {
        "type": "string",
        "name": "bind"
      },
      {
        "type": "array",
        "name": "env-vars"
      }
    ]
  },
  {
    "id": "null.v1"
  }
]

400 Response

{
  "type": "/some/uri-reference",
  "title": "some title for the error situation",
  "status": 100,
  "detail": "some description for the error situation",
  "instance": "/some/uri-reference#specific-occurrence-context",
  "cause": {
    "code": "string",
    "message": "string",
    "target": "string",
    "details": [
      {
        "code": "string",
        "message": "string",
        "target": "string",
        "details": [
          {
            "code": null,
            "message": null,
            "target": null,
            "details": null,
            "innererror": null
          }
        ],
        "innererror": {
          "code": "string",
          "innererror": {}
        }
      }
    ],
    "innererror": {
      "code": "string",
      "innererror": {
        "code": "string",
        "innererror": {
          "code": null,
          "innererror": null
        }
      }
    }
  }
}

Note

This operation does not require authentication

Code samples

GET http://localhost:3000/handler-types HTTP/1.1
Host: localhost:3000
Accept: application/json
# You can also use wget
curl -X GET http://localhost:3000/handler-types \
  -H 'Accept: application/json'
import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('http://localhost:3000/handler-types', headers = headers)

print(r.json())

get-deployment-type-handler-type

Operation Id: get-deployment-type-handler-type

Action: GET /handler-types/{id}

Summary: Get information about a specific Deployment Type Handler implementation

Parameters

Name In Type Required Description
id path DeploymentTypeHandlerTypeId true none

Responses

Status Meaning Description Schema
200 OK OK DeploymentTypeHandlerType
400 Bad Request Bad Request Problem
401 Unauthorized Unauthorized Problem
404 Not Found The specified resource was not found Problem
422 Unprocessable Entity Unprocessable Entity Problem
500 Internal Server Error Internal Server Error Problem

Note

This operation does not require authentication

Code samples

GET http://localhost:3000/handler-types/{id} HTTP/1.1
Host: localhost:3000
Accept: application/json
# You can also use wget
curl -X GET http://localhost:3000/handler-types/{id} \
  -H 'Accept: application/json'
import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('http://localhost:3000/handler-types/{id}', headers = headers)

print(r.json())

do-process-event

Operation Id: do-process-event

Action: POST /events

Summary: Process a CloudEvent

Body parameter

{
  "id": "string",
  "source": "string",
  "specversion": "string",
  "type": "string",
  "time": "2020-12-20T13:37:33.647Z",
  "subject": "string",
  "datacontenttype": "application/json",
  "dataschema": "http://example.com",
  "data": {}
}

Parameters

Name In Type Required Description
body body CloudEvent true none

Responses

Status Meaning Description Schema
204 No Content No Content None
400 Bad Request Bad Request Problem
401 Unauthorized Unauthorized Problem
422 Unprocessable Entity Unprocessable Entity Problem
500 Internal Server Error Internal Server Error Problem

Note

This operation does not require authentication

Code samples

POST http://localhost:3000/events HTTP/1.1
Host: localhost:3000
Content-Type: application/json
Accept: application/problem+json
# You can also use wget
curl -X POST http://localhost:3000/events \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/problem+json'
import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/problem+json'
}

r = requests.post('http://localhost:3000/events', headers = headers)

print(r.json())

list-webhook-handler

Operation Id: list-webhook-handler

Action: GET /webhooks

Summary: Get details about available WebHook handlers

Responses

Status Meaning Description Schema
200 OK OK WebHookHandlerTypeList
400 Bad Request Bad Request Problem
401 Unauthorized Unauthorized Problem
404 Not Found The specified resource was not found Problem
422 Unprocessable Entity Unprocessable Entity Problem
500 Internal Server Error Internal Server Error Problem

Note

This operation does not require authentication

Code samples

GET http://localhost:3000/webhooks HTTP/1.1
Host: localhost:3000
Accept: application/json
# You can also use wget
curl -X GET http://localhost:3000/webhooks \
  -H 'Accept: application/json'
import requests
headers = {
  'Accept': 'application/json'
}

r = requests.get('http://localhost:3000/webhooks', headers = headers)

print(r.json())

do-process-webhook

Operation Id: do-process-webhook

Action: POST /webhooks/{id}

Summary: Receive a webhook call from a remote system

Body parameter

null

Parameters

Name In Type Required Description
id path WebHookId true none
body body any true none

Responses

Status Meaning Description Schema
204 No Content No Content None
400 Bad Request Bad Request Problem
401 Unauthorized Unauthorized Problem
404 Not Found The specified resource was not found Problem
422 Unprocessable Entity Unprocessable Entity Problem
500 Internal Server Error Internal Server Error Problem

Note

This operation does not require authentication

Code samples

POST http://localhost:3000/webhooks/{id} HTTP/1.1
Host: localhost:3000
Content-Type: application/json
Accept: application/problem+json
# You can also use wget
curl -X POST http://localhost:3000/webhooks/{id} \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/problem+json'
import requests
headers = {
  'Content-Type': 'application/json',
  'Accept': 'application/problem+json'
}

r = requests.post('http://localhost:3000/webhooks/{id}', headers = headers)

print(r.json())

Schemas

CloudEvent

{
  "id": "string",
  "source": "string",
  "specversion": "string",
  "type": "string",
  "time": "2020-12-20T13:37:33.647Z",
  "subject": "string",
  "datacontenttype": "application/json",
  "dataschema": "http://example.com",
  "data": {}
}

Properties

Name Type Required Restrictions Description
id string true none The unique identifier for the event
source string true none The source of the event
specversion string true none The version of the CloudEvents specification which the event uses.
This enables the interpretation of the context. Compliant event producers
MUST use a value of 1.0 when referring to this version of the specification.
type string true none The type of event data
time string(date-time)¦null false none Event generation time, in RFC 3339 format
subject string¦null false none none
datacontenttype string¦null false none none
dataschema string(uri)¦null false none Type: URI
Description: Identifies the schema that data adheres to.Incompatible changes to the schema
SHOULD be reflected by a different URI.See Versioning of Attributes in the Primer for more information.
Constraints: OPTIONAL If present, MUST be a non-empty URI
data object false none CloudEvent 'data' content. The event payload.
The payload depends on the type and the 'schemaurl'.
It is encoded into a media format which is specified by the
'contenttype' attribute (e.g. application/json).

InnerError

{
  "code": "string",
  "innererror": {
    "code": "string",
    "innererror": {
      "code": "string",
      "innererror": {
        "code": "string",
        "innererror": {
          "code": null,
          "innererror": null
        }
      }
    }
  }
}

Properties

Name Type Required Restrictions Description
code string false none none
innererror InnerError false none none

Error

{
  "code": "string",
  "message": "string",
  "target": "string",
  "details": [
    {
      "code": "string",
      "message": "string",
      "target": "string",
      "details": [
        {
          "code": "string",
          "message": "string",
          "target": "string",
          "details": [
            {}
          ],
          "innererror": {
            "code": null,
            "innererror": null
          }
        }
      ],
      "innererror": {
        "code": "string",
        "innererror": {
          "code": "string",
          "innererror": {}
        }
      }
    }
  ],
  "innererror": {
    "code": "string",
    "innererror": {
      "code": "string",
      "innererror": {
        "code": "string",
        "innererror": {
          "code": null,
          "innererror": null
        }
      }
    }
  }
}

Properties

Name Type Required Restrictions Description
code string false none none
message string false none none
target string false none none
details [Error] false none none
innererror InnerError false none none

Problem

{
  "type": "/some/uri-reference",
  "title": "some title for the error situation",
  "status": 100,
  "detail": "some description for the error situation",
  "instance": "/some/uri-reference#specific-occurrence-context",
  "cause": {
    "code": "string",
    "message": "string",
    "target": "string",
    "details": [
      {
        "code": "string",
        "message": "string",
        "target": "string",
        "details": [
          {
            "code": null,
            "message": null,
            "target": null,
            "details": null,
            "innererror": null
          }
        ],
        "innererror": {
          "code": "string",
          "innererror": {}
        }
      }
    ],
    "innererror": {
      "code": "string",
      "innererror": {
        "code": "string",
        "innererror": {
          "code": null,
          "innererror": null
        }
      }
    }
  }
}

https://datatracker.ietf.org/doc/html/rfc7807

Properties

Name Type Required Restrictions Description
type string(uri) true none A URI reference that uniquely identifies the problem type only in the context of the provided API. Opposed to the specification in RFC-7807, it is neither recommended to be dereferenceable and point to a human-readable documentation nor globally unique for the problem type.
title string false none A short summary of the problem type. Written in English and readable for engineers, usually not suited for non technical stakeholders and not localized.
status integer(int32) false none The HTTP status code generated by the origin server for this occurrence of the problem.
detail string false none A human readable explanation specific to this occurrence of the problem that is helpful to locate the problem and give advice on how to proceed. Written in English and readable for engineers, usually not suited for non technical stakeholders and not localized.
instance string(uri-reference) false none A URI reference that identifies the specific occurrence of the problem, e.g. by adding a fragment identifier or sub-path to the problem type. May be used to locate the root of this problem in the source code.
cause Error false none none

DeploymentTypeHandlerTypeId

"string"

The unique identifier of a deployment type handler implementation

Properties

Name Type Required Restrictions Description
anonymous string false none The unique identifier of a deployment type handler implementation

DeploymentTypeHandlerTypeParameter

{
  "type": "string",
  "name": "string",
  "required": false,
  "allowedValues": [
    null
  ],
  "default": null
}

Properties

Name Type Required Restrictions Description
type string true none none
name string true none none
required boolean false none none
allowedValues [any] false none none
default any false none none

DeploymentTypeHandlerType

{
  "id": "string",
  "parameters": [
    {
      "type": "string",
      "name": "string",
      "required": false,
      "allowedValues": [
        null
      ],
      "default": null
    }
  ]
}

Properties

Name Type Required Restrictions Description
id DeploymentTypeHandlerTypeId false none The unique identifier of a deployment type handler implementation
parameters [DeploymentTypeHandlerTypeParameter] false none none

WebHookId

"string"

Properties

Name Type Required Restrictions Description
anonymous string false none none

WebHookHandlerType

{
  "id": "string",
  "description": "string"
}

Properties

Name Type Required Restrictions Description
id WebHookId true none none
description string false none none

WebHookHandlerTypeList

[
  {
    "id": "string",
    "description": "string"
  }
]

Properties

Name Type Required Restrictions Description
anonymous [WebHookHandlerType] false none none