REST APIs for CLAMP Automation Compositions

Commissioning API

This API is a CRUD API that allows Automation Composition Type definitions created in a design environment to be commissioned on the CLAMP runtime. It has endpoints that allow Automation Composition Types to be created, read, updated, and deleted.

The body of the create and update end points is a TOSCA Service/Topology template that defines the new or changed Automation Composition Type. The update and delete endpoints take a reference to the Automation Composition Type. The incoming TOSCA is verified and checked for referential integrity. On delete requests, a check is made to ensure that no Automation Composition Instances exist for the Automation Composition Type to be deleted.

GET /onap/automationcomposition/v2/commission

Query details of the requested commissioned automation composition definitions

  • Description: Queries details of the requested commissioned automation composition definitions, returning all automation composition details

  • Produces: [‘application/json’, ‘application/yaml’]

Parameters

Name

Position

Description

Type

name

query

Automation composition definition name

string

version

query

Automation composition definition version

string

X-ONAP-RequestID

header

RequestID for http transaction

string

Responses

200 - OK

401 - Authentication Error

403 - Authorization Error

404 - Not Found

500 - Internal Server Error

POST /onap/automationcomposition/v2/commission

Commissions automation composition definitions

  • Description: Commissions automation composition definitions, returning commissioned definition IDs

  • Consumes: [‘application/json’, ‘application/yaml’]

  • Produces: [‘application/json’, ‘application/yaml’]

Parameters

Name

Position

Description

Type

body

body

Entity Body of Automation Composition

X-ONAP-RequestID

header

RequestID for http transaction

string

Responses

200 - OK

201 - Created

401 - Authentication Error

403 - Authorization Error

404 - Not Found

500 - Internal Server Error

DELETE /onap/automationcomposition/v2/commission

Delete a commissioned automation composition

  • Description: Deletes a Commissioned Automation Composition, returning optional error details

  • Produces: [‘application/json’, ‘application/yaml’]

Parameters

Name

Position

Description

Type

name

query

Automation composition definition name

string

version

query

Automation composition definition version

string

X-ONAP-RequestID

header

RequestID for http transaction

string

Responses

200 - OK

204 - No Content

401 - Authentication Error

403 - Authorization Error

500 - Internal Server Error

GET /onap/automationcomposition/v2/commission/elements

Query details of the requested commissioned automation composition element definitions

  • Description: Queries details of the requested commissioned automation composition element definitions, returning all automation composition elements’ details

  • Produces: [‘application/json’, ‘application/yaml’]

Parameters

Name

Position

Description

Type

name

query

Automation composition definition name

string

version

query

Automation composition definition version

string

X-ONAP-RequestID

header

RequestID for http transaction

string

Responses

200 - OK

401 - Authentication Error

403 - Authorization Error

404 - Not Found

500 - Internal Server Error

GET /onap/automationcomposition/v2/commission/getCommonOrInstanceProperties

Query details of the requested tosca service template common or instance properties

  • Description: Queries details of the requested commissioned tosca service template json commonor instance properties, returning all tosca service template common or instance property details

  • Produces: [‘application/json’, ‘application/yaml’]

Parameters

Name

Position

Description

Type

common

query

Flag, true for common properties, false for instance

boolean

name

query

Tosca service template name

string

version

query

Tosca service template version

string

X-ONAP-RequestID

header

RequestID for http transaction

string

Responses

200 - OK

401 - Authentication Error

403 - Authorization Error

404 - Not Found

500 - Internal Server Error

GET /onap/automationcomposition/v2/commission/toscaServiceTemplateSchema

Query details of the requested tosca service template json schema

  • Description: Queries details of the requested commissioned tosca service template json schema, returning all tosca service template json schema details

  • Produces: [‘application/json’, ‘application/yaml’]

Parameters

Name

Position

Description

Type

section

query

Section of Template schema is desired for

string

X-ONAP-RequestID

header

RequestID for http transaction

string

Responses

200 - OK

401 - Authentication Error

403 - Authorization Error

404 - Not Found

500 - Internal Server Error

GET /onap/automationcomposition/v2/commission/toscaservicetemplate

Query details of the requested tosca service templates

  • Description: Queries details of the requested commissioned tosca service template, returning all tosca service template details

  • Produces: [‘application/json’, ‘application/yaml’]

