Skip to content

HPE Compute Ops Management API (latest)

HPE Compute Operations Management provides a Restful API to customers who want to manage their devices programmatically or through a command line. The API enables customers to invoke operations or tasks such as list devices, see device details, device health, and manage their device's firmware.

UPDATED API ENDPOINTS

Compute Ops Management now supports the HPE GreenLake API endpoints (<region>.api.greenlake.hpe.com). The Guide contains more information about this change.

Download OpenAPI description
Languages
Servers
API endpoint for US West

https://us-west.api.greenlake.hpe.com/

API endpoint for EU Central

https://eu-central.api.greenlake.hpe.com/

API endpoint for AP Northeast

https://ap-northeast.api.greenlake.hpe.com/

Mock server

https://developer.greenlake.hpe.com/_mock/docs/greenlake/services/compute-ops-mgmt/public/openapi/compute-ops-mgmt-latest/

accounts - v1beta1

Operations

activation-keys - v1beta1

Operations

activation-tokens - v1beta1

Operations

activities - v1beta2

Operations

ahs-files - v1beta1

Operations

secure-gateway-appliances - v1beta2

Operations

appliance-firmware-bundles - v1

Operations

appliance-firmware-bundles - v1beta1

Operations

approval-policy - v1beta2

Operations

approval-request - v1beta2

Operations

async-operations - v1

Operations

async-operations - v1beta1

Operations

energy-over-time - v1beta1

Operations

energy-by-entity - v1beta1

Operations

external-services - v1beta1

Operations

filters - v1beta1

Operations

firmware-bundles - v1

Operations

firmware-bundles - v1beta2

Operations

groups - v1

Operations

groups - v1beta3

Operations

groups - v1beta2

Operations

job-templates - v1beta2

Operations

jobs - v1

Operations

List all jobs

Request

Retrieve the list of jobs

Security
Bearer
Query
offsetinteger>= 0

Zero-based resource offset to start the response from

Default 0
Example: offset=10
limitinteger[ 0 .. 1000 ]

The maximum number of records to return.

Example: limit=10
filterstring

Limit the resources operated on by an endpoint or when used with a multiple-GET endpoint, return only the subset of resources that match the filter. The filter grammar is a subset of OData 4.0.

NOTE: The filter query parameter must use URL encoding. Most clients do this automatically with inputs provided to them specifically as query parameters. Encoding must be done manually for any query parameters provided as part of the URL.
The reserved characters ! # $ & ' ( ) * + , / : ; = ? @ [ ] must be encoded with percent encoded equivalents. Server IDs contain a +, which must be encoded as %2B.
For example: the value P06760-B21+2M212504P8 must be encoded as P06760-B21%2B2M212504P8 when it is used in a query parameter.

CLASSEXAMPLES
Typesinteger, decimal, timestamp, string, boolean, null
Operationseq, ne, gt, ge, lt, le, in
Logicand, or, not

Jobs can be filtered by:

  • id
  • type
  • parentJobId
  • createdAt
  • updatedAt
  • deleteOnComplete
  • cancellable
  • name
  • jobParams
  • state
  • resultCode
  • status
  • statusDetails
  • generation
  • results
  • resource/id
  • resource/type
  • jobTemplate

The following examples are not an exhaustive list of all possible filtering options.

Examples:

Return jobs for a specific template. PowerOn in this case. not <property> eq null

filter=jobTemplate eq '0cbb2377-1834-488d-840c-d5bf788c34fb'

Return jobs where a nested property equals a value. This gets jobs on servers. <property>/<nestedProperty> eq <value>

filter=resource/type eq 'compute-ops/server'

Return jobs where a property equals a value, Looking for a specific server. Server IDs contain a +, which must be encoded as %2B. This returns jobs on a specific server. <property>%20eq%20%27<value>

filter=resource/id eq '252500-842%2B8899252500842931'

Return child jobs. Child jobs have a parent job. not <property> eq <value>

