Due to the issue described here, this new issue updates the specification of the API described here and formally here. and the original Session Manager API described here
We provide only the updated parts, for clarity. The full api can be seen on the Interface Specs
Updates to the API:
Added new call to generate tokens with larger payloads (equivalent to the existing one: /sm/generateToken). The payload is passed on the data field of the body json object of parameters. The rest are still passed on the query string.
/sm/generateTokenWithPayload:
post:
tags:
- SessionManager
summary: 'Generates a signed token with the sessionId and the json payload sent in the body. Equivalent to /sm/generateToken but for bigger payloads'
operationId: generateTokenWithPayloadUsingPOST
consumes:
- application/json
produces:
- application/json
parameters:
- in: body
name: requestParameters
description: The request params object, with json object, with the 'data' field filled in with the additional data to include on the token
required: false
schema:
$ref: '#/definitions/requestParameters'
- name: receiver
in: query
description: receiver
required: true
type: string
- name: sender
in: query
description: sender
required: true
type: string
- name: sessionId
in: query
description: sessionId
required: true
type: string
responses:
'200':
description: OK
schema:
$ref: '#/definitions/SessionMngrResponse'
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: Not Found
deprecated: false
* The function of the data store to retrieve a `storeEntry` has been changed to send the id of the `storeEntry` we want on a body json object of parameters, that only needs a value on the `id` field. `sessionId` is still passed on the query string.
```yaml
/sm/new/get:
post:
tags:
- new-api-rest
summary: >-
returns in the extraData the object (JSON strigified) for the given
session id and object id, or if not object id, the array of all objects
for the given sessionID
operationId: getSessionDataUsingPOST_1
consumes:
- application/json
produces:
- application/json
parameters:
- in: body
name: requestParameters
description: The request params object, with json object, with the 'id' filed filled in with the id of the storeEntry to retrieve
required: false
schema:
$ref: '#/definitions/requestParameters'
- name: sessionId
in: query
description: sessionId
required: true
type: string
responses:
'200':
description: OK
schema:
$ref: '#/definitions/SessionMngrResponse'
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: Not Found
deprecated: false
Same as above for the search operation. Now the type parameter is inside the body json and sessionId is still passed on the query string.
/sm/new/search:
post:
tags:
- new-api-rest
summary: >-
returns in the extraData field the array of JSON objects matching the
given type, or if no type is given all session objects
operationId: searchDataUsingPOST
consumes:
- application/json
produces:
- application/json
parameters:
- name: sessionId
in: query
description: sessionId
required: true
type: string
- in: body
name: requestParameters
description: The request params object, with json object, with the 'type' field filled in with the type of storeEntry objects to retrieve
required: false
schema:
$ref: '#/definitions/requestParameters'
responses:
'200':
description: OK
schema:
$ref: '#/definitions/SessionMngrResponse'
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: Not Found
deprecated: false
The sessionId that was passed on the post body is now passed as the sessionId parameter is inside the body json
/sm/new/startSession:
post:
tags:
- new-api-rest
summary: >-
Starts a new session, by setting the code to NEW and the identifier at
sessionData.sessionId
operationId: startSessionUsingPOST_1
consumes:
- application/json
produces:
- application/json
parameters:
- in: body
name: requestParameters
description: The request params object, with json object, with the 'sessionId' field filled in with the sessionID related to this session dataStore
required: false
schema:
$ref: '#/definitions/requestParameters'
responses:
'200':
description: OK
schema:
$ref: '#/definitions/SessionMngrResponse'
'201':
description: Created
'401':
description: Unauthorized
'403':
description: Forbidden
'404':
description: Not Found
deprecated: false
And this is the object of the request parameters (I know the signature is equal to another object, but it is better to differentiate them semantically):
Due to the issue described here, this new issue updates the specification of the API described here and formally here. and the original Session Manager API described here
We provide only the updated parts, for clarity. The full api can be seen on the Interface Specs
Updates to the API:
/sm/generateToken
). The payload is passed on thedata
field of the body json object of parameters. The rest are still passed on the query string.Same as above for the search operation. Now the
type
parameter is inside the body json andsessionId
is still passed on the query string.The sessionId that was passed on the post body is now passed as the
sessionId
parameter is inside the body jsonAnd this is the object of the request parameters (I know the signature is equal to another object, but it is better to differentiate them semantically):
This is the diff of the update, for a more accurate reference. Also this commit, as i forgot to add the
requestParameters
object definition