Skip to content
OpenRelay is in early access, and the /v1 API is stable. New capabilities ship in the changelog.
Skip to Content
API ReferenceAccount and accessAccount

List roles for a CLI session

The roles the approval page offers a CLI session in an org, and the one it starts with. Needs a signed-in user session. Each built-in role up to Admin, and each custom role, that you could give a member yourself (what its holder reaches is within what you can do), and always your own role unless it is Owner. defaultRoleId is Member when offered, otherwise your own role.

Required permission

Requires the self.update permission. See Permissions for the roles and API key permissions that include it.

GET
/v1/me/cli-session-roles

Authorization

apiKey
headerAuthorizationBearer <token>

OpenRelay API key. Send it as Authorization: Bearer or_… (legacy vl_… keys still work).

Query Parameters

orgId*string

Response Body

The roles a CLI session in that org can be given

application/json
  1. response
roles*array<>
defaultRoleId*string
Example Request
curl -X GET 'https://api.openrelay.inc/v1/me/cli-session-roles?orgId=string'
Example Response
{  "roles": [    {      "id": "string",      "name": "string",      "description": "string",      "builtin": true    }  ],  "defaultRoleId": "string"}