JavaScript
import Cadenya from '@cadenya/cadenya';
const client = new Cadenya({
apiKey: process.env['CADENYA_API_KEY'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const objectiveTask of client.objectives.tasks.list('obj_01HXKD2E5NQM3T9AYWCFQAZGFV', {
workspaceId: 'workspace_01HXKD2E5NQM3T9AYWCF133E3Q',
})) {
console.log(objectiveTask.data);
}import os
from cadenya import Cadenya
client = Cadenya(
api_key=os.environ.get("CADENYA_API_KEY"), # This is the default and can be omitted
)
page = client.objectives.tasks.list(
objective_id="obj_01HXKD2E5NQM3T9AYWCFQAZGFV",
workspace_id="workspace_01HXKD2E5NQM3T9AYWCF133E3Q",
)
page = page.items[0]
print(page.data)package main
import (
"context"
"fmt"
"go.cadenya.com/cadenya-go"
"go.cadenya.com/cadenya-go/option"
)
func main() {
client := cadenya.NewClient(
option.WithAPIKey("My API Key"),
)
page, err := client.Objectives.Tasks.List(
context.TODO(),
"obj_01HXKD2E5NQM3T9AYWCFQAZGFV",
cadenya.ObjectiveTaskListParams{
WorkspaceID: cadenya.String("workspace_01HXKD2E5NQM3T9AYWCF133E3Q"),
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}
require "cadenya"
cadenya = Cadenya::Client.new(api_key: "My API Key")
page = cadenya.objectives.tasks.list(
"obj_01HXKD2E5NQM3T9AYWCFQAZGFV",
workspace_id: "workspace_01HXKD2E5NQM3T9AYWCF133E3Q"
)
puts(page)cadenya objectives:tasks list \
--api-key 'My API Key' \
--workspace-id workspace_01HXKD2E5NQM3T9AYWCF133E3Q \
--objective-id obj_01HXKD2E5NQM3T9AYWCFQAZGFVcurl --request GET \
--url https://api.cadenya.com/v1/workspaces/{workspaceId}/objectives/{objectiveId}/tasks \
--header 'Authorization: Bearer <token>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cadenya.com/v1/workspaces/{workspaceId}/objectives/{objectiveId}/tasks",
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>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://api.cadenya.com/v1/workspaces/{workspaceId}/objectives/{objectiveId}/tasks")
.header("Authorization", "Bearer <token>")
.asString();{
"items": [
{
"metadata": {
"id": "<string>",
"name": "<string>"
},
"data": {
"number": 123,
"task": "<string>",
"completed": true,
"completedAt": "2023-11-07T05:31:56Z"
}
}
],
"pagination": {
"nextCursor": "<string>"
}
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}Objectives
List objective tasks
Lists all tasks for an objective
GET
/
v1
/
workspaces
/
{workspaceId}
/
objectives
/
{objectiveId}
/
tasks
JavaScript
import Cadenya from '@cadenya/cadenya';
const client = new Cadenya({
apiKey: process.env['CADENYA_API_KEY'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const objectiveTask of client.objectives.tasks.list('obj_01HXKD2E5NQM3T9AYWCFQAZGFV', {
workspaceId: 'workspace_01HXKD2E5NQM3T9AYWCF133E3Q',
})) {
console.log(objectiveTask.data);
}import os
from cadenya import Cadenya
client = Cadenya(
api_key=os.environ.get("CADENYA_API_KEY"), # This is the default and can be omitted
)
page = client.objectives.tasks.list(
objective_id="obj_01HXKD2E5NQM3T9AYWCFQAZGFV",
workspace_id="workspace_01HXKD2E5NQM3T9AYWCF133E3Q",
)
page = page.items[0]
print(page.data)package main
import (
"context"
"fmt"
"go.cadenya.com/cadenya-go"
"go.cadenya.com/cadenya-go/option"
)
func main() {
client := cadenya.NewClient(
option.WithAPIKey("My API Key"),
)
page, err := client.Objectives.Tasks.List(
context.TODO(),
"obj_01HXKD2E5NQM3T9AYWCFQAZGFV",
cadenya.ObjectiveTaskListParams{
WorkspaceID: cadenya.String("workspace_01HXKD2E5NQM3T9AYWCF133E3Q"),
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}
require "cadenya"
cadenya = Cadenya::Client.new(api_key: "My API Key")
page = cadenya.objectives.tasks.list(
"obj_01HXKD2E5NQM3T9AYWCFQAZGFV",
workspace_id: "workspace_01HXKD2E5NQM3T9AYWCF133E3Q"
)
puts(page)cadenya objectives:tasks list \
--api-key 'My API Key' \
--workspace-id workspace_01HXKD2E5NQM3T9AYWCF133E3Q \
--objective-id obj_01HXKD2E5NQM3T9AYWCFQAZGFVcurl --request GET \
--url https://api.cadenya.com/v1/workspaces/{workspaceId}/objectives/{objectiveId}/tasks \
--header 'Authorization: Bearer <token>'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cadenya.com/v1/workspaces/{workspaceId}/objectives/{objectiveId}/tasks",
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>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.get("https://api.cadenya.com/v1/workspaces/{workspaceId}/objectives/{objectiveId}/tasks")
.header("Authorization", "Bearer <token>")
.asString();{
"items": [
{
"metadata": {
"id": "<string>",
"name": "<string>"
},
"data": {
"number": 123,
"task": "<string>",
"completed": true,
"completedAt": "2023-11-07T05:31:56Z"
}
}
],
"pagination": {
"nextCursor": "<string>"
}
}{
"code": 123,
"message": "<string>",
"details": [
{
"@type": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Example:
"workspace_01HXKD2E5NQM3T9AYWCF133E3Q"
The ID of the objective. Supports "external_id:" prefix for external IDs.
Example:
"obj_01HXKD2E5NQM3T9AYWCFQAZGFV"
Query Parameters
Maximum number of results to return
Pagination cursor from previous response
Sort order for results
⌘I