IBM Cloud Orchestrator, Version 2.5.0.2

Resource instances REST API

Instances returned for a specific type are collected using an instance provider. An instance provider is a Java class that can talk to a back-end to query instance information such as VMs, disks, users, networks and other cloud resources.

JSON Formats

Resource Type Request

{
    "name" : "myprovider",
    "displayname" : "My Provider",
    "description" : "This is my provider",
    "icon" : "Web Icon:glyphicons_266_flag",
    "provider" : "com.ibm.orchestrator.core.instance.providers.myprovider.MyProvider",
    "type" : "admin",
    "tags" : ["enabled", "disabled"],
    "detailsview" : {
        "application" : "SCOABC",
        "humanservice" : "Show My Provider Details"
    },
    "keyfields" : [{
            "instanceattribute" : "displayname",
            "header" : "Name"
        }, {
            "instanceattribute" : "description",
            "header" : "Description"
        }
    ]
}

Resource Type Response

{
    "name" : "myprovider",
    "displayname" : "My Provider",
    "description" : "This is my provider",
    "icon" : "Web Icon:glyphicons_266_flag",
    "provider" : "com.ibm.orchestrator.core.instance.providers.myprovider.MyProvider",
    "type" : "admin",
    "tags" : ["enabled", "disabled"],
    "detailsview" : {
        "application" : "SCOABC",
        "humanservice" : "Show My Provider Details"
    },
    "keyfields" : [{
            "instanceattribute" : "displayname",
            "header" : "Name"
        }, {
            "instanceattribute" : "description",
            "header" : "Description"
        }
    ]
}

Resource Types Response

{
       "href": "http://<hostname:port>/orchestrator/v2/instancetypes",
       "start": 0,
       "limit": 10,
       "total": 3,
       "first": "http://<hostname:port>/orchestrator/v2/instancetypes?_start=0&_limit=10",
       "previous": null,
       "next": null,
       "last": "http://<hostname:port>/orchestrator/v2/instancetypes?_start=0&_limit=10",
       "items":
       [
         Resource Type Response 1,...,Resource Type Response  n
       ]
    }

Resource Instance Request

{        
"parm":        
{            
.... Instance type dependent paramter JSON object ....        
},        
"displayname": "mhtest1",        
"detailsURL": "<hostname:port>/teamworks/executeServiceByName?processApp=<FOO>
&;serviceName=Show+Server+Details&tw.local.serverId
=b479108c-df8f-4462-be8b-f80af4a59d15&tw.local
.region=RegionOne&tw.local.user=<user>&tw.local.
domain=Default&tw.local.project=<project>",        
"status": "ACTIVE",        
"region": "RegionOne",        
"icon": "Server Category Icon:ge100_servercatalog_24",        
"openstackId": "b479108c-df8f-4462-be8b-f80af4a59d15",        
"tags":        
[            
"active"        
],        
"id": "RegionOne--b479108c-df8f-4462-be8b-f80af4a59d15",        
"updated": "2014-03-31T11:04:58Z",        
"ipAddresses": "vmnet: 10.0.0.100",        
"description": "mhtest1"     
}

Resource Instance Response

{        
"href": "<hostname:port>/orchestrator/v2/instancetypes/openstackvms
/instances/RegionOne--b479108c-df8f-4462-be8b-f80af4a59d15",        
"created": "2014-03-31T11:04:18Z",        
"parm":        
{            
.... Instance type dependent paramter JSON object ....        
},        
"displayname": "mhtest1",        
"detailsURL": "<hostname:port>/teamworks/executeServiceByName?
processApp=<FOO>&serviceName=Show+Server+Details&tw
.local.serverId=b479108c-df8f-4462-be8b-f80af4a59d15&tw
.local.region=RegionOne&tw.local.user=<user>&tw
.local.domain=Default&tw.local.project=<project>",        
"status": "ACTIVE",        
"region": "RegionOne",        
"icon": "Server Category Icon:ge100_servercatalog_24",        
"openstackId": "b479108c-df8f-4462-be8b-f80af4a59d15",        
"tags":        
[            
"active"        
],        
"id": "RegionOne--b479108c-df8f-4462-be8b-f80af4a59d15",        
"updated": "2014-03-31T11:04:58Z",        
"ipAddresses": "vmnet: 10.0.0.100",        
"description": "mhtest1"     
}

Resource Instances Response

{        
"href": "<hostname:port>/orchestrator/v2/instancetypes/openstackvms/instances",      
"start": 0,        
"limit": 10,        
"total": 2,        
"first": "<hostname:port>/orchestrator/v2/instancetypes/
openstackvms/instances?_start=0&amp;_limit=10",        
"previous": null,        
"next": null,        
"last": "<hostname:port>/orchestrator/v2/instancetypes
/openstackvms/instances?_start=0&amp;_limit=10",        
"items":        
[           

Resource Instance Response 1, ..., Resource Instance Response n        
]     
}

