Up - API Reference - Home
Requires JWT
Update an existing query.
You cannot change the type
of a query.
POST /api/p/<project gid>/queries/update
Authorization: Bearer <JWT>
{
"query": "<query gid>",
"filter": ["or", "",
[
["validation", "not_translated", "name"],
["validation", "not_translated", "description"],
["validation", "not_translated", "summary"],
],
]
}
query
the gid of the query that is updated
These are all optional, but at least one must be provided.
name
a user-defined name for the query
q
search terms, like '+cms 225'
filter
json with nested filter specification (see the basic workings of a filter)
Note: if the name exists within a type, a serial number is appended to make it unique.
Authorization: <JWT>
{
"success": true,
"result": {
"query": "96ec02b2-fb8d-4fb4-b952-fad0c4b88a74"
},
"data": {
"queries": {
"96ec02b2-fb8d-4fb4-b952-fad0c4b88a74": {
…
}
}
}
}
query
the updated query.
queries
Query info with type, name, q, and filter.
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 - cannot perform update