The HPE GreenLake for Authorization API provides a unified way to manage the authorization function for HPE GreenLake cloud.
HPE GreenLake for Authorization API (1.0.0-beta)
https://global.api.greenlake.hpe.com/
https://developer.greenlake.hpe.com/_mock/docs/greenlake/services/authorization/public/openapi/authz-v1beta1/external-authz-v2-config/
Role Assignments
Role assignments are composed of three pieces (principal, role, and scope). Role assigments associate a user, group, or service (principal) with a specific role (along with its permissions) at a particular scope (a resource or group of resources) to grant them access and specify their responsibilities within HPE GreenLake.
Note: There is a maximum limit of 50 role assignments per user per workspace.
Note: Users can manage roles and retrieve a role identifier (ID / GRN) using the Web Interface. Once the role ID / GRN is retrieved then a role assignment can be created using the API described below.
Request
A scope group is a collection of scopes that can be assigned to a role assignment. This allows a single role assignment to cover multiple scopes.
Note:
- A scope group cannot contain another scope group (no nesting). Once created, a scope group will belong to a organization/workspace based on the caller context. The returned
grnattribute will include this context and can be used as a global unique identifier.
Must be unique within the context it is being created (organization or organization + workspace). Most ASCII characters are allowed, except [&, <, >, |, :, ,] and leading or trailing space.
https://global.api.greenlake.hpe.com/authorization/v1beta1/scope-groups
- Mock server
https://developer.greenlake.hpe.com/_mock/docs/greenlake/services/authorization/public/openapi/authz-v1beta1/external-authz-v2-config/authorization/v1beta1/scope-groups
- curl
- JavaScript
- Node.js
- Python
- Java
- Go
- C#
- PHP
curl -i -X POST \
https://global.api.greenlake.hpe.com/authorization/v1beta1/scope-groups \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"name": "sg1"
}'Created
Must be unique within the context it is being created (organization or organization + workspace). Most ASCII characters are allowed, except [&, <, >, |, :, ,] and leading or trailing space.
A short description of the scope group.
The HPE GreenLake Resource Notation (GRN) is the standardized, URI-compatible syntax used to define and specify this scope within the HPE GreenLake.
{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "type": "authorization/scope-group", "name": "sg1", "description": "This group gives access to resource \"host/123\"", "grn": "grn:glp/workspaces/05f0523c-fd03-47fc-981b-9c4333a37b60/regions/default/providers/authorization/scope-groups/497f6eca-6276-4993-bfeb-53cbbbba6f08", "serviceMetadata": { "id": "44f0443c-fd03-47fc-981b-9c4333a37b44", "type": "/service-catalog/service-offer" }, "generation": 1, "createdAt": "2023-04-06T22:45:59.759943+00:00", "updatedAt": "2023-04-06T22:45:59.759943+00:00" }
Request
Retrieves scope groups by applying OData 4.0 filters. Use the filter parameter to provide a filter string. Supports in operator on serviceMetadata/id, name or grn attributes.
Example Request: /authorization/v1beta1/scope-groups?filter=grn in ('grn:glp/workspaces/05f0523c-fd03-47fc-981b-9c4333a37b70/regions/default/providers/authorization/scope-groups/123')
Note:
- No duplicate attributes in OData filter: Each attribute (serviceMetadata/id, name, grn) can only appear once in the OData filter expression. Multiple occurrences will result in a 400 Bad Request error.
- Only one attribute in OData filter: Only one attribute (serviceMetadata/id, name or grn) can be used at a time, otherwise it will result in a 400 Bad Request error.
- Supported operators: Only in operator is supported.
Total number of results to be returned. If the parameter is not provided, it will return all records found.
OData style filter for filtering scope groups. Supports in operator on serviceMetadata/id, name or grn attributes.
https://global.api.greenlake.hpe.com/authorization/v1beta1/scope-groups
- Mock server
https://developer.greenlake.hpe.com/_mock/docs/greenlake/services/authorization/public/openapi/authz-v1beta1/external-authz-v2-config/authorization/v1beta1/scope-groups
- curl
- JavaScript
- Node.js
- Python
- Java
- Go
- C#
- PHP
curl -i -X GET \
https://global.api.greenlake.hpe.com/authorization/v1beta1/scope-groups \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'OK
Must be unique within the context it is being created (organization or organization + workspace). Most ASCII characters are allowed, except [&, <, >, |, :, ,] and leading or trailing space.
A short description of the scope group.
The HPE GreenLake Resource Notation (GRN) is the standardized, URI-compatible syntax used to define and specify this scope within the HPE GreenLake.
{ "items": [ { … } ], "count": 1, "total": 1, "offset": 0 }
https://global.api.greenlake.hpe.com/authorization/v1beta1/scope-groups/{id}
- Mock server
https://developer.greenlake.hpe.com/_mock/docs/greenlake/services/authorization/public/openapi/authz-v1beta1/external-authz-v2-config/authorization/v1beta1/scope-groups/{id}
- curl
- JavaScript
- Node.js
- Python
- Java
- Go
- C#
- PHP
curl -i -X GET \
'https://global.api.greenlake.hpe.com/authorization/v1beta1/scope-groups/{id}' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'OK
Must be unique within the context it is being created (organization or organization + workspace). Most ASCII characters are allowed, except [&, <, >, |, :, ,] and leading or trailing space.
A short description of the scope group.
The HPE GreenLake Resource Notation (GRN) is the standardized, URI-compatible syntax used to define and specify this scope within the HPE GreenLake.
{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "type": "authorization/scope-group", "name": "sg1", "description": "This group gives access to resource \"host/123\"", "grn": "grn:glp/workspaces/05f0523c-fd03-47fc-981b-9c4333a37b60/regions/default/providers/authorization/scope-groups/497f6eca-6276-4993-bfeb-53cbbbba6f08", "serviceMetadata": { "id": "44f0443c-fd03-47fc-981b-9c4333a37b44", "type": "/service-catalog/service-offer" }, "generation": 1, "createdAt": "2023-04-06T22:45:59.759943+00:00", "updatedAt": "2023-04-06T22:45:59.759943+00:00" }
Must be unique within the context it is being created (organization or organization + workspace). Most ASCII characters are allowed, except [&, <, >, |, :, ,] and leading or trailing space.
https://global.api.greenlake.hpe.com/authorization/v1beta1/scope-groups/{id}
- Mock server
https://developer.greenlake.hpe.com/_mock/docs/greenlake/services/authorization/public/openapi/authz-v1beta1/external-authz-v2-config/authorization/v1beta1/scope-groups/{id}
- curl
- JavaScript
- Node.js
- Python
- Java
- Go
- C#
- PHP
curl -i -X PUT \
'https://global.api.greenlake.hpe.com/authorization/v1beta1/scope-groups/{id}' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
"name": "sg1"
}'OK
Must be unique within the context it is being created (organization or organization + workspace). Most ASCII characters are allowed, except [&, <, >, |, :, ,] and leading or trailing space.
A short description of the scope group.
The HPE GreenLake Resource Notation (GRN) is the standardized, URI-compatible syntax used to define and specify this scope within the HPE GreenLake.
{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "type": "authorization/scope-group", "name": "sg1", "description": "This group gives access to resource \"host/123\"", "grn": "grn:glp/workspaces/05f0523c-fd03-47fc-981b-9c4333a37b60/regions/default/providers/authorization/scope-groups/497f6eca-6276-4993-bfeb-53cbbbba6f08", "serviceMetadata": { "id": "44f0443c-fd03-47fc-981b-9c4333a37b44", "type": "/service-catalog/service-offer" }, "generation": 1, "createdAt": "2023-04-06T22:45:59.759943+00:00", "updatedAt": "2023-04-06T22:45:59.759943+00:00" }
https://global.api.greenlake.hpe.com/authorization/v1beta1/scope-groups/{id}
- Mock server
https://developer.greenlake.hpe.com/_mock/docs/greenlake/services/authorization/public/openapi/authz-v1beta1/external-authz-v2-config/authorization/v1beta1/scope-groups/{id}
- curl
- JavaScript
- Node.js
- Python
- Java
- Go
- C#
- PHP
curl -i -X DELETE \
'https://global.api.greenlake.hpe.com/authorization/v1beta1/scope-groups/{id}' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'https://global.api.greenlake.hpe.com/authorization/v1beta1/scope-groups/{id}/scopes
- Mock server
https://developer.greenlake.hpe.com/_mock/docs/greenlake/services/authorization/public/openapi/authz-v1beta1/external-authz-v2-config/authorization/v1beta1/scope-groups/{id}/scopes
- curl
- JavaScript
- Node.js
- Python
- Java
- Go
- C#
- PHP
curl -i -X GET \
'https://global.api.greenlake.hpe.com/authorization/v1beta1/scope-groups/{id}/scopes' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'{ "items": [ { … } ], "count": 1, "total": 1, "offset": 0 }
https://global.api.greenlake.hpe.com/authorization/v1beta1/scope-groups/{id}/scopes/batch
- Mock server
https://developer.greenlake.hpe.com/_mock/docs/greenlake/services/authorization/public/openapi/authz-v1beta1/external-authz-v2-config/authorization/v1beta1/scope-groups/{id}/scopes/batch
- curl
- JavaScript
- Node.js
- Python
- Java
- Go
- C#
- PHP
curl -i -X POST \
'https://global.api.greenlake.hpe.com/authorization/v1beta1/scope-groups/{id}/scopes/batch' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"items": [
{
"grn": "grn:glp/workspaces/05f0523c-fd03-47fc-981b-9c4333a37b60/regions/us-east-2/providers/bmaas/host/123",
"description": "host 123"
}
]
}'OK
A unique machine-friendly identifier for the error from a global list of enumerated identifier strings.
{ "successCount": 1, "errorCount": 2, "successes": [ { … } ], "errors": [ { … }, { … } ] }
Request
Delete scopes from an existing scope group. The scope group ID can be found in the response body of GET /authorization/v1beta1/scope-groups while the scope ID to be deleted can be found in the response body of GET /authorization/v1beta1/scope-groups/{id}/scopes. This operation is synchronous and non-atomic.
https://global.api.greenlake.hpe.com/authorization/v1beta1/scope-groups/{id}/scopes/bulk
- Mock server
https://developer.greenlake.hpe.com/_mock/docs/greenlake/services/authorization/public/openapi/authz-v1beta1/external-authz-v2-config/authorization/v1beta1/scope-groups/{id}/scopes/bulk
- curl
- JavaScript
- Node.js
- Python
- Java
- Go
- C#
- PHP
curl -i -X DELETE \
'https://global.api.greenlake.hpe.com/authorization/v1beta1/scope-groups/{id}/scopes/bulk' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"items": [
{
"id": "e7b8f8e1-9ad5-432d-a858-499d9f279647"
}
]
}'OK
A unique machine-friendly identifier for the error from a global list of enumerated identifier strings.
A user-friendly error message
{ "successCount": 1, "errorCount": 1, "successes": [ { … } ], "errors": [ { … } ] }