Guide du développeur API
Comment pouvons-nous vous aider ?
Recherche intégrale du site

Mass Operation

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:

  • where filters
  • https://www.ragic.com/< account >/< tab folder >/< sheet index >/massOperation/< Mass Operation Type >?api&where=< Field ID >,< Filter Operand >,< Value >
    
  • recordId in query string, recordId=< recordId >. e.g. recordId=1&recordId=2
  • https://www.ragic.com/< account >/< tab folder >/< sheet index >/massOperation/< Mass Operation Type >?api&recordId=< recordId >
    

Request Format

  • Mass operation APIs are aynschronous operations.
  • It is required to modify www to na3, ap5, or eu2 in the API URL based on your Ragic database account URL.
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 >
}

Mass Lock

The mass lock API allows locking or unlocking multiple records at once.

Mass Lock Document

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"
}

Mass Approval

The mass approval API allows approval or rejection of multiple records at once.

Mass Approval Document

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"
}

Mass Action Button

The mass action button API allows the execution of an action button on multiple records at once.

Mass Action Button Document

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 >
}
]
}

Mass Update

The mass update API allows updates of field values on multiple records at once.

Mass Update Document

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:

  • E-mail (domainId: 1)
  • Full Name (domainId: 4)
  • System Log (domainId: 10)
  • Status (domainId: 31)
  • Internal/External (domainId: 43)


Mass updating Ragic Groups (domainId: 3) has to follow the rules below:

  • The value of the key "value" has to be written in JSON Array, which has strings as its content.
  • All special characters has to be used with escape character(\), especially " has to be used as \".
  • 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"
    }
    
  • In Internal Users, it is necessary to have at least one user who's Ragic Group is SYSAdmin.
  • In External Users, the name of users' Ragic Group has to start with "x-" or "X-".

Mass Search And Replace

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"
}

Task Progress Tracking

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 >
}

Haut de page Table des matières

Essayer Ragic gratuitement

Connectez-vous avec Google