List of APIs
Session API List
Start a session session.open_session
The following is an example of a JSON-RPC request to start a session and obtain an ID/token.
{
"jsonrpc": "2.0",
"method": "session.open_session",
"params": {
"expires_in": null,
},
"id": "jsonrpc_id"
}
The following parameters can be specified for params.
| parameter name | data type | content | default value |
|---|---|---|---|
| expires_in | int | token (session) validity period | 30 days |
The format of the response is as follows
{
"result": {
"access_token": "00890640-ec03-4663-82ce-456ea993807d",
"expires_in": 2592000
},
"id": "jsonrpc_id",
"jsonrpc": "2.0"
}
Check token validity session.verify_session_token
The following is an example of a JSON-RPC request to determine if a token is valid.
{
"jsonrpc": "2.0",
"method": "session.verify_session_token",
"params": {"token": "00890640-ec03-4663-82ce-456ea993807d"},
"id": "jsonrpc_id"
}
The following parameters can be specified for params.
| parameter name | data type | content | default value |
|---|---|---|---|
| token | string | token returned in response to session.open_session | required |
The format of the response is as follows
{
"result": {
"active": true
},
"id": "jsonrpc_id",
"jsonrpc": "2.0"
}
active: return whether the token is active (true or false).
Close session session.close_session
The following is an example of a JSON-RPC request to close a session.
{
"jsonrpc": "2.0",
"method": "session.close_session",
"params": {"token": "00890640-ec03-4663-82ce-456ea993807d"},
"id": "jsonrpc_id"
}
The following parameters can be specified for params.
| parameter name | data type | content | default value |
|---|---|---|---|
| token | string | token returned in response to session.open_session | required |
The format of the response is as follows
{
"result": true,
"id": "jsonrpc_id",
"jsonrpc": "2.0"
}
result: always returnstrueif the request is correct. (The idea is that if you pass a token that has not been issued, or if you invalidate the token, it istruebecause it is finally in the state of being invalidated)