Unicat API Reference

Up - API Reference - Home


/api/p/<project gid>/queries/copy

Requires JWT

Make a copy of an existing query.

Request

POST /api/p/<project gid>/queries/copy
Authorization: Bearer <JWT>

{
    "query": "<query gid>",
}

query the gid of the query that is copied

Note: a serial number is appended to the name if needed to make it unique within the type.

Success response

Authorization: <JWT>

{
    "success": true,
    "result": {
        "query": "79d66148-e16f-41b7-b013-a51fa7e8dbf1"
    },
    "data": {
        "queries": {
            "79d66148-e16f-41b7-b013-a51fa7e8dbf1": {
                
            }
        }
    }
}

result

query the gid for the newly created copy of the query.

data

queries Query info with type, name, q, and filter.

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