Use this call to retrieve identifiers of all line items in a model.
Notes:
- To use this call, you must be a Workspace Administrator.
- The returned line items are restricted just to those in modules to which the model role of the user has Read access.
- The response returns Items within a flat list (no hierarchy).
- This returns all the line items in the model. For line items in a specific module see Retrieve Line Items For a Module.
Method and endpoint
/models/{modelId}/lineItems
Parameters
| Parameter | Details |
{modelId} |
|
Curl example
curl -X GET 'https://api.anaplan.com/2/0/models/{modelId}/lineItems' \
-H 'Authorization: AnaplanAuthToken {anaplan_auth_token}' \
-H 'Accept: application/json'
Response
Response header
Content-Type: application/json
Response 200 body
{
"meta": {
"schema": "https://api.anaplan.com/2/0/objects/lineItem"
},
"status": {
"code": 200,
"message": "Success"
},
"items": [
{
"moduleId": "102000000000",
"moduleName": "Sales Entry",
"id": "206000000000",
"name": "Quantity Sold"
},
{
"moduleId": "102000000000",
"moduleName": "Sales Entry",
"id": "206000000001",
"name": "Price"
},
{
"moduleId": "102000000000",
"moduleName": "Sales Entry",
"id": "206000000002",
"name": "Revenue"
},
{
"moduleId": "102000000001",
"moduleName": "Profit",
"id": "208000000000",
"name": "Commission"
},
{
"moduleId": "102000000001",
"moduleName": "Profit",
"id": "208000000001",
"name": "Cost"
},
{
"moduleId": "102000000001",
"moduleName": "Profit",
"id": "208000000002",
"name": "Profit"
}
]
}