Requesting Items During the Session
Authorization: administration token or client token Endpoint information: Elastic access request in the context of a session |
In this example, make a PUT call to the /api/v1.0/sessions/{sessionId} endpoint to request the following items:
• | 10 counts of PhotoPrint, version 1.0 |
• | 2 counts of CADPrint, version 2.0 |
The request must include the {sessionId} as a path parameter to identify the session during which it requests items.
Item |
Description |
URI |
/api/v1.0/sessions/{sessionID} |
Method |
PUT |
Path parameters |
sessionId: Use the ID returned by the /api/v1.0/sessions API in the previous step, Initiating a Session. |
Request body |
|
Sample Response
The sample response displays information about the items, PhotoPrint and CADPrint, that were requested during the session. As in the previous procedure, the line item with activation ID ACT01-Elastic was charged 44 tokens in total:
• | 10 counts at a rate of 3 = 30 tokens for PhotoPrint |
• | 2 counts at a rate of 7 = 14 tokens for CADPrint. |
{
"requestedItems": [
{
"count": 10,
"item": "PhotoPrint",
"version": "1.0",
"totalTokensCharged": 30,
"lineItems": [
{
"rate": 3,
"activationId": "ACT01-Elastic",
"tokensCharged": 30
}
],
"status": {
"code": "101",
"description": "Successfully checked out"
},
},
{
"count": 2,
"item": "CADPrint",
"version": "2.0",
"totalTokensCharged": 14,
"lineItems": [
{
"rate": 7,
"activationId": "ACT01-Elastic",
"tokensCharged": 14
}
],
"status": {
"code": "101",
"description": "Successfully checked out"
},
}
],
"requester": {
"type": "user",
"value": "LisaBarry"
},
"correlationId": "5c8ec4fd-f17f-4657-bf09-74a97ddc9f8b"
}
See also