filter=not parentJobId eq null

Return jobs with a value populated. This returns jobs that apply to a resource (some don't). not <property> eq null

filter=not resource/id eq none

Return jobs where property contains a value. This is for jobs created in 2022. contains(<property>, <value>)

filter=contains(createdAt,'2022')

Return jobs where property is populated and property contains value. not <property> eq null and contains(<property>, <value>). This is for non-cancelable jobs created in 2022.

filter=not cancellable eq false and contains(createdAt,'2022')

Return jobs where property is one of multiple values. This is for jobs which haven't reached a terminal state. <property>/<nestedProperty> in (<value>,<value>)

filter=state in ('running','pending','stalled')
sortstring

The order in which to return the resources in the collection.

The value of the sort query parameter is a comma separated list of sort expressions. Each sort expression is a property name optionally followed by a direction indicator asc (ascending) or desc (descending).

The first sort expression in the list defines the primary sort order, the second defines the secondary sort order, and so on. If a direciton indicator is omitted the default direction is ascending.

Examples:

Order resources ascending by name

sort=name asc

Order resources ascending by name and then by descending by createdAt

sort=name,createdAt desc
selectstring

Limit the properties of the resource returned in a successful response. When applied to write operations, select controls only the properties that are returned, not which properties are operated on. All properties are returned if the select parameter is omitted.

The value of the select query parameter is a comma separated list of properties to include in the response. Nested properties use / as a separator, e.g. select=interfaces/name selects the name property within an interfaces object.

For operations that return paginated collections, select operates on the resources in the collection. The pagination properties like count and items are always included even when select is specified.

Examples:

Select only the id and name properties of the resource

select=id,name
Headers
Tenant-Acidstring(uuid)

Tenant-Acid header can be used by an MSP workspace to make API calls on behalf of their tenant by specifying the tenant's application customer ID.

In order to make such an API call, the Bearer token must belong to an MSP workspace and this header value must be the application customer ID of a tenant within the MSP workspace. Use the /compute-ops-mgmt/v1beta1/accounts API to determine the application customer IDs for your tenant accounts.

curl -i -X GET \
  https://us-west.api.greenlake.hpe.com/compute-ops-mgmt/v1/jobs \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

OK

Bodyapplication/json
countinteger>= 0required

Number of items returned

Example: 1
offsetinteger>= 0

Zero-based resource offset

totalinteger>= 0

Total number of items in the collection that match the filter query, if one was provided in the request

Example: 12
itemsArray of objects(job-v1)
Response
application/json
{ "offset": 0, "count": 1, "total": 12, "items": [ {} ] }

Create a job

Request

Create a job for a given resource. A job is a multi-step task performed by Compute Ops Manager.

This table summarizes the jobs and their template IDs. For more information about each job template, expand the Job Definitions section and click on Overview to get started.

NameDescriptionResource TypeTemplate ID
Server Power OffPower off a servercompute-ops/serverd0c13b58-748c-461f-9a61-c0c5c71f1bb4
Server Power OnPower on a servercompute-ops/server0cbb2377-1834-488d-840c-d5bf788c34fb
Server RestartRestart a servercompute-ops/server30110551-cad6-4069-95b8-dbce9bbd8525
Server Cold BootCold boot a servercompute-ops/serveraacfb3e0-6575-4d4f-a711-1ee1ae768407
Server Firmware UpdateUpdate firmware on a servercompute-ops/serverfd54a96c-cabc-42e3-aee3-374a2d009dba
Server iLO Firmware UpdateUpdate iLO component firmware on a servercompute-ops/server94caa4ef-9ff8-4805-9e97-18a09e673b66
Server External Storage DetailsCollect external storage details for a servercompute-ops/server9310319e-7b7f-41ba-8b24-8b34eed1ca62
Server Firmware DownloadDownload firmware on a servercompute-ops/server0683ada8-1a89-49dd-bf04-6df715b708a6
Server Set UID Indicator OnTurn on the UID indicator light on a servercompute-ops/servera46b210a-b0c7-4223-ab43-c4c1e77e680c
Server Set UID Indicator OffTurn off the UID indicator light on a servercompute-ops/serverfd837434-a2f2-4bc8-b1b4-ec068bd036aa
Appliance Software UpdateUpdate OneView appliancecompute-ops/oneview-appliance1c4ac4be-8eeb-49f2-a86a-fd8c9182616c
Synchronize firmware baselineSynchronize firmware baseline of a vcentercompute-ops/external-service0fe73adb-9d52-4f00-9540-6ec82f265d82
Remove vCenterRemove a vCentercompute-ops/external-service3f06fd6b-dfb1-4bad-bd04-939951797e97
Group Firmware UpdateUpdate firmware on servers in a groupcompute-ops/group91159b5e-9eeb-11ec-a9da-00155dc0a0c0
Group Firmware ComplianceCalculate firmware compliance of servers in a groupcompute-ops/group23b8ba2a-6c46-4223-b028-919382c7dcac
Group Appliance UpdateUpdate OneView appliances in a groupcompute-ops/groupf69f553a-5004-4a08-9283-5b60abd9eb4a
Group Apply Internal Storage SettingsApply internal storage settings on servers in a groupcompute-ops/group54095626-3911-4fea-9741-816e2531994e
Group Apply Server SettingApply server setting on a groupcompute-ops/groupbeff07ce-f36d-4699-9ac3-f872dcd63133
Group Apply External Storage SettingsApply external storage settings on servers in a groupcompute-ops/groupfcb79270-5954-42e9-9374-6a065b6d494a
Group External Storage ComplianceCalculate external storage compliance of servers in a groupcompute-ops/group7177aa6a-e8f8-4e9b-ae31-e01dafcc81df
Group Firmware DownloadDownload firmware on servers in a groupcompute-ops/groupa17a7aa9-4540-4c21-bbf2-31af4ff65e98
Collect Server InventoryCollect complete or filtered server inventorycompute-ops/serverd6595f1b-84e6-4587-ade5-656e2a5ea20d
Collect Server Network ConnectivityCollect server adapter port to switch port mappingscompute-ops/serverb21ca9e2-8a1b-11ee-b9d1-0242ac120002
Group Operating System InstallationInstall operating system on servers in a groupcompute-ops/groupe2952628-2629-4088-93db-91742304ef0c
Collect Server logCollect server logcompute-ops/server2d744494-22d4-4d61-8c65-647ccadeb6b6
Security
Bearer
Query
selectstring

Limit the properties of the resource returned in a successful response. When applied to write operations, select controls only the properties that are returned, not which properties are operated on. All properties are returned if the select parameter is omitted.

The value of the select query parameter is a comma separated list of properties to include in the response. Nested properties use / as a separator, e.g. select=interfaces/name selects the name property within an interfaces object.

For operations that return paginated collections, select operates on the resources in the collection. The pagination properties like count and items are always included even when select is specified.

Examples:

Select only the id and name properties of the resource

select=id,name
Headers
Content-Typestringrequired

Content-Type header must designate 'application/json' in order for the request to be performed.

Value "application/json"
Tenant-Acidstring(uuid)

Tenant-Acid header can be used by an MSP workspace to make API calls on behalf of their tenant by specifying the tenant's application customer ID.

In order to make such an API call, the Bearer token must belong to an MSP workspace and this header value must be the application customer ID of a tenant within the MSP workspace. Use the /compute-ops-mgmt/v1beta1/accounts API to determine the application customer IDs for your tenant accounts.

Bodyapplication/jsonrequired

Job request

jobTemplatestringrequired

ID of the job template for this job.

Example: "aacfb3e0-6575-4d4f-a711-1ee1ae768407"
resourceIdstringrequired

Id of the resource to run this job on

Example: "744674-N19+8899744674319686"
resourceTypestringrequired

Type of the resource to run this job on

Example: "compute-ops-mgmt/server"
jobParamsobject

Parameters needed to define this job (based on the job schema)

curl -i -X POST \
  https://us-west.api.greenlake.hpe.com/compute-ops-mgmt/v1/jobs \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "jobTemplate": "aacfb3e0-6575-4d4f-a711-1ee1ae768407",
    "resourceType": "compute-ops-mgmt/server",
    "resourceId": "744674-N19+8899744674319686"
  }'

