iSheets API version 2 - iSheet module - API - iSheet item - create
OVERVIEW
Use this method to add a new iSheet item. Multiple iSheets can be supported.
POST /api/3/isheet/{isheetid}/items
isheetid |
number |
The ID of the isheet |
Request body
Send an iSheet item - common object - add/edit iSheet item - common object - add/edit
Response
Case 1 : If there is an error in column data, the method will return a 403 http response for an unsuccessful request
<items>
<item>
<index>1</index>
<columns>
<column>
<columnid>1216</columnid>
<status>ERROR</status>
<statuscode>403</statuscode>
<message>#Name is required</message>
</column>
<column>
<columnid>1357</columnid>
<status>ERROR</status>
<statuscode>403</statuscode>
<message>#Invalid number for pincode</message>
</column>
</columns>
</item>
</items>
Case 2 : If the method is processed correctly, it will return a 200 http response for a successful request
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 item. In the case of a failure, an error object is returned with the appropriate error code.
To get the status of an iSheet item 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 |
Response
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<progressivekeyresponse>
<items>
<item>
<itemid>1232</itemid>
<status>SUCCESS</status>
<statuscode>200</statuscode>
<message>#Record added successfully</message>
</item>
<item>
<itemid>1233</itemid>
<status>SUCCESS</status>
<statuscode>200</statuscode>
<message>#Record added successfully</message>
</item>
</items>
</progressivekeyresponse>
Note: Multiple isheet records are allowed while inserting.
Let us know how you get on (to help future others that come across similar issues). For those playing along at home, what we are talking about is the url path required for accessing the API. So if we were to take this site as an example, then the API url would be:
https://collaborate.highq.com/sitepoint/api/3/isheet/99999/items
Swagger UI would be:
https://collaborate.highq.com/sitepoint/showSwaggerUI.action#/ISheet%20Module/insertISheetItems
Thanks Andrew, I changed the path to include what I think is the correct additional path and now it gives a HTTP 401 error. Thank you, I wasnt sure about the externalid. It should be a normal isheet. Thanks I will try the swagger method in the mean time.
Nothing from the above sticks out that would be causing a HTTP 301 to be returned.
Normally there is an additional path component before "/api/3/..." but I'm guessing this is more a cut'n'paste omission, and besides that would result in a 404. There's an undefined text after the
Is this a standard (normal) isheet, or is it a file/task iSheet?
Have you tried using the Swagger UI (https://.../showSwaggerUI.action#/ISheet%20Module/insertISheetItems) to add the record? Just to rule out any strange behaviour with the POST your platform is doing? What is this the environment you are implementing in?
Other than that, it will need High Support to look at the server side of things to ascertain why it's returning a 301.
Andrew
Im using this basically https://{host}.com/api/3/isheet/{id}/items with the "application/xml" header, the test data is `
That's a strange error code to receive. Can you supply the url you are POSTing to (obfuscate the actual host part of the url), and the body of the post (test data). Any headers would also be useful, though (again) obfuscate the access token.
Why would this produce a 301 http error?
Comments
6 Comments