Use this recipe for small, targeted updates where a file import is unnecessary.
You need:
- An authentication token.
- The target
modelId. - The target
moduleId. - The line item and dimension coordinates for the cells you want to update.
- Write access to the target cells.
Use a file upload and import instead when you need to update a large volume of cells.
Process
- Authenticate.
Request:POSThttps://auth.anaplan.com/token/authenticateSave the returned authentication token.
- Find the workspace
Request:GET /workspacesSave the
idof the workspace asworkspaceId. - Find the model
Request:GET /workspaces/{workspaceId}/modelsSave the
idof the model asmodelId. - Find the module
Request:GET /workspaces/{workspaceId}/models/{modelId}/modulesSave the
idof the target module asmoduleId. - Find line items, if needed
Request:GET /workspaces/{workspaceId}/models/{modelId}/modules/{moduleId}/lineItemsUse this when you need to confirm the line item IDs, names, formats, or other metadata before writing data.
- Build the cell update body. Create a request body that identifies the target cells and the values to write. The exact body depends on the target module structure. Include the required line item and dimension coordinates.
- Write cell data
Request:POST /models/{modelId}/modules/{moduleId}/dataSend the cell update body.
- Inspect the response
Check the response for accepted and rejected updates. Do not assume that a successful HTTP response means every submitted cell was updated.
Result
The specified cells are updated directly in the target module.
Failure handling
If the update fails, check:
- Whether the cell coordinates are valid.
- Whether the line item is writable.
- Whether the cell is read-only because of formula, Dynamic Cell Access, model role, or selective access.
- Whether the submitted value matches the line item format.
- Whether the request is too large for a direct cell-write workflow.