Creates an approval policy
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.
https://us-west.api.greenlake.hpe.com/
https://eu-central.api.greenlake.hpe.com/
https://ap-northeast.api.greenlake.hpe.com/
https://developer.greenlake.hpe.com/_mock/docs/greenlake/services/compute-ops-mgmt/public/openapi/compute-ops-mgmt-latest/
- API endpoint for US West
https://us-west.api.greenlake.hpe.com/compute-ops-mgmt/v1beta2/approval-policies
- API endpoint for EU Central
https://eu-central.api.greenlake.hpe.com/compute-ops-mgmt/v1beta2/approval-policies
- API endpoint for AP Northeast
https://ap-northeast.api.greenlake.hpe.com/compute-ops-mgmt/v1beta2/approval-policies
- Mock server
https://developer.greenlake.hpe.com/_mock/docs/greenlake/services/compute-ops-mgmt/public/openapi/compute-ops-mgmt-latest/compute-ops-mgmt/v1beta2/approval-policies
- curl
- JavaScript
- Node.js
- Python
- Java
- Go
- C#
- PHP
curl -i -X POST \
https://us-west.api.greenlake.hpe.com/compute-ops-mgmt/v1beta2/approval-policies \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{}'{ "name": "demo-policy", "type": "compute-ops-mgmt/approval-policy", "id": "4c102e14-87cd-4c00-8f5a-73073f85c9az", "resourceUri": "/compute-ops-mgmt/v1beta2/approval-policies/4c102e14-87cd-4c00-8f5a-73073f85c9az", "description": "Example policy", "state": "ACTIVE", "remarks": "This is a demo policy", "createdAt": "2025-03-01T10:50:33.736935+00:00", "updatedAt": "2025-03-01T11:05:00.554140+00:00", "generation": 8450, "policyData": { "approvables": [ … ], "resources": [ … ] } }
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.
| CLASS | EXAMPLES |
|---|---|
| Types | integer, decimal, timestamp, string, boolean, null |
| Operations | eq, ne, gt, ge, lt, le, in |
| Logic | and, or, not |
Approval policies can be filtered by:
- createdAt
- description
- name
- policyData/resources/id
- policyData/resources/type
- updatedAt
The following examples are not an exhaustive list of all possible filtering options.
Return approval policies where a property equals a value. <property> eq <value>
Return approval policies where a property is less than or equal to a value. <property> le <value>
Return approval policies where property contains a value. contains(<property>, <value>)
Return approval policies where a property is greater than a value, using url encoding. <property>%20gt%20%27<value>
Return approval policies where a property does not equal a value not <property> eq <value>
Return approval policies where multiple properties can be matched with values <property> eq <value1> and <property> contains <value2>
- API endpoint for US West
https://us-west.api.greenlake.hpe.com/compute-ops-mgmt/v1beta2/approval-policies
- API endpoint for EU Central
https://eu-central.api.greenlake.hpe.com/compute-ops-mgmt/v1beta2/approval-policies
- API endpoint for AP Northeast
https://ap-northeast.api.greenlake.hpe.com/compute-ops-mgmt/v1beta2/approval-policies
- Mock server
https://developer.greenlake.hpe.com/_mock/docs/greenlake/services/compute-ops-mgmt/public/openapi/compute-ops-mgmt-latest/compute-ops-mgmt/v1beta2/approval-policies
- curl
- JavaScript
- Node.js
- Python
- Java
- Go
- C#
- PHP
curl -i -X GET \
https://us-west.api.greenlake.hpe.com/compute-ops-mgmt/v1beta2/approval-policies \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'OK
Primary identifier for policy given by the system.
Time of policy entry creation
Time of last policy update
URI to the policy itself (i.e. a self link)
{ "offset": 0, "count": 1, "total": 12, "items": [ { … } ] }
- API endpoint for US West
https://us-west.api.greenlake.hpe.com/compute-ops-mgmt/v1beta2/approval-policies/{policy_id}
- API endpoint for EU Central
https://eu-central.api.greenlake.hpe.com/compute-ops-mgmt/v1beta2/approval-policies/{policy_id}
- API endpoint for AP Northeast
https://ap-northeast.api.greenlake.hpe.com/compute-ops-mgmt/v1beta2/approval-policies/{policy_id}
- Mock server
https://developer.greenlake.hpe.com/_mock/docs/greenlake/services/compute-ops-mgmt/public/openapi/compute-ops-mgmt-latest/compute-ops-mgmt/v1beta2/approval-policies/{policy_id}
- curl
- JavaScript
- Node.js
- Python
- Java
- Go
- C#
- PHP
curl -i -X GET \
'https://us-west.api.greenlake.hpe.com/compute-ops-mgmt/v1beta2/approval-policies/{policy_id}' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'{ "name": "demo-policy", "type": "compute-ops-mgmt/approval-policy", "id": "4c102e14-87cd-4c00-8f5a-73073f85c9az", "resourceUri": "/compute-ops-mgmt/v1beta2/approval-policies/4c102e14-87cd-4c00-8f5a-73073f85c9az", "description": "Example policy", "state": "ACTIVE", "remarks": "This is a demo policy", "createdAt": "2025-03-01T10:50:33.736935+00:00", "updatedAt": "2025-03-01T11:05:00.554140+00:00", "generation": 8450, "policyData": { "approvables": [ … ], "resources": [ … ] } }
Policy name. This is an optional parameter that can be used to update the policy name.
Policy description. This is an optional parameter that can be used to update the policy description.
Data for the policy containing information about approvers and resources that are assigned to the policy. User can modify the approvables and resources assigned to the policy. If the user wants to modify a policy assigned to a group resource, then the user must specify the resource ID of the group in the resources array. This is an optional parameter that can be used to update the policy data.
- API endpoint for US West
https://us-west.api.greenlake.hpe.com/compute-ops-mgmt/v1beta2/approval-policies/{policy_id}
- API endpoint for EU Central
https://eu-central.api.greenlake.hpe.com/compute-ops-mgmt/v1beta2/approval-policies/{policy_id}
- API endpoint for AP Northeast
https://ap-northeast.api.greenlake.hpe.com/compute-ops-mgmt/v1beta2/approval-policies/{policy_id}
- Mock server
https://developer.greenlake.hpe.com/_mock/docs/greenlake/services/compute-ops-mgmt/public/openapi/compute-ops-mgmt-latest/compute-ops-mgmt/v1beta2/approval-policies/{policy_id}
- curl
- JavaScript
- Node.js
- Python
- Java
- Go
- C#
- PHP
curl -i -X PATCH \
'https://us-west.api.greenlake.hpe.com/compute-ops-mgmt/v1beta2/approval-policies/{policy_id}' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/merge-patch+json' \
-d '{}'{ "name": "demo-policy", "type": "compute-ops-mgmt/approval-policy", "id": "4c102e14-87cd-4c00-8f5a-73073f85c9az", "resourceUri": "/compute-ops-mgmt/v1beta2/approval-policies/4c102e14-87cd-4c00-8f5a-73073f85c9az", "description": "Example policy", "state": "ACTIVE", "remarks": "This is a demo policy", "createdAt": "2025-03-01T10:50:33.736935+00:00", "updatedAt": "2025-03-01T11:05:00.554140+00:00", "generation": 8450, "policyData": { "approvables": [ … ], "resources": [ … ] } }
- API endpoint for US West
https://us-west.api.greenlake.hpe.com/compute-ops-mgmt/v1beta2/approval-policies/{policy_id}
- API endpoint for EU Central
https://eu-central.api.greenlake.hpe.com/compute-ops-mgmt/v1beta2/approval-policies/{policy_id}
- API endpoint for AP Northeast
https://ap-northeast.api.greenlake.hpe.com/compute-ops-mgmt/v1beta2/approval-policies/{policy_id}
- Mock server
https://developer.greenlake.hpe.com/_mock/docs/greenlake/services/compute-ops-mgmt/public/openapi/compute-ops-mgmt-latest/compute-ops-mgmt/v1beta2/approval-policies/{policy_id}
- curl
- JavaScript
- Node.js
- Python
- Java
- Go
- C#
- PHP
curl -i -X DELETE \
'https://us-west.api.greenlake.hpe.com/compute-ops-mgmt/v1beta2/approval-policies/{policy_id}' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'