This API call changes state of access request for a specific request ID. You can set the state access request to PENDING
, ACCEPTED
, REJECTED
or EXPIRED
. The request consumes 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
Request id param
The JSON body of the request, containing new state of access request.
AccessRequestStateData
objectAccess request data - format used to change a state of a request
Access request state
ACCEPTED
EXPIRED
PENDING
REJECTED
This is a model of the request body, showing the possible elements. It has to be adjusted for usage in an actual request.
{"state": "ACCEPTED"}
Success
Bad request
Approving remote access request is disabled
Access request not found
Access request was found, but it's already expired
Operation failed
In this example you request to change the remote access permission to rejected
for access request ID: 7a397770-86b7-473b-b23e-4a07d79f2eff
. The response code is 200
and the remote access permission state is changed.
curl -X PUT "https://myManaged.cluster.com/api/cluster/v2/remoteaccess/requests/7a397770-86b7-473b-b23e-4a07d79f2eff/state"-H "accept: */*"-H "Content-Type: */*"-d "{\"state\":\"ACCEPTED\"}"
https://myManaged.cluster.com/api/cluster/v2/remoteaccess/requests/7a397770-86b7-473b-b23e-4a07d79f2eff/state
{"state": "REJECTED"}
200