Create Gateway Role Assignments

POST {{apiPath}}/environments/{{envID}}/gateways/{{gatewayID}}/roleAssignments

You can manage the roles assigned to gateways to provide access to resources in environments other than the gateway's environment. When you assign a role to a gateway, you provide the attribute values required to identify the role and designate the role assignment scope for this gateway.

The sample shows the POST /environments/{{envID}}/gateways/{{gatewayID}}/roleAssignments operation to create the role assignment for the gateway in the specified environment resource.

The request URL identifies the environment ID and gateway ID. The request body specifies the role ID and the scope attribute values. The scope attribute provides the resource ID and resource type to designate the role assignment scope associated with this application. In this sample, the scope type is ENVIRONMENT and the specific environment to which the role assignment scope applies is specified in the id value.

Prerequisites

  • See Gateway Management for important overview information.

  • Use Read All Gateways to retrieve a list of all gateway IDs associated with the environment and select the specific gatewayID for the endpoint. For more information, see Gateways.

  • Use Read All Roles to retrieve a list of all role IDs defined in the PingOne Platform and select the desired roleID for the body. For more information, see Roles.

For property descriptions, see Gateway role assignments data model.

PropertyTypeRequired?
role.idStringRequired
scope.idStringRequired
scope.typeStringRequired

Request Body

{"role"=>{"id"=>"{{roleID}}"}, "scope"=>{"id"=>"{{envID}}", "type"=>"ENVIRONMENT"}}