Mass operation APIs are designed to perform the same set of operations for multiple records on a sheet in one single request.
There are two ways of specifying the records to be updated:
https://www.ragic.com/< account >/< tab folder >/< sheet index >/massOperation/< Mass Operation Type >?api&where=< Field ID >,< Filter Operand >,< Value >
https://www.ragic.com/< account >/< tab folder >/< sheet index >/massOperation/< Mass Operation Type >?api&recordId=< recordId >
HTTP Method - POST URL - https://www.ragic.com/< account >/< tab folder >/< sheet index >/massOperation/< Mass Operation Type >?api Headers Authorization: Basic < API Key > Body { // JSON data that describes the operation to be performed } ========== Response { "taskId": < A UUID That Identifies The Task > }
The mass lock API allows locking or unlocking multiple records at once.
HTTP Method - POST URL - https://www.ragic.com/< account >/< tab folder >/< sheet index >/massOperation/massLock?api { "action": < lock or unlock > } ========== Response { "taskId": "6dbc796a-07d5-475b-b578-d254eb30f7d2" }
The mass approval API allows approval or rejection of multiple records at once.
HTTP Method - POST URL - https://www.ragic.com/< account >/< tab folder >/< sheet index >/massOperation/massApproval?api { "action": < approve or reject >, "comment": < optional comment > // optional } ========== Response { "taskId": "6dbc796a-07d5-475b-b578-d254eb30f7d2" }
The mass action button API allows the execution of an action button on multiple records at once.
HTTP Method - POST URL - https://www.ragic.com/< account >/< tab folder >/< sheet index >/massOperation/massActionButton?api { "buttonId": < button ID > } ========== Response { "taskId": "6dbc796a-07d5-475b-b578-d254eb30f7d2" }
To Fetch The List Of Available Action Buttons On A Sheet
HTTP Method - GET URL - https://www.ragic.com/< account >/< tab folder >/< sheet index >/metadata/actionButton?api&category=massOperation ========== Response { "actionButtons": [ { "id": < button ID 1 >, "name": < button name 1 > }, ..... ,{ "id": < button ID 2 >, "name": < button name 2 > } ] }
The mass update API allows updates of field values on multiple records at once.
HTTP Method - POST URL - https://www.ragic.com/< account >/< tab folder >/< sheet index >/massOperation/massUpdate?api { "action": [ { "field": < Field ID >, "value": < New Field Value > } ] } ========== Response { "taskId": "6dbc796a-07d5-475b-b578-d254eb30f7d2" }
The mass update API also supports using on Internal Users and External Users, but there are some restrictions.
The following fields cannot be mass updated:
Mass updating Ragic Groups (domainId: 3) has to follow the rules below:
HTTP Method - POST URL - https://www.ragic.com/< account >/< tab folder >/< sheet index >/massOperation/massUpdate?api { "action": [ { "field": 3, "value": "[\"SYSAdmin\"]" } ] } ========== Response { "taskId": "6dbc796a-07d5-475b-b578-d254eb30f7d2" }
The mass search and replace API allows value replacement on multiple records at once.
Mass Search And Replace Document
HTTP Method - POST URL - https://www.ragic.com/< account >/< tab folder >/< sheet index >/massOperation/massSearchReplace?api { "action": [ { "field": < Field ID >, "valueReplaced": < Value To Be Replaced >, "valueNew": < Value To Replace With >, } ] } ========== Response { "taskId": "6dbc796a-07d5-475b-b578-d254eb30f7d2" }
Mass operations are asynchronous operations.
The task Id of the operation can be used to monitor its progress.
HTTP Method - GET URL - https://www.ragic.com/< account >?api&taskId=< task ID > ========== Response { "id": < task ID >, "ap": < account >, "taskName": < task name >, "status": < status > }