API ReferenceManagementSession Classification Management
POST
/v1/mgmt/sessionclassification

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 <= 100
description?string
Lengthlength <= 1024
sessionTimeLimitRule?"SESSION_TIME_LIMIT_RULE_UNSPECIFIED" | "SESSION_TIME_LIMIT_RULE_MIN_OF_TENANTS" | "SESSION_TIME_LIMIT_RULE_PROJECT_SETTINGS" | "SESSION_TIME_LIMIT_RULE_CURRENT_TENANT"

How a member's session time limit is decided. SESSION_TIME_LIMIT_RULE_UNSPECIFIED (0, the default) means the group does not override it, so members are treated like a user with no group at all. SESSION_TIME_LIMIT_RULE_MIN_OF_TENANTS (1) uses the shortest limit among all the tenants the user belongs to. SESSION_TIME_LIMIT_RULE_PROJECT_SETTINGS (2) inherits the project-wide session time limit. SESSION_TIME_LIMIT_RULE_CURRENT_TENANT (3) follows the limit of the tenant the session is currently in, so it changes with the tenant context rather than being fixed at sign-in.

Formatenum
Value in"SESSION_TIME_LIMIT_RULE_UNSPECIFIED" | "SESSION_TIME_LIMIT_RULE_MIN_OF_TENANTS" | "SESSION_TIME_LIMIT_RULE_PROJECT_SETTINGS" | "SESSION_TIME_LIMIT_RULE_CURRENT_TENANT"
accessAllTenants?boolean

Members may access every tenant in the project regardless of their explicit assignments

maxConcurrentSessions?integer

Overrides the project-wide limit for members, in both directions. 0 means UNLIMITED: it lifts the project cap for members rather than inheriting it.

Formatint32
createdTime?integer

Computed server side: accepted and ignored on write, so a read response can be sent back as an update. Epoch seconds as int32, matching every other createdTime/modifiedTime in this file: protobuf JSON renders a 64-bit integer as a quoted string.

Formatint32
modifiedTime?integer
Formatint32
version?integer

The revision this group was read at. Send it back on an update and the write is rejected with a conflict if someone else changed the group in the meantime. Omit it to update regardless of who wrote last.

Formatint32

Create or update a session classification (upsert by name), using a valid management key. On a new name the defaults are applied; on an existing one, fields left out keep their stored value.

curl -X POST "https://api.descope.com/v1/mgmt/sessionclassification" \  -H "Content-Type: application/json" \  -d '{    "name": "string"  }'
{  "name": "string",  "description": "string",  "sessionTimeLimitRule": "SESSION_TIME_LIMIT_RULE_UNSPECIFIED",  "accessAllTenants": true,  "maxConcurrentSessions": 0,  "createdTime": 0,  "modifiedTime": 0,  "version": 0}
/** * SessionClassification is a named set of session rules applied to the users assigned to it. The name is *  the id: unique per project and immutable. */export interface Response {name: stringdescription?: string/** * How a member's session time limit is decided. *   SESSION_TIME_LIMIT_RULE_UNSPECIFIED (0, the default) means the group does not override it, so *   members are treated like a user with no group at all. *   SESSION_TIME_LIMIT_RULE_MIN_OF_TENANTS (1) uses the shortest limit among all the tenants the *   user belongs to. *   SESSION_TIME_LIMIT_RULE_PROJECT_SETTINGS (2) inherits the project-wide session time limit. *   SESSION_TIME_LIMIT_RULE_CURRENT_TENANT (3) follows the limit of the tenant the session is *   currently in, so it changes with the tenant context rather than being fixed at sign-in. */sessionTimeLimitRule?: ("SESSION_TIME_LIMIT_RULE_UNSPECIFIED" | "SESSION_TIME_LIMIT_RULE_MIN_OF_TENANTS" | "SESSION_TIME_LIMIT_RULE_PROJECT_SETTINGS" | "SESSION_TIME_LIMIT_RULE_CURRENT_TENANT")/** * Members may access every tenant in the project regardless of their explicit assignments */accessAllTenants?: boolean/** * Overrides the project-wide limit for members, in both directions. 0 means UNLIMITED: it *  lifts the project cap for members rather than inheriting it. */maxConcurrentSessions?: number/** * Computed server side: accepted and ignored on write, so a read response can be sent back as an *  update. Epoch seconds as int32, matching every other createdTime/modifiedTime in this file: *  protobuf JSON renders a 64-bit integer as a quoted string. */createdTime?: numbermodifiedTime?: number/** * The revision this group was read at. Send it back on an update and the write is rejected with *  a conflict if someone else changed the group in the meantime. Omit it to update regardless of *  who wrote last. */version?: number}
Was this helpful?