Parameters

Name

Position

Description

Type

name

query

Tosca service template name

string

version

query

Tosca service template version

string

X-ONAP-RequestID

header

RequestID for http transaction

string

Responses

200 - OK

401 - Authentication Error

403 - Authorization Error

404 - Not Found

500 - Internal Server Error

Instantiation API

The instantiation API has two functions:

  1. Creation, Reading, Update, and Deletion of Automation Composition Instances.

  2. Instantiation and lifecycle management of Automation Composition Instances on participants.

The Instantiation API is used by the CLAMP GUI.

Instantiation Automation Composition Instance CRUD

This sub API allows for the creation, read, update, and deletion of Automation Composition Instances. The endpoints for create and update take a JSON body that describes the Automation Composition Instance. The endpoints for read and delete take a Automation Composition Instance ID to determine which Automation Composition Instance to act on. For the delete endpoint, a check is made to ensure that the Automation Composition Instance is not instantiated on participants.

A call to the update endpoint for a Automation Composition Instance follows the semantics described here: 4.1 Management of Automation Composition Instance Configurations.

GET /onap/automationcomposition/v2/instantiation

Query details of the requested automation compositions

  • Description: Queries details of the requested automation compositions, returning all composition details

  • Produces: [‘application/json’, ‘application/yaml’]

Parameters

Name

Position

Description

Type

name

query

Automation composition definition name

string

version

query

Automation composition definition version

string

X-ONAP-RequestID

header

RequestID for http transaction

string

Responses

200 - OK

401 - Authentication Error

403 - Authorization Error

404 - Not Found

500 - Internal Server Error

POST /onap/automationcomposition/v2/instantiation

Commissions automation composition definitions

  • Description: Commissions automation composition definitions, returning the automation composition IDs

  • Consumes: [‘application/json’, ‘application/yaml’]

  • Produces: [‘application/json’, ‘application/yaml’]

Parameters

Name

Position

Description

Type

automationCompositions

body

Entity Body of automation composition

X-ONAP-RequestID

header

RequestID for http transaction

string

Responses

200 - OK

201 - Created

401 - Authentication Error

403 - Authorization Error

404 - Not Found

500 - Internal Server Error

PUT /onap/automationcomposition/v2/instantiation

Updates automation composition definitions

  • Description: Updates automation composition definitions, returning the updated composition definition IDs

  • Consumes: [‘application/json’, ‘application/yaml’]

  • Produces: [‘application/json’, ‘application/yaml’]

Parameters

Name

Position

Description

Type

automationCompositions

body

Entity Body of Automation Composition

X-ONAP-RequestID

header

RequestID for http transaction

string

Responses

200 - OK

201 - Created

401 - Authentication Error

403 - Authorization Error

404 - Not Found

500 - Internal Server Error

DELETE /onap/automationcomposition/v2/instantiation

Delete a automation composition

  • Description: Deletes a automation composition, returning optional error details

  • Produces: [‘application/json’, ‘application/yaml’]

Parameters

Name

Position

Description

Type

name

query

Automation composition definition name

string

version

query

Automation composition definition version

string

X-ONAP-RequestID

header

RequestID for http transaction

string

Responses

200 - OK

204 - No Content

401 - Authentication Error

403 - Authorization Error

500 - Internal Server Error

PUT /onap/automationcomposition/v2/instantiation/command

Issue a command to the requested automation compositions

  • Description: Issues a command to an automation composition, ordering a state change on the composition

  • Consumes: [‘application/json’, ‘application/yaml’]

  • Produces: [‘application/json’, ‘application/yaml’]

Parameters

Name

Position

Description

Type

command

body

Entity Body of automation composition command

X-ONAP-RequestID

header

RequestID for http transaction

string

Responses

200 - OK

201 - Created

401 - Authentication Error

403 - Authorization Error

404 - Not Found

500 - Internal Server Error

Instantiation Automation Composition Instance Lifecycle Management

This sub API is used to manage the lifecycle of Automation Composition Instances. An Automation Composition Instance can be in the states described here: 2.1 Automation Composition Instance States. Managing the lifecycle of an Automation Composition Instance amounts to steering the Automation Composition through its states.