Responses

Job data

Headers
Locationstring(uri-reference)

Location for the job that was created

Example: "/compute-ops-mgmt/v1/jobs/0e7f516c-0829-4135-83d6-09ce844ddd9d"
Bodyapplication/json
idstring(uuid)

Primary identifier for the job given by the system

Example: "2500759c-b7dd-4c68-ab7e-6b644bcf4b9c"
parentJobIdstring or null(uuid)

The identifier of a job which triggered this job

Example: "284f3b7a-7a17-4f0a-9b40-a51bc887c7d0"
typestring

Type of the resource

Value "compute-ops-mgmt/job"
resourceUristring(uri-reference)

URI to the job itself (i.e. a self link)

Example: "/compute-ops-mgmt/v1/jobs/2500759c-b7dd-4c68-ab7e-6b644bcf4b9c"
namestring

Name for the job

Example: "FirmwareUpdate.New"
generationinteger>= 1

Monotonically increasing update counter

Example: 9
deleteOnCompleteboolean

Automatically delete the job after it reaches the COMPLETE state.

Example: true
createdAtstring(date-time)

Time of job creation

updatedAtstring(date-time)

Time of the last job update

jobTemplatestring

ID of the job template this job is using

Example: "fd54a96c-cabc-42e3-aee3-374a2d009dba"
resourceobject(resource)

