Change state of access request

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.

Endpoint

/api/cluster/v1/remoteaccess/requests

Response code

Code Description
200 Success
400 Bad request
403 Approving remote access request is disabled
404 Access request not found
409 Access request was found, but it's already expired
500 Operation failed

Example

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

curl -X PUT "https://myManaged.cluster.com/api/cluster/v1/remoteaccess/requests/7a397770-86b7-473b-b23e-4a07d79f2eff/state"
         -H  "accept: */*"
		 -H  "Content-Type: */*"
		 -d "{\"state\":\"ACCEPTED\"}"		 

Request URL

https://myManaged.cluster.com/api/cluster/v1/remoteaccess/requests/7a397770-86b7-473b-b23e-4a07d79f2eff/state

Request body

api-examples/cluster/remote-access/put-change-state-of-access-request.json
Download
{
  "state": "REJECTED"
}

Response code

200