What's on this page

Catalog

The following is the details of the API the enables descriptors to be managed within the catalog. Assembly descriptors can be added, listed, updated and deleted from the catalog. Resource descriptors can be listed and deleted but can only be added or updated through the resource manager API above.

Associated with each example is a table explaining the fields in the example. This includes the name of the field, a brief description and whether the field is mandatory. Whether a field is required or not is based on the context of the examples. The underlying API definition may mark a field as optional, but in some contexts, the fields must be supplied.

In the examples below field names shown in italics are example names and not the real one to be used in messages.

Get a summary of all Descriptors

This request returns a summary of the descriptors known to the LM Catalog.

Request Format

Aspect Value
Endpoint URL /api/catalog/descriptors
HTTP Method GET

Response Format

Aspect Value
Response Code 200 Ok

Example Response

[

  {

​    "name": "resource::t_simple::1.0",

​    "description": "resource for  t_simple",

​    "links": [

​      {

​        "rel": "self",

​        "href": "http://192.168.99.100:8280/api/ /catalog/descriptors/resource::t_simple::1.0"

​      }

​    ]

  },

  {

​    "name": "resource::h_simple::1.0",

​    "description": "resource for  t_simple",

​    "links": [

​      {

​        "rel": "self",

​        "href": "http://192.168.99.100:8280 /api/catalog/descriptors/resource::h_simple::1.0"

​      }

​    ]

  }

]

Response properties

Field Description Mandatory
name The name of the descriptor Yes
description The descriptor description Yes
links A collection of links to the descriptor Yes
rel Will always be set to self Yes
href The url to retrieve the descriptor from the catalog Yes

Create Assembly Descriptor

Creates a new assembly descriptor in the LM Catalog.

Request Format

Aspect Value
Endpoint URL /api/catalog/descriptors
Content-Type: application/yaml
HTTP Method POST

Example Request

The content of the request will be an assembly descriptor in YAML format. See Assembly Descriptor YAML Specification.

Response Format

Aspect Value
Response Code 201 Ok

Example Response

{

  "validationWarnings": []

}

Response properties

Field Description Mandatory
validationWarnings Will contain a list of warnings about the descriptor that has been created, if empty the descriptor is valid. Yes

NOTE: If the Descriptor you are trying to create already exists then you will get an HTTP 409 status code and an error message contained within the response.

Delete Assembly Descriptor

Deletes an assembly descriptor from the LM Catalog.

Request Format

Aspect Value
Endpoint URL /api/catalog/descriptors/{descriptorName}
HTTP Method DELETE

The descriptor name is the full name of the descriptor, e.g. assembly::t_single::1.0. This will need to be encoded appropriately for use as a url – i.e. assembly%3A%3At_single%3A%3A1.0

Response Format

Aspect Value
Response Code 204 Ok

Get Assembly Descriptor by Name

Returns an existing assembly descriptor from the LM Catalog.

Request Format

Aspect Value
Endpoint URL /api/catalog/descriptors/{descriptorName}
HTTP Method Get

The descriptor name is the full name of the descriptor, e.g. assembly::t_single::1.0. This will need to be encoded appropriately for use as a url – i.e. assembly%3A%3At_single%3A%3A1.0

Response Format

Aspect Value
Response Code 201 Ok

The body will contain the descriptor in YAML format

Update Assembly Descriptor

Updates an existing assembly descriptor in the LM Catalog.

Request Format

Aspect Value
Endpoint URL /api/catalog/descriptors/{descriptorName
Content-Type: application/yaml
HTTP Method PUT

The descriptor name is the full name of the descriptor, e.g. assembly::t_single::1.0. This will need to be encoded appropriately for use as a url – i.e. assembly%3A%3At_single%3A%3A1.0

Example Request

The content of the request will be an assembly descriptor in YAML format. See Assembly Descriptor YAML Specification.

Response Format

Aspect Value
Response Code 200 Ok

Example Response

{

  "validationWarnings": []

}

Response properties

Field Description Mandatory
validationWarnings Will contain a list of warnings about the descriptor that has been created, if empty the descriptor is valid. Yes

NOTE: If the Descriptor you are trying to create already exists then you will get an HTTP 409 status code and an error message contained within the response.