Service and service instance APIs
This section includes all service and service instance APIs with examples.
-
- Create a service with default version
- Add a service version to an existing service
- Set a default version for a service
- Edit a Service Version
- Delete a Service Version in a service
- Delete a Service (with all its versions)
- GET the list of services
- Get Service versions for a service using
service-id
- Get Service version manifest by service version ID
- Publish a service version
- Duplicate a service
- Change the category of a service
- Rename a service
- Change service image for a service
- Assign access to a service
- Retire a service version
- Unretire a service version
- Auto-retire a service version
-
- Deploy a Service Instance
- Get the list of deployed instance: GET call
- Get details of a Service Instance by using the id
- 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
- Get custom actions
- Invoke custom action
- Terminate Service Instance
- Cleanup Service Instance
- Cleanup Service Instance in inprogress state
Service APIs
Create a service with default version
This API call creates a service version and adds a default version. The service and the service version are returned in response.
curl -k -X POST \
'https://${TSA_HOSTNAME}/cam/composer/api/v1/Service/createService?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_create.json
Payload, content of 'service_create.json'
{
"service": {
"specVersion": "v3",
"catalog_metadata": {
"name": "SampleV1",
"description": "A Sample Single Virtual Machine Service",
"image": "serviceicon_1.svg",
"category": "",
"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": [
{
"name": "vmMemory",
"label": "vmMemory",
"customtype": "string",
"type": "string",
"immutable": false,
"hidden": false,
"required": false,
"secured": false
},
{
"name": "vmCpu",
"label": "vmCpu",
"customtype": "string",
"type": "string",
"immutable": false,
"hidden": false,
"required": false,
"secured": false
}
],
"flow": {
"conditions": [
],
"templates": [
{
"SingleVirtualMachine": {
"title": "SingleVirtualMachine_cca453",
"template_name": "SingleVirtualMachine",
"version": "2.3",
"id": "singlevi23cd3149",
"template_type": "Terraform",
"template_content_type": "VMware vSphere",
"template_provider": "VMware vSphere",
"instance_name": "",
"cloud_connection_name": "vmware",
"template_data_objects": {
},
"template_params": {
"vm_1_name": "ver2vm",
"vm_1_dns_servers": [
"1.1.1.2"
],
"vm_1_dns_suffixes": [
"test.cam.com"
],
"vm_1_root_disk_keep_on_remove": "false",
"vm_1_domain": "test.cam.com",
"vm_1-image": "terraform/template/rhel_7_2_small",
"vm_1_root_disk_size": "25",
"vm_1_root_disk_controller_type": "scsi",
"vm_1_root_disk_datastore": "NSXcluster/datastore1",
"vm_1_root_disk_type": "eager_zeroed",
"vm_1_ipv4_gateway": "10.4.10.1",
"vm_1_ipv4_address": "10.4.10.17",
"vm_1_memory": "${input_parameters.vmMemory}",
"vm_1_ipv4_prefix_length": "23",
"vm_1_number_of_vcpu": "${input_parameters.vmCpu}",
"vm_1_network_interface_label": "external-net-410",
"vm_1_cluster": "icm-vmware-nsx-2",
"vm_1_datacenter": "NSX Manage To",
"vm_1_folder": "terraform/test",
"vm_1_adapter_type": "vmxnet3",
"vm_1_resource_pool": "cam"
},
"outputs": [
],
"immutable": false
}
}
],
"resthooks": [
],
"notifications": [
],
"sequence": {
"0": "singlevi23cd3149"
},
"error_sequence": {
}
},
"output_parameters": [
]
}
],
"plans": [
{
"name": "Standard",
"description": "To deploy a Standard plan",
"actions": [
],
"plan_parameters": [
]
}
]
}
}
Response
{
"id": "5df37c4aa051bd001d161161",
"name": "SampleV1",
"author": "admin",
"image": "serviceicon_1.svg",
"status": "",
"serviceManifestId": "5df37c4ba051bd001d161162",
"tag": "5c6e73077077fc001715703b",
"creationTime": "2019-12-13T11:55:51.389Z",
"lastUpdated": "2019-12-13T11:55:55.078Z",
"namespaceId": "default",
"tenantId": "674a6a42-76c0-450c-a225-e743772c49f3",
"description": "A Sample Single Virtual Machine Service",
"longDescription": "",
"defaultServiceVersion": {
"id": "5df37c4ba051bd001d161162",
"version": "1.0.0.0",
"ServiceEngine_InputFile": {
"service": {
"specVersion": "v3",
"catalog_metadata": {
"name": "SampleV1",
"description": "A Sample Single Virtual Machine Service",
"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": [
{
"name": "vmMemory",
"label": "vmMemory",
"customtype": "string",
"type": "string",
"immutable": false,
"hidden": false,
"required": false,
"secured": false
},
{
"name": "vmCpu",
"label": "vmCpu",
"customtype": "string",
"type": "string",
"immutable": false,
"hidden": false,
"required": false,
"secured": false
}
],
"flow": {
"conditions": [],
"templates": [
{
"SingleVirtualMachine": {
"title": "SingleVirtualMachine_cca453",
"template_name": "SingleVirtualMachine",
"version": "2.3",
"id": "singlevi23cd3149",
"template_type": "Terraform",
"template_content_type": "VMware vSphere",
"template_provider": "VMware vSphere",
"instance_name": "",
"cloud_connection_name": "vmware",
"template_data_objects": {},
"template_params": {
"vm_1_name": "ver2vm",
"vm_1_dns_servers": [
"1.1.1.2"
],
"vm_1_dns_suffixes": [
"test.cam.com"
],
"vm_1_root_disk_keep_on_remove": "false",
"vm_1_domain": "test.cam.com",
"vm_1-image": "terraform/template/rhel_7_2_small",
"vm_1_root_disk_size": "25",
"vm_1_root_disk_controller_type": "scsi",
"vm_1_root_disk_datastore": "NSXcluster/datastore1",
"vm_1_root_disk_type": "eager_zeroed",
"vm_1_ipv4_gateway": "10.4.10.1",
"vm_1_ipv4_address": "10.4.10.17",
"vm_1_memory": "${input_parameters.vmMemory}",
"vm_1_ipv4_prefix_length": "23",
"vm_1_number_of_vcpu": "${input_parameters.vmCpu}",
"vm_1_network_interface_label": "external-net-410",
"vm_1_cluster": "icm-vmware-nsx-2",
"vm_1_datacenter": "NSX Manage To",
"vm_1_folder": "terraform/test",
"vm_1_adapter_type": "vmxnet3",
"vm_1_resource_pool": "cam"
},
"outputs": [],
"immutable": false
}
}
],
"resthooks": [],
"notifications": [],
"sequence": {
"0": "singlevi23cd3149"
},
"error_sequence": {}
},
"output_parameters": []
}
],
"plans": [
{
"name": "Standard",
"description": "To deploy a Standard plan",
"actions": [],
"plan_parameters": []
}
],
"version": "1.0.0.0"
}
},
"service_id": "5df37c4aa051bd001d161161",
"namespaceId": "default",
"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": "2019-12-13T11:55:54.970Z"
},
"warning": [
"No 'Category' is provided in the source code. Assigning the service to 'CloudServices' \n",
"No 'version' is provided in the source code. Assigning the service, the default version '1.0.0.0' \n"
]
}
Add a service version to an existing service
Service name, category, and image cannot be changed by using this API.
curl -k -X POST \
'https://${TSA_HOSTNAME}/cam/composer/api/v1/Service/${SERVICE_ID}/addServiceVersion?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_version_add.json
Payload: Content of service_version_add.json
{
"service": {
"version": "1.0.0.1",
"specVersion": "v3",
"catalog_metadata": {
"name": "SampleV1",
"description": "A Sample Single Virtual Machine Service",
"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": [
{
"name": "vmMemory",
"label": "vmMemory",
"customtype": "string",
"type": "string",
"immutable": false,
"hidden": false,
"required": false,
"secured": false
},
{
"name": "vmCpu",
"label": "vmCpu",
"customtype": "string",
"type": "string",
"immutable": false,
"hidden": false,
"required": false,
"secured": false
}
],
"flow": {
"conditions": [],
"templates": [
{
"SingleVirtualMachine": {
"title": "SingleVirtualMachine_cca453",
"template_name": "SingleVirtualMachine",
"version": "2.3",
"id": "singlevi23cd3149",
"template_type": "Terraform",
"template_content_type": "VMware vSphere",
"template_provider": "VMware vSphere",
"instance_name": "",
"cloud_connection_name": "vmware",
"template_data_objects": {},
"template_params": {
"vm_1_name": "ver2vm",
"vm_1_dns_servers": [
"1.1.1.2"
],
"vm_1_dns_suffixes": [
"test.cam.com"
],
"vm_1_root_disk_keep_on_remove": "false",
"vm_1_domain": "test.cam.com",
"vm_1-image": "terraform/template/rhel_7_2_small",
"vm_1_root_disk_size": "25",
"vm_1_root_disk_controller_type": "scsi",
"vm_1_root_disk_datastore": "NSXcluster/datastore1",
"vm_1_root_disk_type": "eager_zeroed",
"vm_1_ipv4_gateway": "10.4.10.1",
"vm_1_ipv4_address": "10.4.10.17",
"vm_1_memory": "${input_parameters.vmMemory}",
"vm_1_ipv4_prefix_length": "23",
"vm_1_number_of_vcpu": "${input_parameters.vmCpu}",
"vm_1_network_interface_label": "external-net-410",
"vm_1_cluster": "icm-vmware-nsx-2",
"vm_1_datacenter": "NSX Manage To",
"vm_1_folder": "terraform/test",
"vm_1_adapter_type": "vmxnet3",
"vm_1_resource_pool": "cam"
},
"outputs": [],
"immutable": false
}
}
],
"resthooks": [],
"notifications": [
{
"emailnotification": {
"title": "emailnotification_4278ce",
"type": "email",
"receiverList": "testmail@testr-mail.net",
"id": "emailnot21410720",
"sender": "CAMadmin",
"copyToList": "",
"subject": "VM Creation Succeful",
"body": "VM create at ${templates.singlevi23cd3149.created_at}",
"immutable": false
}
}
],
"sequence": {
"0": "singlevi23cd3149",
"1": "emailnot21410720"
},
"error_sequence": {}
},
"output_parameters": []
}
],
"plans": [
{
"name": "Standard",
"description": "To deploy a Standard plan",
"actions": [],
"plan_parameters": []
}
]
}
}
Response
{
"id": "5df37f91a051bd001d161171",
"version": "1.0.0.1",
"ServiceEngine_InputFile": {
"service": {
"version": "1.0.0.1",
"specVersion": "v3",
"catalog_metadata": {
"name": "SampleV1",
"description": "A Sample Single Virtual Machine Service",
"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": [
{
"name": "vmMemory",
"label": "vmMemory",
"customtype": "string",
"type": "string",
"immutable": false,
"hidden": false,
"required": false,
"secured": false
},
{
"name": "vmCpu",
"label": "vmCpu",
"customtype": "string",
"type": "string",
"immutable": false,
"hidden": false,
"required": false,
"secured": false
}
],
"flow": {
"conditions": [],
"templates": [
{
"SingleVirtualMachine": {
"title": "SingleVirtualMachine_cca453",
"template_name": "SingleVirtualMachine",
"version": "2.3",
"id": "singlevi23cd3149",
"template_type": "Terraform",
"template_content_type": "VMware vSphere",
"template_provider": "VMware vSphere",
"instance_name": "",
"cloud_connection_name": "vmware",
"template_data_objects": {},
"template_params": {
"vm_1_name": "ver2vm",
"vm_1_dns_servers": [
"1.1.1.2"
],
"vm_1_dns_suffixes": [
"test.cam.com"
],
"vm_1_root_disk_keep_on_remove": "false",
"vm_1_domain": "test.cam.com",
"vm_1-image": "terraform/template/rhel_7_2_small",
"vm_1_root_disk_size": "25",
"vm_1_root_disk_controller_type": "scsi",
"vm_1_root_disk_datastore": "NSXcluster/datastore1",
"vm_1_root_disk_type": "eager_zeroed",
"vm_1_ipv4_gateway": "10.4.10.1",
"vm_1_ipv4_address": "10.4.10.17",
"vm_1_memory": "${input_parameters.vmMemory}",
"vm_1_ipv4_prefix_length": "23",
"vm_1_number_of_vcpu": "${input_parameters.vmCpu}",
"vm_1_network_interface_label": "external-net-410",
"vm_1_cluster": "icm-vmware-nsx-2",
"vm_1_datacenter": "NSX Manage To",
"vm_1_folder": "terraform/test",
"vm_1_adapter_type": "vmxnet3",
"vm_1_resource_pool": "cam"
},
"outputs": [],
"immutable": false
}
}
],
"resthooks": [],
"notifications": [
{
"emailnotification": {
"title": "emailnotification_4278ce",
"type": "email",
"receiverList": "testmail@testr-mail.net",
"id": "emailnot21410720",
"sender": "CAMadmin",
"copyToList": "",
"subject": "VM Creation Succeful",
"body": "VM create at ${templates.singlevi23cd3149.created_at}",
"immutable": false
}
}
],
"sequence": {
"0": "singlevi23cd3149",
"1": "emailnot21410720"
},
"error_sequence": {}
},
"output_parameters": []
}
],
"plans": [
{
"name": "Standard",
"description": "To deploy a Standard plan",
"actions": [],
"plan_parameters": []
}
]
}
},
"service_id": "5df37f85a051bd001d16116d",
"tenantId": "674a6a42-76c0-450c-a225-e743772c49f3",
"namespaceId": "default",
"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": "2019-12-13T12:09:53.433Z",
"warning": []
}
Set a default version for a service
curl -k -X POST \
'https://${TSA_HOSTNAME}/cam/composer/api/v1/Service/${SERVICE_ID}/updateServiceDetails?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_default_version.json
Payload sample1:
"default_version_id": "<<version id>>"
Payload sample2:
{
"default_version_name": "1.0.0.1"
}
Response:
{
"service": {
"id": "5df38f28a051bd001d16117d",
"name": "SampleV1",
"serviceManifestId": "5df38f30a051bd001d161181",
"author": "admin",
"image": "serviceicon_1.svg",
"tag": "5c6e73077077fc001715703b",
"creationTime": "2019-12-13T13:16:23.237Z",
"lastUpdated": "2019-12-13T13:25:01.646Z",
"namespaceId": "default",
"tenantId": "674a6a42-76c0-450c-a225-e743772c49f3",
"description": "A Sample Single Virtual Machine Service",
"longDescription": ""
}
}
Edit a Service Version
This API edits a service version. This API cannot change service name, category, and image.
curl -k -X POST \
'https://${TSA_HOSTNAME}/cam/composer/api/v1/ServiceManifest/${SERVICE_VERSION_ID}/updateServiceVersion?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_version_edit.json
Payload: content of service_version_edit.json
{
"service": {
"version": "1.0.0.1",
"specVersion": "v3",
"catalog_metadata": {
"name": "SampleV1",
"description": "A Sample Single Virtual Machine Service",
"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": [
{
"name": "vmMemory",
"label": "vmMemory",
"customtype": "string",
"type": "string",
"immutable": false,
"hidden": false,
"required": false,
"secured": false
},
{
"name": "vmCpu",
"label": "vmCpu",
"customtype": "string",
"type": "string",
"immutable": false,
"hidden": false,
"required": false,
"secured": false
}
],
"flow": {
"conditions": [],
"templates": [
{
"SingleVirtualMachine": {
"title": "SingleVirtualMachine_cca453",
"template_name": "SingleVirtualMachine",
"version": "2.3",
"id": "singlevi23cd3149",
"template_type": "Terraform",
"template_content_type": "VMware vSphere",
"template_provider": "VMware vSphere",
"instance_name": "",
"cloud_connection_name": "vmware",
"template_data_objects": {},
"template_params": {
"vm_1_name": "ver2vm",
"vm_1_dns_servers": [
"1.1.1.2"
],
"vm_1_dns_suffixes": [
"test.cam.com"
],
"vm_1_root_disk_keep_on_remove": "false",
"vm_1_domain": "test.cam.com",
"vm_1-image": "terraform/template/rhel_7_2_small",
"vm_1_root_disk_size": "25",
"vm_1_root_disk_controller_type": "scsi",
"vm_1_root_disk_datastore": "NSXcluster/datastore1",
"vm_1_root_disk_type": "eager_zeroed",
"vm_1_ipv4_gateway": "10.4.10.1",
"vm_1_ipv4_address": "10.4.10.17",
"vm_1_memory": "${input_parameters.vmMemory}",
"vm_1_ipv4_prefix_length": "23",
"vm_1_number_of_vcpu": "${input_parameters.vmCpu}",
"vm_1_network_interface_label": "external-net-410",
"vm_1_cluster": "icm-vmware-nsx-2",
"vm_1_datacenter": "NSX Manage To",
"vm_1_folder": "terraform/test",
"vm_1_adapter_type": "vmxnet3",
"vm_1_resource_pool": "cam"
},
"outputs": [],
"immutable": false,
"provider_engine_version": "0.11.11"
}
}
],
"resthooks": [],
"notifications": [
{
"emailnotification": {
"title": "emailnotification_4278ce",
"type": "email",
"receiverList": "testmail@test-mail.sample.net",
"id": "emailnot21410720",
"sender": "CAMadmin",
"copyToList": "",
"subject": "VM Creation Succeful",
"body": "VM create at ${templates.singlevi23cd3149.created_at}",
"immutable": false
}
},
{
"emailnotification": {
"title": "emailnotification_ac336e",
"type": "email",
"receiverList": "testmail@test-mail.sample.net",
"id": "emailnotd384eeec",
"sender": "CAMadmin",
"copyToList": "",
"subject": "VM Creation failed",
"body": "VM creation failure caused by : ${svc_instance.error.message}",
"immutable": false
}
}
],
"sequence": {
"0": "singlevi23cd3149",
"1": "emailnot21410720"
},
"error_sequence": {
"0": "emailnotd384eeec"
}
},
"output_parameters": []
}
],
"plans": [
{
"name": "Standard",
"description": "To deploy a Standard plan",
"actions": [],
"plan_parameters": []
}
]
}
}
Response:
{
"id": "5df38f30a051bd001d161181",
"version": "1.0.0.1",
"ServiceEngine_InputFile": {
"service": {
"version": "1.0.0.1",
"specVersion": "v3",
"catalog_metadata": {
"name": "SampleV1",
"description": "A Sample Single Virtual Machine Service",
"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 rovisioning 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": [
{
"name": "vmMemory",
"label": "vmMemory",
"customtype": "string",
"type": "string",
"immutable": false,
"hidden": false,
"required": false,
"secured": false
},
{
"name": "vmCpu",
"label": "vmCpu",
"customtype": "string",
"type": "string",
"immutable": false,
"hidden": false,
"required": false,
"secured": false
}
],
"flow": {
"conditions": [],
"templates": [
{
"SingleVirtualMachine": {
"title": "SingleVirtualMachine_cca453",
"template_name": "SingleVirtualMachine",
"version": "2.3",
"id": "singlevi23cd3149",
"template_type": "Terraform",
"template_content_type": "VMware vSphere",
"template_provider": "VMware vSphere",
"instance_name": "",
"cloud_connection_name": "vmware",
"template_data_objects": {},
"template_params": {
"vm_1_name": "ver2vm",
"vm_1_dns_servers": [
"1.1.1.2"
],
"vm_1_dns_suffixes": [
"test.cam.com"
],
"vm_1_root_disk_keep_on_remove": "false",
"vm_1_domain": "test.cam.com",
"vm_1-image": "terraform/template/rhel_7_2_small",
"vm_1_root_disk_size": "25",
"vm_1_root_disk_controller_type": "scsi",
"vm_1_root_disk_datastore": "NSXcluster/datastore1",
"vm_1_root_disk_type": "eager_zeroed",
"vm_1_ipv4_gateway": "10.4.10.1",
"vm_1_ipv4_address": "10.4.10.17",
"vm_1_memory": "${input_parameters.vmMemory}",
"vm_1_ipv4_prefix_length": "23",
"vm_1_number_of_vcpu": "${input_parameters.vmCpu}",
"vm_1_network_interface_label": "external-net-410",
"vm_1_cluster": "icm-vmware-nsx-2",
"vm_1_datacenter": "NSX Manage To",
"vm_1_folder": "terraform/test",
"vm_1_adapter_type": "vmxnet3",
"vm_1_resource_pool": "cam"
},
"outputs": [],
"immutable": false,
"provider_engine_version": "0.11.11"
}
}
],
"resthooks": [],
"notifications": [
{
"emailnotification": {
"title": "emailnotification_4278ce",
"type": "email",
"receiverList": "testmail@test-mail.sample.net",
"id": "emailnot21410720",
"sender": "CAMadmin",
"copyToList": "",
"subject": "VM Creation Succeful",
"body": "VM create at ${templates.singlevi23cd3149.created_at}",
"immutable": false
}
},
{
"emailnotification": {
"title": "emailnotification_ac336e",
"type": "email",
"receiverList": "testmail@test-mail.sample.net",
"id": "emailnotd384eeec",
"sender": "CAMadmin",
"copyToList": "",
"subject": "VM Creation failed",
"body": "VM creation failure caused by : ${svc_instance.error.message}",
"immutable": false
}
}
],
"sequence": {
"0": "singlevi23cd3149",
"1": "emailnot21410720"
},
"error_sequence": {
"0": "emailnotd384eeec"
}
},
"output_parameters": []
}
],
"plans": [
{
"name": "Standard",
"description": "To deploy a Standard plan",
"actions": [],
"plan_parameters": []
}
]
}
},
"service_id": "5df38f28a051bd001d16117d",
"tenantId": "674a6a42-76c0-450c-a225-e743772c49f3",
"namespaceId": "default",
"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": "2019-12-13T13:16:32.250Z",
"serviceInstanceCount": 0,
"warning": []
}
Delete a Service Version in a service
curl -k -X POST \
'https://${TSA_HOSTNAME}/cam/composer/api/v1/Service/${SERVICE_ID}/deleteService?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_version_delete.json
Payload sample1:
{
"version_id": "{{VERION_ID}}"
}
Payload sample2:
{
"version": "{{VERSION}}"
}
Delete a Service (with all its versions)
curl -k -X POST \
'https://${TSA_HOSTNAME}/cam/composer/api/v1/Service/${SERVICE_ID}/deleteService?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_delete.json
Payload
{}
Response
{
"count": "1"
}
GET the list of services
curl -k -X GET \
-H "Authorization: Bearer ${TSA_BEARER_TOKEN}" "https://${TSA_HOSTNAME}/cam/composer/api/v1/service?tenantId=${TSA_TENANT_ID}&ace_orgGuid=${MCM_TEAM}&cloudOE_spaceGuid=${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 specify 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": "Cloud Pak for Multicloud Management",
"template_provider": "Cloud Pak for Multicloud Management",
"instance_name": "",
"cloud_connection_name": "MCM Connection",
"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": "Cloud Pak for Multicloud Management",
"template_provider": "Cloud Pak for Multicloud Management",
"instance_name": "",
"cloud_connection_name": "MCM Connection",
"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": "Cloud Pak for Multicloud Management",
"template_provider": "Cloud Pak for Multicloud Management",
"instance_name": "",
"cloud_connection_name": "MCM Connection",
"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"
}]
Get Service versions for a service by using service-id
This API fetches all the service versions for a specific service by using the service ID.
curl -k -X GET \
'https://${TSA_HOSTNAME}/cam/composer/api/v1/Service/${SERVICEID}/ServiceVersions? filter[order]=updated_time%20DESC&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'
Response:
[{"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-08-25T14:29:47.231Z","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-08-25T14:29:47.231Z","serviceInstanceCount":3,"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","retiredTime":"2020-08-25T14:29:31.229Z"},{"version":"2.0.0.0","ServiceEngine_InputFile":{"service":{"specVersion":"v3","catalog_metadata":{"name":"T_1594640403754979b9fb0_c4fd_11ea_9354_f721359f251a_9be04e40-c4fd-11ea-9354-f721359f251a","description":"test-with-resthook desc","image":"serviceicon_1.svg","category":"CloudServices","bullets":[],"providerDisplayName":"IBM","longDescription":"test-with-resthook long desc","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":[{"name":"arrayparam","label":"arrayparam","customtype":"list","type":"list","immutable":false,"hidden":false,"required":false,"secured":false,"default":["first","second","third"],"editable":true}],"flow":{"conditions":[],"templates":[],"resthooks":[{"resthook":{"title":"resthook_fb4ca7","id":"resthook1b74da50","headers":{"accept":"application/json","Content-Type":"application/json"},"url":"http://9.5.28.173:3000/posts","method":"POST","payload":{"id":2001,"arraylistcustom":"${input_parameters.arrayparam}"}}}],"notifications":[],"sequence":{"0":"resthook1b74da50"},"error_sequence":{}},"output_parameters":[]}],"plans":[{"name":"Standard","description":"To deploy a Standard plan","actions":[],"plan_parameters":[]}],"version":"2.0.0.0"}},"service_id":"5f0c481b415e1137d7efc5f9","tenantId":"72e1331d-3d93-447a-bf61-de1177f2f0d8","namespaceId":"ibmcom","author":"admin","specVersion":"v3","status":"Published","publishedTime":"2020-07-13T11:40:18.421Z","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-07-13T11:40:18.186Z","lastUpdated":"2020-07-13T11:40:18.421Z","serviceInstanceCount":1,"id":"5f0c4822415e1137d7efc5ff","actions":[{"type":"provision","name":"Provision","description":"Default action for deployment of service","input_parameters":[{"name":"arrayparam","label":"arrayparam","customtype":"list","type":"list","immutable":false,"hidden":false,"required":false,"secured":false,"default":["first","second","third"],"editable":true}],"flow":{"conditions":[],"templates":[],"resthooks":[{"resthook":{"title":"resthook_fb4ca7","id":"resthook1b74da50","headers":{"accept":"application/json","Content-Type":"application/json"},"url":"http://9.5.28.173:3000/posts","method":"POST","payload":{"id":2001,"arraylistcustom":"${input_parameters.arrayparam}"}}}],"notifications":[],"sequence":{"0":"resthook1b74da50"},"error_sequence":{}},"output_parameters":[]}],"plans":[{"name":"Standard","description":"To deploy a Standard plan","actions":[],"plan_parameters":[]}],"tagId":"5ecddfe55d6b7600155831de"}]
Get Service version manifest by service version ID
This API fetches the service version manifest by using the service version ID.
curl -k -X GET \
'https://${TSA_HOSTNAME}/cam/composer/api/v1/ServiceManifest/${SERVICE_VERSION_ID}?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'
Response:
{"version":"1.1.1.1","ServiceEngine_InputFile":{"service":{"version":"1.1.1.1","specVersion":"v3","catalog_metadata":{"name":"Test_Automationb7550ee0-b6a7-11ea-9f4e-f3a3b131b5d4","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"}],"actions":[{"type":"provision","name":"Provision","description":"Default action for deployment of service","input_parameters":[{"name":"url_1","label":"URL 1","customtype":"string","type":"string","immutable":false,"hidden":false,"required":false,"secured":false,"isDynamic":false,"editable":true},{"name":"url_2","label":"URL 2","customtype":"string","type":"string","immutable":false,"hidden":false,"required":false,"secured":false,"description":"","isDynamic":false,"editable":true}],"flow":{"conditions":[],"templates":[],"resthooks":[{"resthook":{"title":"resthook_5477d2","id":"resthookee76554d","headers":{"accept":"application/json","Content-Type":"application/json"},"immutable":false,"url":"${input_parameters.url_1}","method":"GET"}},{"resthook":{"title":"resthook_f2fce4","id":"resthook4712f3c3","headers":{"accept":"application/json","Content-Type":"application/json"},"immutable":false,"url":"${input_parameters.url_2}","method":"GET"}}],"notifications":[],"sequence":{"0":"resthookee76554d","1":"resthook4712f3c3"},"error_sequence":{}},"output_parameters":[]}],"plans":[{"name":"Standard","description":"To deploy a Standard plan","actions":[],"plan_parameters":[]}]}},"service_id":"5ef43b0ccfdfb035e2a3824b","namespaceId":"cert-manager","author":"user1_administrator","specVersion":"v3","status":"Published","publishedTime":"2020-06-25T05:50:06.602Z","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-06-25T05:50:04.184Z","lastUpdated":"2020-06-25T05:50:06.602Z","serviceInstanceCount":0,"id":"5ef43b0ccfdfb035e2a3824c","actions":[{"type":"provision","name":"Provision","description":"Default action for deployment of service","input_parameters":[{"name":"url_1","label":"URL 1","customtype":"string","type":"string","immutable":false,"hidden":false,"required":false,"secured":false,"isDynamic":false,"editable":true},{"name":"url_2","label":"URL 2","customtype":"string","type":"string","immutable":false,"hidden":false,"required":false,"secured":false,"description":"","isDynamic":false,"editable":true}],"flow":{"conditions":[],"templates":[],"resthooks":[{"resthook":{"title":"resthook_5477d2","id":"resthookee76554d","headers":{"accept":"application/json","Content-Type":"application/json"},"immutable":false,"url":"${input_parameters.url_1}","method":"GET"}},{"resthook":{"title":"resthook_f2fce4","id":"resthook4712f3c3","headers":{"accept":"application/json","Content-Type":"application/json"},"immutable":false,"url":"${input_parameters.url_2}","method":"GET"}}],"notifications":[],"sequence":{"0":"resthookee76554d","1":"resthook4712f3c3"},"error_sequence":{}},"output_parameters":[]}],"plans":[{"name":"Standard","description":"To deploy a Standard plan","actions":[],"plan_parameters":[]}],"tagId":"5ecddfe55d6b7600155831de","retiredTime":"2020-06-25T05:50:06.277Z","isParametersResolved":false}
Publish a service version
curl -k -X POST \
'https://${TSA_HOSTNAME}/cam/composer/api/v1/ServiceManifest/${SERVICE_MANIFEST_ID}/publish
?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'
Response:
{"version":"1.0.0.0","ServiceEngine_InputFile":{"service":{"specVersion":"v3","version":"1.0.0.0","catalog_metadata":{"name":"Test_with_COMPATIBILITY_MODE_ON_16331c60-ed01-11ea-b709-43ed3173756c","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"}],"actions":[{"type":"provision","name":"Provision","description":"Default action for deployment of service","input_parameters":[{"name":"vm-name","label":"vm-name","customtype":"string","type":"string","immutable":false,"hidden":false,"required":true,"secured":false,"description":"","isDynamic":false,"default":"vm1","editable":true},{"name":"Conn1","label":"Conn1","customtype":"connection","type":"connection","immutable":false,"hidden":false,"required":true,"secured":false,"isDynamic":false,"default":"vmware","provider":"VMware vSphere","editable":true},{"name":"DataObject1","label":"DataObject1","customtype":"sharedparameter","type":"sharedparameter","immutable":false,"hidden":false,"required":true,"secured":false,"description":"","isDynamic":false,"default":"DefaultNoBastionHostRequired","datatype":"bastionhost","editable":true},{"name":"region","label":"region","customtype":"string","type":"string","immutable":false,"hidden":false,"required":false,"secured":false,"isDynamic":false,"default":"west1","editable":true},{"name":"org","label":"Org","customtype":"string","type":"string","immutable":false,"hidden":false,"required":false,"secured":false,"description":"","isDynamic":false,"default":"all","editable":true},{"name":"team","label":"Team","customtype":"string","type":"string","immutable":false,"hidden":false,"required":false,"secured":false,"description":"","isDynamic":false,"default":"team1","editable":true},{"name":"DataObject2","label":"DataObject2","customtype":"sharedparameter","type":"sharedparameter","immutable":false,"hidden":false,"required":true,"secured":false,"description":"","isDynamic":false,"default":"","datatype":"httpproxy","editable":true},{"name":"aws","label":"aws","customtype":"connection","type":"connection","immutable":false,"hidden":false,"required":true,"secured":false,"description":"","isDynamic":false,"default":"","provider":"Amazon EC2","editable":true},{"name":"size","label":"size","customtype":"counter","type":"counter","immutable":false,"hidden":false,"required":true,"secured":false,"description":"","isDynamic":false,"default":100,"range":{"min":1,"max":1000},"editable":true}],"flow":{"conditions":[],"templates":[],"resthooks":[{"resthook":{"title":"Prov_R1","id":"resthooka4f9e22b","headers":{"accept":"application/json","Content-Type":"application/json"},"error":false,"immutable":false,"url":"http://9.30.167.199:8080/pingpong/list/1?id=1021&list=${input_parameters.Conn1}&list=${input_parameters.DataObject1}","method":"GET","warning":false}}],"notifications":[],"sequence":{"0":"resthooka4f9e22b"},"error_sequence":{}},"output_parameters":[]}],"plans":[{"name":"Standard","description":"To deploy a Standard plan","actions":[],"plan_parameters":[{"name":"DataObject2","label":"DataObject2","customtype":"sharedparameter","type":"sharedparameter","immutable":true,"hidden":true,"required":true,"secured":false,"description":"","isDynamic":false,"default":"DefaultNoProxyRequired","datatype":"httpproxy"},{"name":"aws","label":"aws","customtype":"connection","type":"connection","immutable":true,"hidden":true,"required":true,"secured":false,"description":"","isDynamic":false,"default":"AWS","provider":"Amazon EC2"},{"name":"size","label":"size","customtype":"counter","type":"counter","immutable":false,"hidden":false,"required":true,"secured":false,"description":"","isDynamic":false,"default":50,"range":{"min":10,"max":100}},{"name":"vm-name","label":"vm-name","customtype":"string","type":"string","immutable":false,"hidden":false,"required":true,"secured":false,"description":"","isDynamic":false,"default":"vm1"},{"name":"Conn1","label":"Conn1","customtype":"connection","type":"connection","immutable":false,"hidden":false,"required":true,"secured":false,"isDynamic":false,"default":"vmware","provider":"VMware vSphere"},{"name":"DataObject1","label":"DataObject1","customtype":"sharedparameter","type":"sharedparameter","immutable":false,"hidden":false,"required":true,"secured":false,"description":"","isDynamic":false,"default":"DefaultNoBastionHostRequired","datatype":"bastionhost"},{"name":"region","label":"region","customtype":"string","type":"string","immutable":false,"hidden":false,"required":false,"secured":false,"isDynamic":false,"default":"west1"},{"name":"org","label":"Org","customtype":"string","type":"string","immutable":false,"hidden":false,"required":false,"secured":false,"description":"","isDynamic":false,"default":"all"},{"name":"team","label":"Team","customtype":"string","type":"string","immutable":false,"hidden":false,"required":false,"secured":false,"description":"","isDynamic":false,"default":"team1"}]},{"name":"Max","description":"Max","plan_parameters":[{"name":"size","label":"size","customtype":"counter","type":"counter","immutable":false,"hidden":false,"required":true,"secured":false,"description":"","isDynamic":false,"default":100,"range":{"min":100,"max":1000}},{"name":"vm-name","label":"vm-name","customtype":"string","type":"string","immutable":false,"hidden":false,"required":true,"secured":false,"description":"","isDynamic":false,"default":"vm1"},{"name":"Conn1","label":"Conn1","customtype":"connection","type":"connection","immutable":false,"hidden":false,"required":true,"secured":false,"isDynamic":false,"default":"vmware","provider":"VMware vSphere"},{"name":"DataObject1","label":"DataObject1","customtype":"sharedparameter","type":"sharedparameter","immutable":false,"hidden":false,"required":true,"secured":false,"description":"","isDynamic":false,"default":"DefaultNoBastionHostRequired","datatype":"bastionhost"},{"name":"region","label":"region","customtype":"string","type":"string","immutable":false,"hidden":false,"required":false,"secured":false,"isDynamic":false,"default":"west1"},{"name":"org","label":"Org","customtype":"string","type":"string","immutable":false,"hidden":false,"required":false,"secured":false,"description":"","isDynamic":false,"default":"all"},{"name":"team","label":"Team","customtype":"string","type":"string","immutable":false,"hidden":false,"required":false,"secured":false,"description":"","isDynamic":false,"default":"team1"},{"name":"DataObject2","label":"DataObject2","customtype":"sharedparameter","type":"sharedparameter","immutable":false,"hidden":false,"required":true,"secured":false,"description":"","isDynamic":false,"default":"","datatype":"httpproxy"},{"name":"aws","label":"aws","customtype":"connection","type":"connection","immutable":false,"hidden":false,"required":true,"secured":false,"description":"","isDynamic":false,"default":"","provider":"Amazon EC2"}]},{"name":"Min","description":"Min","plan_parameters":[{"name":"region","label":"region","customtype":"string","type":"string","immutable":true,"hidden":true,"required":false,"secured":false,"isDynamic":false,"default":"west1"},{"name":"org","label":"Org","customtype":"string","type":"string","immutable":true,"hidden":true,"required":false,"secured":false,"description":"","isDynamic":false,"default":"all"},{"name":"DataObject2","label":"DataObject2","customtype":"sharedparameter","type":"sharedparameter","immutable":true,"hidden":true,"required":true,"secured":false,"description":"","isDynamic":false,"default":"DefaultNoProxyRequired","datatype":"httpproxy"},{"name":"aws","label":"aws","customtype":"connection","type":"connection","immutable":true,"hidden":true,"required":true,"secured":false,"description":"","isDynamic":false,"default":"AWS","provider":"Amazon EC2"},{"name":"size","label":"size","customtype":"counter","type":"counter","immutable":false,"hidden":false,"required":true,"secured":false,"description":"","isDynamic":false,"default":1,"range":{"min":1,"max":10}},{"name":"vm-name","label":"vm-name","customtype":"string","type":"string","immutable":false,"hidden":false,"required":true,"secured":false,"description":"","isDynamic":false,"default":"vm1"},{"name":"Conn1","label":"Conn1","customtype":"connection","type":"connection","immutable":false,"hidden":false,"required":true,"secured":false,"isDynamic":false,"default":"vmware","provider":"VMware vSphere"},{"name":"DataObject1","label":"DataObject1","customtype":"sharedparameter","type":"sharedparameter","immutable":false,"hidden":false,"required":true,"secured":false,"description":"","isDynamic":false,"default":"DefaultNoBastionHostRequired","datatype":"bastionhost"},{"name":"team","label":"Team","customtype":"string","type":"string","immutable":false,"hidden":false,"required":false,"secured":false,"description":"","isDynamic":false,"default":"team1"}]}]}},"service_id":"5f4f69cf643bcb0f7b35ab29","tenantId":"72e1331d-3d93-447a-bf61-de1177f2f0d8","namespaceId":"cert-manager","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-09-02T09:45:51.304Z","serviceInstanceCount":0,"id":"5f4f69cf643bcb0f7b35ab2a","actions":[{"type":"provision","name":"Provision","description":"Default action for deployment of service","input_parameters":[{"name":"vm-name","label":"vm-name","customtype":"string","type":"string","immutable":false,"hidden":false,"required":true,"secured":false,"description":"","isDynamic":false,"default":"vm1","editable":true},{"name":"Conn1","label":"Conn1","customtype":"connection","type":"connection","immutable":false,"hidden":false,"required":true,"secured":false,"isDynamic":false,"default":"vmware","provider":"VMware vSphere","editable":true},{"name":"DataObject1","label":"DataObject1","customtype":"sharedparameter","type":"sharedparameter","immutable":false,"hidden":false,"required":true,"secured":false,"description":"","isDynamic":false,"default":"DefaultNoBastionHostRequired","datatype":"bastionhost","editable":true},{"name":"region","label":"region","customtype":"string","type":"string","immutable":false,"hidden":false,"required":false,"secured":false,"isDynamic":false,"default":"west1","editable":true},{"name":"org","label":"Org","customtype":"string","type":"string","immutable":false,"hidden":false,"required":false,"secured":false,"description":"","isDynamic":false,"default":"all","editable":true},{"name":"team","label":"Team","customtype":"string","type":"string","immutable":false,"hidden":false,"required":false,"secured":false,"description":"","isDynamic":false,"default":"team1","editable":true},{"name":"DataObject2","label":"DataObject2","customtype":"sharedparameter","type":"sharedparameter","immutable":false,"hidden":false,"required":true,"secured":false,"description":"","isDynamic":false,"default":"","datatype":"httpproxy","editable":true},{"name":"aws","label":"aws","customtype":"connection","type":"connection","immutable":false,"hidden":false,"required":true,"secured":false,"description":"","isDynamic":false,"default":"","provider":"Amazon EC2","editable":true},{"name":"size","label":"size","customtype":"counter","type":"counter","immutable":false,"hidden":false,"required":true,"secured":false,"description":"","isDynamic":false,"default":100,"range":{"min":1,"max":1000},"editable":true}],"flow":{"conditions":[],"templates":[],"resthooks":[{"resthook":{"title":"Prov_R1","id":"resthooka4f9e22b","headers":{"accept":"application/json","Content-Type":"application/json"},"error":false,"immutable":false,"url":"http://9.30.167.199:8080/pingpong/list/1?id=1021&list=${input_parameters.Conn1}&list=${input_parameters.DataObject1}","method":"GET","warning":false}}],"notifications":[],"sequence":{"0":"resthooka4f9e22b"},"error_sequence":{}},"output_parameters":[]}],"plans":[{"name":"Standard","description":"To deploy a Standard plan","actions":[],"plan_parameters":[{"name":"DataObject2","label":"DataObject2","customtype":"sharedparameter","type":"sharedparameter","immutable":true,"hidden":true,"required":true,"secured":false,"description":"","isDynamic":false,"default":"DefaultNoProxyRequired","datatype":"httpproxy"},{"name":"aws","label":"aws","customtype":"connection","type":"connection","immutable":true,"hidden":true,"required":true,"secured":false,"description":"","isDynamic":false,"default":"AWS","provider":"Amazon EC2"},{"name":"size","label":"size","customtype":"counter","type":"counter","immutable":false,"hidden":false,"required":true,"secured":false,"description":"","isDynamic":false,"default":50,"range":{"min":10,"max":100}},{"name":"vm-name","label":"vm-name","customtype":"string","type":"string","immutable":false,"hidden":false,"required":true,"secured":false,"description":"","isDynamic":false,"default":"vm1"},{"name":"Conn1","label":"Conn1","customtype":"connection","type":"connection","immutable":false,"hidden":false,"required":true,"secured":false,"isDynamic":false,"default":"vmware","provider":"VMware vSphere"},{"name":"DataObject1","label":"DataObject1","customtype":"sharedparameter","type":"sharedparameter","immutable":false,"hidden":false,"required":true,"secured":false,"description":"","isDynamic":false,"default":"DefaultNoBastionHostRequired","datatype":"bastionhost"},{"name":"region","label":"region","customtype":"string","type":"string","immutable":false,"hidden":false,"required":false,"secured":false,"isDynamic":false,"default":"west1"},{"name":"org","label":"Org","customtype":"string","type":"string","immutable":false,"hidden":false,"required":false,"secured":false,"description":"","isDynamic":false,"default":"all"},{"name":"team","label":"Team","customtype":"string","type":"string","immutable":false,"hidden":false,"required":false,"secured":false,"description":"","isDynamic":false,"default":"team1"}]},{"name":"Max","description":"Max","plan_parameters":[{"name":"size","label":"size","customtype":"counter","type":"counter","immutable":false,"hidden":false,"required":true,"secured":false,"description":"","isDynamic":false,"default":100,"range":{"min":100,"max":1000}},{"name":"vm-name","label":"vm-name","customtype":"string","type":"string","immutable":false,"hidden":false,"required":true,"secured":false,"description":"","isDynamic":false,"default":"vm1"},{"name":"Conn1","label":"Conn1","customtype":"connection","type":"connection","immutable":false,"hidden":false,"required":true,"secured":false,"isDynamic":false,"default":"vmware","provider":"VMware vSphere"},{"name":"DataObject1","label":"DataObject1","customtype":"sharedparameter","type":"sharedparameter","immutable":false,"hidden":false,"required":true,"secured":false,"description":"","isDynamic":false,"default":"DefaultNoBastionHostRequired","datatype":"bastionhost"},{"name":"region","label":"region","customtype":"string","type":"string","immutable":false,"hidden":false,"required":false,"secured":false,"isDynamic":false,"default":"west1"},{"name":"org","label":"Org","customtype":"string","type":"string","immutable":false,"hidden":false,"required":false,"secured":false,"description":"","isDynamic":false,"default":"all"},{"name":"team","label":"Team","customtype":"string","type":"string","immutable":false,"hidden":false,"required":false,"secured":false,"description":"","isDynamic":false,"default":"team1"},{"name":"DataObject2","label":"DataObject2","customtype":"sharedparameter","type":"sharedparameter","immutable":false,"hidden":false,"required":true,"secured":false,"description":"","isDynamic":false,"default":"","datatype":"httpproxy"},{"name":"aws","label":"aws","customtype":"connection","type":"connection","immutable":false,"hidden":false,"required":true,"secured":false,"description":"","isDynamic":false,"default":"","provider":"Amazon EC2"}]},{"name":"Min","description":"Min","plan_parameters":[{"name":"region","label":"region","customtype":"string","type":"string","immutable":true,"hidden":true,"required":false,"secured":false,"isDynamic":false,"default":"west1"},{"name":"org","label":"Org","customtype":"string","type":"string","immutable":true,"hidden":true,"required":false,"secured":false,"description":"","isDynamic":false,"default":"all"},{"name":"DataObject2","label":"DataObject2","customtype":"sharedparameter","type":"sharedparameter","immutable":true,"hidden":true,"required":true,"secured":false,"description":"","isDynamic":false,"default":"DefaultNoProxyRequired","datatype":"httpproxy"},{"name":"aws","label":"aws","customtype":"connection","type":"connection","immutable":true,"hidden":true,"required":true,"secured":false,"description":"","isDynamic":false,"default":"AWS","provider":"Amazon EC2"},{"name":"size","label":"size","customtype":"counter","type":"counter","immutable":false,"hidden":false,"required":true,"secured":false,"description":"","isDynamic":false,"default":1,"range":{"min":1,"max":10}},{"name":"vm-name","label":"vm-name","customtype":"string","type":"string","immutable":false,"hidden":false,"required":true,"secured":false,"description":"","isDynamic":false,"default":"vm1"},{"name":"Conn1","label":"Conn1","customtype":"connection","type":"connection","immutable":false,"hidden":false,"required":true,"secured":false,"isDynamic":false,"default":"vmware","provider":"VMware vSphere"},{"name":"DataObject1","label":"DataObject1","customtype":"sharedparameter","type":"sharedparameter","immutable":false,"hidden":false,"required":true,"secured":false,"description":"","isDynamic":false,"default":"DefaultNoBastionHostRequired","datatype":"bastionhost"},{"name":"team","label":"Team","customtype":"string","type":"string","immutable":false,"hidden":false,"required":false,"secured":false,"description":"","isDynamic":false,"default":"team1"}]}],"tagId":"5f476f9881758e190de1c44e","warning":[]}
Duplicate a service
Creates a copy of the Service with all its versions in a new Service.
curl -k -X POST \
'https://${TSA_HOSTNAME}/cam/composer/api/v1/Service/${SERVICE_ID}/duplicateService?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_duplicate.json
Payload
{
"service_name": "{{NEW-SERVICE-NAME}}"
}
Response
{
"id": "5df3aacea051bd001d1611cf",
"name": "SampleV2",
"author": "admin",
"image": "serviceicon_1.svg",
"status": "",
"serviceManifestId": "5df3aacea051bd001d1611d0",
"tag": "5c6e73077077fc001715703b",
"creationTime": "2019-12-13T15:14:22.045Z",
"lastUpdated": "2019-12-13T15:14:22.156Z",
"namespaceId": "default",
"tenantId": "674a6a42-76c0-450c-a225-e743772c49f3",
"description": "A Sample Single Virtual Machine Service",
"longDescription": "",
"defaultServiceVersion": {
"id": "5df3aacea051bd001d1611d0"
"version": "1.0.0.1",
"ServiceEngine_InputFile": {
"service": {
"version": "1.0.0.1",
"specVersion": "v3",
"catalog_metadata": {
"name": "SampleV2",
"description": "A Sample Single Virtual Machine Service",
"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": [
{
"name": "vmMemory",
"label": "vmMemory",
"customtype": "string",
"type": "string",
"immutable": false,
"hidden": false,
"required": false,
"secured": false
},
{
"name": "vmCpu",
"label": "vmCpu",
"customtype": "string",
"type": "string",
"immutable": false,
"hidden": false,
"required": false,
"secured": false
}
],
"flow": {
"conditions": [],
"templates": [
{
"SingleVirtualMachine": {
"title": "SingleVirtualMachine_cca453",
"template_name": "SingleVirtualMachine",
"version": "2.3",
"id": "singlevi23cd3149",
"template_type": "Terraform",
"template_content_type": "VMware vSphere",
"template_provider": "VMware vSphere",
"instance_name": "",
"cloud_connection_name": "vmware",
"template_data_objects": {},
"template_params": {
"vm_1_name": "ver2vm",
"vm_1_dns_servers": [
"1.1.1.2"
],
"vm_1_dns_suffixes": [
"test.cam.com"
],
"vm_1_root_disk_keep_on_remove": "false",
"vm_1_domain": "test.cam.com",
"vm_1-image": "terraform/template/rhel_7_2_small",
"vm_1_root_disk_size": "25",
"vm_1_root_disk_controller_type": "scsi",
"vm_1_root_disk_datastore": "NSXcluster/datastore1",
"vm_1_root_disk_type": "eager_zeroed",
"vm_1_ipv4_gateway": "10.4.10.1",
"vm_1_ipv4_address": "10.4.10.17",
"vm_1_memory": "${input_parameters.vmMemory}",
"vm_1_ipv4_prefix_length": "23",
"vm_1_number_of_vcpu": "${input_parameters.vmCpu}",
"vm_1_network_interface_label": "external-net-410",
"vm_1_cluster": "icm-vmware-nsx-2",
"vm_1_datacenter": "NSX Manage To",
"vm_1_folder": "terraform/test",
"vm_1_adapter_type": "vmxnet3",
"vm_1_resource_pool": "cam"
},
"outputs": [],
"immutable": false,
"provider_engine_version": "0.11.11"
}
}
],
"resthooks": [],
"notifications": [
{
"emailnotification": {
"title": "emailnotification_4278ce",
"type": "email",
"receiverList": "testmail@test-mail.sample.net",
"id": "emailnot21410720",
"sender": "CAMadmin",
"copyToList": "",
"subject": "VM Creation Succeful",
"body": "VM create at ${templates.singlevi23cd3149.created_at}",
"immutable": false
}
},
{
"emailnotification": {
"title": "emailnotification_ac336e",
"type": "email",
"receiverList": "testmail@test-mail.sample.net",
"id": "emailnotd384eeec",
"sender": "CAMadmin",
"copyToList": "",
"subject": "VM Creation failed",
"body": "VM creation failure caused by : ${svc_instance.error.message}",
"immutable": false
}
}
],
"sequence": {
"0": "singlevi23cd3149",
"1": "emailnot21410720"
},
"error_sequence": {
"0": "emailnotd384eeec"
}
},
"output_parameters": []
}
],
"plans": [
{
"name": "Standard",
"description": "To deploy a Standard plan",
"actions": [],
"plan_parameters": []
}
]
}
},
"service_id": "5df3aacea051bd001d1611cf",
"namespaceId": "default",
"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 ervice instance of the template provisioned.",
"isSystemTag": true,
"default": "${svc_instance.service_instance_id}",
"customtype": "string",
"permission": "Read-Only"
}
],
"systemTags": true,
"creationTime": "2019-12-13T15:14:22.062Z",
"serviceInstanceCount": 0,
},
"warning": []
}
Copy service version to a service
curl -k -X POST \
'https://${TSA_HOSTNAME}/cam/composer/api/v1/ServiceManifest/${SOURCE_SERVICE_VERSION_ID}/copyService?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_version_copy.json
Payload
{
"to_service_id": "{{SERVICE_ID}}",
"new_version_name": "{{NEW-VERSION-LABEL}}"
}
Response
{
"id": "5df3bb2fa051bd001d1611e1",
"version": "1.0.0.2",
"ServiceEngine_InputFile": {
"service": {
"version": "1.0.0.2",
"specVersion": "v3",
"catalog_metadata": {
"name": "SampleV2",
"description": "A Sample Single Virtual Machine Service",
"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": [
{
"name": "vmMemory",
"label": "vmMemory",
"customtype": "string",
"type": "string",
"immutable": false,
"hidden": false,
"required": false,
"secured": false
},
{
"name": "vmCpu",
"label": "vmCpu",
"customtype": "string",
"type": "string",
"immutable": false,
"hidden": false,
"required": false,
"secured": false
}
],
"flow": {
"conditions": [],
"templates": [
{
"SingleVirtualMachine": {
"title": "SingleVirtualMachine_cca453",
"template_name": "SingleVirtualMachine",
"version": "2.3",
"id": "singlevi23cd3149",
"template_type": "Terraform",
"template_content_type": "VMware vSphere",
"template_provider": "VMware vSphere",
"instance_name": "",
"cloud_connection_name": "vmware",
"template_data_objects": {},
"template_params": {
"vm_1_name": "ver2vm",
"vm_1_dns_servers": [
"1.1.1.2"
],
"vm_1_dns_suffixes": [
"test.cam.com"
],
"vm_1_root_disk_keep_on_remove": "false",
"vm_1_domain": "test.cam.com",
"vm_1-image": "terraform/template/rhel_7_2_small",
"vm_1_root_disk_size": "25",
"vm_1_root_disk_controller_type": "scsi",
"vm_1_root_disk_datastore": "NSXcluster/datastore1",
"vm_1_root_disk_type": "eager_zeroed",
"vm_1_ipv4_gateway": "10.4.10.1",
"vm_1_ipv4_address": "10.4.10.17",
"vm_1_memory": "${input_parameters.vmMemory}",
"vm_1_ipv4_prefix_length": "23",
"vm_1_number_of_vcpu": "${input_parameters.vmCpu}",
"vm_1_network_interface_label": "external-net-410",
"vm_1_cluster": "icm-vmware-nsx-2",
"vm_1_datacenter": "NSX Manage To",
"vm_1_folder": "terraform/test",
"vm_1_adapter_type": "vmxnet3",
"vm_1_resource_pool": "cam"
},
"outputs": [],
"immutable": false
}
}
],
"resthooks": [],
"notifications": [
{
"emailnotification": {
"title": "emailnotification_4278ce",
"type": "email",
"receiverList": "testmail@testr-mail.net",
"id": "emailnot21410720",
"sender": "CAMadmin",
"copyToList": "",
"subject": "VM Creation Succeful",
"body": "VM create at ${templates.singlevi23cd3149.created_at}",
"immutable": false
}
}
],
"sequence": {
"0": "singlevi23cd3149",
"1": "emailnot21410720"
},
"error_sequence": {}
},
"output_parameters": []
}
],
"plans": [
{
"name": "Standard",
"description": "To deploy a Standard plan",
"actions": [],
"plan_parameters": []
}
]
}
},
"service_id": "5df3b815a051bd001d1611da",
"tenantId": "674a6a42-76c0-450c-a225-e743772c49f3",
"namespaceId": "default",
"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": "2019-12-13T16:24:15.334Z",
"serviceInstanceCount": 0,
"warning": []
}
Change the category of a service
curl -k -X POST \
'https://${TSA_HOSTNAME}/cam/composer/api/v1/Service/${SERVICE_ID}/updateServiceDetails?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_change_category.json
Payload, content for service_change_category.json
{
"service": {
"catalog_metadata": {
"category": "{{NAME-OF-CATEGORY}}"
}
}
}
Response
{
"service": {
"name": "SampleV1",
"author": "admin",
"image": "serviceicon_1.svg",
"status": "",
"serviceManifestId": "5df3aacea051bd001d1611d0",
"tag": "5d8a3531bbcac2001d967d1d",
"creationTime": "2019-12-13T15:14:22.045Z",
"lastUpdated": "2019-12-13T15:30:09.054Z",
"namespaceId": "default",
"tenantId": "674a6a42-76c0-450c-a225-e743772c49f3",
"id": "5df3aacea051bd001d1611cf",
"description": "A Sample Single Virtual Machine Service",
"longDescription": ""
}
}
Rename a service
curl -k -X POST \
'https://${TSA_HOSTNAME}/cam/composer/api/v1/Service/${SERVICE_ID}/updateServiceDetails?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_rename.json
Payload, content for service_rename.json
{
"service": {
"catalog_metadata": {
"name": "SampleV3"
}
}
}
Response
{
"service": {
"id": "5df3aacea051bd001d1611cf",
"name": "SampleV3",
"author": "admin",
"image": "serviceicon_1.svg",
"serviceManifestId": "5df3aacea051bd001d1611d0",
"tag": "5c6e73077077fc001715703b",
"creationTime": "2019-12-13T15:14:22.045Z",
"lastUpdated": "2019-12-13T15:22:38.185Z",
"namespaceId": "default",
"tenantId": "674a6a42-76c0-450c-a225-e743772c49f3",
"description": "A Sample Single Virtual Machine Service",
"longDescription": ""
}
}
Change service image for a service
curl -k -X POST \
'https://${TSA_HOSTNAME}/cam/composer/api/v1/Service/${SERVICE_ID}/updateServiceDetails?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_change_image.json
Payload: content for service_change_image.json
{
"service": {
"catalog_metadata": {
"image": "{{NEW-IMAGE-NAME}}"
}
}
}
Response
{
"service": {
"name": "SampleV1",
"author": "admin",
"image": "serviceicon_2.svg",
"status": ""
"serviceManifestId": "5df3aacea051bd001d1611d0",
"tag": "5d8a3531bbcac2001d967d1d",
"creationTime": "2019-12-13T15:14:22.045Z",
"lastUpdated": "2019-12-13T15:30:09.054Z",
"namespaceId": "default",
"tenantId": "674a6a42-76c0-450c-a225-e743772c49f3",
"id": "5df3aacea051bd001d1611cf",
"description": "A Sample Single Virtual Machine Service",
"longDescription": ""
}
}
Assign access to a service
Assigns a single or multiple namespaces to a service.
curl -k -X POST \
-H "Authorization: Bearer ${TSA_BEARER_TOKEN}" \
-H "Accept: application/json" "https://${TSA_HOSTNAME}/cam/composer/api/v1/Service/<id>/setNamespaceId?tenantId=<tenantId>&cloudOE_spaceGuid=<comma separated list of namesapces>"
For scenarios of assigning access, see Assigning access to a service
Retire a service version
This API retires both published services and draft services.
curl -k -X POST \
-H "Authorization: Bearer ${TSA_BEARER_TOKEN}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
"https://${TSA_HOSTNAME}/cam/composer/api/v1/ServiceManifest/${SERVICE_VERSION_ID}/retire?tenantId=${TSA_TENANT_ID}&ace_orgGuid=${MCM_TEAM}
Unretire a service version
This API unretires the already retired service and moves it back to Published state.
curl -k -X POST \
-H "Authorization: Bearer ${TSA_BEARER_TOKEN}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
"https://${TSA_HOSTNAME}/cam/composer/api/v1/ServiceManifest/${SERVICE_VERSION_ID}/unretire?tenantId=${TSA_TENANT_ID}&ace_orgGuid=${MCM_TEAM}
Auto-retire a service version
This API retires a service version on the set date. The service version is retired at mid-night of the set day.
curl -k --location --request POST 'https://${TSA_HOSTNAME}/cam/composer/api/v1/ServiceManifest/${SERVICE_VERSION_ID}/setRetireOnDate?tenantId=${TSA_TENANT_ID}&ace_orgGuid=${MCM_TEAM}' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer ${TSA_BEARER_TOKEN}' \
-H 'Content-Type: application/json' \
-d @set_retire_on_date.json
set_retire_on_date.json:
{
"retire_on_date": "2020-10-28T07:03:11.612Z"
}
Service Instance APIs
Deploy a 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 the list of deployed instance: GET call
curl -k -X GET \
-H "Authorization: Bearer ${TSA_BEARER_TOKEN}" "https://${TSA_HOSTNAME}/cam/composer/api/v1/ServiceInstances?tenantId=${TSA_TENANT_ID}&ace_orgGuid=${MCM_TEAM}&cloudOE_spaceGuid=${NAMESPACE}"
Where namespace
is namespace Id
and team
is organization Id
.
Headers required:
- Content-Type: application/json
- Authorization:
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 ${TSA_BEARER_TOKEN}" "https://${TSA_HOSTNAME}/cam/composer/api/v1/ServiceInstances/<service-instance-id>?tenantId=${TSA_TENANT_ID}&ace_orgGuid=${MCM_TEAM}&cloudOE_spaceGuid=${NAMESPACE}"
Headers remain the same as in the terminate service instance call.
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 or Resume after a service version change.
To use this API, you need a service instance ID. To get the service instance ID:
- Retrieve all the service instances using the following API Get the list of deployed instance. The response contains an array of service instances
- Locate the instance by name and get the ID.
-
Use the following curl command to get the input parameters for the service instance:
curl --location --request GET \ 'https://${TSA_HOSTNAME}/cam/composer/api/v1/ServiceInstances/${ServiceInstanceId}/getInputParameters?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-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 ${TSA_BEARER_TOKEN}" \
-H "Content-Type: application/json"
-H "Accept: application/json"
-d @cc_create.json "https://${TSA_HOSTNAME}/cam/composer/api/v1/ServiceInstances/{{SERVICE_INSTANCE_ID}}/update?tenantId=${TSA_TENANT_ID}&ace_orgGuid=${MCM_TEAM}"
POST call
Headers:
"Authorization": <bearer token>
"Content-Type": "applcation/json"
cc_create.json
{
“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 ${TSA_BEARER_TOKEN}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d @cc_create.json "https://${TSA_HOSTNAME}/cam/composer/api/v1/ServiceInstances/${SERVICE_INSTANCE_ID}/retry?tenantId=${TSA_TENANT_ID}&ace_orgGuid=${MCM_TEAM}"
POST call
Headers:
"Authorization": <bearer token>
"Content-Type": "applcation/json"
cc_create.json
{
“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 ${TSA_BEARER_TOKEN}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d @cc_create.json "https://${TSA_HOSTNAME}/cam/composer/api/v1/ServiceInstances/${SERVICE_INSTANCE_ID}/resume?tenantId=${TSA_TENANT_ID}&ace_orgGuid=${MCM_TEAM}"
POST call
Headers:
"Authorization”: <bearer token>
"Content-Type”: "application/json"
Sample cc_create.json:
{
“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 or downgrade a Service Instance
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 that are needed for service instance version change.
- submitversionChange: Upgrade/downgrade a version of service instance.
getServiceInstance
This API returns the service instance details along with the available version change paths (upgrade or downgrade).
curl --location --request GET \
'https://${TSA_HOSTNAME}/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 or DowngradePaths should be used as versionChangeId
in payloads of the versionChangeInputParameters
and submitVersionChange
APIs.
versionChangeInputParameters
This API returns the list of input parameters that are needed for service instance version change.
curl --location --request POST \
'https://${TSA_HOSTNAME}/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 the
idpresent inside the
UpgradePathsor
DowngradePathsreturned in the
getServiceInstance` 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_parameters
andpost_action_input_parameters
are not supported in this release.
submitVersionChange
This API upgrades/downgrades a version of the service instance.
curl --location --request POST \
'https://${TSA_HOSTNAME}/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 ${TSA_BEARER_TOKEN}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d @cc_create.json "https://${TSA_HOSTNAME}/cam/composer/api/v1/ServiceInstances/${SERVICE_INSTANCE_ID}/createBind?tenantId=${TSA_TENANT_ID}&ace_orgGuid=${MCM_TEAM}"
POST call
Headers:
"Authorization": "bearer <token>"
"Content-Type": "application/json"
cc_create.json
{
“bindDetails”: {
“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 ${TSA_BEARER_TOKEN}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d @cc_create.json "https://${TSA_HOSTNAME}/cam/composer/api/v1/ServiceInstances/${SERVICE_INSTANCE_ID}/terminateBind?tenantId=${TSA_TENANT_ID}&ace_orgGuid=${MCM_TEAM}"
BODY:
cc_create.json
"name":"<name_of_bind_instance>"}
<name_of_bind_instance>
- It is the name of the bind instance that you want to unbind.
Get custom actions
List the custom actions of a service instance.
curl -k -X GET \
-H "Authorization: Bearer ${TSA_BEARER_TOKEN}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" "https://${TSA_HOSTNAME}/cam/composer/api/v1/ServiceInstances/<serviceInstanceID>/getCustomActions?tenantId=${TSA_TENANT_ID}&ace_orgGuid=${MCM_TEAM}"
This GET call fetches the list of custom actions of service instance.
Headers:
"Authorization": "bearer <token>"
"Content-Type": "application/json"
Response
{
"customActions": [
{
"type": "custom",
"name": "custom1",
"description": "customaction",
"pre_or_post": false,
"input_parameters": [
{
"name": "resthook_url",
"label": "resthook_url",
"customtype": "string",
"type": "string",
"immutable": false,
"hidden": false,
"required": false,
"secured": false,
"isDynamic": false
}
],
"flow": {
"conditions": [],
"templates": [],
"resthooks": [
{
"resthook": {
"title": "resthook_f428a5",
"id": "resthook56a3f1fc",
"headers": {
"accept": "application/json",
"Content-Type": "application/json"
},
"editable": true,
"url": "${input_parameters.resthook_url}",
"method": "GET"
}
}
],
"notifications": [],
"sequence": {
"0": "resthook56a3f1fc"
},
"error_sequence": {}
},
"output_parameters": []
}
]
}
Invoke custom action
To execute a custom action on a service instance.
curl -k -X POST \
-H "Authorization: Bearer ${TSA_BEARER_TOKEN}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d @custom_action.json "https://${TSA_HOSTNAME}/cam/composer/api/v1/ServiceInstances/<serviceInstanceID>/invokeCustomAction?tenantId=${TSA_TENANT_ID}&ace_orgGuid=${MCM_TEAM}"
POST call
Headers:
"Authorization": "bearer <token>"
"Content-Type": "application/json"
custon_action.json
{
"customDetails": {
"serviceInstanceId": "<serviceInstanceId>"
"name":"actionInstanceName",
"instance_parameters": {
"resthook_url":"https://jsonplaceholder.typicode.com/todos/33"
},
"currentCustomAction":"<actionName>"
}
}
instance_parameters
- Optionally, you can run custom action with updated values for service instance parameters. The default values are used, if parameters are not provided.
Terminate Service Instance
curl -k -X POST \
'https://${TSA_HOSTNAME}/cam/composer/api/v1/ServiceInstances/${ServiceInstanceId}/terminate?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_terminate.json
Content of service__instance_terminate.json:
{}
Response
{"name":"upgarde_downgrade_service_instance56857d10-0220-11eb-859b-adea70bdca6d","Status":"Terminating","id":"5f72d9ac2401e29758629ce9"}
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 ${TSA_BEARER_TOKEN}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d @cc_create.json "https://${TSA_HOSTNAME}/cam/composer/api/v1/ServiceInstances/{{SERVICE_INSTANCE_ID}}/cleanup?tenantId=${TSA_TENANT_ID}&ace_orgGuid=${MCM_TEAM}"
POST call
Headers:
“Authorization”: <bearer token>
“Content-Type”: “applcation/json”
Body: {
"force": <true/false>
}
Cleanup Service Instance in inprogress state
If a service instance is stuck in IN_PROGRESS state for a 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 ${TSA_BEARER_TOKEN}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d @cc_create.json "https://${TSA_HOSTNAME}/cam/composer/api/v1/ServiceInstances/{{SERVICE_INSTANCE_ID}}/cleanup?tenantId=${TSA_TENANT_ID}&ace_orgGuid=${MCM_TEAM}"
Sample Request BODY:
{
"serviceInstanceId": "5cf0c20cbdf17d001786d1a9",
"force": true
}
The force = true
deletes the service instance entry from the Managed services database forcefully. However, the activities 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 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 cleaning 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.
Standalone action APIs
Create Standalone Action
Creates a stand-alone action independent of any service.
curl -k -X POST \
-H "Authorization: Bearer ${TSA_BEARER_TOKEN}" \
-H "Content-Type: application/json" -H "Accept: application/json" \
-d @cc_create.json "https://${TSA_HOSTNAME}/cam/composer/api/v1/Actions/createAction?tenantId=${TSA_TENANT_ID}&ace_orgGuid=${MCM_TEAM}&cloudOE_spaceGuid={NAMESPACE}"
The cloudOE_spaceGuid
contains the value of the namespace. Note that the NAMESPACE
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 Standalone Action
Use the action id generated in the Create Action
API call to invoke an action.
curl -k -X POST \
-H "Authorization: Bearer ${TSA_BEARER_TOKEN}" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-d @cc_create.json "https://${TSA_HOSTNAME}/cam/composer/api/v1/ActionInstances/invokeAction?tenantId=${TSA_TENANT_ID}&ace_orgGuid=${MCM_TEAM}&cloudOE_spaceGuid={NAMESPACE}"
The cloudOE_spaceGuid
contains the value of the namespace. Note that the NAMESPACE
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.
ICON APIs
Upload service icons
This API uploads new icons. Select the file to upload.
POST method
curl -k -X POST \
-H "Authorization: Bearer ${TSA_BEARER_TOKEN}" \
-F "icon=@PATH_TO_FILE" "https://${TSA_HOSTNAME}/cam/composer/api/v1/icons/upload?tenantId=${TSA_TENANT_ID}&ace_orgGuid=${MCM_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 one 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 ${TSA_BEARER_TOKEN}" "https://${TSA_HOSTNAME}/cam/composer/api/v1/icons/${ICON_ID}?tenantId=${TSA_TENANT_ID}&ace_orgGuid=${MCM_TEAM}"
Retrieve all service icons
This API returns metadata of all available icons.
GET method.
curl -k -X GET \
-H "Authorization: Bearer ${TSA_BEARER_TOKEN}" "https://${TSA_HOSTNAME}/cam/composer/api/v1/icons?tenantId=${TSA_TENANT_ID}&ace_orgGuid=${MCM_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 ${TSA_BEARER_TOKEN}" "https://${TSA_HOSTNAME}/cam/composer/api/v1/icons/name/${ICON_NAME}?tenantId=${TSA_TENANT_ID}&ace_orgGuid=${MCM_TEAM}"