Reference to the associated resource this job is operating against

jobParamsobject(jobParams)

Parameters used to define this job

resultsobject(results)

Results from job execution

statestring(jobState)
Enum ValueDescription
PENDING

The job is waiting to start. It may be waiting for another job on the same resource to complete first.

APPROVAL_PENDING

The job is waiting to start. It requires approval from one or more of the configured approvers.

RUNNING

The job is running.

resultCodenull or string
One of:

No result code

null
statusstring

Status message about the job

statusDetailsobject or null

Additional information about the job's status

Response
application/json
{ "id": "2500759c-b7dd-4c68-ab7e-6b644bcf4b9c", "parentJobId": "284f3b7a-7a17-4f0a-9b40-a51bc887c7d0", "type": "compute-ops-mgmt/job", "resourceUri": "/compute-ops-mgmt/v1/jobs/2500759c-b7dd-4c68-ab7e-6b644bcf4b9c", "name": "FirmwareUpdate.New", "generation": 9, "deleteOnComplete": true, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "jobTemplate": "fd54a96c-cabc-42e3-aee3-374a2d009dba", "resource": { "id": "744674-N19+8899744674319686", "type": "compute-ops-mgmt/server" }, "jobParams": {}, "results": {}, "state": "PENDING", "resultCode": {}, "status": "string", "statusDetails": {} }

Get a job by ID

Request

Retrieve details about the job referenced by its id

Security
Bearer
Path
idstring(uuid)required

Unique Job identifier

Query
selectstring

Limit the properties of the resource returned in a successful response. When applied to write operations, select controls only the properties that are returned, not which properties are operated on. All properties are returned if the select parameter is omitted.

The value of the select query parameter is a comma separated list of properties to include in the response. Nested properties use / as a separator, e.g. select=interfaces/name selects the name property within an interfaces object.

For operations that return paginated collections, select operates on the resources in the collection. The pagination properties like count and items are always included even when select is specified.

Examples:

Select only the id and name properties of the resource

select=id,name
Headers
Tenant-Acidstring(uuid)

