Set Values in a Project Input Table
Example Request URL
https://<URL>/FactTableService/setfact/proj/{MODELID}/5/{VAR}/?codeduser={CODEDUSER}&attrname={ATTRNAME}&attrval={ATTRVAL}
There are two ways to specify the project in this URL:
- MODELID - You can use this is you are modifying inputs for a set of known projects with Planview Advisor project IDs.
- By a known attribute - You can use a project attribute to specify a project. Planview Advisor will provide the set of possible attributes, which is based on your implementation. If you are using this method, set the MODELID to {0}.
VAR is the variable indentifier. Planview Advisoe will provide the list of relevant input variables.
CODEDUSER is optional. Use the token if you do not maintain session in the request headers.
Example Request
Setting a value in a project input table is a POST request with the following JSON fields:
{
indexOrder: [<index1>,<index2>,...],
dataChanges: [
{coordinates:[x,y,…], cellValue: <value string>},
...
]
}
For example, if you have a 3-D table with indexes idx1, idx2, and idx3, desired changes to cells at coordinates [1,3,5], [6,7,8], and respective cell values of 10, 15, then request would like the the following:
{
indexOrder: [idx1,idx2,idx3],
dataChanges: [
{coordinates:[1,3,5], cellValue: 10},
{coordinates:[6,7,8], cellValue: 15}
]
}
Planview Advisor will provide the information for you about the variable identifiers and index identifiers and the index order. The cellValue is always a string. There will be a dataChange object for each cell in the table, so one request per variable can contain all the changes.
Example Response
The response is a JSON with the following structure:
{
success: true/false,
message: <success/error message>
}

