Grant remote access permission
This page will soon be available only on the dedicated Dynatrace Managed Documentation site. Update your bookmarks.
This API call grants remote access permission to a specific user. You can specify the user role, duration, and reason for remote access request. The request consumes and produces an application/json
payload.
Authentication
To execute this request, you need one of the following API-Token scopes:
- Cluster token management (
ClusterTokenManagement
) - Service Provider API (
ServiceProviderAPI
) - Nodekeeper access for node management (
Nodekeeper
)
To learn how to obtain and use it, see Cluster API - Authentication.
Endpoint
/api/cluster/v2/remoteaccess/requests
Parameters
Parameter | Type | Description | In | Required |
---|---|---|---|---|
body | CreateAccessRequestDto | The JSON body of the request, containing parameters of access request. | body | optional |
Request body objects
The CreateAccessRequestDto
object
Access request data - format used to create a request
Element | Type | Description | Required |
---|---|---|---|
userId | string | User id | optional |
reason | string | Request reason description | optional |
requestedDays | integer | For how many days access is requested | optional |
role | string | Requested role
| optional |
Request body JSON model
This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request.
1{2 "userId": "string",3 "reason": "string",4 "requestedDays": 1,5 "role": "devops-admin"6}
Response
Response codes
Code | Type | Description |
---|---|---|
201 | AccessRequestData | Successfully created |
400 | - | Invalid parameters |
403 | - | Approving remote access request is disabled |
500 | - | Operation failed |
513 | - | Mission Control is unavailable |
Response body objects
The AccessRequestData
object
Access Request data
Element | Type | Description |
---|---|---|
requestId | string | Request id |
userId | string | User id |
reason | string | Request reason description |
requestedDays | integer | For how many days access is requested |
role | string | Requested role
|
createdTimestamp | integer | Access request created at (timestamp) |
expirationTimestamp | integer | Access expires at (timestamp) |
state | string | Access request state
|
stateModifiedByUser | string | Access request state was modified by user |
Response body JSON model
1{2 "requestId": "string",3 "userId": "string",4 "reason": "string",5 "requestedDays": 1,6 "role": "devops-admin",7 "createdTimestamp": 1,8 "expirationTimestamp": 1,9 "state": "ACCEPTED",10 "stateModifiedByUser": "string"11}
Example
In this example, you grant the user john.smith@dynatrace.com
a remote cluster permission with an admin role for 7
days.
Curl
1curl -X POST "https://myManaged.cluster.com/api/cluster/v2/remoteaccess/requests"2 -H "accept: application/json"3 -H "Content-Type: */*"4 -d "{\"userId\":\"john.smith@dynatrace.com\",\"reason\":\"SUP-123456 Verifying cluster state after upgrade\",\"requestedDays\":7,\"role\":\"devops-admin\"}"
Request URL
1https://myManaged.cluster.com/api/cluster/v2/remoteaccess/requests
Request body
1{2 "userId": "john.smith@dynatrace.com",3 "reason": "SUP-123456 Verifying cluster state after upgrade",4 "requestedDays": 7,5 "role": "devops-admin"6}
Response body
1{2 "requestId":"7a397770-86b7-473b-b23e-4a07d79f2eff",3 "userId":"john.smith@dynatrace.com",4 "reason":"SUP-123456 Verifying cluster state after upgrade",5 "requestedDays":7,6 "role":"devops-admin",7 "createdTimestamp":1586452866661,8 "expirationTimestamp":null,9 "state":"PENDING",10 "stateModifiedByUser":null11}
Response code
201