Tenant-Acid header can be used by an MSP workspace to make API calls on behalf of their tenant by specifying the tenant's application customer ID.

In order to make such an API call, the Bearer token must belong to an MSP workspace and this header value must be the application customer ID of a tenant within the MSP workspace. Use the /compute-ops-mgmt/v1beta1/accounts API to determine the application customer IDs for your tenant accounts.

curl -i -X GET \
  'https://us-west.api.greenlake.hpe.com/compute-ops-mgmt/v1/jobs/{id}' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>'

Responses

Job data

Bodyapplication/json
idstring(uuid)

Primary identifier for the job given by the system

Example: "2500759c-b7dd-4c68-ab7e-6b644bcf4b9c"
parentJobIdstring or null(uuid)

The identifier of a job which triggered this job

Example: "284f3b7a-7a17-4f0a-9b40-a51bc887c7d0"
typestring

Type of the resource

Value "compute-ops-mgmt/job"
resourceUristring(uri-reference)

URI to the job itself (i.e. a self link)

Example: "/compute-ops-mgmt/v1/jobs/2500759c-b7dd-4c68-ab7e-6b644bcf4b9c"
namestring

Name for the job

Example: "FirmwareUpdate.New"
generationinteger>= 1

Monotonically increasing update counter

Example: 9
deleteOnCompleteboolean

Automatically delete the job after it reaches the COMPLETE state.

Example: true
createdAtstring(date-time)

Time of job creation

updatedAtstring(date-time)

Time of the last job update

jobTemplatestring

ID of the job template this job is using

Example: "fd54a96c-cabc-42e3-aee3-374a2d009dba"
resourceobject(resource)

Reference to the associated resource this job is operating against

jobParamsobject(jobParams)

Parameters used to define this job

resultsobject(results)

Results from job execution

statestring(jobState)
Enum ValueDescription
PENDING

The job is waiting to start. It may be waiting for another job on the same resource to complete first.

APPROVAL_PENDING

The job is waiting to start. It requires approval from one or more of the configured approvers.

RUNNING

The job is running.

resultCodenull or string
One of:

No result code

null
statusstring

Status message about the job

statusDetailsobject or null

Additional information about the job's status

Response
application/json
{ "id": "2500759c-b7dd-4c68-ab7e-6b644bcf4b9c", "parentJobId": "284f3b7a-7a17-4f0a-9b40-a51bc887c7d0", "type": "compute-ops-mgmt/job", "resourceUri": "/compute-ops-mgmt/v1/jobs/2500759c-b7dd-4c68-ab7e-6b644bcf4b9c", "name": "FirmwareUpdate.New", "generation": 9, "deleteOnComplete": true, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "jobTemplate": "fd54a96c-cabc-42e3-aee3-374a2d009dba", "resource": { "id": "744674-N19+8899744674319686", "type": "compute-ops-mgmt/server" }, "jobParams": {}, "results": {}, "state": "PENDING", "resultCode": {}, "status": "string", "statusDetails": {} }

Patch a job by ID

Request

Updates an existing job

Security
Bearer
Path
idstring(uuid)required

Unique Job identifier

Query
selectstring

Limit the properties of the resource returned in a successful response. When applied to write operations, select controls only the properties that are returned, not which properties are operated on. All properties are returned if the select parameter is omitted.

The value of the select query parameter is a comma separated list of properties to include in the response. Nested properties use / as a separator, e.g. select=interfaces/name selects the name property within an interfaces object.

For operations that return paginated collections, select operates on the resources in the collection. The pagination properties like count and items are always included even when select is specified.

Examples:

Select only the id and name properties of the resource

select=id,name
Headers
Content-Typestringrequired

Content-Type header must designate 'application/merge-patch+json' in order for the request to be performed.

Value "application/merge-patch+json"
Tenant-Acidstring(uuid)

Tenant-Acid header can be used by an MSP workspace to make API calls on behalf of their tenant by specifying the tenant's application customer ID.

