iSheets API version 2 - iSheet admin - API - Column CRUD operations - Add columns
OVERVIEW
Method to add a column to an existing iSheet
Request URI
POST /api/3/isheets/admin/{isheetid}/columns
Request Body
<columns>
a list of column objects
</columns>
Response
If the operation is successful, the API returns a progressive key resource object. Using the progressive key, an API user can see the status of an iSheet columns. In case of a failure, an error object is returned with the appropriate error code.
To get the status of an iSheet columns based on a progressive key
POST /api/3/progressivekeystatus/{progressive_key}
Name | Type | Description |
---|---|---|
progressive_key | String | This key is returned when a long-running operation is called and can be used to find the final status of the operation |
If the operation is successful, the API returns a progressive key resource object. The possible status values are "still in-progress", "done" or "failed". In the case of a failure, an error object is returned with the appropriate error code.
Andrew Quinn thanks for highlighting the issue here and also raising a support request for it. We will investigate and resolve the issue if it exists. Thanks
Hi Imran Aziz, I've encountered another bug in this endpoint. I've already raised this with support, and this is to also let others know of the issue (tested on Collaborate 4.4.4 instance)
Issue:
Creating a Number column with a decimal place configuration (e.g. 1), and a default value (e.g. 1.5) results in a failure response. It seems the default value only works if (empty), or value is an Integer.
For example:
Example Number Field
4
9999
1.0
100
0
1
1
0
0
Response from example will be:
{
"column": [
{
"index": 1,
"columnid": null,
"name": "Example Number Field",
"status": "Failure",
"statuscode": "403",
"message": "Invalid default value"
}
],
"failedEntities": 1,
"successEntities": 0
}
Andrew Quinn very sorry for hitting that many bugs, I have raised the issue with the technical team and will keep you posted. We plan to resolve these issue in Collaborate 4.3.4. Thanks
Hi Imran Aziz, can you log the following BUGs please:
BUG #1 - Cannot create a Date AND Time column (formattype = DATE_TIME) using the Add Column API
For example, if I post the following request:
POST https://**************/api/3/isheets/admin/1353/columns HTTP/1.1 Accept: application/json Auth-Type: OAUTH2 Authorization: Bearer ************** Content-Type: application/xml Content-Length: 537 host: ************** Connection: closeExpiry Date 5 2533 <![CDATA[Test]]> 0 NONE 120 0 1 DATE_TIME <![CDATA[DD MMM YYYY]]>
Then the response is:
HTTP/1.1 403 403 Date: Fri, 23 Feb 2018 03:54:04 GMT Server: Apache Cache-Control: no-cache, no-store Pragma: no-cache X-XSS-Protection: 1; mode=block Strict-Transport-Security: max-age=31536000; includeSubDomains X-Content-Type-Options: nosniff X-Ratelimit-Limit: 500 X-Ratelimit-Remaining: 497 X-Ratelimit-Reset: 1519318633 X-Ratelimit-Relative-Reset: 189 Expires: Thu, 01 Jan 1970 00:00:00 GMT Content-Type: application/json;charset=utf-8 Content-Length: 177 Connection: close {"column":[{"index":1,"columnid":null,"name":"Expiry Date","status":"ERROR","statuscode":"403","message":"Validation failed/ Forbidden"}],"failedEntities":1,"successEntities":0}
However, if I change the formattype to DATE_ONLY and submit the same request, it completes and creates the column (which leads me on to a second issue).
BUG #2 - In the above example when submitting a request, that only specifies one column to create, the response doesn't contain the required progressive key object, instead we get the following:
HTTP/1.1 200 200 {"column":[{"index":1,"columnid":13398,"name":"Expiry Date TEST","status":"SUCCESS","statuscode":"200","message":"Column added successfully"}],"failedEntities":0,"successEntities":1}
when we should get something like this, as stated in this wiki
HTTP/1.1 200 200 {"progressivekey":null,"siteid":null,"progressivekeystatus":null,"userid":null,"responsebody":null,"message":null,"messagecode":null,"integrationResponseDBO":null,"columns":{"column":[{"index":1,"columnid":13399,"name":"Expiry Date TEST 1","status":"SUCCESS","statuscode":"200","message":"Column added successfully"}]},"error":null,"downloadlink":null}
Thanks, Andrew
Andrew Quinn I have raised the bug, thanks for bringing it to our notice.
Hi Imran Aziz, can you log the following BUG please:
If you post an AutoIncrement column object, where the minlength property is zero, e.g.
<![CDATA[]]>
The response is a 403 error message which details that minlength needs to be a number between 0 and 10, i.e.
{
"column": [
{
"index": 1,
"columnid": null,
"name": "Expert ID",
"status": "Failure",
"statuscode": "403",
"message": "Enter only numeric values between 0 and 10 in auto-increment minimum length"
}
]
}
Posting a non-zero value works.
Thanks, Andrew
Comments
6 Comments