Initiating a Session

Authorization: administration token or client token

Endpoint information: Request a new session 

Issue a POST to the /api/v1.0/sessions endpoint to create a new session. The request body must contain the following:

The instance that the session should run in. (See also Exercise 2: Identifying the Instance.)
For authorization, a JWT which must contain an instance ID which matches the instance ID included in the headers.

When the session is first created, it is in an IDLE state.

Initiating a Session

Item

Description

URI

/api/v1.0/sessions 

Method

POST 

Path parameters

N/A

Request body

{

  "instanceId": "64d2028c-ae87-4069-a624-66089d957ef9"

}  

Sample Response

The response contains a UUID identifying the session, which is generated by Elastic Access. Take note of the ID that is returned in your example, because it is used in subsequent exercises.

{

  "sessionId": "f6567dd8-e069-418e-8893-7d22fcf12459""

}

See also