Unicat API Reference

Up - API Reference - Home


We can use Excel to do bulk-updates for records. First, you download an Excel file that is prepared with record, definition, and field information. Use Excel to modify the data, then upload it to propagate the changes.

This is the download step. The upload step can be found in excel/update.

/api/p/<project gid>/records/excel/children

Requires JWT.

Get an Excel sheet for editing the fields of the children of a record in the tree (in a given language).

Request

You get the children by specifying the gid in the record parameter, and the language to get the correct localization.

POST /api/p/<project gid>/records/excel/children
Authorization: Bearer <JWT>

{
    "record": "<record gid>",
    "language": "en"
}

record is the record's gid, the parent of the children.
language (project) language for the data in the Excel sheet.

Success response

Authorization: <JWT>

{
    "success": true,
    "result": {
        "children.excel": "cc-<groupname>-children.xlsx"
    },
    "data": {
        "files": {
            "cc-<groupname>-children.xlsx": "UEsDBBQAAAAIAANznFQHQU1igQAAALEAAAAQAAA…"
            
        }
    }
}

result

children.excel the key (filename) for the file-data.

data

files File data, base-64 encoded. Unordered.

For Excel files, the content-type is application/vnd.openxmlformats-officedocument.spreadsheetml.sheet. You can construct a dataurl by prepending data:application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;base64, to the base-64 encoded data.

Error responses

400 Bad request - missing parameters or wrong type or value
401 Unauthorized - missing or expired JWT
403 Forbidden - not a member of this project
422 Unprocessable entity - can't work with this item