Instances

GET : Lists all resource types

URL pattern
/orchestrator/v2/instancetypes
Accepts
*/*
Content-Type
application/JSON
Normal Response Codes
200
Error Response Codes
500 internal server error
Response
Resource Type Response
Authorization
No authorization needed

POST: Create resource type

URL pattern
/orchestrator/v2/instancetypes/
Accepts
application/JSON
Content type
application/JSON
Normal Response Codes
201
Error Response Codes
401 unauthorized
409 conflict
500 internal server error
Request
Resource Type Request
Response
Resource Type Request
Authorization
role: admin

GET: Get one resource type

URL pattern
/orchestrator/v2/instancetypes/{name}
Accepts
*/*
Content-Type
application/JSON
Normal Response Codes
200
Error Response Codes
404 not found
500 internal server error
Response
Resource Type Response
Authorization
No authorization needed

PUT: Update a resource type

URL pattern
/orchestrator/v2/instancetypes/{name}
Accepts
application/JSON
Content-Type
application/JSON
Normal Response Codes
200
Error Response Codes
401 unauthorized
404 not found
500 internal server error
Request
Resource Type Request (partial)
Response
Resource Type Response
Authorization
role: admin

DELETE: Delete a resource type.

URL pattern
/orchestrator/v2/instancetypes/{name}
accepts
*/*
Content-Type
application/JSON
Normal Response Codes
204
Error Response Codes
401 unauthorized
404 not found
500 internal server error
Authorization
role: admin

GET : List instances of a given type.

URL pattern
/orchestrator/v2/instancetypes/{name}/instances
Accepts
*/*
Content-Type
application/JSON
Normal Response Codes
200
Error Response Codes
401 unauthorized
404 not found
500 internal server error
Response
Resource Instances Response
Authorization
Instance provider dependent. Generic Provider: Access Control Link with view set to true for the domain, project and role you are working on.

POST: Creates a instance of a given type.

URL pattern
/orchestrator/v2/instancetypes/{name}/instances
Accepts
application/JSON
Content-Type
application/JSON
Normal Response Codes
201 created
Error Response Codes
401 unauthorized
404 not found
500 internal server error
Request
Resource Instance Request
Response
Resource Instance Response
Authorization
Instance provider dependent. Generic Provider: roles: admin, domain_admin, catalogeditor

GET: Gets an instance of a given type.

URL pattern
/orchestrator/v2/instancetypes/{name}/instances/{id}
Accepts
application/JSON
Content-Type
*/*
Normal Response Codes
401 unauthorized
404 not found
500 internal server error
Response
Resource Instance Response
Authorization
Instance provider dependent. Generic Provider: Access Control Link with view set to true for the domain, project and role you are working on.

PUT: Updates an instance of a given type.

URL pattern
/orchestrator/v2/instancetypes/{name}/instances/{id}
Accepts
application/JSON
Content-Type
application/JSON
Normal Response Codes
200
Error Response Codes
401 unauthorized
404 not found
500 internal server error
Request
Resource Instance Request (partial)
Response
Resource Instance Request
Authorization
Instance provider dependent. Generic Provider: Access Control Link with modify set to true for given domain, project and role you are working on.

DELETE: Deletes an instance of a given type.

URL pattern: /orchestrator/v2/instancetypes/{name}/instances/{id}

Accepts
*/*
Content-Type
application/JSON
Normal response Codes
204
Error Response Codes
401 unauthorized
404 not found
500 internal server error
Authorization
Instance provider dependent. Generic Provider: Access Control Link with modify set to true for given domain, project and role of the user.

GET: Lists actions defined on a given instance of a given type.

URL pattern: /orchestrator/v2/instancetypes/{name}/instances/{id}/services

Accepts
*/*
Content-Type
application/JSON
Normal Response Codes
200
Error Response Codes
401 unauthorized
404 not found
500 internal server error
Authorization
Instance provider dependent. Generic Provider: Access Control Link with view set to true on the instance and services for given domain, project and role of the user.

POST: Launch given action on a given instance of a given type.

URL pattern: /orchestrator/v2/instancetypes/{name}/instances/{id}/services/{serviceid}/launch

Content-Type
application/JSON
Normal Response Codes
202 accepted
Error Response Codes
401 unauthorized
404 not found
500 internal server error
Authorization
Instance provider dependent and ACL with use set to true on the services for given domain, project and role of the user. Access Control Link with use set to true on the instance and services for given domain, project and role of the user.