Execute the specified query
POSThttps://nildb-node-a50d.sandbox.app-cluster.sandbox.nilogy.xyz/api/v1/queries/execute
Execute the specified query
Request
- application/json
Bodyrequired
id uuidrequired
The query uuid to execute
variables objectrequired
Key value pairs to use as the query's runtime variables
Responses
- 200
- 400
- 401
The query execution result
- application/json
- Schema
- Example (auto)
Schema
data objectrequired
The query execution result
{
"data": {}
}
Validation or processing errors
- application/json
- Schema
- Example (auto)
Schema
ts date-timerequired
The time of the error according to the node.
errors object[]required
{
"ts": "2024-07-29T15:51:28.071Z",
"errors": [
"string",
{
"code": "string",
"message": "string"
}
]
}
Missing or invalid JWT
Authorization: http
name: jwttype: httpscheme: bearerbearerFormat: JWTdescription: A DID-JWT using the ES256K algorithm for authenticated endpoints. JWT payload must include: - iat: Issued at timestamp - exp: Expiration timestamp (recommended) - aud: Target node decentralised identifier (DID) - iss: Client's decentralised identifier (DID)
- csharp
- curl
- dart
- go
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- powershell
- python
- r
- ruby
- rust
- shell
- swift
- HTTPCLIENT
- RESTSHARP
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://nildb-node-a50d.sandbox.app-cluster.sandbox.nilogy.xyz/api/v1/queries/execute");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("Authorization", "Bearer <TOKEN>");
var content = new StringContent("{\n \"id\": \"3fa85f64-5717-4562-b3fc-2c963f66afa6\",\n \"variables\": {}\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
ResponseClear