The sub API allows upgrades and downgrades of Automation Composition Instances to be pushed to participants following the semantics described here: 4.1 Management of Automation Composition Instance Configurations. When the API is used to update the participants on a Automation Composition Instance, the new/upgraded/downgraded definition of the Automation Composition is pushed to the participants. Note that the API asks the participants in an Automation Composition Instance to perform the update, it is the responsibility of the participants to execute the update and report the result using the protocols described here: CLAMP Participants. The progress and result of an update can be monitored using the Monitoring API.

The sub API also allows a state change of an Automation Composition Instance to be ordered. The required state of the Automation Composition Instance is pushed to participants in an Automation Composition Instance using the API. Note that the API asks the participants in an Automation Composition Instance to perform the state change, it is the responsibility of the participants to execute the state change and report the result using the protocols described here: CLAMP Participants. The progress and result of a state change can be monitored using the Monitoring API <monitoring-api>.

Warning

The Swagger for the Instantiation Lifecycle Management API will appear here.

Monitoring API

The Monitoring API allows the state and statistics of Participants, Automation Composition Instances and their Automation Composition Elements to be monitored. This API is used by the CLAMP GUI. The API provides filtering so that specific Participants and Automation Composition Instances can be retrieved. In addition, the quantity of statistical information to be returned can be scoped.

GET /onap/automationcomposition/v2/monitoring/acelement

Query details of the requested acElement stats

  • Description: Queries details of the requested acElement stats, returning all acElement stats

  • Produces: [‘application/json’, ‘application/yaml’]

Parameters

Name

Position

Description

Type

endTime

query

end time

string

id

query

Automation composition element id

string

name

query

Participant name

string

recordCount

query

Record count

integer

startTime

query

start time

string

version

query

Participant version

string

X-ONAP-RequestID

header

RequestID for http transaction

string

Responses

200 - OK

401 - Authentication Error

403 - Authorization Error

404 - Not Found

500 - Internal Server Error

GET /onap/automationcomposition/v2/monitoring/acelements/automationcomposition

Query details of the requested acElement stats in a automation composition

  • Description: Queries details of the requested acElement stats, returning all acElement stats

  • Produces: [‘application/json’, ‘application/yaml’]

Parameters

Name

Position

Description

Type

name

query

Automation composition name

string

version

query

Automation composition version

string

X-ONAP-RequestID

header

RequestID for http transaction

string

Responses

200 - OK

401 - Authentication Error

403 - Authorization Error

404 - Not Found

500 - Internal Server Error

GET /onap/automationcomposition/v2/monitoring/participant

Query details of the requested participant stats

  • Description: Queries details of the requested participant stats, returning all participant stats

  • Produces: [‘application/json’, ‘application/yaml’]

Parameters

Name

Position

Description

Type

endTime

query

end time

string

name

query

Automation composition participant name

string

recordCount

query

Record count

integer

startTime

query

start time

string

version

query

Automation composition participant version

string

X-ONAP-RequestID

header

RequestID for http transaction

string

Responses

200 - OK

401 - Authentication Error

403 - Authorization Error

404 - Not Found

500 - Internal Server Error

GET /onap/automationcomposition/v2/monitoring/participants/automationcomposition

Query details of all the participant stats in a automation composition

  • Description: Queries details of the participant stats, returning all participant stats

  • Produces: [‘application/json’, ‘application/yaml’]

Parameters

Name

Position

Description

Type

name

query

Automation composition name

string

version

query

Automation composition version

string

X-ONAP-RequestID

header

RequestID for http transaction

string

Responses

200 - OK

401 - Authentication Error

403 - Authorization Error

404 - Not Found

500 - Internal Server Error

Pass Through API

This API allows information to be passed to Automation Composition Elements in an Automation Composition.

Warning

The requirements on this API are still under discussion.

Warning

The Swagger for the Pass Through API will appear here.

Participant Standalone API

This API allows a Participant to run in standalone mode and to run standalone Automation Composition Elements.

Kubernetes participant can also be deployed as a standalone application and provides REST endpoints for onboarding helm charts to its local chart storage, installing and uninstalling of helm charts to a Kubernetes cluster. It also allows to configure a remote repository in Kubernetes participant for installing helm charts. User can onboard a helm chart along with the overrides YAML file, the chart gets stored in the local chart directory of Kubernetes participants. The onboarded charts can be installed and uninstalled. The GET API fetches all the available helm charts from the chart storage.

