Special Considerations
3 minutes to readEncoding Query and Body Parameters
Calls to the resource endpoint usually involves sending query and/or body parameters, usually enclosed in brackets {}. Everything between and including the brackets {} must be encoded. While some clients automatically encode the URL and the body, in many other cases it may remain your responsibility to do the encoding. Your programming language may provide a way for encoding strings. Various interactive web based encoders are also available and can be found using a search engine.
As an example encoded {“where”:”Name=’Mike'”} is %7B%22where%22%3A%22Name%3D’Mike’%22%7D and encoded {“Status”:”Updated”} is %7B%22Status%22%3A%22Updated%22%7D.
Limits
The following limits apply to REST API operations:
- A call can return a maximum of 1,000 records.
- The maximum length of a request URI is 2047 characters.
Only HTTPS Allowed
Calls to Caspio REST API URLs must be made using the HTTPS protocol.
PK_ID Fields
In addition to user-defined fields, all Caspio tables and views include a system-defined field called PK_ID. In tables, PK_ID is a long integer, while in views, it is a string containing a comma-separated list of the source tables’ PK_ID values. This field is automatically created and maintained by Caspio—you cannot delete, modify, or update it, either through the Caspio interface or the REST API.
The PK_ID field is included in REST API responses when table records are retrieved. To display the PK_ID values for your records within Caspio, open the table design, add a new field with the Formula data type, and use [@field:PK_ID] as the formula. In Datasheet view, the PK_ID values will be displayed in the new field.
Password Fields
Password fields are special data type fields that are meant for storing encrypted values. You cannot obtain the value stored in password fields. All requests that attempt to get their values via Select or in other ways such as in Criteria, cause an error. When all fields of a table or view are returned via “Select *” or empty field list, password fields are skipped.
Password fields can be set to their initial value during an Insert operation. However, their values cannot be changed using the standard Update method. A special password update method is available to change the value of password fields.
Response Date Format
All dates in Caspio REST API response are in ISO 8601 format.
Alternatives to PUT and DELETE Methods
If PUT and DELETE methods are prohibited in your client, you can use the custom header X-HTTP-Method-Override to make such requests using POST. To do this, just add the following header to a POST request. For example:
Parameter Name: X-HTTP-Method-Override Parameter Value: PUT or DELETE