API ReferenceManagementManagement Keys
PUT
/v1/mgmt/managementkey

Authorization

Descope Project ID and Management Key
AuthorizationBearer <token>

Project ID:Management Key as bearer token.

In: header

Request Body

application/json

name*string
Length1 <= length <= 254
description?string
Lengthlength <= 100000
expiresIn?string
Formatuint64
permittedIps?array<string>
string
reBac*object

Only one kind of roles is granted: company roles, otherwise project roles, otherwise tag roles. Every role is granted on every listed project or tag, up to 20000 grants in total.

expireTime?string
Formatint64
trustedIssuer?object

Create a management key using another management key.

curl -X PUT "https://api.descope.com/v1/mgmt/managementkey" \  -H "Content-Type: application/json" \  -d '{    "name": "string",    "reBac": {}  }'
{  "cleartext": "string",  "key": {    "id": "string",    "name": "string",    "description": "string",    "status": "string",    "createdTime": 0,    "expireTime": 0,    "permittedIps": [      "string"    ],    "reBac": {      "companyRoles": [        "string"      ],      "projectRoles": [        {          "projectIds": [            "string"          ],          "roles": [            "string"          ]        }      ],      "tagRoles": [        {          "tags": [            "string"          ],          "roles": [            "string"          ]        }      ]    },    "version": 0,    "authzVersion": 0,    "trustedIssuer": {      "name": "string",      "issuer": "string",      "expireTime": 0,      "audience": "string",      "claimFilters": {        "property1": null,        "property2": null      },      "expireTimeUnit": "string"    }  }}
export interface Response {cleartext?: stringkey?: {id?: stringname: stringdescription?: stringstatus: stringcreatedTime?: numberexpireTime?: numberpermittedIps?: string[]/** * Only one kind of roles is granted: company roles, otherwise project roles, otherwise tag roles. Every role is granted *  on every listed project or tag, up to 20000 grants in total. */reBac?: {/** * @maxItems 100 */companyRoles?: string[]/** * @maxItems 100 */projectRoles?: ManagementKeyProjectRole[]/** * @maxItems 100 */tagRoles?: ManagementKeyTagRole[]}version?: numberauthzVersion?: numbertrustedIssuer?: {name?: stringissuer?: stringexpireTime?: numberaudience?: stringclaimFilters?: {/** * Represents a dynamically typed value which can be either null, a number, a string, a boolean, a recursive struct value, or a list of values. */[k: string]: {[k: string]: unknown}}expireTimeUnit?: string}}}export interface ManagementKeyProjectRole {/** * @maxItems 10000 */projectIds?: string[]/** * @maxItems 100 */roles?: string[]}/** * Management key */export interface ManagementKeyTagRole {/** * @maxItems 1000 */tags?: string[]/** * @maxItems 100 */roles?: string[]}
Was this helpful?