In order to make such an API call, the Bearer token must belong to an MSP workspace and this header value must be the application customer ID of a tenant within the MSP workspace. Use the /compute-ops-mgmt/v1beta1/accounts API to determine the application customer IDs for your tenant accounts.

Bodyapplication/merge-patch+jsonrequired

Job update data

statestring

New state for the job (currently only Complete or Error is supported)

Enum"COMPLETE""ERROR"
inputobject

Additional input (optional) for the job

curl -i -X PATCH \
  'https://us-west.api.greenlake.hpe.com/compute-ops-mgmt/v1/jobs/{id}' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/merge-patch+json' \
  -d '{}'

Responses

Job data

Bodyapplication/json
idstring(uuid)

Primary identifier for the job given by the system

Example: "2500759c-b7dd-4c68-ab7e-6b644bcf4b9c"
parentJobIdstring or null(uuid)

The identifier of a job which triggered this job

Example: "284f3b7a-7a17-4f0a-9b40-a51bc887c7d0"
typestring

Type of the resource

Value "compute-ops-mgmt/job"
resourceUristring(uri-reference)

URI to the job itself (i.e. a self link)

Example: "/compute-ops-mgmt/v1/jobs/2500759c-b7dd-4c68-ab7e-6b644bcf4b9c"
namestring

Name for the job

Example: "FirmwareUpdate.New"
generationinteger>= 1

Monotonically increasing update counter

Example: 9
deleteOnCompleteboolean

Automatically delete the job after it reaches the COMPLETE state.

Example: true
createdAtstring(date-time)

Time of job creation

updatedAtstring(date-time)

Time of the last job update

jobTemplatestring

ID of the job template this job is using

Example: "fd54a96c-cabc-42e3-aee3-374a2d009dba"
resourceobject(resource)

Reference to the associated resource this job is operating against

jobParamsobject(jobParams)

Parameters used to define this job

resultsobject(results)

Results from job execution

statestring(jobState)
Enum ValueDescription
PENDING

The job is waiting to start. It may be waiting for another job on the same resource to complete first.

APPROVAL_PENDING

The job is waiting to start. It requires approval from one or more of the configured approvers.

RUNNING

The job is running.

resultCodenull or string
One of:

No result code

null
statusstring

Status message about the job

statusDetailsobject or null

Additional information about the job's status

Response
application/json
{ "id": "2500759c-b7dd-4c68-ab7e-6b644bcf4b9c", "parentJobId": "284f3b7a-7a17-4f0a-9b40-a51bc887c7d0", "type": "compute-ops-mgmt/job", "resourceUri": "/compute-ops-mgmt/v1/jobs/2500759c-b7dd-4c68-ab7e-6b644bcf4b9c", "name": "FirmwareUpdate.New", "generation": 9, "deleteOnComplete": true, "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "jobTemplate": "fd54a96c-cabc-42e3-aee3-374a2d009dba", "resource": { "id": "744674-N19+8899744674319686", "type": "compute-ops-mgmt/server" }, "jobParams": {}, "results": {}, "state": "PENDING", "resultCode": {}, "status": "string", "statusDetails": {} }

jobs - v1beta3

Operations

jobs - v1beta2

Operations

metrics-configurations - v1

Operations

oneview-appliances - v1beta1

Operations

oneview-settings - v1beta1

Operations

oneview-server-templates - v1beta1

Operations

reports - v1beta2

Operations

schedules - v1beta2

Operations

server-locations - v1beta1

Operations

server-settings - v1beta1

Operations

settings - v1

Operations

settings - v1beta1

Operations

servers - v1

Operations

servers - v1beta2

Operations

server-warranty - v1beta2

Operations

user-preferences - v1

Operations

user-preferences - v1beta1

Operations

utilization-over-time - v1beta1

Operations

utilization-by-entity - v1beta1

Operations

webhooks - v1beta1

Operations