Service and service instance APIs
This section includes all service and service instance APIs with examples.
Cloud Automation Manager 4.1.0.0 allows users to create multiple versions for a service. If you don't want to enable service versioning support in Cloud Automation Manager 4.1.0.0 and continue to work using older versions, set the COMPATIBILITY_MODE to TRUE.
To set the COMPATIBILITY_MODE to TRUE:
-
Make sure you have Kubernetes CLI installed.
-
Select Install CLI tools from the IBM Cloud Pak for Multicloud Management console and install Kubernetes CLI.
-
Run the following command:
kubectl set env deployment/cam-service-composer-api COMPATIBILITY_MODE=true -n services - Edit a service
- Create Action
- Invoke Action
- SMTP connection
- Publish a service
- Retire a service
- Unretire a service
- GET the list of services
- Terminate a service
- Create Service-Instance: POST call
- Deploy service instance
- Get input parameters of a Service Instance
- Edit Service Instance
- Retry Service Instance
- Resume Service Instance
- Upgrade or downgrade a Service Instance
- Bind a service instance
- Unbind Instance
- Cleanup Service Instance
- Cleanup Service Instance in inprogress state
- Get details of a Service Instance by using the id
- Get the list of deployed instance: GET call
- Upload service icons
- Delete service icons
- Retrieve all service icons
- Download service icon
- Encrypt secured data
Create a service
This API call creates a service.
curl -k -X POST -H "Authorization: Bearer ${CAM_BEARER_TOKEN}" -H "Content-Type: application/json" -H "Accept: application/json" -d @cc_create.json "https://${CAM_HOST}:${CAM_PORT}/cam/composer/api/v1/ServiceManifest?tenantId=${CAM_TENANT_ID}&ace_orgGuid=${ICP_TEAM}&cloudOE_spaceGuid={NAMESPACE_ID}
The cloudOE_spaceGuid contains the value of the namespace ID. Note that the NAMESPACE_ID must be the desired namespace to deploy to.
If you want to create a service in global namespace, then you do not have to specify any value for &cloudOE_spaceGuid parameter.
POST method
Headers required:
Content-Type: application/json
Authorization: <bearer token>
{
"service": {
"specVersion": "v3",
"catalog_metadata": {
"name": "dsfdfs",
"description": "",
"image": "serviceicon_1.svg",
"category": "CloudServices",
"bullets": [],
"providerDisplayName": "IBM",
"longDescription": "",
"documentationUrl": "",
"supportUrl": "",
"bindable": false,
"updatable": "",
"systemTags": true,
"author": "admin"
},
"tags": [
{
"name": "Request_Group",
"label": "Request_Group",
"type": "string",
"immutable": true,
"hidden": false,
"required": false,
"secured": false,
"description": "The current context group id of the current user that requested the provisioning of the template. This is important because a user may be part of more than one group and this identifies the context of which group the user made the request.",
"isSystemTag": true,
"default": "${svc_instance.group}",
"customtype": "string",
"permission": "Read-Only"
},
{
"name": "Request_User",
"label": "Request_User",
"type": "string",
"immutable": true,
"hidden": false,
"required": false,
"secured": false,
"description": "The user id of the current user that requested the provisioning of the template.",
"isSystemTag": true,
"default": "${svc_instance.owner}",
"customtype": "string",
"permission": "Read-Only"
},
{
"name": "Service_Name",
"label": "Service_Name",
"type": "string",
"immutable": true,
"hidden": false,
"required": false,
"secured": false,
"description": "Name provided for the service instance by the end user at time of request",
"isSystemTag": true,
"default": "${svc_instance.name}",
"customtype": "string",
"permission": "Read-Only"
},
{
"name": "Service_Identifier",
"label": "Service_Identifier",
"type": "string",
"immutable": true,
"hidden": false,
"required": false,
"secured": false,
"description": "Unique identifer generated by ICAM which is mapped to the service instance of the template provisioned.",
"isSystemTag": true,
"default": "${svc_instance.service_instance_id}",
"customtype": "string",
"permission": "Read-Only"
}
],
"actions": [
{
"type": "provision",
"name": "Provision",
"description": "Default action for deployment of service",
"input_parameters": [],
"flow": {
"conditions": [],
"templates": [
{
"Amazon EC2 Virtual Server with SSH key": {
"title": "Amazon EC2 Virtual Server with SSH key_25e3a0",
"template_name": "Amazon EC2 Virtual Server with SSH key1",
"version": "2.3",
"id": "amazoneceeb670ee",
"template_type": "Terraform",
"template_content_type": "Amazon EC2",
"template_provider": "Amazon EC2",
"instance_name": "",
"cloud_connection_name": "",
"template_data_objects": {},
"template_params": {
"": "us-east-1",
"aws_image": "ubuntu/images/hvm-ssd/ubuntu-trusty-14.04-amd64-server-*",
"aws_image_size": "t2.small",
"aws_ami_owner_id": "099720109477",
"vpc_name_tag": "",
"subnet_name": "",
"public_ssh_key_name": "",
"public_ssh_key": ""
},
"outputs": [],
"warning": true,
"current_action_key": 0
}
}
],
"resthooks": [],
"notifications": [],
"sequence": {
"0": "amazoneceeb670ee"
},
"error_sequence": {}
},
"output_parameters": []
}
],
"plans": [
{
"name": "Standard",
"description": "To deploy a Standard plan",
"actions": [],
"plan_parameters": []
}
]
}
}
The response includes namespaceId, errors, and warnings. For example:
{
"ServiceEngine_InputFile": {
"service": {
"specVersion": "v3",
"catalog_metadata": {
"name": "dsfdfs",
"description": "",
"image": "serviceicon_1.svg",
"category": "CloudServices",
"bullets": [],
"providerDisplayName": "IBM",
"longDescription": "",
"documentationUrl": "",
"supportUrl": "",
"bindable": false,
"updatable": "",
"systemTags": true,
"author": "admin"
},
"tags": [
{
"name": "Request_Group",
"label": "Request_Group",
"type": "string",
"immutable": true,
"hidden": false,
"required": false,
"secured": false,
"description": "The current context group id of the current user that requested the provisioning of the template. This is important because a user may be part of more than one group and this identifies the context of which group the user made the request.",
"isSystemTag": true,
"default": "${svc_instance.group}",
"customtype": "string",
"permission": "Read-Only"
},
{
"name": "Request_User",
"label": "Request_User",
"type": "string",
"immutable": true,
"hidden": false,
"required": false,
"secured": false,
"description": "The user id of the current user that requested the provisioning of the template.",
"isSystemTag": true,
"default": "${svc_instance.owner}",
"customtype": "string",
"permission": "Read-Only"
},
{
"name": "Service_Name",
"label": "Service_Name",
"type": "string",
"immutable": true,
"hidden": false,
"required": false,
"secured": false,
"description": "Name provided for the service instance by the end user at time of request",
"isSystemTag": true,
"default": "${svc_instance.name}",
"customtype": "string",
"permission": "Read-Only"
},
{
"name": "Service_Identifier",
"label": "Service_Identifier",
"type": "string",
"immutable": true,
"hidden": false,
"required": false,
"secured": false,
"description": "Unique identifer generated by ICAM which is mapped to the service instance of the template provisioned.",
"isSystemTag": true,
"default": "${svc_instance.service_instance_id}",
"customtype": "string",
"permission": "Read-Only"
}
],
"actions": [
{
"type": "provision",
"name": "Provision",
"description": "Default action for deployment of service",
"input_parameters": [],
"flow": {
"conditions": [],
"templates": [
{
"Amazon EC2 Virtual Server with SSH key": {
"title": "Amazon EC2 Virtual Server with SSH key_25e3a0",
"template_name": "Amazon EC2 Virtual Server with SSH key",
"version": "2.3",
"id": "amazoneceeb670ee",
"template_type": "Terraform",
"template_content_type": "Amazon EC2",
"template_provider": "Amazon EC2",
"instance_name": "",
"cloud_connection_name": "",
"template_data_objects": {},
"template_params": {
"": "us-east-1",
"aws_image": "ubuntu/images/hvm-ssd/ubuntu-trusty-14.04-amd64-server-*",
"aws_image_size": "t2.small",
"aws_ami_owner_id": "099720109477",
"vpc_name_tag": "",
"subnet_name": "",
"public_ssh_key_name": "",
"public_ssh_key": ""
},
"outputs": [],
"warning": true,
"current_action_key": 0
}
}
],
"resthooks": [],
"notifications": [],
"sequence": {
"0": "amazoneceeb670ee"
},
"error_sequence": {}
},
"output_parameters": []
}
],
"plans": [
{
"name": "Standard",
"description": "To deploy a Standard plan",
"actions": [],
"plan_parameters": []
}
],
"tagId": "5c36d79c3abef7001aead045"
}
},
"service_id": "5cf5fd6e30483a00144c919f",
"namespaceId": "",
"id": "5cf5fd6e30483a00144c919e",
"warning": [
"Template doesnt exists or no access: response.statusCode: 400",
" Template amazoneceeb670ee does not have cloud connection name.",
"Templates- 'template_params' of type json object should have non-empty keys , template.id : amazoneceeb670ee"
]
}
For more information on the service validations (warnings/errors), see Service validations.
Edit a service
curl -k -X PUT -H "Authorization: Bearer ${CAM_BEARER_TOKEN}" -H "Content-Type: application/json" -H "Accept: application/json" -d @cc_create.json "https://${CAM_HOST}:${CAM_PORT}/cam/composer/api/v1/ServiceManifest/<Service-manifest-id>?tenantId=${CAM_TENANT_ID}&ace_orgGuid=${ICP_TEAM}&cloudOE_spaceGuid={NAMESPACE_ID}
Request Body:
cc_create.json
{
"ServiceEngine_InputFile": {
"service": {
"specVersion": "v3",
"catalog_metadata": {
"name": "test-sample1",
"description": "",
"image": "serviceicon_1.svg",
"category": "CloudServices",
"bullets": [],
"providerDisplayName": "IBM",
"longDescription": "",
"documentationUrl": "",
"supportUrl": "",
"bindable": false,
"updatable": "",
"systemTags": true,
"author": "admin"
},
"tags": [
{
"name": "Request_Group",
"label": "Request_Group",
"type": "string",
"immutable": true,
"hidden": false,
"required": false,
"secured": false,
"description": "The current context group id of the current user that requested the provisioning of the template. This is important because a user may be part of more than one group and this identifies the context of which group the user made the request.",
"isSystemTag": true,
"default": "${svc_instance.group}",
"customtype": "string",
"permission": "Read-Only"
},
{
"name": "Request_User",
"label": "Request_User",
"type": "string",
"immutable": true,
"hidden": false,
"required": false,
"secured": false,
"description": "The user id of the current user that requested the provisioning of the template.",
"isSystemTag": true,
"default": "${svc_instance.owner}",
"customtype": "string",
"permission": "Read-Only"
},
{
"name": "Service_Name",
"label": "Service_Name",
"type": "string",
"immutable": true,
"hidden": false,
"required": false,
"secured": false,
"description": "Name provided for the service instance by the end user at time of request",
"isSystemTag": true,
"default": "${svc_instance.name}",
"customtype": "string",
"permission": "Read-Only"
},
{
"name": "Service_Identifier",
"label": "Service_Identifier",
"type": "string",
"immutable": true,
"hidden": false,
"required": false,
"secured": false,
"description": "Unique identifer generated by ICAM which is mapped to the service instance of the template provisioned.",
"isSystemTag": true,
"default": "${svc_instance.service_instance_id}",
"customtype": "string",
"permission": "Read-Only"
}
],
"actions": [
{
"type": "provision",
"name": "Provision",
"description": "Default action for deployment of service",
"input_parameters": [],
"flow": {
"conditions": [],
"templates": [
{
"Amazon EC2 Virtual Server with SSH key": {
"title": "Amazon EC2 Virtual Server with SSH key_25e3a0",
"template_name": "Amazon EC2 Virtual Server with SSH key",
"version": "2.3",
"id": "amazoneceeb670ee",
"template_type": "Terraform",
"template_content_type": "Amazon EC2",
"template_provider": "Amazon EC2",
"instance_name": "",
"cloud_connection_name": "",
"template_data_objects": {},
"template_params": {
"": "us-east-1",
"aws_image": "ubuntu/images/hvm-ssd/ubuntu-trusty-14.04-amd64-server-*",
"aws_image_size": "t2.small",
"aws_ami_owner_id": "099720109477",
"vpc_name_tag": "",
"subnet_name": "",
"public_ssh_key_name": "",
"public_ssh_key": ""
},
"outputs": [],
"warning": true,
"current_action_key": 0,
"error": false
}
}
],
"resthooks": [],
"notifications": [],
"sequence": {
"0": "amazoneceeb670ee"
},
"error_sequence": {}
},
"output_parameters": []
}
],
"plans": [
{
"name": "Standard",
"description": "To deploy a Standard plan",
"actions": [],
"plan_parameters": []
}
]
}
}
}
Response:
{
"ServiceEngine_InputFile": {
"service": {
"specVersion": "v3",
"catalog_metadata": {
"name": "test-sample1",
"description": "",
"image": "serviceicon_1.svg",
"category": "CloudServices",
"bullets": [],
"providerDisplayName": "IBM",
"longDescription": "",
"documentationUrl": "",
"supportUrl": "",
"bindable": false,
"updatable": "",
"systemTags": true,
"author": "admin"
},
"tags": [
{
"name": "Request_Group",
"label": "Request_Group",
"type": "string",
"immutable": true,
"hidden": false,
"required": false,
"secured": false,
"description": "The current context group id of the current user that requested the provisioning of the template. This is important because a user may be part of more than one group and this identifies the context of which group the user made the request.",
"isSystemTag": true,
"default": "${svc_instance.group}",
"customtype": "string",
"permission": "Read-Only"
},
{
"name": "Request_User",
"label": "Request_User",
"type": "string",
"immutable": true,
"hidden": false,
"required": false,
"secured": false,
"description": "The user id of the current user that requested the provisioning of the template.",
"isSystemTag": true,
"default": "${svc_instance.owner}",
"customtype": "string",
"permission": "Read-Only"
},
{
"name": "Service_Name",
"label": "Service_Name",
"type": "string",
"immutable": true,
"hidden": false,
"required": false,
"secured": false,
"description": "Name provided for the service instance by the end user at time of request",
"isSystemTag": true,
"default": "${svc_instance.name}",
"customtype": "string",
"permission": "Read-Only"
},
{
"name": "Service_Identifier",
"label": "Service_Identifier",
"type": "string",
"immutable": true,
"hidden": false,
"required": false,
"secured": false,
"description": "Unique identifer generated by ICAM which is mapped to the service instance of the template provisioned.",
"isSystemTag": true,
"default": "${svc_instance.service_instance_id}",
"customtype": "string",
"permission": "Read-Only"
}
],
"actions": [
{
"type": "provision",
"name": "Provision",
"description": "Default action for deployment of service",
"input_parameters": [],
"flow": {
"conditions": [],
"templates": [
{
"Amazon EC2 Virtual Server with SSH key": {
"title": "Amazon EC2 Virtual Server with SSH key_25e3a0",
"template_name": "Amazon EC2 Virtual Server with SSH key",
"version": "2.3",
"id": "amazoneceeb670ee",
"template_type": "Terraform",
"template_content_type": "Amazon EC2",
"template_provider": "Amazon EC2",
"instance_name": "",
"cloud_connection_name": "",
"template_data_objects": {},
"template_params": {
"": "us-east-1",
"aws_image": "ubuntu/images/hvm-ssd/ubuntu-trusty-14.04-amd64-server-*",
"aws_image_size": "t2.small",
"aws_ami_owner_id": "099720109477",
"vpc_name_tag": "",
"subnet_name": "",
"public_ssh_key_name": "",
"public_ssh_key": ""
},
"outputs": [],
"warning": true,
"current_action_key": 0,
"error": false
}
}
],
"resthooks": [],
"notifications": [],
"sequence": {
"0": "amazoneceeb670ee"
},
"error_sequence": {}
},
"output_parameters": []
}
],
"plans": [
{
"name": "Standard",
"description": "To deploy a Standard plan",
"actions": [],
"plan_parameters": []
}
],
"tagId": "5c36d79c3abef7001aead045"
}
},
"service_id": "5cf5fd6e30483a00144c919f",
"namespaceId": "",
"id": "5cf5fd6e30483a00144c919e",
"warning": [
"Template doesnt exists or no access: response.statusCode: 400",
" Template amazoneceeb670ee does not have cloud connection name.",
"Templates- 'template_params' of type json object should have non-empty keys , template.id : amazoneceeb670ee"
]
}
For more information on the service validations (warnings/errors), see Service validations.
Create Action
Creates a stand-alone action independent of any service.
curl -k -X POST -H "Authorization: Bearer ${CAM_BEARER_TOKEN}" -H "Content-Type: application/json" -H "Accept: application/json" -d @cc_create.json "https://${CAM_HOST}:${CAM_PORT}/cam/composer/api/v1/Actions/createAction?tenantId=${CAM_TENANT_ID}&ace_orgGuid=${ICP_TEAM}&cloudOE_spaceGuid={NAMESPACE_ID}
The cloudOE_spaceGuid contains the value of the namespace. Note that the NAMESPACE_ID must be the desired namespace to deploy to.
POST method
Example BODY:
cc_create.json
{
"type": "provision",
"name": "newAct44f",
"description": "Default action for deployment of service",
"input_parameters": [],
"flow": {
"conditions": [],
"templates": [
{
"Template With Output Parameters": {
"title": "Template With Output Parameters_343311",
"template_name": "Template With Output Parameters ce0c21",
"version": "master",
"id": "template46b48313",
"template_type": "Terraform",
"template_content_type": "VMware vSphere",
"template_provider": "VMware vSphere",
"instance_name": "",
"cloud_connection_name": "Global-VV1",
"template_data_objects": {},
"template_params": {
"sleep": "10000",
"cam-ip": "9.5.29.229",
"data-server": "9.5.28.159",
"data-as-query-string": "id=1&name=test",
"region": "us-east-1"
},
"outputs": [
"resource-id",
"selected-region",
"data"
]
}
}
],
"resthooks": [],
"notifications": [],
"sequence": {
"0": "template46b48313"
}
},
"output_parameters": []
}
After your create an action, an action id is generated automatically:
Example response:
{
"ServiceEngine_InputFile": {
"service": {
"specVersion": "v3",
"catalog_metadata": {
"name": "dsfdfs",
"description": "",
"image": "serviceicon_1.svg",
"category": "CloudServices",
"bullets": [],
"providerDisplayName": "IBM",
"longDescription": "",
"documentationUrl": "",
"supportUrl": "",
"bindable": false,
"updatable": "",
"systemTags": true,
"author": "admin"
},
"tags": [
{
"name": "Request_Group",
"label": "Request_Group",
"type": "string",
"immutable": true,
"hidden": false,
"required": false,
"secured": false,
"description": "The current context group id of the current user that requested the provisioning of the template. This is important because a user may be part of more than one group and this identifies the context of which group the user made the request.",
"isSystemTag": true,
"default": "${svc_instance.group}",
"customtype": "string",
"permission": "Read-Only"
},
{
"name": "Request_User",
"label": "Request_User",
"type": "string",
"immutable": true,
"hidden": false,
"required": false,
"secured": false,
"description": "The user id of the current user that requested the provisioning of the template.",
"isSystemTag": true,
"default": "${svc_instance.owner}",
"customtype": "string",
"permission": "Read-Only"
},
{
"name": "Service_Name",
"label": "Service_Name",
"type": "string",
"immutable": true,
"hidden": false,
"required": false,
"secured": false,
"description": "Name provided for the service instance by the end user at time of request",
"isSystemTag": true,
"default": "${svc_instance.name}",
"customtype": "string",
"permission": "Read-Only"
},
{
"name": "Service_Identifier",
"label": "Service_Identifier",
"type": "string",
"immutable": true,
"hidden": false,
"required": false,
"secured": false,
"description": "Unique identifer generated by ICAM which is mapped to the service instance of the template provisioned.",
"isSystemTag": true,
"default": "${svc_instance.service_instance_id}",
"customtype": "string",
"permission": "Read-Only"
}
],
"actions": [
{
"type": "provision",
"name": "Provision",
"description": "Default action for deployment of service",
"input_parameters": [],
"flow": {
"conditions": [],
"templates": [
{
"Amazon EC2 Virtual Server with SSH key": {
"title": "Amazon EC2 Virtual Server with SSH key_25e3a0",
"template_name": "Amazon EC2 Virtual Server with SSH key",
"version": "2.3",
"id": "amazoneceeb670ee",
"template_type": "Terraform",
"template_content_type": "Amazon EC2",
"template_provider": "Amazon EC2",
"instance_name": "",
"cloud_connection_name": "",
"template_data_objects": {},
"template_params": {
"": "us-east-1",
"aws_image": "ubuntu/images/hvm-ssd/ubuntu-trusty-14.04-amd64-server-*",
"aws_image_size": "t2.small",
"aws_ami_owner_id": "099720109477",
"vpc_name_tag": "",
"subnet_name": "",
"public_ssh_key_name": "",
"public_ssh_key": ""
},
"outputs": [],
"warning": true,
"current_action_key": 0
}
}
],
"resthooks": [],
"notifications": [],
"sequence": {
"0": "amazoneceeb670ee"
},
"error_sequence": {}
},
"output_parameters": []
}
],
"plans": [
{
"name": "Standard",
"description": "To deploy a Standard plan",
"actions": [],
"plan_parameters": []
}
],
"tagId": "5c36d79c3abef7001aead045"
}
},
"service_id": "5cf5fd6e30483a00144c919f",
"namespaceId": "",
"id": "5cf5fd6e30483a00144c919e",
"warning": [
"Template doesnt exists or no access: response.statusCode: 400",
" Template amazoneceeb670ee does not have cloud connection name.",
"Templates- 'template_params' of type json object should have non-empty keys , template.id : amazoneceeb670ee"
]
}
For complete format of the action, see action section in the Editing a service file section.
Invoke Action
Use the action id generated in the Create Action API call to invoke an action.
curl -k -X POST -H "Authorization: Bearer ${CAM_BEARER_TOKEN}" -H
"Content-Type: application/json" -H "Accept: application/json" -d @cc_create.json "https://${CAM_HOST}:${CAM_PORT}/cam/composer/api/v1/ActionInstances/invokeAction?tenantId=${CAM_TENANT_ID}&ace_orgGuid=${ICP_TEAM}&cloudOE_spaceGuid={NAMESPACE_ID}
The cloudOE_spaceGuid contains the value of the namespace. Note that the NAMESPACE_ID must be the desired namespace to deploy to.
POST method
Example BODY:
"action_data": {
"action_id": "5caf3b64b52b5a00182116af",
"name": "inst2 "
}
Example response:
{
"actionInstance": {
"id": "5cd01a095253de001918ce2c"
}
}
It returns Action instance ID.
Publish a service
To publish a service, we can make use of the following API:
curl -k -X PUT -H "Authorization: Bearer ${CAM_BEARER_TOKEN}" -H "Content-Type: application/json" -H "Accept: application/json" -d @cc_create.json "https://${CAM_HOST}:${CAM_PORT}/cam/composer/api/v1/Service/<service-id>?tenantId=${CAM_TENANT_ID}&ace_orgGuid=${ICP_TEAM}&cloudOE_spaceGuid={NAMESPACE_ID}
The cloudOE_spaceGuid contains the value of the namespace. Note that the NAMESPACE_ID is the id of the namespace that was used during service creation.
If you want to publish a service that is deployed on a global namespace, then you do not have to specify any value for &cloudOE_spaceGuid parameter.
PUT method
Request Body: {"status":"Published"}
Headers: Content-Type: “application/json”
Authorization: “<bearer token>”
Note: You cannot delete or edit a published service, but you can retire it.
Retire a service
This API retires both published services and draft services.
curl -k -X POST -H "Authorization: Bearer ${CAM_BEARER_TOKEN}" -H "Content-Type: application/json" -H "Accept: application/json" -d @cc_create.json "https://${CAM_HOST}:${CAM_PORT}/cam/composer/api/v1/Service/retireService?tenantId=${CAM_TENANT_ID}&ace_orgGuid=${ICP_TEAM}
cc_create.json: {"serviceID":"5c49a3daf6b12f001bfbea78"}
cc_create.json
{"serviceID":"5c49a3daf6b12f001bfbea78"}
Unretire a service
This API unretires the already retired service and moves it back to Published state. This feature is available only in Cloud Automation Manager 4.1.0.1 release onwards.
curl -k -X POST -H "Authorization: Bearer ${CAM_BEARER_TOKEN}" -H "Content-Type: application/json" -H "Accept: application/json" -d @cc_create.json "https://${CAM_HOST}:${CAM_PORT}/cam/composer/api/v1/ServiceManifest/<service-id>/unretire?tenantId=${CAM_TENANT_ID}&ace_orgGuid=${ICP_TEAM}
cc_create.json: {"serviceID":"5c49a3daf6b12f001bfbea78"}
GET the list of services (service)
curl -k -X GET -H "Authorization: Bearer ${CAM_BEARER_TOKEN}" "https://${CAM_HOST}:${CAM_PORT}/cam/composer/api/v1/service?tenantId=${CAM_TENANT_ID}&ace_orgGuid=${ICP_TEAM}&cloudOE_spaceGuid=${ICP_NAMESPACE}"
The service records that belong to the namespace value provided for cloudOE_spaceGuid are fetched as a result of this curl command. If you speicfy any value for cloudOE_spaceGuid, then all default services are fetched along
with services that belong to globally accessible namespace.
Example response:
[{
"name": "helmmultiple",
"author": "admin",
"image": "serviceicon_1.svg",
"specVersion": "v2",
"status": "Draft",
"plans": {
"Standard": "5ab0dcb27bf798001e85724b"
},
"tags": [],
"parameters": [],
"serviceManifestId": "5ab0dcb27bf798001e857249",
"lastUpdated": "2018-03-20T10:04:34.051Z",
"published": "",
"creationTime": "Tue Mar 20 2018 10:04:34 GMT+0000 (UTC)",
"conditions": [{
"ibm-charts/ibm-nodejs-sample": {
"title": "ibm-charts/ibm-nodejs-sample",
"template_name": "ibm-nodejs-sample",
"version": "1.2.0",
"id": "ibmchartc99c9c4a",
"template_type": "Helm",
"template_content_type": "IBM Cloud Private",
"template_provider": "IBM Cloud Private",
"instance_name": "",
"cloud_connection_name": "localicp",
"template_dataobjects": {},
"template_params": {
"namespace": "default",
"image-repository": "ibmcom/icp-nodejs-sample",
"image-tag": "latest",
"image-pullPolicy": "Always",
"livenessProbe-initialDelaySeconds": 30,
"livenessProbe-periodSeconds": 10,
"service-name": "Node",
"service-type": "NodePort",
"service-port": 3000,
"resources-limits-cpu": "100m",
"resources-limits-memory": "128Mi",
"resources-requests-cpu": "100m",
"resources-requests-memory": "128Mi",
"autoscaling-enabled": "",
"autoscaling-minReplicas": 1,
"autoscaling-maxReplicas": 2,
"autoscaling-metrics-cpu-targetAverageUtilization": "100m"
},
"outputs": []
}
}, {
"publichelm/wordpress": {
"title": "publichelm/wordpress",
"template_name": "wordpress",
"version": "0.8.8",
"id": "publichea9b36841",
"template_type": "Helm",
"template_content_type": "IBM Cloud Private",
"template_provider": "IBM Cloud Private",
"instance_name": "",
"cloud_connection_name": "localicp",
"template_dataobjects": {},
"template_params": {
"namespace": "services",
"image": "bitnami/wordpress:4.9.4-r2",
"imagePullPolicy": "IfNotPresent",
"wordpressUsername": "user",
"wordpressEmail": "user@example.com",
"wordpressFirstName": "FirstName",
"wordpressLastName": "LastName",
"wordpressBlogName": "User's Blog!",
"allowEmptyPassword": "yes",
"externalDatabase-host": "localhost",
"externalDatabase-user": "bn_wordpress",
"externalDatabase-password": "",
"externalDatabase-database": "bitnami_wordpress",
"externalDatabase-port": 3306,
"mariadb-enabled": true,
"mariadb-mariadbDatabase": "bitnami_wordpress",
"mariadb-mariadbUser": "bn_wordpress",
"mariadb-persistence-enabled": true,
"mariadb-persistence-accessMode": "ReadWriteOnce",
"mariadb-persistence-size": "8Gi",
"serviceType": "LoadBalancer",
"healthcheckHttps": "",
"livenessProbe-initialDelaySeconds": 120,
"livenessProbe-periodSeconds": 10,
"livenessProbe-timeoutSeconds": 5,
"livenessProbe-failureThreshold": 6,
"livenessProbe-successThreshold": 1,
"readinessProbe-initialDelaySeconds": 30,
"readinessProbe-periodSeconds": 10,
"readinessProbe-timeoutSeconds": 5,
"readinessProbe-failureThreshold": 6,
"readinessProbe-successThreshold": 1,
"ingress-enabled": "",
"ingress-hosts-0-name": "wordpress.local",
"ingress-hosts-0-tls": "",
"ingress-hosts-0-tlsSecret": "wordpress.local-tls",
"ingress-hosts-0-annotations": "",
"ingress-secrets": "",
"persistence-enabled": true,
"persistence-accessMode": "ReadWriteOnce",
"persistence-size": "10Gi",
"resources-requests-memory": "512Mi",
"resources-requests-cpu": "300m"
},
"outputs": []
}
}, {
"publichelm/filebeat": {
"title": "publichelm/filebeat",
"template_name": "filebeat",
"version": "0.1.0",
"id": "publiche046d1a27",
"template_type": "Helm",
"template_content_type": "IBM Cloud Private",
"template_provider": "IBM Cloud Private",
"instance_name": "",
"cloud_connection_name": "localicp",
"template_dataobjects": {},
"template_params": {
"namespace": "kube-system",
"image-repository": "docker.elastic.co/beats/filebeat",
"image-tag": "6.2.2",
"image-pullPolicy": "IfNotPresent",
"config-processors-0-add_cloud_metadata": "",
"rbac-create": true,
"serviceAccount-create": true,
"serviceAccount-name": "",
"config-filebeat.config-prospectors-path": "${path.config}/prospectors.d/*.yml",
"config-filebeat.config-prospectors-reload.enabled": "",
"config-filebeat.config-modules-path": "${path.config}/modules.d/*.yml",
"config-filebeat.config-modules-reload.enabled": "",
"config-filebeat.prospectors-0-type": "log",
"config-filebeat.prospectors-0-enabled": true,
"config-filebeat.prospectors-0-paths-0": "/var/log/**",
"config-filebeat.prospectors-0-exclude_files-0": "(\\.[0-9]{1,})$",
"config-filebeat.prospectors-0-exclude_files-1": "templates/clusterrolebinding.yaml'.gz$'",
"config-output.file-path": "/usr/share/filebeat/data",
"config-output.file-filename": "filebeat",
"config-output.file-rotate_every_kb": 10000,
"config-output.file-number_of_files": 5
},
"outputs": []
}
}],
"tag": "5a8e69872210e0001d311d9a",
"template_mapping": {
"ibmchartc99c9c4a": "ibm-nodejs-sample",
"publichea9b36841": "wordpress",
"publiche046d1a27": "filebeat"
},
"id": "5ab0dcb27bf798001e85724a",
"orgGuid": "dummy-org-id",
"spaceGuid": "dummy-space-id",
"namespaceId": "dummy-space-id",
"displayName": "helmmultiple"
}]
Terminate a service
You can terminate a service instance from the deployed service instances.
curl -k -X DELETE -H "Authorization: Bearer ${CAM_BEARER_TOKEN}" "https://${CAM_HOST}:${CAM_PORT}/cam/composer/api/v1/ServiceInstances/<service-instance-id>?tenantId=${CAM_TENANT_ID}&ace_orgGuid=${ICP_TEAM}&cloudOE_spaceGuid=${ICP_NAMESPACE}"
POST method
Request Body: {"service_instance_details":{"service_instance_id":"<service-instance-id>"}}
Note: Service-instance-id is the id of the instance you wish to terminate.
Headers: Content-Type: “application/json”
Authorization: “<bearer token>”
Create Service-Instance: POST call
Sample URL:
curl -k -X POST -H "Authorization: Bearer ${CAM_BEARER_TOKEN}" -H "Content-Type: application/json" -H "Accept: application/json" -d @cc_create.json "https://${CAM_HOST}:${CAM_PORT}/cam/composer/api/v1/Service/<service-id>/ServiceInstances?tenantId=${CAM_TENANT_ID}&ace_orgGuid=${ICP_TEAM}&cloudOE_spaceGuid=${ICP_NAMESPACE}"
If you have created a service in a particular namespace, then you can deploy the service in that namespace only. If the service belongs to a global namespace, then you have the option to specify the namepsace value in cloudOE_spaceGuid.
Cc_create.json
{"name”:"test","instance_plan":"Standard","tags_input":[{"value":"${svc_instance.group}","label":"Request_Group","name":"Request_Group","secured":false},{"value":"${svc_instance.owner}","label":"Request_User","name":"Request_User","secured":false},{"value":"${svc_instance.name}","label":"Service_Name","name":"Service_Name","secured":false},{"value":"${svc_instance.templateIds}","label":"Template_Identifier","name":"Template_Identifier","secured":false},{"value":"${svc_instance.service_instance_id}","label":"Service_Identifier","name":"Service_Identifier","secured":false}],"catalogItemId":"5c6c00fac71dd40016344920","serviceId":"5c6c00fac71dd40016344920","action":"Provision","resourceProperties":{"templateParameters":[],"specifications":[{"value":"dsfd","label":"t1","name":"t1","secured":false}]},"ownership":{"username":"","displayName":"admin","orgGuid":"all","spaceGuid":"abcdef123456","tenantId":""}}
Example URL:
https://+ cam-host:cam port + "/cam/composer/api/v1/Service/"+5c3e1562983d04001d5b95ed +"/ServiceInstances?tenantId="+e1c923f8-44fb-44d9-a41e-138e61e32a35+"&cloudOE_spaceGuid="+ namespace +"&ace_orgGuid=" + team
Headers required:
"Content-Type: application/json"
"Authorization: <bearer token>"
Sample request BODY:
{
"name": "TestA123",
"instance_plan": "Standard",
"tags_input": [
],
"catalogItemId": "5c3e1562983d04001d5b95ed",
"serviceId": "5c3e1562983d04001d5b95ed",
"action": "Provision",
"resourceProperties": {
"templateParameters": [
],
"specifications": [
]
},
"ownership": {
"username": "admin",
"displayName": "admin",
"orgGuid": "all",
"spaceGuid": "cert-manager",
"tenantId": "e1c923f8-44fb-44d9-a41e-138e61e32a35"
}
}
serviceIdis the ID of the service. Run the GET API list of services to retrieve the serviceId.
Deploy service instance
curl -k -X POST \
'https://${TSA_HOSTNAME}/cam/composer/api/v1/ServiceManifest/{SERVICEMANIFEST_ID}/deploy?ace_orgGuid=${MCM_TEAM}&cloudOE_spaceGuid=${NAMESPACE}&tenantId=${TSA_TENANT_ID}' \
-H 'Authorization: Bearer ${TSA_BEARER_TOKEN}' \
-H 'Content-Type: application/json' \
-H 'cache-control: no-cache' \
-d @service__instance_create.json
service__instance_create.json:
{
"name": "Service_Instance_Name",
"instance_plan": "Standard",
"instance_plan_id": "5dc13f03ec19fe001508e539",
"tags_input": [
{
"value": "${svc_instance.group}",
"label": "request_group",
"name": "request_group",
"secured": false
},
{
"value": "${svc_instance.owner}",
"label": "request_user",
"name": "request_user",
"secured": false
},
{
"value": "${svc_instance.name}",
"label": "service_name",
"name": "service_name",
"secured": false
},
{
"value": "${svc_instance.service_instance_id}",
"label": "service_identifier",
"name": "service_identifier",
"secured": false
}
],
"action": "Provision",
"resourceProperties": {
"templateParameters": [],
"specifications": []
},
"ownership": {
"username": "",
"displayName": "admin",
"orgGuid": "all",
"spaceGuid": "abcdef123456",
"tenantId": ""
}
}
Response:
{"name":
"Service_Instance_Name","Status":"Submitted","owner":"admin","templateName":"","ordered_time":"2020-08-25T06:15:42.245Z","updated_time":"2020-08-25T06:15:42.246Z","creationTime":"2020-08-25T06:15:42.245Z","activity_deployment_details":{},"logs":"Waiting for service action to start","serviceId":"5f0c481b415e1137d7efc5f9","serviceManifestId":"5f0c481b415e1137d7efc5fa","ownership":{"username":"admin","displayName":"admin","orgGuid":"all","spaceGuid":"ibmcom","tenantId":"4c46c3f2-6582-49de-b697-4891ae7e8dee"},"namespaceId":"ibmcom","tenantId":"4c46c3f2-6582-49de-b697-4891ae7e8dee","instance_plan":"Standard","action":"Provision","id":"5f44ac8ee32082001cec758a","ServiceID":"5f0c481b415e1137d7efc5f9","instance_plan_id":"5f0c481b415e1137d7efc5fc","resourceProperties":{"templateParameters":[],"specifications":[]},"catalogItemId":"5f0c481b415e1137d7efc5f9","tags_input":[{"value":"5f44ac8ee32082001cec758a","label":"service_identifier","name":"service_identifier","secured":false},{"value":"s9","label":"service_name","name":"service_name","secured":false},{"value":"admin","label":"request_user","name":"request_user","secured":false},{"value":"admin","label":"request_group","name":"request_group","secured":false}],"ace_orgGuid":"all","cloudOE_spaceGuid":"ibmcom","Bearer_Token":"*******","bindable":false,"catalogItemName":"T_1594640403754979b9fb0_c4fd_11ea_9354_f721359f251a_9be04e40-c4fd-11ea-9354-f721359f251a","serviceManifest":{"version":"1.0.0.0","ServiceEngine_InputFile":{"service":{"specVersion":"v3","catalog_metadata":{"name":"T_1594640403754979b9fb0_c4fd_11ea_9354_f721359f251a_9be04e40-c4fd-11ea-9354-f721359f251a","description":"","image":"serviceicon_1.svg","category":"CloudServices","bullets":[{"title":"Cloud Provider","description":"IBM Bluemix Platform"}],"providerDisplayName":"IBM","longDescription":"Meant Stack deployed on Multiple VMs to help user get the stack working is faster manner","documentationUrl":"http://example.com/meanstack","supportUrl":"http://example.com/meanstack","bindable":"","updatable":"","systemTags":true},"tags":[],"actions":[{"type":"provision","name":"Provision","configuration":{"onError":"pause"},"input_parameters":[],"flow":{"conditions":[],"templates":[],"resthooks":[{"resthook":{"title":"resthook_d4961d","id":"resthook7afd540e","headers":{"accept":"application/json","Content-Type":"application/json"},"url":"https://jsonplaceholder.typicode.com/todos/1","method":"GET"}}],"notifications":[],"sequence":{"0":"resthook7afd540e"},"error_sequence":{},"abort_sequence":{}},"output_parameters":[]}],"plans":[{"name":"Standard","description":"To deploy a Standard plan","actions":[],"plan_parameters":[]}],"version":"1.0.0.0"}},"service_id":"5f0c481b415e1137d7efc5f9","namespaceId":"ibmcom","author":"user2_administrator","specVersion":"v3","status":"Published","publishedTime":"2020-07-13T11:40:17.901Z","tags":[{"name":"service_identifier","label":"service_identifier","type":"string","immutable":true,"hidden":false,"required":false,"secured":false,"default":"${svc_instance.service_instance_id}","customtype":"string","permission":"Read-Only","description":"Unique identifer generated by ICAM which is mapped to the service\n instance of the template provisioned.","isSystemTag":true},{"name":"service_name","label":"service_name","type":"string","immutable":true,"hidden":false,"required":false,"secured":false,"default":"${svc_instance.name}","customtype":"string","permission":"Read-Only","description":"Name provided for the service instance by the end user at time of request","isSystemTag":true},{"name":"request_user","label":"request_user","type":"string","immutable":true,"hidden":false,"required":false,"secured":false,"default":"${svc_instance.owner}","customtype":"string","permission":"Read-Only","description":"The user id of the current user that requested the provisioning of the template.","isSystemTag":true},{"name":"request_group","label":"request_group","type":"string","immutable":true,"hidden":false,"required":false,"secured":false,"default":"${svc_instance.group}","customtype":"string","permission":"Read-Only","description":"The current context group id of the current user that requested\n the provisioning of the template. This is important because a user may be part of\n more than one group and this identifies the context of which group the user made the request.","isSystemTag":true}],"systemTags":true,"creationTime":"2020-07-13T11:40:11.292Z","lastUpdated":"2020-07-13T11:40:17.901Z","serviceInstanceCount":2,"id":"5f0c481b415e1137d7efc5fa","actions":[{"type":"provision","name":"Provision","configuration":{"onError":"pause"},"input_parameters":[],"flow":{"conditions":[],"templates":[],"resthooks":[{"resthook":{"title":"resthook_d4961d","id":"resthook7afd540e","headers":{"accept":"application/json","Content-Type":"application/json"},"url":"https://jsonplaceholder.typicode.com/todos/1","method":"GET"}}],"notifications":[],"sequence":{"0":"resthook7afd540e"},"error_sequence":{},"abort_sequence":{}},"output_parameters":[]}],"plans":[{"name":"Standard","description":"To deploy a Standard plan","actions":[],"plan_parameters":[]}],"tagId":"5ecddfe55d6b7600155831de"},"action_status":{},"output_parameters":[],"bind_array":{}}
Get Input Parameters of a service instance
The API retrieves the inputs parameters of a service instance. It is recommended to use this API before Retry/Resume/Edit service instance so that you can verify the input parameters before Retry/Resume/Edit service instance. This API also resolves the shared parameters and parameters of type connection, if any. Earlier this API (GET ServiceManifest/5e4f5a51826bc70015dfaece?service_filter[resolve_params][action_name]=Provision) was used for the same purpose.
Note: It is recommended to use the getInputParameters API instead of ServiceManifest API if you want to try Retry/Resume after a service version change.
curl --location --request GET 'https://cam-proxy:30000/cam/composer/api/v1/ServiceInstances/5e574fe2dc44840015c8093b/getInputParameters?cloudOE_spaceGuid=development&ace_orgGuid=all&tenantId=c26b3dd4-4e74-4545-8ac9-bc30a6167b33' \
--header 'Content-Type: application/json'
Request Body
{
"versionChangeId": "5e575d04dc44840015c80963",
"instance_parameters": {
"url": "https://jsonplaceholder.typicode.com/todos/1",
"url2": "https://jsonplaceholder.typicode.com/todos/2"
},
"pre_action_parameters": {},
"post_action_parameters": {},
"plan": ""
}
Response
{
"name": "switch_resthookIns",
"Status": "Error",
"owner": "admin",
"active_time": "2020-02-27T05:14:10+00:00",
"templateName": "",
"ordered_time": "2020-02-27T05:13:06.943Z",
"updated_time": "2020-02-27T05:13:06.943Z",
"creationTime": "2020-02-27T05:13:06.943Z",
"instance_id": "d7395b20-591f-11ea-bab8-5f5432f25af5",
"activity_deployment_details": {
"instance": {
"vmwarens666346e3": {
"action": "CREATE",
"activity_id": "vmwarens666346e3",
"connection_name": "NSX",
"created_at": "2020-02-27T05:13:14.914Z",
"fail_quietly": "false",
"flow_control_#": "1",
"id": "5e574feaf63b0a001564e6db",
"instance_name": "switch_resthookIns-00-inst",
"long_running_delay": "0",
"long_running_timeout": "0",
"provider_engine_version": "0.11.11",
"resource_id": "serviceblueprint_stack.vmwarens666346e3",
"sequence_no": "1",
"stack_data_%": "1",
"stack_data_latest_state_id": "5e574febf63b0a001564e6dc",
"stack_error_message": "",
"stack_id": "5e574feaf63b0a001564e6db",
"stack_url": "",
"status": "SUCCESS",
"status_error_message": "",
"status_message": "[SUCCESS] ",
"template_name": "VMware NSX-T Sample to create a logical switch",
"template_outputs_%": "0",
"template_params_%": "7",
"template_params_nsxt_logical_switch_desc": "des",
"template_params_nsxt_logical_switch_name": "name",
"template_params_nsxt_logical_switch_repl_mode": "MTEP",
"template_params_nsxt_logical_switch_state": "UP",
"template_params_nsxt_tag": "Auto",
"template_params_nsxt_tag_scope": "Auto-Project",
"template_params_nsxt_transport_zone": "CAMDC2Zone",
"template_provider": "VMware NSX-T",
"template_tags_%": "4",
"template_tags_request_group": "admin",
"template_tags_request_user": "admin",
"template_tags_service_identifier": "5e574fe2dc44840015c8093b",
"template_tags_service_name": "switch_resthookins",
"template_type": "TERRAFORM",
"template_version": "2.3",
"service_action_type": "provision",
"service_action_name": "Provision",
"action_instance_name": "switch_resthookIns",
"state": "CREATED",
"flow_control_0.case": "",
"flow_control_0.case_is_selected": "",
"flow_control_0.continue_failed": "false",
"flow_control_0.continue_on_prev_failed": "false",
"flow_control_0.continue_on_prev_inprogress": "false",
"flow_control_0.depends_on.#": "1",
"flow_control_0.depends_on.0": "serviceblueprint_action_start.",
"flow_control_0.meta.%": "0",
"flow_control_0.prev_resource_sequence_no": "0",
"flow_control_0.prev_resource_status": "SUCCESS",
"flow_control_0.resume": "false",
"flow_control_0.resume_version": "0",
"flow_control_0.version": "0"
}
},
"output_parameters": {}
},
"logs": "serviceblueprint_action_start.start: Refreshing state... (ID: provision)\nserviceblueprint_stack.vmwarens666346e3: Refreshing state... (ID: 5e574feaf63b0a001564e6db)\nserviceblueprint_http.resthook2ec4d4f7: Refreshing state... (ID: resthook2ec4d4f7)\nserviceblueprint_http.resthook16dc50cc: Refreshing state... (ID: resthook16dc50cc)\nserviceblueprint_http.resthook16dc50cc: Destroying... (ID: resthook16dc50cc)\nserviceblueprint_http.resthook2ec4d4f7: Modifying... (ID: resthook2ec4d4f7)\n url: \"https://jsonplaceholder.typicode.com/todos/1\" => \"https://jsonplaceholder.Invalid\"\nserviceblueprint_http.resthook2ec4d4f7: Modifications complete after 0s (ID: resthook2ec4d4f7)\nserviceblueprint_http.resthook16dc50cc: Still destroying... (ID: resthook16dc50cc, 10s elapsed)\nserviceblueprint_http.resthook16dc50cc: Destruction complete after 11s\n\nApply complete! Resources: 0 added, 1 changed, 1 destroyed.\n\nOutputs:\n\nresthook2ec4d4f7_message = { \"resthook_88f097\": { \"status\": \"FAILED\" , \"code\": \"502\" , \"message\": \"Failure caused by : <nil>\" }}\nresthook2ec4d4f7_status = FAILED\nresthook2ec4d4f7_status_error_message = <nil>\nvmwarens666346e3_message = { \"switch_resthookIns-00-inst\": { \"status\": \"SUCCESS\" , \"action\": \"CREATE\" }}\nvmwarens666346e3_status = SUCCESS\nvmwarens666346e3_status_create_error_message = \nvmwarens666346e3_status_error_message =\n",
"serviceId": "5e4f59ca826bc70015dfaec8",
"serviceManifestId": "5e4f5a51826bc70015dfaece",
"ownership": {
"username": "admin",
"displayName": "admin",
"orgGuid": "all",
"spaceGuid": "development",
"tenantId": "c26b3dd4-4e74-4545-8ac9-bc30a6167b33"
},
"namespaceId": "development",
"tenantId": "c26b3dd4-4e74-4545-8ac9-bc30a6167b33",
"instance_plan": "Standard",
"action": "Provision",
"id": "5e574fe2dc44840015c8093b",
"ServiceID": "5e4f59ca826bc70015dfaec8",
"instance_plan_id": "5e57566fdc44840015c8094c",
"resourceProperties": {
"templateParameters": [],
"specifications": [
{
"label": "Tansport Zone Name",
"name": "nsxt_transport_zone",
"value": "CAMDC2Zone",
"secured": false
},
{
"label": "Rest URL",
"name": "url",
"value": "https://jsonplaceholder.Invalid",
"secured": false
}
]
},
"catalogItemId": "5e4f59ca826bc70015dfaec8",
"tags_input": [
{
"value": "admin",
"label": "request_group",
"name": "request_group",
"secured": false
},
{
"value": "admin",
"label": "request_user",
"name": "request_user",
"secured": false
},
{
"value": "switch_resthookins",
"label": "service_name",
"name": "service_name",
"secured": false
},
{
"value": "5e574fe2dc44840015c8093b",
"label": "service_identifier",
"name": "service_identifier",
"secured": false
}
],
"ace_orgGuid": "all",
"cloudOE_spaceGuid": "development",
"Bearer_Token": "*******",
"bindable": false,
"catalogItemName": "switch_resthook",
"serviceManifest": {
"version": "2.2.2.2",
"ServiceEngine_InputFile": {
"service": {
"version": "2.2.2.2",
"specVersion": "v3",
"catalog_metadata": {
"name": "switch_resthook",
"description": "",
"image": "serviceicon_1.svg",
"category": "CloudServices",
"bullets": [],
"providerDisplayName": "IBM",
"longDescription": "",
"documentationUrl": "",
"supportUrl": "",
"bindable": false,
"updatable": "",
"systemTags": true
},
"tags": [
{
"name": "request_group",
"label": "request_group",
"type": "string",
"immutable": true,
"hidden": false,
"required": false,
"secured": false,
"description": "The current context group id of the current user that requested the provisioning of the template. This is important because a user may be part of more than one group and this identifies the context of which group the user made the request.",
"isSystemTag": true,
"default": "${svc_instance.group}",
"customtype": "string",
"permission": "Read-Only"
},
{
"name": "request_user",
"label": "request_user",
"type": "string",
"immutable": true,
"hidden": false,
"required": false,
"secured": false,
"description": "The user id of the current user that requested the provisioning of the template.",
"isSystemTag": true,
"default": "${svc_instance.owner}",
"customtype": "string",
"permission": "Read-Only"
},
{
"name": "service_name",
"label": "service_name",
"type": "string",
"immutable": true,
"hidden": false,
"required": false,
"secured": false,
"description": "Name provided for the service instance by the end user at time of request",
"isSystemTag": true,
"default": "${svc_instance.name}",
"customtype": "string",
"permission": "Read-Only"
},
{
"name": "service_identifier",
"label": "service_identifier",
"type": "string",
"immutable": true,
"hidden": false,
"required": false,
"secured": false,
"description": "Unique identifer generated by ICAM which is mapped to the service instance of the template provisioned.",
"isSystemTag": true,
"default": "${svc_instance.service_instance_id}",
"customtype": "string",
"permission": "Read-Only"
}
],
"upgrade_from": [
{
"version": "1.1.1.1"
}
],
"downgrade_to": [
{
"version": "1.1.1.1"
}
],
"actions": [
{
"type": "provision",
"name": "Provision",
"description": "Default action for deployment of service",
"input_parameters": [
{
"name": "nsxt_transport_zone",
"label": "Tansport Zone Name",
"customtype": "string",
"type": "string",
"immutable": false,
"hidden": false,
"required": false,
"secured": false,
"description": "The name of the Transport Zone to be used by the logical switch.",
"default": "CAMDC2Zone",
"editable": true
},
{
"name": "url",
"label": "Rest URL",
"customtype": "string",
"type": "string",
"immutable": false,
"hidden": false,
"required": false,
"secured": false,
"isDynamic": false,
"editable": true,
"default": "https://jsonplaceholder.typicode.com/todos/1"
}
],
"flow": {
"conditions": [],
"templates": [
{
"VMware NSX-T Sample to create a logical switch": {
"title": "VMware NSX-T Sample to create a logical switch_b70a6e",
"template_name": "VMware NSX-T Sample to create a logical switch",
"version": "2.3",
"id": "vmwarens666346e3",
"template_type": "Terraform",
"template_content_type": "VMware NSX-T",
"template_provider": "VMware NSX-T",
"instance_name": "",
"cloud_connection_name": "NSX",
"template_data_objects": {},
"template_params": {
"nsxt_tag_scope": "Auto-Project",
"nsxt_tag": "Auto",
"nsxt_transport_zone": "CAMDC2Zone",
"nsxt_logical_switch_name": "name",
"nsxt_logical_switch_desc": "des",
"nsxt_logical_switch_state": "UP",
"nsxt_logical_switch_repl_mode": "MTEP"
},
"outputs": [],
"editable": true,
"provider_engine_version": "0.11.11"
}
}
],
"resthooks": [
{
"resthook": {
"title": "resthook_88f097",
"id": "resthook2ec4d4f7",
"headers": {
"accept": "application/json",
"Content-Type": "application/json"
},
"editable": true,
"url": "${input_parameters.url}",
"method": "GET"
}
}
],
"notifications": [],
"sequence": {
"0": "vmwarens666346e3",
"1": "resthook2ec4d4f7"
},
"error_sequence": {}
},
"output_parameters": []
}
],
"plans": [
{
"name": "Standard",
"description": "To deploy a Standard plan",
"actions": [],
"plan_parameters": []
}
]
}
},
"service_id": "5e4f59ca826bc70015dfaec8",
"tenantId": "c26b3dd4-4e74-4545-8ac9-bc30a6167b33",
"namespaceId": "",
"author": "admin",
"specVersion": "v3",
"status": "Draft",
"tags": [
{
"name": "request_group",
"label": "request_group",
"type": "string",
"immutable": true,
"hidden": false,
"required": false,
"secured": false,
"description": "The current context group id of the current user that requested the provisioning of the template. This is important because a user may be part of more than one group and this identifies the context of which group the user made the request.",
"isSystemTag": true,
"default": "${svc_instance.group}",
"customtype": "string",
"permission": "Read-Only"
},
{
"name": "request_user",
"label": "request_user",
"type": "string",
"immutable": true,
"hidden": false,
"required": false,
"secured": false,
"description": "The user id of the current user that requested the provisioning of the template.",
"isSystemTag": true,
"default": "${svc_instance.owner}",
"customtype": "string",
"permission": "Read-Only"
},
{
"name": "service_name",
"label": "service_name",
"type": "string",
"immutable": true,
"hidden": false,
"required": false,
"secured": false,
"description": "Name provided for the service instance by the end user at time of request",
"isSystemTag": true,
"default": "${svc_instance.name}",
"customtype": "string",
"permission": "Read-Only"
},
{
"name": "service_identifier",
"label": "service_identifier",
"type": "string",
"immutable": true,
"hidden": false,
"required": false,
"secured": false,
"description": "Unique identifer generated by ICAM which is mapped to the service instance of the template provisioned.",
"isSystemTag": true,
"default": "${svc_instance.service_instance_id}",
"customtype": "string",
"permission": "Read-Only"
}
],
"systemTags": true,
"creationTime": "2020-02-21T04:19:29.736Z",
"serviceInstanceCount": 5,
"id": "5e4f5a51826bc70015dfaece",
"actions": [
{
"type": "provision",
"name": "Provision",
"description": "Default action for deployment of service",
"input_parameters": [
{
"name": "nsxt_transport_zone",
"label": "Tansport Zone Name",
"customtype": "string",
"type": "string",
"immutable": false,
"hidden": false,
"required": false,
"secured": false,
"description": "The name of the Transport Zone to be used by the logical switch.",
"default": "CAMDC2Zone",
"editable": true
},
{
"name": "url",
"label": "Rest URL",
"customtype": "string",
"type": "string",
"immutable": false,
"hidden": false,
"required": false,
"secured": false,
"isDynamic": false,
"editable": true,
"default": "https://jsonplaceholder.typicode.com/todos/1"
}
],
"flow": {
"conditions": [],
"templates": [
{
"VMware NSX-T Sample to create a logical switch": {
"title": "VMware NSX-T Sample to create a logical switch_b70a6e",
"template_name": "VMware NSX-T Sample to create a logical switch",
"version": "2.3",
"id": "vmwarens666346e3",
"template_type": "Terraform",
"template_content_type": "VMware NSX-T",
"template_provider": "VMware NSX-T",
"instance_name": "",
"cloud_connection_name": "NSX",
"template_data_objects": {},
"template_params": {
"nsxt_tag_scope": "Auto-Project",
"nsxt_tag": "Auto",
"nsxt_transport_zone": "CAMDC2Zone",
"nsxt_logical_switch_name": "name",
"nsxt_logical_switch_desc": "des",
"nsxt_logical_switch_state": "UP",
"nsxt_logical_switch_repl_mode": "MTEP"
},
"outputs": [],
"editable": true,
"provider_engine_version": "0.11.11"
}
}
],
"resthooks": [
{
"resthook": {
"title": "resthook_88f097",
"id": "resthook2ec4d4f7",
"headers": {
"accept": "application/json",
"Content-Type": "application/json"
},
"editable": true,
"url": "${input_parameters.url}",
"method": "GET"
}
}
],
"notifications": [],
"sequence": {
"0": "vmwarens666346e3",
"1": "resthook2ec4d4f7"
},
"error_sequence": {}
},
"output_parameters": []
}
],
"plans": [
{
"name": "Standard",
"description": "To deploy a Standard plan",
"actions": [],
"plan_parameters": []
}
],
"tagId": "5e4f59ca826bc70015dfaec7"
},
"action_status": {},
"output_parameters": [],
"bind_array": {},
"current_action_instance_id": "5e578abedc44840015c8096c",
"stack_id": [
"5e574feaf63b0a001564e6db"
],
"last_plan_action_instance_id": "5e578a95dc44840015c8096b",
"last_plan_action_instance_status": "Active",
"InputParameters": {
"input_parameters": [
{
"name": "nsxt_transport_zone",
"label": "Tansport Zone Name",
"customtype": "string",
"type": "string",
"immutable": false,
"hidden": false,
"required": false,
"secured": false,
"description": "The name of the Transport Zone to be used by the logical switch.",
"default": "CAMDC2Zone",
"editable": true,
"value": "CAMDC2Zone"
},
{
"name": "url",
"label": "Rest URL",
"customtype": "string",
"type": "string",
"immutable": false,
"hidden": false,
"required": false,
"secured": false,
"isDynamic": false,
"editable": true,
"default": "https://jsonplaceholder.typicode.com/todos/1",
"value": "https://jsonplaceholder.Invalid"
}
],
"pre_action_input_parameters": [],
"post_action_input_parameters": []
}
}
Edit Service Instance
The updateServiceInstance command edits the service instance parameters.
curl -k -X POST -H "Authorization: Bearer ${CAM_BEARER_TOKEN}" -H "Content-Type: application/json" -H "Accept: application/json" -d @cc_create.json "https://${CAM_HOST}:${CAM_PORT}/cam/composer/api/v1/ServiceInstances/updateServiceInstance?tenantId=${CAM_TENANT_ID}&ace_orgGuid=${ICP_TEAM}
POST call
Headers:
"Authorization": <bearer token>
"Content-Type": "applcation/json"
cc_create.json
{
“serviceInstanceId”: “5c48392b11b0e20022696d58",
“update_details”: {
“instance_parameters”: {
“in1": “https://jsonplaceholder.typicode.com/todos/22”
}
}
}
<service_instance_id> - It is the ID of the service instance for which you want to edit.
You must provide all the updated values of service instance parameters to edit this service instance.
Retry Service Instance
The retryServiceInstance command attempts to retry all terminate service instances that failed.
curl -k -X POST -H "Authorization: Bearer ${CAM_BEARER_TOKEN}" -H "Content-Type: application/json" -H "Accept: application/json" -d @cc_create.json "https://${CAM_HOST}:${CAM_PORT}/cam/composer/api/v1/ServiceInstances/retryServiceInstance?tenantId=${CAM_TENANT_ID}&ace_orgGuid=${ICP_TEAM}
POST call
Headers:
"Authorization": <bearer token>
"Content-Type": "applcation/json"
cc_create.json
{
“serviceInstanceId”: “5c48392b11b0e20022696d58",
“retry_details”: {
“is_partial”: false,
“instance_parameters”: {
“in1": “https://jsonplaceholder.typicode.com/todos/22”
}
}
}
<service_instance_id> - It is the ID of the service instance for which you want to retry.
You can run retry with all the updated values for service instance parameters. If the updated service instance parameters are not provided, the values of the previous deployments are used.
If is_partial not provided, then by default its value is false. Support is not available for a true value of is_partial.
Resume Service Instance
The resumeServiceInstance command attempts to resume all terminated service instances that failed.
curl -k -X POST -H "Authorization: Bearer ${CAM_BEARER_TOKEN}" -H "Content-Type: application/json" -H "Accept: application/json" -d @cc_create.json "https://${CAM_HOST}:${CAM_PORT}/cam/composer/api/v1/ServiceInstances/resumeServiceInstance?tenantId=${CAM_TENANT_ID}&ace_orgGuid=${ICP_TEAM}
POST call
Headers:
"Authorization”: <bearer token>
"Content-Type”: "application/json"
Sample cc_create.json:
{
“serviceInstanceId”: “5c48392b11b0e20022696d58",
“resume_details”: {
“is_partial”: false,
“instance_parameters”: {
“in1": “https://jsonplaceholder.typicode.com/todos/22”
}
}
}
<service_instance_id> - It is the ID of the service instance for which you want to resume.
You can resume deployment with all the updated values for service instance parameters. If the updated service instance parameters are not provided, the values of the previous deployments are used.
If is_partial not provided, then by default its value is false. Support is not available for a true value of is_partial.
Upgrade/downgrade a Service Instance
This API is available in Cloud Automation Manager version 4.1.0.1 onwards. To upgrade or downgrade a particular service instance to higher or lower service version, the following APIs must be used in sequence:
- getServiceInstance: Returns the service instance details along with the available version change paths (upgrade/downgrade).
- versionChangeInputParameters : Returns the list of input parameters needed for service instance version change.
- submitversionChange : Upgrade/downgrade a version of service instance.
getServiceInstances
This API returns the service instance details along with the available version change paths (upgrade/downgrade).
curl --location --request GET 'https://${CAM_HOST}:${CAM_PORT}/cam/composer/api/v1/ServiceInstances/5e574fe2dc44840015c8093b?filter[include]=UpgradePaths&filter[include]=DowngradePaths&cloudOE_spaceGuid=development&ace_orgGuid=all&tenantId=c26b3dd4-4e74-4545-8ac9-bc30a6167b33' \--header 'Content-Type: application/json'
Response
{
{
"name": "switch_resthookIns",
"Status": "Error",
"owner": "admin",
"active_time": "2020-02-27T05:14:10+00:00",
"templateName": "",
"ordered_time": "2020-02-27T05:13:06.943Z",
"updated_time": "2020-02-27T09:24:47.020Z",
"creationTime": "2020-02-27T05:13:06.943Z",
"instance_id": "d7395b20-591f-11ea-bab8-5f5432f25af5",
"activity_deployment_details": {
"instance": {
"vmwarens666346e3": {
"action": "CREATE",
"activity_id": "vmwarens666346e3",
"connection_name": "NSX",
"created_at": "2020-02-27T05:13:14.914Z",
"fail_quietly": "false",
"flow_control_#": "1",
"id": "5e574feaf63b0a001564e6db",
"instance_name": "switch_resthookIns-00-inst",
"long_running_delay": "0",
"long_running_timeout": "0",
"provider_engine_version": "0.11.11",
"resource_id": "serviceblueprint_stack.vmwarens666346e3",
"sequence_no": "1",
"stack_data_%": "1",
"stack_data_latest_state_id": "5e574febf63b0a001564e6dc",
"stack_error_message": "",
"stack_id": "5e574feaf63b0a001564e6db",
"stack_url": "",
"status": "SUCCESS",
"status_error_message": "",
"status_message": "[SUCCESS] ",
"template_name": "VMware NSX-T Sample to create a logical switch",
"template_outputs_%": "0",
"template_params_%": "7",
"template_params_nsxt_logical_switch_desc": "des",
"template_params_nsxt_logical_switch_name": "name",
"template_params_nsxt_logical_switch_repl_mode": "MTEP",
"template_params_nsxt_logical_switch_state": "UP",
"template_params_nsxt_tag": "Auto",
"template_params_nsxt_tag_scope": "Auto-Project",
"template_params_nsxt_transport_zone": "CAMDC2Zone",
"template_provider": "VMware NSX-T",
"template_tags_%": "4",
"template_tags_request_group": "admin",
"template_tags_request_user": "admin",
"template_tags_service_identifier": "5e574fe2dc44840015c8093b",
"template_tags_service_name": "switch_resthookins",
"template_type": "TERRAFORM",
"template_version": "2.3",
"service_action_type": "provision",
"service_action_name": "Provision",
"action_instance_name": "switch_resthookIns",
"state": "CREATED",
"flow_control_0.case": "",
"flow_control_0.case_is_selected": "",
"flow_control_0.continue_failed": "false",
"flow_control_0.continue_on_prev_failed": "false",
"flow_control_0.continue_on_prev_inprogress": "false",
"flow_control_0.depends_on.#": "1",
"flow_control_0.depends_on.0": "serviceblueprint_action_start.",
"flow_control_0.meta.%": "0",
"flow_control_0.prev_resource_sequence_no": "0",
"flow_control_0.prev_resource_status": "SUCCESS",
"flow_control_0.resume": "false",
"flow_control_0.resume_version": "0",
"flow_control_0.version": "0"
}
},
"output_parameters": {}
},
"logs": "serviceblueprint_action_start.start: Refreshing state... (ID: provision)\nserviceblueprint_stack.vmwarens666346e3: Refreshing state... (ID: 5e574feaf63b0a001564e6db)\nserviceblueprint_http.resthook2ec4d4f7: Refreshing state... (ID: resthook2ec4d4f7)\nserviceblueprint_http.resthook16dc50cc: Refreshing state... (ID: resthook16dc50cc)\nserviceblueprint_http.resthook16dc50cc: Destroying... (ID: resthook16dc50cc)\nserviceblueprint_http.resthook2ec4d4f7: Modifying... (ID: resthook2ec4d4f7)\n url: \"https://jsonplaceholder.typicode.com/todos/1\" => \"https://jsonplaceholder.Invalid\"\nserviceblueprint_http.resthook2ec4d4f7: Modifications complete after 0s (ID: resthook2ec4d4f7)\nserviceblueprint_http.resthook16dc50cc: Still destroying... (ID: resthook16dc50cc, 10s elapsed)\nserviceblueprint_http.resthook16dc50cc: Destruction complete after 11s\n\nApply complete! Resources: 0 added, 1 changed, 1 destroyed.\n\nOutputs:\n\nresthook2ec4d4f7_message = { \"resthook_88f097\": { \"status\": \"FAILED\" , \"code\": \"502\" , \"message\": \"Failure caused by : <nil>\" }}\nresthook2ec4d4f7_status = FAILED\nresthook2ec4d4f7_status_error_message = <nil>\nvmwarens666346e3_message = { \"switch_resthookIns-00-inst\": { \"status\": \"SUCCESS\" , \"action\": \"CREATE\" }}\nvmwarens666346e3_status = SUCCESS\nvmwarens666346e3_status_create_error_message = \nvmwarens666346e3_status_error_message =\n",
"serviceId": "5e4f59ca826bc70015dfaec8",
"serviceManifestId": "5e4f5a51826bc70015dfaece",
"ownership": {
"username": "admin",
"displayName": "admin",
"orgGuid": "all",
"spaceGuid": "development",
"tenantId": "c26b3dd4-4e74-4545-8ac9-bc30a6167b33"
},
"namespaceId": "development",
"tenantId": "c26b3dd4-4e74-4545-8ac9-bc30a6167b33",
"instance_plan": "Standard",
"action": "Provision",
"id": "5e574fe2dc44840015c8093b",
"ServiceID": "5e4f59ca826bc70015dfaec8",
"instance_plan_id": "5e57566fdc44840015c8094c",
"resourceProperties": {
"templateParameters": [],
"specifications": [
{
"label": "Tansport Zone Name",
"name": "nsxt_transport_zone",
"value": "CAMDC2Zone",
"secured": false
},
{
"label": "Rest URL",
"name": "url",
"value": "https://jsonplaceholder.Invalid",
"secured": false
}
]
},
"catalogItemId": "5e4f59ca826bc70015dfaec8",
"tags_input": [
{
"value": "admin",
"label": "request_group",
"name": "request_group",
"secured": false
},
{
"value": "admin",
"label": "request_user",
"name": "request_user",
"secured": false
},
{
"value": "switch_resthookins",
"label": "service_name",
"name": "service_name",
"secured": false
},
{
"value": "5e574fe2dc44840015c8093b",
"label": "service_identifier",
"name": "service_identifier",
"secured": false
}
],
"ace_orgGuid": "all",
"cloudOE_spaceGuid": "development",
"Bearer_Token": "*******",
"bindable": false,
"catalogItemName": "switch_resthook",
"serviceManifest": {
"version": "2.2.2.2",
"ServiceEngine_InputFile": {
"service": {
"version": "2.2.2.2",
"specVersion": "v3",
"catalog_metadata": {
"name": "switch_resthook",
"description": "",
"image": "serviceicon_1.svg",
"category": "CloudServices",
"bullets": [],
"providerDisplayName": "IBM",
"longDescription": "",
"documentationUrl": "",
"supportUrl": "",
"bindable": false,
"updatable": "",
"systemTags": true
},
"tags": [
{
"name": "request_group",
"label": "request_group",
"type": "string",
"immutable": true,
"hidden": false,
"required": false,
"secured": false,
"description": "The current context group id of the current user that requested the provisioning of the template. This is important because a user may be part of more than one group and this identifies the context of which group the user made the request.",
"isSystemTag": true,
"default": "${svc_instance.group}",
"customtype": "string",
"permission": "Read-Only"
},
{
"name": "request_user",
"label": "request_user",
"type": "string",
"immutable": true,
"hidden": false,
"required": false,
"secured": false,
"description": "The user id of the current user that requested the provisioning of the template.",
"isSystemTag": true,
"default": "${svc_instance.owner}",
"customtype": "string",
"permission": "Read-Only"
},
{
"name": "service_name",
"label": "service_name",
"type": "string",
"immutable": true,
"hidden": false,
"required": false,
"secured": false,
"description": "Name provided for the service instance by the end user at time of request",
"isSystemTag": true,
"default": "${svc_instance.name}",
"customtype": "string",
"permission": "Read-Only"
},
{
"name": "service_identifier",
"label": "service_identifier",
"type": "string",
"immutable": true,
"hidden": false,
"required": false,
"secured": false,
"description": "Unique identifer generated by ICAM which is mapped to the service instance of the template provisioned.",
"isSystemTag": true,
"default": "${svc_instance.service_instance_id}",
"customtype": "string",
"permission": "Read-Only"
}
],
"upgrade_from": [
{
"version": "1.1.1.1"
}
],
"downgrade_to": [
{
"version": "1.1.1.1"
}
],
"actions": [
{
"type": "provision",
"name": "Provision",
"description": "Default action for deployment of service",
"input_parameters": [
{
"name": "nsxt_transport_zone",
"label": "Tansport Zone Name",
"customtype": "string",
"type": "string",
"immutable": false,
"hidden": false,
"required": false,
"secured": false,
"description": "The name of the Transport Zone to be used by the logical switch.",
"default": "CAMDC2Zone",
"editable": true
},
{
"name": "url",
"label": "Rest URL",
"customtype": "string",
"type": "string",
"immutable": false,
"hidden": false,
"required": false,
"secured": false,
"isDynamic": false,
"editable": true,
"default": "https://jsonplaceholder.typicode.com/todos/1"
}
],
"flow": {
"conditions": [],
"templates": [
{
"VMware NSX-T Sample to create a logical switch": {
"title": "VMware NSX-T Sample to create a logical switch_b70a6e",
"template_name": "VMware NSX-T Sample to create a logical switch",
"version": "2.3",
"id": "vmwarens666346e3",
"template_type": "Terraform",
"template_content_type": "VMware NSX-T",
"template_provider": "VMware NSX-T",
"instance_name": "",
"cloud_connection_name": "NSX",
"template_data_objects": {},
"template_params": {
"nsxt_tag_scope": "Auto-Project",
"nsxt_tag": "Auto",
"nsxt_transport_zone": "CAMDC2Zone",
"nsxt_logical_switch_name": "name",
"nsxt_logical_switch_desc": "des",
"nsxt_logical_switch_state": "UP",
"nsxt_logical_switch_repl_mode": "MTEP"
},
"outputs": [],
"editable": true,
"provider_engine_version": "0.11.11"
}
}
],
"resthooks": [
{
"resthook": {
"title": "resthook_88f097",
"id": "resthook2ec4d4f7",
"headers": {
"accept": "application/json",
"Content-Type": "application/json"
},
"editable": true,
"url": "${input_parameters.url}",
"method": "GET"
}
}
],
"notifications": [],
"sequence": {
"0": "vmwarens666346e3",
"1": "resthook2ec4d4f7"
},
"error_sequence": {}
},
"output_parameters": []
}
],
"plans": [
{
"name": "Standard",
"description": "To deploy a Standard plan",
"actions": [],
"plan_parameters": []
}
]
}
},
"service_id": "5e4f59ca826bc70015dfaec8",
"tenantId": "c26b3dd4-4e74-4545-8ac9-bc30a6167b33",
"namespaceId": "",
"author": "admin",
"specVersion": "v3",
"status": "Draft",
"tags": [
{
"name": "request_group",
"label": "request_group",
"type": "string",
"immutable": true,
"hidden": false,
"required": false,
"secured": false,
"description": "The current context group id of the current user that requested the provisioning of the template. This is important because a user may be part of more than one group and this identifies the context of which group the user made the request.",
"isSystemTag": true,
"default": "${svc_instance.group}",
"customtype": "string",
"permission": "Read-Only"
},
{
"name": "request_user",
"label": "request_user",
"type": "string",
"immutable": true,
"hidden": false,
"required": false,
"secured": false,
"description": "The user id of the current user that requested the provisioning of the template.",
"isSystemTag": true,
"default": "${svc_instance.owner}",
"customtype": "string",
"permission": "Read-Only"
},
{
"name": "service_name",
"label": "service_name",
"type": "string",
"immutable": true,
"hidden": false,
"required": false,
"secured": false,
"description": "Name provided for the service instance by the end user at time of request",
"isSystemTag": true,
"default": "${svc_instance.name}",
"customtype": "string",
"permission": "Read-Only"
},
{
"name": "service_identifier",
"label": "service_identifier",
"type": "string",
"immutable": true,
"hidden": false,
"required": false,
"secured": false,
"description": "Unique identifer generated by ICAM which is mapped to the service instance of the template provisioned.",
"isSystemTag": true,
"default": "${svc_instance.service_instance_id}",
"customtype": "string",
"permission": "Read-Only"
}
],
"systemTags": true,
"creationTime": "2020-02-21T04:19:29.736Z",
"serviceInstanceCount": 5,
"id": "5e4f5a51826bc70015dfaece",
"actions": [
{
"type": "provision",
"name": "Provision",
"description": "Default action for deployment of service",
"input_parameters": [
{
"name": "nsxt_transport_zone",
"label": "Tansport Zone Name",
"customtype": "string",
"type": "string",
"immutable": false,
"hidden": false,
"required": false,
"secured": false,
"description": "The name of the Transport Zone to be used by the logical switch.",
"default": "CAMDC2Zone",
"editable": true
},
{
"name": "url",
"label": "Rest URL",
"customtype": "string",
"type": "string",
"immutable": false,
"hidden": false,
"required": false,
"secured": false,
"isDynamic": false,
"editable": true,
"default": "https://jsonplaceholder.typicode.com/todos/1"
}
],
"flow": {
"conditions": [],
"templates": [
{
"VMware NSX-T Sample to create a logical switch": {
"title": "VMware NSX-T Sample to create a logical switch_b70a6e",
"template_name": "VMware NSX-T Sample to create a logical switch",
"version": "2.3",
"id": "vmwarens666346e3",
"template_type": "Terraform",
"template_content_type": "VMware NSX-T",
"template_provider": "VMware NSX-T",
"instance_name": "",
"cloud_connection_name": "NSX",
"template_data_objects": {},
"template_params": {
"nsxt_tag_scope": "Auto-Project",
"nsxt_tag": "Auto",
"nsxt_transport_zone": "CAMDC2Zone",
"nsxt_logical_switch_name": "name",
"nsxt_logical_switch_desc": "des",
"nsxt_logical_switch_state": "UP",
"nsxt_logical_switch_repl_mode": "MTEP"
},
"outputs": [],
"editable": true,
"provider_engine_version": "0.11.11"
}
}
],
"resthooks": [
{
"resthook": {
"title": "resthook_88f097",
"id": "resthook2ec4d4f7",
"headers": {
"accept": "application/json",
"Content-Type": "application/json"
},
"editable": true,
"url": "${input_parameters.url}",
"method": "GET"
}
}
],
"notifications": [],
"sequence": {
"0": "vmwarens666346e3",
"1": "resthook2ec4d4f7"
},
"error_sequence": {}
},
"output_parameters": []
}
],
"plans": [
{
"name": "Standard",
"description": "To deploy a Standard plan",
"actions": [],
"plan_parameters": []
}
],
"tagId": "5e4f59ca826bc70015dfaec7"
},
"action_status": {},
"output_parameters": [],
"bind_array": {},
"current_action_instance_id": "5e578abedc44840015c8096c",
"stack_id": [
"5e574feaf63b0a001564e6db"
],
"last_plan_action_instance_id": "5e578a95dc44840015c8096b",
"last_plan_action_instance_status": "Active",
"actionInstanceDetails": [
{
"actionInstanceId": "5e574fe3dc44840015c8093c",
"Status": "Active",
"processed_time": "2020-02-27T05:13:07.034Z",
"active_time": "2020-02-27T05:14:10+00:00",
"ordered_time": 1582780387033,
"created_time": "2020-02-27T05:14:10+00:00",
"updated_time": "2020-02-27T05:14:10.982Z",
"instance_action": "Provision",
"input_parameters": {}
},
{
"actionInstanceId": "5e575621dc44840015c80943",
"Status": "Error",
"processed_time": "2020-02-27T05:39:45.176Z",
"ordered_time": 1582781985140,
"updated_time": "2020-02-27T05:39:45.917Z",
"instance_action": "plan",
"versionChangeDetails": {
"versionChange": true,
"versionChangeId": "5e50fc1405789a0015a482f5",
"instance_parameters": {
"nsxt_transport_zone": "CAMDC2Zone",
"url": "https://jsonplaceholder.typicode.com/todos/1"
},
"pre_action_parameters": {},
"post_action_parameters": {},
"fromVersionManifest": {},
"isRegenerationRequired": true,
"toVersion": "2.2.2.2"
},
"input_parameters": {
"nsxt_transport_zone": "CAMDC2Zone",
"url": "https://jsonplaceholder.typicode.com/todos/1"
}
},
{
"actionInstanceId": "5e57564fdc44840015c80948",
"Status": "Error",
"processed_time": "2020-02-27T05:40:31.198Z",
"ordered_time": 1582782031165,
"updated_time": "2020-02-27T05:40:31.649Z",
"instance_action": "plan",
"versionChangeDetails": {
"versionChange": true,
"versionChangeId": "5e575610dc44840015c8093f",
"instance_parameters": {
"nsxt_transport_zone": "CAMDC2Zone",
"url": "https://jsonplaceholder.typicode.com/todos/1"
},
"pre_action_parameters": {},
"post_action_parameters": {},
"fromVersionManifest": {},
"isRegenerationRequired": true,
"toVersion": "3.3.3.3"
},
"input_parameters": {
"nsxt_transport_zone": "CAMDC2Zone",
"url": "https://jsonplaceholder.typicode.com/todos/1"
}
},
{
"actionInstanceId": "5e5756b8dc44840015c80954",
"Status": "Active",
"processed_time": "2020-02-27T05:42:16.162Z",
"active_time": "2020-02-27T05:42:47+00:00",
"ordered_time": 1582782136137,
"created_time": "2020-02-27T05:42:47+00:00",
"updated_time": "2020-02-27T05:42:47.053Z",
"instance_action": "plan",
"versionChangeDetails": {
"versionChange": true,
"versionChangeId": "5e57566fdc44840015c8094d",
"instance_parameters": {
"nsxt_transport_zone": "CAMDC2Zone",
"url": "https://jsonplaceholder.typicode.com/todos/1"
},
"pre_action_parameters": {},
"post_action_parameters": {},
"fromVersionManifest": {},
"isRegenerationRequired": true,
"toVersion": "2.2.2.2"
},
"input_parameters": {
"nsxt_transport_zone": "CAMDC2Zone",
"url": "https://jsonplaceholder.typicode.com/todos/1"
}
},
{
"actionInstanceId": "5e5756eadc44840015c80955",
"Status": "Active",
"processed_time": "2020-02-27T05:43:06.719Z",
"active_time": "2020-02-27T05:43:38+00:00",
"ordered_time": 1582782186716,
"created_time": "2020-02-27T05:43:38+00:00",
"updated_time": "2020-02-27T05:43:38.994Z",
"instance_action": "update",
"versionChangeDetails": {
"serviceInstanceId": "5e574fe2dc44840015c8093b",
"versionChangeId": "5e57566fdc44840015c8094d",
"versionChangeType": "UPGRADE",
"isRegenerationRequired": true,
"fromVersionId": "5e4f59ca826bc70015dfaec9",
"fromVersion": "1.1.1.1",
"fromVersionManifest": {},
"toVersionId": "5e4f5a51826bc70015dfaece",
"toVersion": "2.2.2.2",
"instance_parameters": {
"nsxt_transport_zone": "CAMDC2Zone",
"url": "https://jsonplaceholder.typicode.com/todos/1"
},
"pre_action_ParmList": [],
"pre_action_parameters": {},
"post_action_ParmList": [],
"post_action_parameters": {}
},
"input_parameters": {
"nsxt_transport_zone": "CAMDC2Zone",
"url": "https://jsonplaceholder.typicode.com/todos/1"
}
},
{
"actionInstanceId": "5e57891bdc44840015c80969",
"Status": "Active",
"processed_time": "2020-02-27T09:17:15.511Z",
"active_time": "2020-02-27T09:17:47+00:00",
"ordered_time": 1582795035480,
"created_time": "2020-02-27T09:17:47+00:00",
"updated_time": "2020-02-27T09:17:47.695Z",
"instance_action": "plan",
"versionChangeDetails": {
"versionChange": true,
"versionChangeId": "5e575d04dc44840015c80963",
"instance_parameters": {
"url": "https://jsonplaceholder.typicode.com/todos/1",
"url2": "https://jsonplaceholder.typicode.com/todos/2"
},
"pre_action_parameters": {},
"post_action_parameters": {},
"fromVersionManifest": {},
"isRegenerationRequired": true,
"toVersion": "3.3.3.3"
},
"input_parameters": {
"url": "https://jsonplaceholder.typicode.com/todos/1",
"url2": "https://jsonplaceholder.typicode.com/todos/2"
}
},
{
"actionInstanceId": "5e578990dc44840015c8096a",
"Status": "Active",
"processed_time": "2020-02-27T09:19:12.978Z",
"active_time": "2020-02-27T09:19:46+00:00",
"ordered_time": 1582795152977,
"created_time": "2020-02-27T09:19:46+00:00",
"updated_time": "2020-02-27T09:19:46.727Z",
"instance_action": "update",
"versionChangeDetails": {
"serviceInstanceId": "5e574fe2dc44840015c8093b",
"versionChangeId": "5e575d04dc44840015c80963",
"versionChangeType": "UPGRADE",
"isRegenerationRequired": true,
"fromVersionId": "5e4f5a51826bc70015dfaece",
"fromVersion": "2.2.2.2",
"fromVersionManifest": {},
"toVersionId": "5e575610dc44840015c8093d",
"toVersion": "3.3.3.3",
"instance_parameters": {
"url": "https://jsonplaceholder.typicode.com/todos/1",
"url2": "https://jsonplaceholder.typicode.com/todos/2"
},
"pre_action_ParmList": [],
"pre_action_parameters": {},
"post_action_ParmList": [],
"post_action_parameters": {}
},
"input_parameters": {
"url": "https://jsonplaceholder.typicode.com/todos/1",
"url2": "https://jsonplaceholder.typicode.com/todos/2"
}
},
{
"actionInstanceId": "5e578a95dc44840015c8096b",
"Status": "Active",
"processed_time": "2020-02-27T09:23:33.091Z",
"active_time": "2020-02-27T09:24:05+00:00",
"ordered_time": 1582795413060,
"created_time": "2020-02-27T09:24:05+00:00",
"updated_time": "2020-02-27T09:24:05.271Z",
"instance_action": "plan",
"versionChangeDetails": {
"versionChange": true,
"versionChangeId": "5e575d04dc44840015c80964",
"instance_parameters": {
"nsxt_transport_zone": "CAMDC2Zone",
"url": "https://jsonplaceholder.Invalid"
},
"pre_action_parameters": {},
"post_action_parameters": {},
"fromVersionManifest": {},
"isRegenerationRequired": true,
"toVersion": "2.2.2.2"
},
"input_parameters": {
"nsxt_transport_zone": "CAMDC2Zone",
"url": "https://jsonplaceholder.Invalid"
}
},
{
"actionInstanceId": "5e578abedc44840015c8096c",
"Status": "Error",
"processed_time": "2020-02-27T09:24:14.187Z",
"ordered_time": 1582795454186,
"updated_time": "2020-02-27T09:24:47.020Z",
"instance_action": "update",
"versionChangeDetails": {
"serviceInstanceId": "5e574fe2dc44840015c8093b",
"versionChangeId": "5e575d04dc44840015c80964",
"versionChangeType": "DOWNGRADE",
"isRegenerationRequired": true,
"fromVersionId": "5e575610dc44840015c8093d",
"fromVersion": "3.3.3.3",
"fromVersionManifest": {},
"toVersionId": "5e4f5a51826bc70015dfaece",
"toVersion": "2.2.2.2",
"instance_parameters": {
"nsxt_transport_zone": "CAMDC2Zone",
"url": "https://jsonplaceholder.Invalid"
},
"pre_action_ParmList": [],
"pre_action_parameters": {},
"post_action_ParmList": [],
"post_action_parameters": {}
},
"input_parameters": {
"nsxt_transport_zone": "CAMDC2Zone",
"url": "https://jsonplaceholder.Invalid"
}
}
],
"processed_time": "2020-02-27T09:24:14.187Z",
"output": {},
"UpgradePaths": [
{
"currentVersionId": "5e575610dc44840015c8093d",
"fromVersionId": "5e4f5a51826bc70015dfaece",
"toVersionId": "5e575610dc44840015c8093d",
"type": "UPGRADE",
"tenantId": "c26b3dd4-4e74-4545-8ac9-bc30a6167b33",
"id": "5e575d04dc44840015c80963"
}
],
"DowngradePaths": [
{
"currentVersionId": "5e4f5a51826bc70015dfaece",
"fromVersionId": "5e4f5a51826bc70015dfaece",
"toVersionId": "5e4f59ca826bc70015dfaec9",
"type": "DOWNGRADE",
"tenantId": "c26b3dd4-4e74-4545-8ac9-bc30a6167b33",
"id": "5e57566fdc44840015c8094e"
}
]
}
Note: id present inside the UpgradePaths/DowngradePaths should be used as versionChangeId in payloads of the versionChangeInputParameters and submitVersionChange APIs.
versionChangeInputParameters
This API returns the list of input parameters needed for service instance version change.
curl --location --request POST 'https://${CAM_HOST}:${CAM_PORT}/cam/composer/api/v1/ServiceInstances/5e574fe2dc44840015c8093b/versionChangeInputParameters?cloudOE_spaceGuid=development&ace_orgGuid=all&tenantId=c26b3dd4-4e74-4545-8ac9-bc30a6167b33' \
--header 'Content-Type: application/json' \
--data-raw '{
"versionChangeId": "5e575d04dc44840015c80963"
}
versionChangeId' is theidpresent inside theUpgradePathsorDowngradePathsreturned in thegetServiceInstance` API.
Request Body
{
"versionChangeId": "5e575c44dc44840015c80959"
}
Response
{
"VersionChangeInputParameters": {
"versionChangeId": "5e575d04dc44840015c80963",
"toVersion": "3.3.3.3",
"type": "UPGRADE",
"input_parameters": [
{
"name": "url",
"label": "Rest URL",
"customtype": "string",
"type": "string",
"immutable": false,
"hidden": false,
"required": false,
"secured": false,
"isDynamic": false,
"editable": true,
"default": "https://jsonplaceholder.Invalid"
},
{
"name": "url2",
"label": "URL 2",
"customtype": "string",
"type": "string",
"immutable": false,
"hidden": false,
"required": false,
"secured": false,
"isDynamic": false,
"editable": true,
"default": "https://jsonplaceholder.typicode.com/todos/2"
}
],
"pre_action_input_parameters": [],
"post_action_input_parameters": [],
"new_parameters": [
"url2"
],
"used_old_parameters": [
"url"
],
"ignored_old_parameters": [
"nsxt_transport_zone"
]
}
}
Note:
input_parameters- A list of input parameters needed for service instance version change.new_parameters- A list of new input parameters present in the new version.used_old_parameters- A list of input parameters present from the old version which are used in new version.ignored_old_parameters- A list of input parameters present from the old version which are not used in new version.pre_action_input_parametersandpost_action_input_parametersare not supported in this release.
submitVersionChange
This API upgrades/downgrades a version of the service instance.
curl --location --request POST 'https://${CAM_HOST}:${CAM_PORT}/cam/composer/api/v1/ServiceInstances/5e574fe2dc44840015c8093b/submitVersionChange?cloudOE_spaceGuid=development&ace_orgGuid=all&tenantId=c26b3dd4-4e74-4545-8ac9-bc30a6167b33' \
--header 'Content-Type: application/json' \
--data-raw '{
"versionChangeId": "5e575d04dc44840015c80963",
"instance_parameters": {
"url": "https://jsonplaceholder.typicode.com/todos/1",
"url2": "https://jsonplaceholder.typicode.com/todos/2"
},
"pre_action_parameters": {},
"post_action_parameters": {},
"plan": ""
}
Request Body
{
"versionChangeId": "5e575d04dc44840015c80963",
"instance_parameters": {
"url": "https://jsonplaceholder.typicode.com/todos/1",
"url2": "https://jsonplaceholder.typicode.com/todos/2"
},
"pre_action_parameters": {},
"post_action_parameters": {},
"plan": ""
}
Bind a service instance
The API call creates a bind instance.
curl -k -X POST -H "Authorization: Bearer ${CAM_BEARER_TOKEN}" -H "Content-Type: application/json" -H "Accept: application/json" -d @cc_create.json "https://${CAM_HOST}:${CAM_PORT}/cam/composer/api/v1/ServiceInstances/bindServiceInstance?tenantId=${CAM_TENANT_ID}&ace_orgGuid=${ICP_TEAM}
POST call
Headers:
"Authorization": "bearer <token>"
"Content-Type": "application/json"
cc_create.json
{
“bindDetails”: {
“serviceInstanceId”: “5c2eebb2e93c49001b12813f”,
“instance_parameters”: {
“resturl2”: “https://jsonplaceholder.typicode.com/todos/33”
}
}
<service_instance_id>- It is the ID of the service instance for which you want to create a bind instance.<instance_parameters>- Optionally, you can run bind with updated values for service instance parameters. If not provided, then earlier values are used.
Unbind Instance
The API call unbinds or deletes a bind instance.
curl -k -X POST -H "Authorization: Bearer ${CAM_BEARER_TOKEN}" -H "Content-Type: application/json" -H "Accept: application/json" -d @cc_create.json "https://${CAM_HOST}:${CAM_PORT}/cam/composer/api/v1/ServiceInstances/deleteBindInstance?tenantId=${CAM_TENANT_ID}&ace_orgGuid=${ICP_TEAM}
BODY:
cc_create.json
{"serviceInstanceId":"<service_instance_id>","name":"<name_of_bind_instance>"}
<name_of_bind_instance> - It is the name of the bind instance that you want to unbind.
Cleanup Service Instance
It deletes all service instances based on the value of force flag. If the force = false, then the instances in active state are not deleted. The instances in error state are deleted irrespective of the force flag value.
curl -k -X POST -H "Authorization: Bearer ${CAM_BEARER_TOKEN}" -H "Content-Type: application/json" -H "Accept: application/json" -d @cc_create.json "https://${CAM_HOST}:${CAM_PORT}/cam/composer/api/v1/ServiceInstances/cleanupServiceInstance?tenantId=${CAM_TENANT_ID}&ace_orgGuid=${ICP_TEAM}
POST call
Headers:
“Authorization”: <bearer token>
“Content-Type”: “applcation/json”
Body: {"serviceInstanceId": <id of the instance to be deleted>,
"force": <true/false>
}
Cleanup Service Instance in inprogress state
If a service instance is stuck in IN_PROGRESS state for a very long time without any backend activity, then use this API to delete the service instance entry from the database.
curl -k -X POST -H "Authorization: Bearer ${CAM_BEARER_TOKEN}" -H "Content-Type: application/json" -H "Accept: application/json" -d @cc_create.json "https://${CAM_HOST}:${CAM_PORT}/cam/composer/api/v1/ServiceInstances/cleanupServiceInstance?tenantId=${CAM_TENANT_ID}&ace_orgGuid=${ICP_TEAM}
Sample Request BODY:
{
"serviceInstanceId": "5cf0c20cbdf17d001786d1a9",
"force": true
}
The force = true deletes the service instance entry from the Cloud Automation Manager database forcefully. However, the activites that are running does not get cleaned up and they throw the following error exception:
{
"error": {
"statusCode": "419",
"name": "Error",
"message": "ResourceLockError: Failed to obtain lock for resource stack_e19dd5d0-85f5-11e9-8609-cf2b57a8a189.; caused by Error: unable to obtain lock"
}
}
The ResourceLockError is related to Mongo DB lock. Whenever any deployment starts, Mongo DB lock associated with the stack_id is placed and it remains locked for 1 hour. If service instance is really stuck and the cleanup API gives
ResourceLockError, try the same API after 1 hour, that is, after the lock expires. It is a precautionary step to avoid clean up of service instances that are in running state at the backend, which might cause inconsistency. Also, there can be
side effects if an instance having dangled resources gets cleaned up.
Get details of a Service Instance by using the id
This GET call fetches the details of a specific by its id:
curl -k -X GET -H "Authorization: Bearer ${CAM_BEARER_TOKEN}" "https://${CAM_HOST}:${CAM_PORT}/cam/composer/api/v1/ServiceInstances/<service-instance-id>?tenantId=${CAM_TENANT_ID}&ace_orgGuid=${ICP_TEAM}&cloudOE_spaceGuid=${ICP_NAMESPACE}"
Headers remain the same as in the terminate service instance call.
Get the list of deployed instance: GET call
curl -k -X GET -H "Authorization: Bearer ${CAM_BEARER_TOKEN}" "https://${CAM_HOST}:${CAM_PORT}/cam/composer/api/v1/ServiceInstances?tenantId=${CAM_TENANT_ID}&ace_orgGuid=${ICP_TEAM}&cloudOE_spaceGuid=${ICP_NAMESPACE}"
Where namespace is namespace Id and team is organization Id.
Headers required:
- Content-Type: application/json
- Authorization:
Upload service icons
This API uploads new icons. Select the file to upload.
POST method
curl -k -X POST -H "Authorization: Bearer ${CAM_BEARER_TOKEN}" -F "icon=@PATH_TO_FILE" "https://${CAM_HOST}:${CAM_PORT}/cam/composer/api/v1/icons/upload?tenantId=${CAM_TENANT_ID}&ace_orgGuid=${ICP_TEAM}"
It returns the name and id of the image.
BODY example:
{
"res": {
"name": "serviceicon_1.svg",
"id": "5czdb1bc1b47001cbc556"
}
}
Note:
- The size of the icon file must be less than 1 MB.
- The name of the icon must be unique.
-
The supported content types are as follows:
CONTENT_TYPE = ['image/jpeg', 'image/gif', 'image/png','application/xml'];
- Upload images with the key name as ‘icon’.
Delete service icons
This API deletes service icons.
curl -k -X DELETE -H "Authorization: Bearer ${CAM_BEARER_TOKEN}" "https://${CAM_HOST}:${CAM_PORT}/cam/composer/api/v1/icons/${ICON_ID}?tenantId=${CAM_TENANT_ID}&ace_orgGuid=${ICP_TEAM}"
Retrieve all service icons
This API returns metadata of all available icons.
GET method.
curl -k -X GET -H "Authorization: Bearer ${CAM_BEARER_TOKEN}" "https://${CAM_HOST}:${CAM_PORT}/cam/composer/api/v1/icons?tenantId=${CAM_TENANT_ID}&ace_orgGuid=${ICP_TEAM}"
BODY example:
[
{
"ContentTye": "application/xml",
"name": "serviceicon_1.svg",
"id": "5czdb1bc1b47001cbc556"
},
{
"ContentTye": "application/xml",
"name": "serviceicon_2.svg",
"id": "5czdb1bc1b47001cbc557"
},
{
"ContentTye": "application/xml",
"name": "serviceicon_3.svg",
"id": "SCZ5czdb1bc1b47001cbc559"
}
]
You can also set the filter to retrieve the metadata of a service icon based on its name, ID, or type.
GET /cam/composer/api/v1/icons/?tenantId=62c6ce6e-1f62-4fe1-b176-259037a7bff2&ace_orgGuid=all&filter[where][name]=serviceicon_1.svg
BODY example:
{
{
"ContentTye": "application/xml",
"name": "serviceicon_1.svg",
"id": "5czdb1bc1b47001cbc556"
}
}
Download service icon
This API call downloads the specified icon.
GET method
curl -k -X GET -H "Authorization: Bearer ${CAM_BEARER_TOKEN}" "https://${CAM_HOST}:${CAM_PORT}/cam/composer/api/v1/icons/name/${ICON_NAME}?tenantId=${CAM_TENANT_ID}&ace_orgGuid=${ICP_TEAM}"
Encrypt secured data
If you import 2.1.0.2 or older version services into 2.1.0.2 FP 1 version or above, the secured parameters of the services are not encrypted. The secured parameters include any tag or template parameter that is of type password or has secured = true.
Header:
Content-Type: application/json,
Authorization: bearer <token>
Use this POST API call to encrypt secured parameters. You can either directly provide the source code of the service to be encrypted or use the service_id of the pre-existing service on your system.
curl -k -X POST -H "Authorization: Bearer ${CAM_BEARER_TOKEN}" -H "Content-Type: application/json" -H "Accept: application/json" -d @cc_create.json "https://${CAM_HOST}:${CAM_PORT}/cam/composer/api/v1/Service/encryptServiceData?tenantId=${CAM_TENANT_ID}&ace_orgGuid=${ICP_TEAM}
{"service_data": {"service_id": <id of the service>}}- The body if you encrypt any pre-existing service.{"Service_data": {"json": <imported source code>}}- The body where you encrypt the parameters of an imported service from Cloud Automation Manager 2.1.0.2.
The output of this API is the encrypted source code of the service. Save the encrypted source code and import it in Cloud Automation Manager 2.1.0.2 FP 1.
For known limitations of this encrpytServiceData API, see Troubleshooting Service Composer or Portal issues.