API開発者ガイド
なんか問題がある?心配しないで、答えは全部ここにいる。
全サイト検索

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

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

一番上に戻る 目次

無料でRagicを始める

Googleアカウントに登録