curl --request GET \
--url https://api.zivio.net/api/v4/tasks/{id} \
--header 'Authorization: Bearer <token>' \
--header 'zivio-tenant-id: <api-key>'import requests
url = "https://api.zivio.net/api/v4/tasks/{id}"
headers = {
"Authorization": "Bearer <token>",
"zivio-tenant-id": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Authorization: 'Bearer <token>', 'zivio-tenant-id': '<api-key>'}
};
fetch('https://api.zivio.net/api/v4/tasks/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.zivio.net/api/v4/tasks/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"zivio-tenant-id: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.zivio.net/api/v4/tasks/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("zivio-tenant-id", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.zivio.net/api/v4/tasks/{id}")
.header("Authorization", "Bearer <token>")
.header("zivio-tenant-id", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zivio.net/api/v4/tasks/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
request["zivio-tenant-id"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": 101,
"name": "Acme Corporation",
"description": "Complete redesign of corporate website with modern UX",
"status": "completed",
"due_on": "2024-01-16",
"overdue": false,
"taskable_type": "Example taskable_type",
"taskable_id": 501,
"taskable_scope": "Example taskable_scope",
"subject": {
"type": "JobTriggeredApprovalStep",
"id": 55,
"resource": {
"type": "Project",
"id": 123
},
"project_id": 123,
"project_title": "Website Redesign",
"supplier_name": "Acme Consulting"
},
"api_actions": [
{
"method": "POST",
"path": "/api/v4/projects/123/approve"
}
],
"completed_at": "2024-01-16T10:30:00+00:00",
"completed_by": {
"id": 7,
"name": "Jane Doe"
},
"assignees": [
{
"id": 7,
"name": "Jane Doe",
"dismissed": false
}
],
"dismissed": false,
"ui_path": "/hiring/projects/123",
"created_at": "2024-01-16T10:30:00+00:00",
"updated_at": "2024-01-16T10:30:00+00:00"
}Get a Task
curl --request GET \
--url https://api.zivio.net/api/v4/tasks/{id} \
--header 'Authorization: Bearer <token>' \
--header 'zivio-tenant-id: <api-key>'import requests
url = "https://api.zivio.net/api/v4/tasks/{id}"
headers = {
"Authorization": "Bearer <token>",
"zivio-tenant-id": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Authorization: 'Bearer <token>', 'zivio-tenant-id': '<api-key>'}
};
fetch('https://api.zivio.net/api/v4/tasks/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.zivio.net/api/v4/tasks/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"zivio-tenant-id: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.zivio.net/api/v4/tasks/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("zivio-tenant-id", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.zivio.net/api/v4/tasks/{id}")
.header("Authorization", "Bearer <token>")
.header("zivio-tenant-id", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.zivio.net/api/v4/tasks/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
request["zivio-tenant-id"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": 101,
"name": "Acme Corporation",
"description": "Complete redesign of corporate website with modern UX",
"status": "completed",
"due_on": "2024-01-16",
"overdue": false,
"taskable_type": "Example taskable_type",
"taskable_id": 501,
"taskable_scope": "Example taskable_scope",
"subject": {
"type": "JobTriggeredApprovalStep",
"id": 55,
"resource": {
"type": "Project",
"id": 123
},
"project_id": 123,
"project_title": "Website Redesign",
"supplier_name": "Acme Consulting"
},
"api_actions": [
{
"method": "POST",
"path": "/api/v4/projects/123/approve"
}
],
"completed_at": "2024-01-16T10:30:00+00:00",
"completed_by": {
"id": 7,
"name": "Jane Doe"
},
"assignees": [
{
"id": 7,
"name": "Jane Doe",
"dismissed": false
}
],
"dismissed": false,
"ui_path": "/hiring/projects/123",
"created_at": "2024-01-16T10:30:00+00:00",
"updated_at": "2024-01-16T10:30:00+00:00"
}Authorizations
OAuth 2.0 client credentials. The access token from POST /oauth/token is sent as a bearer token. Request only the scopes you need.
Your Zivio organisation identifier. The regional API endpoints serve every Zivio organisation, so each request must identify yours.
Path Parameters
Task ID
Response
Task details
pending, completed, cancelled "pending"
true
What the task is about: the internal taskable, the record the api_actions act on, and the project it belongs to when there is one
Show child attributes
Show child attributes
V4 operations that action this kind of task, with ids filled in where known. Empty means the task can only be actioned in the web UI (use ui_path). Actioning the underlying record completes the task automatically, so prefer these over POST /tasks/{id}/complete.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Every user the task was assigned to, with whether each has dismissed it
Show child attributes
Show child attributes
true
Relative web UI path for a human to action the task
"/hiring/projects/123"

