Migration from REST API v2 to v3
2 minutes to readIf you are currently using Caspio REST API version 2, we highly recommend migrating to version 3 to experience new features, including the new Swagger UI with OpenAPI Specification version 3.0, new operations, and new endpoints.
To migrate your application to REST API v3, you need to update base URL for REST API endpoints in your application from:
https://<your-integration-URL>.caspio.com/rest/v2
to:
https://<your-integration-URL>.caspio.com/integrations/rest/v3
Example: update https://c0abc123.caspio.com/rest/v2/tables
to: https://c0abc123.caspio.com/integrations/rest/v3/tables.
Changes introduced in REST API v3 are listed below.
General changes
- Error handling was improved. There are new HTTP codes and error texts.
- The operationId values for REST API endpoints in the Swagger UI (OpenAPI) documentation were revised for improved consistency and clarity. If you use tools or code generators (such as Swagger Codegen, OpenAPI Generator, or NSwag) to create client codes, SDKs, or API documentation based on the Swagger file, note that the generated method names in v3 will differ due to updated operationId values.
New operation types
Directories operations were introduced with the following capabilities:
- Returning the list of directories using GET operations
- Creating, updating, and deleting users, as well as returning a list of users
- Activating users with POST operations
Operations updates
- In the table operations that are used to update fields:
- The PUT request schema was changed to be the same as the POST request schema: the word “New” was removed from the names of properties.
- In GET, POST, and PUT operations, attachment-related properties were added.
- In files operations:
- Files and Folders operations were separated. In v3, GET /v3/files returns files only, whereas a new operation, GET /v3/files/folders is used to return folders.
- Both GET /v3/files and GET /v3/files/folders have additional pagination and sorting options.
- Data import/export tasks endpoints were renamed from /v2/tasks/ to /v3/dataImportExportTasks
- In applications operations:
- All endpoints were renamed from /v2/applications/ in v2 to v3/bridgeApplications/ in v3.
- Deploying and undeploying DataPages is handled using a PUT operation with a parameter. In v2, both PUT and DELETE operations were necessary.
Full list of REST API v3 operations is available on Swagger UI.