What's on this page

Deployment Location

The following details the API used to manage Deployment Locations within TNC-O.

Associated with each definition are details of the request parameters and responses. These include the name of each field plus 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.

For a 40x, 50x or any other error response please see error response codes

Create a new Deployment Location

Creates a new Deployment Location to be created

Request

AspectValue
Endpoint URL/api/deploymentLocations
Content-Typeapplication/json
HTTP MethodPOST

Body

FieldDescriptionMandatory
nameThe name of the Deployment LocationYes
descriptionDescription of the Deployment LocationNo
resourceManagerID of the Resource Manager to manage the Deployment LocationYes
infrastructureTypeType of infrastructure managed at this Deployment LocationYes
infrastructureSpecificPropertiesSet of name-value pairs to be passed to the Resource Manager managing this location. The list of properties is dependent upon the location but is usually where connection details for the location are set, so the Resource Manager can reach the locationNo

Example:

{

​    "name":"London-4",
​    "description":"London 4 Data Center - OpenStack",
​    "resourceManager":"8e266bc5-e613-4b0d-9ae0-50db6454b026",
​    "infrastructureType":"docker",
​    "infrastructureSpecificProperties": [
​        {
​            "propertyName-1" : "propertyValue-1",
​            "propertyName-2" : "propertyValue-2"
​        }
​    ]
}

Response

AspectValue
Response Code201 (Created)

Headers

FieldDescription
locationEndpoint to Deployment Location resource

Body

FieldDescription
idUnique ID of the Deployment Location
nameThe name of the Deployment Location
descriptionDescription of the Deployment Location
resourceManagerID of the Resource Manager that manages the Deployment Location
infrastructureTypeType of infrastructure managed at this Deployment Location

Update Deployment Location

Update either the description or the infrastructure properties of a Deployment Location.

Request

AspectValue
Endpoint URL/api/deploymentLocation/{deployLocId}
Content-Typeapplication/json
HTTP MethodPUT

Body

FieldDescriptionMandatory
descriptionDescription of the Deployment LocationNo
infrastructureSpecificPropertiesSet of name-value pairs to be passed to the Resource Manager managing this location. The list of properties is dependent upon the location but is usually where connection details for the location are set, so the Resource Manager can reach the locationNo

Example:

{
​    "description":"London 4 Data Center - OpenStack",
​    "infrastructureSpecificProperties": [
​        {
​            "propertyName-1" : "propertyValue-1",
​            "propertyName-2" : "propertyValue-2"
​        }
​    ]
}

Response

AspectValue
Response Code200 (OK)

Remove Deployment Location

Remove a Deployment Location from TNC-O.

Request Format

AspectValue
Endpoint URL/api/deploymentLocation/{deployLocId}
HTTP MethodDELETE

Path Parameters

FieldDescriptionMandatory
deployLocIdThe unique ID of the Deployment Location being removedYes

Response

AspectValue
Response Code204 (No Content)

Get all Deployment Locations

Get a list of all existing Deployment Locations. An optional match against a partial name string or Resource Manager name can be provided.

Request

AspectValue
Endpoint URL/api/deploymentLocations?{query-params}
HTTP MethodGET
ParametersName

Query Parameters

FieldDescriptionMandatory
namename to use as a partial name match in order to file the resultsNo
resourceManagerNamename of a Resource Manager to reduce the results to the locations associated with itNo

Response

AspectValue
Response Code200 (OK)
Content-Typeapplication/json

Body

The body includes a single list of locations, each with the following fields:

FieldDescription
idUnique ID of the Deployment Location
nameThe name of the Deployment Location
descriptionDescription of the Deployment Location
resourceManagerID of the Resource Manager that manages the Deployment Location
infrastructureTypeType of infrastructure managed at this Deployment Location

Example:

[
​    {
​        "id":"London-4",
​        "name":"London-4",
​        "description":"London 4 Data Center - OpenStack",
​        "resourceManager":"8e266bc5-e613-4b0d-9ae0-50db6454b026",
​        "infrastructureType":"docker"
​    }
]

Get Deployment Location

Request the details for a specific Deployment Location identified by it’s unique ID.

Request

AspectValue
Endpoint URL/api/deploymentLocation/{deployLocId}
HTTP MethodGET

Path Parameters

FieldDescriptionMandatory
deployLocIdThe unique ID of the Deployment Location being requestedYes

Response

AspectValue
Response Code200 (OK)
Content-Typeapplication/json

Body

FieldDescription
idUnique ID of the Deployment Location
nameThe name of the Deployment Location
descriptionDescription of the Deployment Location
resourceManagerID of the Resource Manager that manages the Deployment Location
infrastructureTypeType of infrastructure managed at this Deployment Location

Example:

{
​    "id":"8e266bc5-e613-4b0d-9ae0-50db6454b026",
​    "name":"London-4",
​    "description":"London 4 Data Center - Docker",
​    "resourceManager":"8e266bc5-e613-4b0d-9ae0-50db6454b026",
​    "infrastructureType":"docker"
}