DELETE /onap/k8sparticipant/helm/chart/{name}/{version}

Delete the chart

  • Produces: [‘*/*’]

Parameters

Name

Position

Description

Type

name

path

name

string

version

path

version

string

Responses

200 - OK

204 - Chart Deleted

401 - Unauthorized

403 - Forbidden

GET /onap/k8sparticipant/helm/charts

Return all Charts

  • Produces: [‘application/json’]

Responses

200 - chart List

401 - Unauthorized

403 - Forbidden

404 - Not Found

POST /onap/k8sparticipant/helm/install

Install the chart

  • Consumes: [‘application/json’]

  • Produces: [‘application/json’]

Parameters

Name

Position

Description

Type

info

body

info

Responses

200 - OK

201 - chart Installed

401 - Unauthorized

403 - Forbidden

404 - Not Found

POST /onap/k8sparticipant/helm/onboard/chart

Onboard the Chart

  • Consumes: [‘multipart/form-data’]

  • Produces: [‘application/json’]

Parameters

Name

Position

Description

Type

chart

formData

file

info

formData

string

values

body

values

Responses

200 - OK

201 - Chart Onboarded

401 - Unauthorized

403 - Forbidden

404 - Not Found

POST /onap/k8sparticipant/helm/repo

Configure helm repository

  • Consumes: [‘application/json’]

  • Produces: [‘application/json’]

Parameters

Name

Position

Description

Type

repo

body

repo

Responses

200 - OK

201 - Repository added

401 - Unauthorized

403 - Forbidden

404 - Not Found

DELETE /onap/k8sparticipant/helm/uninstall/{name}/{version}

Uninstall the Chart

  • Produces: [‘application/json’]

Parameters

Name

Position

Description

Type

name

path

name

string

version

path

version

string

Responses

200 - OK

201 - chart Uninstalled

204 - No Content

401 - Unauthorized

403 - Forbidden

Participant Simulator API

This API allows a Participant Simulator to be started and run for test purposes.

PUT /onap/participantsim/v2/elements

Updates simulated automation composition elements

  • Description: Updates simulated automation composition elements, returning the updated automation composition definition IDs

  • Consumes: [‘application/json’]

  • Produces: [‘application/json’, ‘application/yaml’]

Parameters

Name

Position

Description

Type

body

body

Body of a automation composition element

X-ONAP-RequestID

header

RequestID for http transaction

string

Responses

200 - OK

201 - Created

401 - Authentication Error

403 - Authorization Error

404 - Not Found

500 - Internal Server Error

GET /onap/participantsim/v2/elements/{name}/{version}

Query details of the requested simulated automation composition elements

  • Description: Queries details of the requested simulated automation composition elements, returning all automation composition element details

  • Produces: [‘application/json’, ‘application/yaml’]

Parameters

Name

Position

Description

Type

name

path

Automation composition element name

string

version

path

Automation composition element version

string

X-ONAP-RequestID

header

RequestID for http transaction

string

Responses

200 - OK

401 - Authentication Error

403 - Authorization Error

404 - Not Found

500 - Internal Server Error

PUT /onap/participantsim/v2/participants

Updates simulated participants

  • Description: Updates simulated participants, returning the updated automation composition definition IDs

  • Consumes: [‘application/json’]

  • Produces: [‘application/json’, ‘application/yaml’]

Parameters

Name

Position

Description

Type

body

body

Body of a participant

X-ONAP-RequestID

header

RequestID for http transaction

string

Responses

200 - OK

201 - Created

401 - Authentication Error

403 - Authorization Error

404 - Not Found

500 - Internal Server Error

GET /onap/participantsim/v2/participants/{name}/{version}

Query details of the requested simulated participants

  • Description: Queries details of the requested simulated participants, returning all participant details

  • Produces: [‘application/json’, ‘application/yaml’]

Parameters

Name

Position

Description

Type

name

path

Participant name

string

version

path

Participant version

string

X-ONAP-RequestID

header

RequestID for http transaction

string

Responses

200 - OK

401 - Authentication Error

403 - Authorization Error

404 - Not Found

500 - Internal Server Error

End of Document