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.
To execute this request, you need one of the following API-Token scopes:
ClusterTokenManagement
)ServiceProviderAPI
)Nodekeeper
)/api/cluster/v2/remoteaccess/requests
The JSON body of the request, containing parameters of access request.
CreateAccessRequestDto
objectAccess request data - format used to create a request
User id
Request reason description
For how many days access is requested
Requested role
devops-admin
devops-user
devops-viewer
This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request.
{"userId": "string","reason": "string","requestedDays": 1,"role": "devops-admin"}
Invalid parameters
Approving remote access request is disabled
Operation failed
Mission Control is unavailable
AccessRequestData
objectAccess Request data
Request id
User id
Request reason description
For how many days access is requested
Requested role
devops-admin
devops-user
devops-viewer
Access request created at (timestamp)
Access expires at (timestamp)
Access request state
ACCEPTED
EXPIRED
PENDING
REJECTED
Access request state was modified by user
{"requestId": "string","userId": "string","reason": "string","requestedDays": 1,"role": "devops-admin","createdTimestamp": 1,"expirationTimestamp": 1,"state": "ACCEPTED","stateModifiedByUser": "string"}
In this example, you grant the user john.smith@dynatrace.com
a remote cluster permission with an admin role for 7
days.
curl -X POST "https://myManaged.cluster.com/api/cluster/v2/remoteaccess/requests"-H "accept: application/json"-H "Content-Type: */*"-d "{\"userId\":\"john.smith@dynatrace.com\",\"reason\":\"SUP-123456 Verifying cluster state after upgrade\",\"requestedDays\":7,\"role\":\"devops-admin\"}"
https://myManaged.cluster.com/api/cluster/v2/remoteaccess/requests
{"userId": "john.smith@dynatrace.com","reason": "SUP-123456 Verifying cluster state after upgrade","requestedDays": 7,"role": "devops-admin"}
{"requestId":"7a397770-86b7-473b-b23e-4a07d79f2eff","userId":"john.smith@dynatrace.com","reason":"SUP-123456 Verifying cluster state after upgrade","requestedDays":7,"role":"devops-admin","createdTimestamp":1586452866661,"expirationTimestamp":null,"state":"PENDING","stateModifiedByUser":null}
201