curl --request PUT \
--url https://api-dev.narrative.io/v2/queries/{query_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "updated name",
"tags": [
"tag3"
]
}
'{
"name": "query1",
"id": "7409b999-2a9a-40cd-89dc-8430d85e0391",
"display_name": "Query One",
"owner": {
"company_id": 456,
"company_name": "ExampleCorp",
"company_slug": "examplecorp"
},
"tags": [
"tag1",
"tag2"
],
"collaborators": {
"query": {
"type": "inclusion",
"company_ids": [
789
]
},
"view": {
"type": "all"
}
},
"is_owned": true,
"metadata": {
"created_at": "2024-04-12T19:57:05.012908",
"created_by_user_id": 321,
"updated_at": "2024-04-12T20:03:48.031825",
"updated_by_user_id": 321
},
"ast": {
"type": "select",
"nql": "SELECT age FROM narrative.rosetta_stone",
"budget": null,
"columns": [
{
"type": "table",
"nql": "age",
"db": null,
"schema": null,
"table": "age"
}
],
"from": {
"type": "table",
"nql": "narrative.rosetta_stone",
"db": null,
"schema": "narrative",
"table": "rosetta_stone"
},
"group_by": [],
"having": null,
"is_distinct": false,
"limit": null,
"order_by": [],
"qualify": null,
"where": null,
"windows": [],
"with": []
}
}Updates a query
curl --request PUT \
--url https://api-dev.narrative.io/v2/queries/{query_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "updated name",
"tags": [
"tag3"
]
}
'{
"name": "query1",
"id": "7409b999-2a9a-40cd-89dc-8430d85e0391",
"display_name": "Query One",
"owner": {
"company_id": 456,
"company_name": "ExampleCorp",
"company_slug": "examplecorp"
},
"tags": [
"tag1",
"tag2"
],
"collaborators": {
"query": {
"type": "inclusion",
"company_ids": [
789
]
},
"view": {
"type": "all"
}
},
"is_owned": true,
"metadata": {
"created_at": "2024-04-12T19:57:05.012908",
"created_by_user_id": 321,
"updated_at": "2024-04-12T20:03:48.031825",
"updated_by_user_id": 321
},
"ast": {
"type": "select",
"nql": "SELECT age FROM narrative.rosetta_stone",
"budget": null,
"columns": [
{
"type": "table",
"nql": "age",
"db": null,
"schema": null,
"table": "age"
}
],
"from": {
"type": "table",
"nql": "narrative.rosetta_stone",
"db": null,
"schema": "narrative",
"table": "rosetta_stone"
},
"group_by": [],
"having": null,
"is_distinct": false,
"limit": null,
"order_by": [],
"qualify": null,
"where": null,
"windows": [],
"with": []
}
}Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Query identifier.
It should be unique. Must be <= 256 characters and consist of only alphanumeric characters and underscores.
Optional. Display Name must be non-empty and less than 1000 chars.
A human-friendly description of the query.
Optional. Each tag must be less than 256 chars.
Describes who can view or query a resource
Show child attributes
The AST representing the query.
OK
It should be unique. Must be <= 256 characters and consist of only alphanumeric characters and underscores.
Describes who can view or query a resource
Show child attributes
Information about the owner of the query
Show child attributes
Metadata about when and by whom a query was created/updated
Show child attributes
The AST representing the query.
Optional. Display Name must be non-empty and less than 1000 chars.
A human-friendly description of the query.
Optional. Each tag must be less than 256 chars.
Whether the requestor owns the query.