Przejdź do głównej zawartości

task

Dla: Programista

ZapytanieBetaQuery.task

One production task by its identifier; null when there is no such task.

Wymagany zakresproduction:read
Dostępne odPrynt 0.28.0
StabilnośćBeta (co to znaczy)

Argumenty

NazwaTypOpis
idwymaganeID!

Identifier of the task.

Zwraca

Task

Przykład

Zapytanie
query Task($id: ID!) {
task(id: $id) {
id
title
currentStatus
machineId
startedAt
completedAt
operation {
id
description
quantity
quantityCompleted
unit
productionStatus
}
}
}
Zmienne
{
"id": "5a6b7c8d-9e0f-4a1b-8c2d-3e4f5a6b7c02"
}
Wywołanie (curl)
curl -sS https://twoja-drukarnia.prynt.pl/api/v1/graphql \
-H "Authorization: Bearer $PRYNT_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @- <<'JSON'
{
"query": "query Task($id: ID!) {\n task(id: $id) {\n id\n title\n currentStatus\n machineId\n startedAt\n completedAt\n operation {\n id\n description\n quantity\n quantityCompleted\n unit\n productionStatus\n }\n }\n}",
"variables": {
"id": "5a6b7c8d-9e0f-4a1b-8c2d-3e4f5a6b7c02"
}
}
JSON
Odpowiedź
{
"data": {
"task": {
"id": "5a6b7c8d-9e0f-4a1b-8c2d-3e4f5a6b7c02",
"title": "Foliowanie mat — 1084/2026",
"currentStatus": "IN_PROGRESS",
"machineId": "4e5f6a7b-8c9d-4e0f-9a1b-2c3d4e5f6a7b",
"startedAt": "2026-10-06T09:05:00.000Z",
"completedAt": null,
"operation": {
"id": "2b3c4d5e-6f7a-4b8c-9d0e-1f2a3b4c5d02",
"description": "Foliowanie mat 1+0",
"quantity": 2500,
"quantityCompleted": 900,
"unit": "SHEETS",
"productionStatus": "IN_PROGRESS"
}
}
}
}