Saved filters
Create a saved filter
Allows users to create a new view within their workspace by specifying filters and configurations for boards, cards, or pages. The request must include a name, type (board, card, or page), and optional filtering criteria such as projects, members, or time ranges. Shared views can be created by setting the shared parameter.
POST
/
{team_id}
/
views
Create a view
curl --request POST \
--url https://api.superthread.com/v1/{team_id}/views \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"board_filters": {
"time_created": {
"before": "now-1d",
"after": "1620997103||-2h"
},
"time_updated": {
"before": "now-1d",
"after": "1620997103||-2h"
},
"include": {
"ids": [
"<string>"
],
"content": "<string>",
"projects": [
"<string>"
],
"creators": [
"<string>"
],
"members": [
"<string>"
]
},
"exclude": {
"ids": [
"<string>"
],
"content": "<string>",
"projects": [
"<string>"
],
"creators": [
"<string>"
],
"members": [
"<string>"
]
},
"sort_by": {
"field": "time_created",
"order_ascending": true
}
},
"card_filters": {
"is_parent": true,
"is_child": true,
"has_estimate": true,
"has_members": true,
"has_priority": true,
"has_status": true,
"has_tags": true,
"has_linked_card": true,
"has_due_date": true,
"has_start_date": true,
"has_completed_date": true,
"has_parent_card": true,
"is_archived": true,
"is_watching": true,
"created_from_form": true,
"start_date": {
"before": "now-1d",
"after": "1620997103||-2h"
},
"completed_date": {
"before": "now-1d",
"after": "1620997103||-2h"
},
"due_date": {
"before": "now-1d",
"after": "1620997103||-2h"
},
"time_created": {
"before": "now-1d",
"after": "1620997103||-2h"
},
"time_updated": {
"before": "now-1d",
"after": "1620997103||-2h"
},
"include": {
"ids": [
"<string>"
],
"content": "<string>",
"title": "<string>",
"boards": [
"<string>"
],
"estimates": [
123
],
"lists": [
"<string>"
],
"priority": [
123
],
"projects": [
"<string>"
],
"creators": [
"<string>"
],
"owners": [
"<string>"
],
"members": [
"<string>"
],
"statuses": [
"started"
],
"external_links": [],
"linked_cards": [
"blocks"
],
"tags": [
"<string>"
],
"parent_cards": [
"<string>"
],
"epics": [
"<string>"
]
},
"exclude": {
"ids": [
"<string>"
],
"content": "<string>",
"title": "<string>",
"boards": [
"<string>"
],
"estimates": [
123
],
"lists": [
"<string>"
],
"priority": [
123
],
"projects": [
"<string>"
],
"creators": [
"<string>"
],
"owners": [
"<string>"
],
"members": [
"<string>"
],
"statuses": [
"started"
],
"external_links": [],
"linked_cards": [
"blocks"
],
"tags": [
"<string>"
],
"parent_cards": [
"<string>"
],
"epics": [
"<string>"
]
},
"sort_by": {
"field": "time_created",
"order_ascending": true
}
},
"page_filters": {
"is_archived": true,
"time_created": {
"before": "now-1d",
"after": "1620997103||-2h"
},
"time_updated": {
"before": "now-1d",
"after": "1620997103||-2h"
},
"include": {
"ids": [
"<string>"
],
"content": "<string>",
"projects": [
"<string>"
],
"creators": [
"<string>"
],
"members": [
"<string>"
]
},
"exclude": {
"ids": [
"<string>"
],
"content": "<string>",
"projects": [
"<string>"
],
"creators": [
"<string>"
],
"members": [
"<string>"
]
},
"sort_by": {
"field": "time_created",
"order_ascending": true
}
},
"name": "my view",
"type": "card",
"shared": false
}
'import requests
url = "https://api.superthread.com/v1/{team_id}/views"
payload = {
"board_filters": {
"time_created": {
"before": "now-1d",
"after": "1620997103||-2h"
},
"time_updated": {
"before": "now-1d",
"after": "1620997103||-2h"
},
"include": {
"ids": ["<string>"],
"content": "<string>",
"projects": ["<string>"],
"creators": ["<string>"],
"members": ["<string>"]
},
"exclude": {
"ids": ["<string>"],
"content": "<string>",
"projects": ["<string>"],
"creators": ["<string>"],
"members": ["<string>"]
},
"sort_by": {
"field": "time_created",
"order_ascending": True
}
},
"card_filters": {
"is_parent": True,
"is_child": True,
"has_estimate": True,
"has_members": True,
"has_priority": True,
"has_status": True,
"has_tags": True,
"has_linked_card": True,
"has_due_date": True,
"has_start_date": True,
"has_completed_date": True,
"has_parent_card": True,
"is_archived": True,
"is_watching": True,
"created_from_form": True,
"start_date": {
"before": "now-1d",
"after": "1620997103||-2h"
},
"completed_date": {
"before": "now-1d",
"after": "1620997103||-2h"
},
"due_date": {
"before": "now-1d",
"after": "1620997103||-2h"
},
"time_created": {
"before": "now-1d",
"after": "1620997103||-2h"
},
"time_updated": {
"before": "now-1d",
"after": "1620997103||-2h"
},
"include": {
"ids": ["<string>"],
"content": "<string>",
"title": "<string>",
"boards": ["<string>"],
"estimates": [123],
"lists": ["<string>"],
"priority": [123],
"projects": ["<string>"],
"creators": ["<string>"],
"owners": ["<string>"],
"members": ["<string>"],
"statuses": ["started"],
"external_links": [],
"linked_cards": ["blocks"],
"tags": ["<string>"],
"parent_cards": ["<string>"],
"epics": ["<string>"]
},
"exclude": {
"ids": ["<string>"],
"content": "<string>",
"title": "<string>",
"boards": ["<string>"],
"estimates": [123],
"lists": ["<string>"],
"priority": [123],
"projects": ["<string>"],
"creators": ["<string>"],
"owners": ["<string>"],
"members": ["<string>"],
"statuses": ["started"],
"external_links": [],
"linked_cards": ["blocks"],
"tags": ["<string>"],
"parent_cards": ["<string>"],
"epics": ["<string>"]
},
"sort_by": {
"field": "time_created",
"order_ascending": True
}
},
"page_filters": {
"is_archived": True,
"time_created": {
"before": "now-1d",
"after": "1620997103||-2h"
},
"time_updated": {
"before": "now-1d",
"after": "1620997103||-2h"
},
"include": {
"ids": ["<string>"],
"content": "<string>",
"projects": ["<string>"],
"creators": ["<string>"],
"members": ["<string>"]
},
"exclude": {
"ids": ["<string>"],
"content": "<string>",
"projects": ["<string>"],
"creators": ["<string>"],
"members": ["<string>"]
},
"sort_by": {
"field": "time_created",
"order_ascending": True
}
},
"name": "my view",
"type": "card",
"shared": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
board_filters: {
time_created: {before: 'now-1d', after: '1620997103||-2h'},
time_updated: {before: 'now-1d', after: '1620997103||-2h'},
include: {
ids: ['<string>'],
content: '<string>',
projects: ['<string>'],
creators: ['<string>'],
members: ['<string>']
},
exclude: {
ids: ['<string>'],
content: '<string>',
projects: ['<string>'],
creators: ['<string>'],
members: ['<string>']
},
sort_by: {field: 'time_created', order_ascending: true}
},
card_filters: {
is_parent: true,
is_child: true,
has_estimate: true,
has_members: true,
has_priority: true,
has_status: true,
has_tags: true,
has_linked_card: true,
has_due_date: true,
has_start_date: true,
has_completed_date: true,
has_parent_card: true,
is_archived: true,
is_watching: true,
created_from_form: true,
start_date: {before: 'now-1d', after: '1620997103||-2h'},
completed_date: {before: 'now-1d', after: '1620997103||-2h'},
due_date: {before: 'now-1d', after: '1620997103||-2h'},
time_created: {before: 'now-1d', after: '1620997103||-2h'},
time_updated: {before: 'now-1d', after: '1620997103||-2h'},
include: {
ids: ['<string>'],
content: '<string>',
title: '<string>',
boards: ['<string>'],
estimates: [123],
lists: ['<string>'],
priority: [123],
projects: ['<string>'],
creators: ['<string>'],
owners: ['<string>'],
members: ['<string>'],
statuses: ['started'],
external_links: [],
linked_cards: ['blocks'],
tags: ['<string>'],
parent_cards: ['<string>'],
epics: ['<string>']
},
exclude: {
ids: ['<string>'],
content: '<string>',
title: '<string>',
boards: ['<string>'],
estimates: [123],
lists: ['<string>'],
priority: [123],
projects: ['<string>'],
creators: ['<string>'],
owners: ['<string>'],
members: ['<string>'],
statuses: ['started'],
external_links: [],
linked_cards: ['blocks'],
tags: ['<string>'],
parent_cards: ['<string>'],
epics: ['<string>']
},
sort_by: {field: 'time_created', order_ascending: true}
},
page_filters: {
is_archived: true,
time_created: {before: 'now-1d', after: '1620997103||-2h'},
time_updated: {before: 'now-1d', after: '1620997103||-2h'},
include: {
ids: ['<string>'],
content: '<string>',
projects: ['<string>'],
creators: ['<string>'],
members: ['<string>']
},
exclude: {
ids: ['<string>'],
content: '<string>',
projects: ['<string>'],
creators: ['<string>'],
members: ['<string>']
},
sort_by: {field: 'time_created', order_ascending: true}
},
name: 'my view',
type: 'card',
shared: false
})
};
fetch('https://api.superthread.com/v1/{team_id}/views', 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.superthread.com/v1/{team_id}/views",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'board_filters' => [
'time_created' => [
'before' => 'now-1d',
'after' => '1620997103||-2h'
],
'time_updated' => [
'before' => 'now-1d',
'after' => '1620997103||-2h'
],
'include' => [
'ids' => [
'<string>'
],
'content' => '<string>',
'projects' => [
'<string>'
],
'creators' => [
'<string>'
],
'members' => [
'<string>'
]
],
'exclude' => [
'ids' => [
'<string>'
],
'content' => '<string>',
'projects' => [
'<string>'
],
'creators' => [
'<string>'
],
'members' => [
'<string>'
]
],
'sort_by' => [
'field' => 'time_created',
'order_ascending' => true
]
],
'card_filters' => [
'is_parent' => true,
'is_child' => true,
'has_estimate' => true,
'has_members' => true,
'has_priority' => true,
'has_status' => true,
'has_tags' => true,
'has_linked_card' => true,
'has_due_date' => true,
'has_start_date' => true,
'has_completed_date' => true,
'has_parent_card' => true,
'is_archived' => true,
'is_watching' => true,
'created_from_form' => true,
'start_date' => [
'before' => 'now-1d',
'after' => '1620997103||-2h'
],
'completed_date' => [
'before' => 'now-1d',
'after' => '1620997103||-2h'
],
'due_date' => [
'before' => 'now-1d',
'after' => '1620997103||-2h'
],
'time_created' => [
'before' => 'now-1d',
'after' => '1620997103||-2h'
],
'time_updated' => [
'before' => 'now-1d',
'after' => '1620997103||-2h'
],
'include' => [
'ids' => [
'<string>'
],
'content' => '<string>',
'title' => '<string>',
'boards' => [
'<string>'
],
'estimates' => [
123
],
'lists' => [
'<string>'
],
'priority' => [
123
],
'projects' => [
'<string>'
],
'creators' => [
'<string>'
],
'owners' => [
'<string>'
],
'members' => [
'<string>'
],
'statuses' => [
'started'
],
'external_links' => [
],
'linked_cards' => [
'blocks'
],
'tags' => [
'<string>'
],
'parent_cards' => [
'<string>'
],
'epics' => [
'<string>'
]
],
'exclude' => [
'ids' => [
'<string>'
],
'content' => '<string>',
'title' => '<string>',
'boards' => [
'<string>'
],
'estimates' => [
123
],
'lists' => [
'<string>'
],
'priority' => [
123
],
'projects' => [
'<string>'
],
'creators' => [
'<string>'
],
'owners' => [
'<string>'
],
'members' => [
'<string>'
],
'statuses' => [
'started'
],
'external_links' => [
],
'linked_cards' => [
'blocks'
],
'tags' => [
'<string>'
],
'parent_cards' => [
'<string>'
],
'epics' => [
'<string>'
]
],
'sort_by' => [
'field' => 'time_created',
'order_ascending' => true
]
],
'page_filters' => [
'is_archived' => true,
'time_created' => [
'before' => 'now-1d',
'after' => '1620997103||-2h'
],
'time_updated' => [
'before' => 'now-1d',
'after' => '1620997103||-2h'
],
'include' => [
'ids' => [
'<string>'
],
'content' => '<string>',
'projects' => [
'<string>'
],
'creators' => [
'<string>'
],
'members' => [
'<string>'
]
],
'exclude' => [
'ids' => [
'<string>'
],
'content' => '<string>',
'projects' => [
'<string>'
],
'creators' => [
'<string>'
],
'members' => [
'<string>'
]
],
'sort_by' => [
'field' => 'time_created',
'order_ascending' => true
]
],
'name' => 'my view',
'type' => 'card',
'shared' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.superthread.com/v1/{team_id}/views"
payload := strings.NewReader("{\n \"board_filters\": {\n \"time_created\": {\n \"before\": \"now-1d\",\n \"after\": \"1620997103||-2h\"\n },\n \"time_updated\": {\n \"before\": \"now-1d\",\n \"after\": \"1620997103||-2h\"\n },\n \"include\": {\n \"ids\": [\n \"<string>\"\n ],\n \"content\": \"<string>\",\n \"projects\": [\n \"<string>\"\n ],\n \"creators\": [\n \"<string>\"\n ],\n \"members\": [\n \"<string>\"\n ]\n },\n \"exclude\": {\n \"ids\": [\n \"<string>\"\n ],\n \"content\": \"<string>\",\n \"projects\": [\n \"<string>\"\n ],\n \"creators\": [\n \"<string>\"\n ],\n \"members\": [\n \"<string>\"\n ]\n },\n \"sort_by\": {\n \"field\": \"time_created\",\n \"order_ascending\": true\n }\n },\n \"card_filters\": {\n \"is_parent\": true,\n \"is_child\": true,\n \"has_estimate\": true,\n \"has_members\": true,\n \"has_priority\": true,\n \"has_status\": true,\n \"has_tags\": true,\n \"has_linked_card\": true,\n \"has_due_date\": true,\n \"has_start_date\": true,\n \"has_completed_date\": true,\n \"has_parent_card\": true,\n \"is_archived\": true,\n \"is_watching\": true,\n \"created_from_form\": true,\n \"start_date\": {\n \"before\": \"now-1d\",\n \"after\": \"1620997103||-2h\"\n },\n \"completed_date\": {\n \"before\": \"now-1d\",\n \"after\": \"1620997103||-2h\"\n },\n \"due_date\": {\n \"before\": \"now-1d\",\n \"after\": \"1620997103||-2h\"\n },\n \"time_created\": {\n \"before\": \"now-1d\",\n \"after\": \"1620997103||-2h\"\n },\n \"time_updated\": {\n \"before\": \"now-1d\",\n \"after\": \"1620997103||-2h\"\n },\n \"include\": {\n \"ids\": [\n \"<string>\"\n ],\n \"content\": \"<string>\",\n \"title\": \"<string>\",\n \"boards\": [\n \"<string>\"\n ],\n \"estimates\": [\n 123\n ],\n \"lists\": [\n \"<string>\"\n ],\n \"priority\": [\n 123\n ],\n \"projects\": [\n \"<string>\"\n ],\n \"creators\": [\n \"<string>\"\n ],\n \"owners\": [\n \"<string>\"\n ],\n \"members\": [\n \"<string>\"\n ],\n \"statuses\": [\n \"started\"\n ],\n \"external_links\": [],\n \"linked_cards\": [\n \"blocks\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"parent_cards\": [\n \"<string>\"\n ],\n \"epics\": [\n \"<string>\"\n ]\n },\n \"exclude\": {\n \"ids\": [\n \"<string>\"\n ],\n \"content\": \"<string>\",\n \"title\": \"<string>\",\n \"boards\": [\n \"<string>\"\n ],\n \"estimates\": [\n 123\n ],\n \"lists\": [\n \"<string>\"\n ],\n \"priority\": [\n 123\n ],\n \"projects\": [\n \"<string>\"\n ],\n \"creators\": [\n \"<string>\"\n ],\n \"owners\": [\n \"<string>\"\n ],\n \"members\": [\n \"<string>\"\n ],\n \"statuses\": [\n \"started\"\n ],\n \"external_links\": [],\n \"linked_cards\": [\n \"blocks\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"parent_cards\": [\n \"<string>\"\n ],\n \"epics\": [\n \"<string>\"\n ]\n },\n \"sort_by\": {\n \"field\": \"time_created\",\n \"order_ascending\": true\n }\n },\n \"page_filters\": {\n \"is_archived\": true,\n \"time_created\": {\n \"before\": \"now-1d\",\n \"after\": \"1620997103||-2h\"\n },\n \"time_updated\": {\n \"before\": \"now-1d\",\n \"after\": \"1620997103||-2h\"\n },\n \"include\": {\n \"ids\": [\n \"<string>\"\n ],\n \"content\": \"<string>\",\n \"projects\": [\n \"<string>\"\n ],\n \"creators\": [\n \"<string>\"\n ],\n \"members\": [\n \"<string>\"\n ]\n },\n \"exclude\": {\n \"ids\": [\n \"<string>\"\n ],\n \"content\": \"<string>\",\n \"projects\": [\n \"<string>\"\n ],\n \"creators\": [\n \"<string>\"\n ],\n \"members\": [\n \"<string>\"\n ]\n },\n \"sort_by\": {\n \"field\": \"time_created\",\n \"order_ascending\": true\n }\n },\n \"name\": \"my view\",\n \"type\": \"card\",\n \"shared\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.superthread.com/v1/{team_id}/views")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"board_filters\": {\n \"time_created\": {\n \"before\": \"now-1d\",\n \"after\": \"1620997103||-2h\"\n },\n \"time_updated\": {\n \"before\": \"now-1d\",\n \"after\": \"1620997103||-2h\"\n },\n \"include\": {\n \"ids\": [\n \"<string>\"\n ],\n \"content\": \"<string>\",\n \"projects\": [\n \"<string>\"\n ],\n \"creators\": [\n \"<string>\"\n ],\n \"members\": [\n \"<string>\"\n ]\n },\n \"exclude\": {\n \"ids\": [\n \"<string>\"\n ],\n \"content\": \"<string>\",\n \"projects\": [\n \"<string>\"\n ],\n \"creators\": [\n \"<string>\"\n ],\n \"members\": [\n \"<string>\"\n ]\n },\n \"sort_by\": {\n \"field\": \"time_created\",\n \"order_ascending\": true\n }\n },\n \"card_filters\": {\n \"is_parent\": true,\n \"is_child\": true,\n \"has_estimate\": true,\n \"has_members\": true,\n \"has_priority\": true,\n \"has_status\": true,\n \"has_tags\": true,\n \"has_linked_card\": true,\n \"has_due_date\": true,\n \"has_start_date\": true,\n \"has_completed_date\": true,\n \"has_parent_card\": true,\n \"is_archived\": true,\n \"is_watching\": true,\n \"created_from_form\": true,\n \"start_date\": {\n \"before\": \"now-1d\",\n \"after\": \"1620997103||-2h\"\n },\n \"completed_date\": {\n \"before\": \"now-1d\",\n \"after\": \"1620997103||-2h\"\n },\n \"due_date\": {\n \"before\": \"now-1d\",\n \"after\": \"1620997103||-2h\"\n },\n \"time_created\": {\n \"before\": \"now-1d\",\n \"after\": \"1620997103||-2h\"\n },\n \"time_updated\": {\n \"before\": \"now-1d\",\n \"after\": \"1620997103||-2h\"\n },\n \"include\": {\n \"ids\": [\n \"<string>\"\n ],\n \"content\": \"<string>\",\n \"title\": \"<string>\",\n \"boards\": [\n \"<string>\"\n ],\n \"estimates\": [\n 123\n ],\n \"lists\": [\n \"<string>\"\n ],\n \"priority\": [\n 123\n ],\n \"projects\": [\n \"<string>\"\n ],\n \"creators\": [\n \"<string>\"\n ],\n \"owners\": [\n \"<string>\"\n ],\n \"members\": [\n \"<string>\"\n ],\n \"statuses\": [\n \"started\"\n ],\n \"external_links\": [],\n \"linked_cards\": [\n \"blocks\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"parent_cards\": [\n \"<string>\"\n ],\n \"epics\": [\n \"<string>\"\n ]\n },\n \"exclude\": {\n \"ids\": [\n \"<string>\"\n ],\n \"content\": \"<string>\",\n \"title\": \"<string>\",\n \"boards\": [\n \"<string>\"\n ],\n \"estimates\": [\n 123\n ],\n \"lists\": [\n \"<string>\"\n ],\n \"priority\": [\n 123\n ],\n \"projects\": [\n \"<string>\"\n ],\n \"creators\": [\n \"<string>\"\n ],\n \"owners\": [\n \"<string>\"\n ],\n \"members\": [\n \"<string>\"\n ],\n \"statuses\": [\n \"started\"\n ],\n \"external_links\": [],\n \"linked_cards\": [\n \"blocks\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"parent_cards\": [\n \"<string>\"\n ],\n \"epics\": [\n \"<string>\"\n ]\n },\n \"sort_by\": {\n \"field\": \"time_created\",\n \"order_ascending\": true\n }\n },\n \"page_filters\": {\n \"is_archived\": true,\n \"time_created\": {\n \"before\": \"now-1d\",\n \"after\": \"1620997103||-2h\"\n },\n \"time_updated\": {\n \"before\": \"now-1d\",\n \"after\": \"1620997103||-2h\"\n },\n \"include\": {\n \"ids\": [\n \"<string>\"\n ],\n \"content\": \"<string>\",\n \"projects\": [\n \"<string>\"\n ],\n \"creators\": [\n \"<string>\"\n ],\n \"members\": [\n \"<string>\"\n ]\n },\n \"exclude\": {\n \"ids\": [\n \"<string>\"\n ],\n \"content\": \"<string>\",\n \"projects\": [\n \"<string>\"\n ],\n \"creators\": [\n \"<string>\"\n ],\n \"members\": [\n \"<string>\"\n ]\n },\n \"sort_by\": {\n \"field\": \"time_created\",\n \"order_ascending\": true\n }\n },\n \"name\": \"my view\",\n \"type\": \"card\",\n \"shared\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.superthread.com/v1/{team_id}/views")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"board_filters\": {\n \"time_created\": {\n \"before\": \"now-1d\",\n \"after\": \"1620997103||-2h\"\n },\n \"time_updated\": {\n \"before\": \"now-1d\",\n \"after\": \"1620997103||-2h\"\n },\n \"include\": {\n \"ids\": [\n \"<string>\"\n ],\n \"content\": \"<string>\",\n \"projects\": [\n \"<string>\"\n ],\n \"creators\": [\n \"<string>\"\n ],\n \"members\": [\n \"<string>\"\n ]\n },\n \"exclude\": {\n \"ids\": [\n \"<string>\"\n ],\n \"content\": \"<string>\",\n \"projects\": [\n \"<string>\"\n ],\n \"creators\": [\n \"<string>\"\n ],\n \"members\": [\n \"<string>\"\n ]\n },\n \"sort_by\": {\n \"field\": \"time_created\",\n \"order_ascending\": true\n }\n },\n \"card_filters\": {\n \"is_parent\": true,\n \"is_child\": true,\n \"has_estimate\": true,\n \"has_members\": true,\n \"has_priority\": true,\n \"has_status\": true,\n \"has_tags\": true,\n \"has_linked_card\": true,\n \"has_due_date\": true,\n \"has_start_date\": true,\n \"has_completed_date\": true,\n \"has_parent_card\": true,\n \"is_archived\": true,\n \"is_watching\": true,\n \"created_from_form\": true,\n \"start_date\": {\n \"before\": \"now-1d\",\n \"after\": \"1620997103||-2h\"\n },\n \"completed_date\": {\n \"before\": \"now-1d\",\n \"after\": \"1620997103||-2h\"\n },\n \"due_date\": {\n \"before\": \"now-1d\",\n \"after\": \"1620997103||-2h\"\n },\n \"time_created\": {\n \"before\": \"now-1d\",\n \"after\": \"1620997103||-2h\"\n },\n \"time_updated\": {\n \"before\": \"now-1d\",\n \"after\": \"1620997103||-2h\"\n },\n \"include\": {\n \"ids\": [\n \"<string>\"\n ],\n \"content\": \"<string>\",\n \"title\": \"<string>\",\n \"boards\": [\n \"<string>\"\n ],\n \"estimates\": [\n 123\n ],\n \"lists\": [\n \"<string>\"\n ],\n \"priority\": [\n 123\n ],\n \"projects\": [\n \"<string>\"\n ],\n \"creators\": [\n \"<string>\"\n ],\n \"owners\": [\n \"<string>\"\n ],\n \"members\": [\n \"<string>\"\n ],\n \"statuses\": [\n \"started\"\n ],\n \"external_links\": [],\n \"linked_cards\": [\n \"blocks\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"parent_cards\": [\n \"<string>\"\n ],\n \"epics\": [\n \"<string>\"\n ]\n },\n \"exclude\": {\n \"ids\": [\n \"<string>\"\n ],\n \"content\": \"<string>\",\n \"title\": \"<string>\",\n \"boards\": [\n \"<string>\"\n ],\n \"estimates\": [\n 123\n ],\n \"lists\": [\n \"<string>\"\n ],\n \"priority\": [\n 123\n ],\n \"projects\": [\n \"<string>\"\n ],\n \"creators\": [\n \"<string>\"\n ],\n \"owners\": [\n \"<string>\"\n ],\n \"members\": [\n \"<string>\"\n ],\n \"statuses\": [\n \"started\"\n ],\n \"external_links\": [],\n \"linked_cards\": [\n \"blocks\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"parent_cards\": [\n \"<string>\"\n ],\n \"epics\": [\n \"<string>\"\n ]\n },\n \"sort_by\": {\n \"field\": \"time_created\",\n \"order_ascending\": true\n }\n },\n \"page_filters\": {\n \"is_archived\": true,\n \"time_created\": {\n \"before\": \"now-1d\",\n \"after\": \"1620997103||-2h\"\n },\n \"time_updated\": {\n \"before\": \"now-1d\",\n \"after\": \"1620997103||-2h\"\n },\n \"include\": {\n \"ids\": [\n \"<string>\"\n ],\n \"content\": \"<string>\",\n \"projects\": [\n \"<string>\"\n ],\n \"creators\": [\n \"<string>\"\n ],\n \"members\": [\n \"<string>\"\n ]\n },\n \"exclude\": {\n \"ids\": [\n \"<string>\"\n ],\n \"content\": \"<string>\",\n \"projects\": [\n \"<string>\"\n ],\n \"creators\": [\n \"<string>\"\n ],\n \"members\": [\n \"<string>\"\n ]\n },\n \"sort_by\": {\n \"field\": \"time_created\",\n \"order_ascending\": true\n }\n },\n \"name\": \"my view\",\n \"type\": \"card\",\n \"shared\": false\n}"
response = http.request(request)
puts response.read_body{
"board_filters": {
"time_created": {
"before": "now-1d",
"after": "1620997103||-2h"
},
"time_updated": {
"before": "now-1d",
"after": "1620997103||-2h"
},
"include": {
"ids": [
"<string>"
],
"content": "<string>",
"projects": [
"<string>"
],
"creators": [
"<string>"
],
"members": [
"<string>"
]
},
"exclude": {
"ids": [
"<string>"
],
"content": "<string>",
"projects": [
"<string>"
],
"creators": [
"<string>"
],
"members": [
"<string>"
]
},
"sort_by": {
"field": "time_created",
"order_ascending": true
}
},
"card_filters": {
"is_parent": true,
"is_child": true,
"has_estimate": true,
"has_members": true,
"has_priority": true,
"has_status": true,
"has_tags": true,
"has_linked_card": true,
"has_due_date": true,
"has_start_date": true,
"has_completed_date": true,
"has_parent_card": true,
"is_archived": true,
"is_watching": true,
"created_from_form": true,
"start_date": {
"before": "now-1d",
"after": "1620997103||-2h"
},
"completed_date": {
"before": "now-1d",
"after": "1620997103||-2h"
},
"due_date": {
"before": "now-1d",
"after": "1620997103||-2h"
},
"time_created": {
"before": "now-1d",
"after": "1620997103||-2h"
},
"time_updated": {
"before": "now-1d",
"after": "1620997103||-2h"
},
"include": {
"ids": [
"<string>"
],
"content": "<string>",
"title": "<string>",
"boards": [
"<string>"
],
"estimates": [
123
],
"lists": [
"<string>"
],
"priority": [
123
],
"projects": [
"<string>"
],
"creators": [
"<string>"
],
"owners": [
"<string>"
],
"members": [
"<string>"
],
"statuses": [
"started"
],
"external_links": [
"github_pull_request"
],
"linked_cards": [
"blocks"
],
"tags": [
"<string>"
],
"parent_cards": [
"<string>"
],
"epics": [
"<string>"
]
},
"exclude": {
"ids": [
"<string>"
],
"content": "<string>",
"title": "<string>",
"boards": [
"<string>"
],
"estimates": [
123
],
"lists": [
"<string>"
],
"priority": [
123
],
"projects": [
"<string>"
],
"creators": [
"<string>"
],
"owners": [
"<string>"
],
"members": [
"<string>"
],
"statuses": [
"started"
],
"external_links": [
"github_pull_request"
],
"linked_cards": [
"blocks"
],
"tags": [
"<string>"
],
"parent_cards": [
"<string>"
],
"epics": [
"<string>"
]
},
"sort_by": {
"field": "time_created",
"order_ascending": true
}
},
"page_filters": {
"is_archived": true,
"time_created": {
"before": "now-1d",
"after": "1620997103||-2h"
},
"time_updated": {
"before": "now-1d",
"after": "1620997103||-2h"
},
"include": {
"ids": [
"<string>"
],
"content": "<string>",
"projects": [
"<string>"
],
"creators": [
"<string>"
],
"members": [
"<string>"
]
},
"exclude": {
"ids": [
"<string>"
],
"content": "<string>",
"projects": [
"<string>"
],
"creators": [
"<string>"
],
"members": [
"<string>"
]
},
"sort_by": {
"field": "time_created",
"order_ascending": true
}
},
"id": "1",
"team_id": "tARGLH5d",
"owner_user_id": "u2DdoERz",
"type": "card",
"name": "my view",
"shared": false,
"time_created": 1608742037016,
"time_updated": 1608742037016
}{
"error": {
"id": "err5f744ab",
"code": 403,
"sec": "SEC:000-00014",
"message": "You do not have access to this resource",
"date": 1608742037016
}
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Team ID is an alphanumerical string that identifies a Team. This is externally referred to as a "Workspace".
Body
application/json
Fields for creation
Response
created view response
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Example:
"1"
Example:
"tARGLH5d"
Example:
"u2DdoERz"
Available options:
board, card, page Example:
"card"
Example:
"my view"
Example:
false
unix timestamp in seconds
Example:
1608742037016
unix timestamp in seconds
Example:
1608742037016
⌘I
Create a view
curl --request POST \
--url https://api.superthread.com/v1/{team_id}/views \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"board_filters": {
"time_created": {
"before": "now-1d",
"after": "1620997103||-2h"
},
"time_updated": {
"before": "now-1d",
"after": "1620997103||-2h"
},
"include": {
"ids": [
"<string>"
],
"content": "<string>",
"projects": [
"<string>"
],
"creators": [
"<string>"
],
"members": [
"<string>"
]
},
"exclude": {
"ids": [
"<string>"
],
"content": "<string>",
"projects": [
"<string>"
],
"creators": [
"<string>"
],
"members": [
"<string>"
]
},
"sort_by": {
"field": "time_created",
"order_ascending": true
}
},
"card_filters": {
"is_parent": true,
"is_child": true,
"has_estimate": true,
"has_members": true,
"has_priority": true,
"has_status": true,
"has_tags": true,
"has_linked_card": true,
"has_due_date": true,
"has_start_date": true,
"has_completed_date": true,
"has_parent_card": true,
"is_archived": true,
"is_watching": true,
"created_from_form": true,
"start_date": {
"before": "now-1d",
"after": "1620997103||-2h"
},
"completed_date": {
"before": "now-1d",
"after": "1620997103||-2h"
},
"due_date": {
"before": "now-1d",
"after": "1620997103||-2h"
},
"time_created": {
"before": "now-1d",
"after": "1620997103||-2h"
},
"time_updated": {
"before": "now-1d",
"after": "1620997103||-2h"
},
"include": {
"ids": [
"<string>"
],
"content": "<string>",
"title": "<string>",
"boards": [
"<string>"
],
"estimates": [
123
],
"lists": [
"<string>"
],
"priority": [
123
],
"projects": [
"<string>"
],
"creators": [
"<string>"
],
"owners": [
"<string>"
],
"members": [
"<string>"
],
"statuses": [
"started"
],
"external_links": [],
"linked_cards": [
"blocks"
],
"tags": [
"<string>"
],
"parent_cards": [
"<string>"
],
"epics": [
"<string>"
]
},
"exclude": {
"ids": [
"<string>"
],
"content": "<string>",
"title": "<string>",
"boards": [
"<string>"
],
"estimates": [
123
],
"lists": [
"<string>"
],
"priority": [
123
],
"projects": [
"<string>"
],
"creators": [
"<string>"
],
"owners": [
"<string>"
],
"members": [
"<string>"
],
"statuses": [
"started"
],
"external_links": [],
"linked_cards": [
"blocks"
],
"tags": [
"<string>"
],
"parent_cards": [
"<string>"
],
"epics": [
"<string>"
]
},
"sort_by": {
"field": "time_created",
"order_ascending": true
}
},
"page_filters": {
"is_archived": true,
"time_created": {
"before": "now-1d",
"after": "1620997103||-2h"
},
"time_updated": {
"before": "now-1d",
"after": "1620997103||-2h"
},
"include": {
"ids": [
"<string>"
],
"content": "<string>",
"projects": [
"<string>"
],
"creators": [
"<string>"
],
"members": [
"<string>"
]
},
"exclude": {
"ids": [
"<string>"
],
"content": "<string>",
"projects": [
"<string>"
],
"creators": [
"<string>"
],
"members": [
"<string>"
]
},
"sort_by": {
"field": "time_created",
"order_ascending": true
}
},
"name": "my view",
"type": "card",
"shared": false
}
'import requests
url = "https://api.superthread.com/v1/{team_id}/views"
payload = {
"board_filters": {
"time_created": {
"before": "now-1d",
"after": "1620997103||-2h"
},
"time_updated": {
"before": "now-1d",
"after": "1620997103||-2h"
},
"include": {
"ids": ["<string>"],
"content": "<string>",
"projects": ["<string>"],
"creators": ["<string>"],
"members": ["<string>"]
},
"exclude": {
"ids": ["<string>"],
"content": "<string>",
"projects": ["<string>"],
"creators": ["<string>"],
"members": ["<string>"]
},
"sort_by": {
"field": "time_created",
"order_ascending": True
}
},
"card_filters": {
"is_parent": True,
"is_child": True,
"has_estimate": True,
"has_members": True,
"has_priority": True,
"has_status": True,
"has_tags": True,
"has_linked_card": True,
"has_due_date": True,
"has_start_date": True,
"has_completed_date": True,
"has_parent_card": True,
"is_archived": True,
"is_watching": True,
"created_from_form": True,
"start_date": {
"before": "now-1d",
"after": "1620997103||-2h"
},
"completed_date": {
"before": "now-1d",
"after": "1620997103||-2h"
},
"due_date": {
"before": "now-1d",
"after": "1620997103||-2h"
},
"time_created": {
"before": "now-1d",
"after": "1620997103||-2h"
},
"time_updated": {
"before": "now-1d",
"after": "1620997103||-2h"
},
"include": {
"ids": ["<string>"],
"content": "<string>",
"title": "<string>",
"boards": ["<string>"],
"estimates": [123],
"lists": ["<string>"],
"priority": [123],
"projects": ["<string>"],
"creators": ["<string>"],
"owners": ["<string>"],
"members": ["<string>"],
"statuses": ["started"],
"external_links": [],
"linked_cards": ["blocks"],
"tags": ["<string>"],
"parent_cards": ["<string>"],
"epics": ["<string>"]
},
"exclude": {
"ids": ["<string>"],
"content": "<string>",
"title": "<string>",
"boards": ["<string>"],
"estimates": [123],
"lists": ["<string>"],
"priority": [123],
"projects": ["<string>"],
"creators": ["<string>"],
"owners": ["<string>"],
"members": ["<string>"],
"statuses": ["started"],
"external_links": [],
"linked_cards": ["blocks"],
"tags": ["<string>"],
"parent_cards": ["<string>"],
"epics": ["<string>"]
},
"sort_by": {
"field": "time_created",
"order_ascending": True
}
},
"page_filters": {
"is_archived": True,
"time_created": {
"before": "now-1d",
"after": "1620997103||-2h"
},
"time_updated": {
"before": "now-1d",
"after": "1620997103||-2h"
},
"include": {
"ids": ["<string>"],
"content": "<string>",
"projects": ["<string>"],
"creators": ["<string>"],
"members": ["<string>"]
},
"exclude": {
"ids": ["<string>"],
"content": "<string>",
"projects": ["<string>"],
"creators": ["<string>"],
"members": ["<string>"]
},
"sort_by": {
"field": "time_created",
"order_ascending": True
}
},
"name": "my view",
"type": "card",
"shared": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
board_filters: {
time_created: {before: 'now-1d', after: '1620997103||-2h'},
time_updated: {before: 'now-1d', after: '1620997103||-2h'},
include: {
ids: ['<string>'],
content: '<string>',
projects: ['<string>'],
creators: ['<string>'],
members: ['<string>']
},
exclude: {
ids: ['<string>'],
content: '<string>',
projects: ['<string>'],
creators: ['<string>'],
members: ['<string>']
},
sort_by: {field: 'time_created', order_ascending: true}
},
card_filters: {
is_parent: true,
is_child: true,
has_estimate: true,
has_members: true,
has_priority: true,
has_status: true,
has_tags: true,
has_linked_card: true,
has_due_date: true,
has_start_date: true,
has_completed_date: true,
has_parent_card: true,
is_archived: true,
is_watching: true,
created_from_form: true,
start_date: {before: 'now-1d', after: '1620997103||-2h'},
completed_date: {before: 'now-1d', after: '1620997103||-2h'},
due_date: {before: 'now-1d', after: '1620997103||-2h'},
time_created: {before: 'now-1d', after: '1620997103||-2h'},
time_updated: {before: 'now-1d', after: '1620997103||-2h'},
include: {
ids: ['<string>'],
content: '<string>',
title: '<string>',
boards: ['<string>'],
estimates: [123],
lists: ['<string>'],
priority: [123],
projects: ['<string>'],
creators: ['<string>'],
owners: ['<string>'],
members: ['<string>'],
statuses: ['started'],
external_links: [],
linked_cards: ['blocks'],
tags: ['<string>'],
parent_cards: ['<string>'],
epics: ['<string>']
},
exclude: {
ids: ['<string>'],
content: '<string>',
title: '<string>',
boards: ['<string>'],
estimates: [123],
lists: ['<string>'],
priority: [123],
projects: ['<string>'],
creators: ['<string>'],
owners: ['<string>'],
members: ['<string>'],
statuses: ['started'],
external_links: [],
linked_cards: ['blocks'],
tags: ['<string>'],
parent_cards: ['<string>'],
epics: ['<string>']
},
sort_by: {field: 'time_created', order_ascending: true}
},
page_filters: {
is_archived: true,
time_created: {before: 'now-1d', after: '1620997103||-2h'},
time_updated: {before: 'now-1d', after: '1620997103||-2h'},
include: {
ids: ['<string>'],
content: '<string>',
projects: ['<string>'],
creators: ['<string>'],
members: ['<string>']
},
exclude: {
ids: ['<string>'],
content: '<string>',
projects: ['<string>'],
creators: ['<string>'],
members: ['<string>']
},
sort_by: {field: 'time_created', order_ascending: true}
},
name: 'my view',
type: 'card',
shared: false
})
};
fetch('https://api.superthread.com/v1/{team_id}/views', 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.superthread.com/v1/{team_id}/views",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'board_filters' => [
'time_created' => [
'before' => 'now-1d',
'after' => '1620997103||-2h'
],
'time_updated' => [
'before' => 'now-1d',
'after' => '1620997103||-2h'
],
'include' => [
'ids' => [
'<string>'
],
'content' => '<string>',
'projects' => [
'<string>'
],
'creators' => [
'<string>'
],
'members' => [
'<string>'
]
],
'exclude' => [
'ids' => [
'<string>'
],
'content' => '<string>',
'projects' => [
'<string>'
],
'creators' => [
'<string>'
],
'members' => [
'<string>'
]
],
'sort_by' => [
'field' => 'time_created',
'order_ascending' => true
]
],
'card_filters' => [
'is_parent' => true,
'is_child' => true,
'has_estimate' => true,
'has_members' => true,
'has_priority' => true,
'has_status' => true,
'has_tags' => true,
'has_linked_card' => true,
'has_due_date' => true,
'has_start_date' => true,
'has_completed_date' => true,
'has_parent_card' => true,
'is_archived' => true,
'is_watching' => true,
'created_from_form' => true,
'start_date' => [
'before' => 'now-1d',
'after' => '1620997103||-2h'
],
'completed_date' => [
'before' => 'now-1d',
'after' => '1620997103||-2h'
],
'due_date' => [
'before' => 'now-1d',
'after' => '1620997103||-2h'
],
'time_created' => [
'before' => 'now-1d',
'after' => '1620997103||-2h'
],
'time_updated' => [
'before' => 'now-1d',
'after' => '1620997103||-2h'
],
'include' => [
'ids' => [
'<string>'
],
'content' => '<string>',
'title' => '<string>',
'boards' => [
'<string>'
],
'estimates' => [
123
],
'lists' => [
'<string>'
],
'priority' => [
123
],
'projects' => [
'<string>'
],
'creators' => [
'<string>'
],
'owners' => [
'<string>'
],
'members' => [
'<string>'
],
'statuses' => [
'started'
],
'external_links' => [
],
'linked_cards' => [
'blocks'
],
'tags' => [
'<string>'
],
'parent_cards' => [
'<string>'
],
'epics' => [
'<string>'
]
],
'exclude' => [
'ids' => [
'<string>'
],
'content' => '<string>',
'title' => '<string>',
'boards' => [
'<string>'
],
'estimates' => [
123
],
'lists' => [
'<string>'
],
'priority' => [
123
],
'projects' => [
'<string>'
],
'creators' => [
'<string>'
],
'owners' => [
'<string>'
],
'members' => [
'<string>'
],
'statuses' => [
'started'
],
'external_links' => [
],
'linked_cards' => [
'blocks'
],
'tags' => [
'<string>'
],
'parent_cards' => [
'<string>'
],
'epics' => [
'<string>'
]
],
'sort_by' => [
'field' => 'time_created',
'order_ascending' => true
]
],
'page_filters' => [
'is_archived' => true,
'time_created' => [
'before' => 'now-1d',
'after' => '1620997103||-2h'
],
'time_updated' => [
'before' => 'now-1d',
'after' => '1620997103||-2h'
],
'include' => [
'ids' => [
'<string>'
],
'content' => '<string>',
'projects' => [
'<string>'
],
'creators' => [
'<string>'
],
'members' => [
'<string>'
]
],
'exclude' => [
'ids' => [
'<string>'
],
'content' => '<string>',
'projects' => [
'<string>'
],
'creators' => [
'<string>'
],
'members' => [
'<string>'
]
],
'sort_by' => [
'field' => 'time_created',
'order_ascending' => true
]
],
'name' => 'my view',
'type' => 'card',
'shared' => false
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.superthread.com/v1/{team_id}/views"
payload := strings.NewReader("{\n \"board_filters\": {\n \"time_created\": {\n \"before\": \"now-1d\",\n \"after\": \"1620997103||-2h\"\n },\n \"time_updated\": {\n \"before\": \"now-1d\",\n \"after\": \"1620997103||-2h\"\n },\n \"include\": {\n \"ids\": [\n \"<string>\"\n ],\n \"content\": \"<string>\",\n \"projects\": [\n \"<string>\"\n ],\n \"creators\": [\n \"<string>\"\n ],\n \"members\": [\n \"<string>\"\n ]\n },\n \"exclude\": {\n \"ids\": [\n \"<string>\"\n ],\n \"content\": \"<string>\",\n \"projects\": [\n \"<string>\"\n ],\n \"creators\": [\n \"<string>\"\n ],\n \"members\": [\n \"<string>\"\n ]\n },\n \"sort_by\": {\n \"field\": \"time_created\",\n \"order_ascending\": true\n }\n },\n \"card_filters\": {\n \"is_parent\": true,\n \"is_child\": true,\n \"has_estimate\": true,\n \"has_members\": true,\n \"has_priority\": true,\n \"has_status\": true,\n \"has_tags\": true,\n \"has_linked_card\": true,\n \"has_due_date\": true,\n \"has_start_date\": true,\n \"has_completed_date\": true,\n \"has_parent_card\": true,\n \"is_archived\": true,\n \"is_watching\": true,\n \"created_from_form\": true,\n \"start_date\": {\n \"before\": \"now-1d\",\n \"after\": \"1620997103||-2h\"\n },\n \"completed_date\": {\n \"before\": \"now-1d\",\n \"after\": \"1620997103||-2h\"\n },\n \"due_date\": {\n \"before\": \"now-1d\",\n \"after\": \"1620997103||-2h\"\n },\n \"time_created\": {\n \"before\": \"now-1d\",\n \"after\": \"1620997103||-2h\"\n },\n \"time_updated\": {\n \"before\": \"now-1d\",\n \"after\": \"1620997103||-2h\"\n },\n \"include\": {\n \"ids\": [\n \"<string>\"\n ],\n \"content\": \"<string>\",\n \"title\": \"<string>\",\n \"boards\": [\n \"<string>\"\n ],\n \"estimates\": [\n 123\n ],\n \"lists\": [\n \"<string>\"\n ],\n \"priority\": [\n 123\n ],\n \"projects\": [\n \"<string>\"\n ],\n \"creators\": [\n \"<string>\"\n ],\n \"owners\": [\n \"<string>\"\n ],\n \"members\": [\n \"<string>\"\n ],\n \"statuses\": [\n \"started\"\n ],\n \"external_links\": [],\n \"linked_cards\": [\n \"blocks\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"parent_cards\": [\n \"<string>\"\n ],\n \"epics\": [\n \"<string>\"\n ]\n },\n \"exclude\": {\n \"ids\": [\n \"<string>\"\n ],\n \"content\": \"<string>\",\n \"title\": \"<string>\",\n \"boards\": [\n \"<string>\"\n ],\n \"estimates\": [\n 123\n ],\n \"lists\": [\n \"<string>\"\n ],\n \"priority\": [\n 123\n ],\n \"projects\": [\n \"<string>\"\n ],\n \"creators\": [\n \"<string>\"\n ],\n \"owners\": [\n \"<string>\"\n ],\n \"members\": [\n \"<string>\"\n ],\n \"statuses\": [\n \"started\"\n ],\n \"external_links\": [],\n \"linked_cards\": [\n \"blocks\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"parent_cards\": [\n \"<string>\"\n ],\n \"epics\": [\n \"<string>\"\n ]\n },\n \"sort_by\": {\n \"field\": \"time_created\",\n \"order_ascending\": true\n }\n },\n \"page_filters\": {\n \"is_archived\": true,\n \"time_created\": {\n \"before\": \"now-1d\",\n \"after\": \"1620997103||-2h\"\n },\n \"time_updated\": {\n \"before\": \"now-1d\",\n \"after\": \"1620997103||-2h\"\n },\n \"include\": {\n \"ids\": [\n \"<string>\"\n ],\n \"content\": \"<string>\",\n \"projects\": [\n \"<string>\"\n ],\n \"creators\": [\n \"<string>\"\n ],\n \"members\": [\n \"<string>\"\n ]\n },\n \"exclude\": {\n \"ids\": [\n \"<string>\"\n ],\n \"content\": \"<string>\",\n \"projects\": [\n \"<string>\"\n ],\n \"creators\": [\n \"<string>\"\n ],\n \"members\": [\n \"<string>\"\n ]\n },\n \"sort_by\": {\n \"field\": \"time_created\",\n \"order_ascending\": true\n }\n },\n \"name\": \"my view\",\n \"type\": \"card\",\n \"shared\": false\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.superthread.com/v1/{team_id}/views")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"board_filters\": {\n \"time_created\": {\n \"before\": \"now-1d\",\n \"after\": \"1620997103||-2h\"\n },\n \"time_updated\": {\n \"before\": \"now-1d\",\n \"after\": \"1620997103||-2h\"\n },\n \"include\": {\n \"ids\": [\n \"<string>\"\n ],\n \"content\": \"<string>\",\n \"projects\": [\n \"<string>\"\n ],\n \"creators\": [\n \"<string>\"\n ],\n \"members\": [\n \"<string>\"\n ]\n },\n \"exclude\": {\n \"ids\": [\n \"<string>\"\n ],\n \"content\": \"<string>\",\n \"projects\": [\n \"<string>\"\n ],\n \"creators\": [\n \"<string>\"\n ],\n \"members\": [\n \"<string>\"\n ]\n },\n \"sort_by\": {\n \"field\": \"time_created\",\n \"order_ascending\": true\n }\n },\n \"card_filters\": {\n \"is_parent\": true,\n \"is_child\": true,\n \"has_estimate\": true,\n \"has_members\": true,\n \"has_priority\": true,\n \"has_status\": true,\n \"has_tags\": true,\n \"has_linked_card\": true,\n \"has_due_date\": true,\n \"has_start_date\": true,\n \"has_completed_date\": true,\n \"has_parent_card\": true,\n \"is_archived\": true,\n \"is_watching\": true,\n \"created_from_form\": true,\n \"start_date\": {\n \"before\": \"now-1d\",\n \"after\": \"1620997103||-2h\"\n },\n \"completed_date\": {\n \"before\": \"now-1d\",\n \"after\": \"1620997103||-2h\"\n },\n \"due_date\": {\n \"before\": \"now-1d\",\n \"after\": \"1620997103||-2h\"\n },\n \"time_created\": {\n \"before\": \"now-1d\",\n \"after\": \"1620997103||-2h\"\n },\n \"time_updated\": {\n \"before\": \"now-1d\",\n \"after\": \"1620997103||-2h\"\n },\n \"include\": {\n \"ids\": [\n \"<string>\"\n ],\n \"content\": \"<string>\",\n \"title\": \"<string>\",\n \"boards\": [\n \"<string>\"\n ],\n \"estimates\": [\n 123\n ],\n \"lists\": [\n \"<string>\"\n ],\n \"priority\": [\n 123\n ],\n \"projects\": [\n \"<string>\"\n ],\n \"creators\": [\n \"<string>\"\n ],\n \"owners\": [\n \"<string>\"\n ],\n \"members\": [\n \"<string>\"\n ],\n \"statuses\": [\n \"started\"\n ],\n \"external_links\": [],\n \"linked_cards\": [\n \"blocks\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"parent_cards\": [\n \"<string>\"\n ],\n \"epics\": [\n \"<string>\"\n ]\n },\n \"exclude\": {\n \"ids\": [\n \"<string>\"\n ],\n \"content\": \"<string>\",\n \"title\": \"<string>\",\n \"boards\": [\n \"<string>\"\n ],\n \"estimates\": [\n 123\n ],\n \"lists\": [\n \"<string>\"\n ],\n \"priority\": [\n 123\n ],\n \"projects\": [\n \"<string>\"\n ],\n \"creators\": [\n \"<string>\"\n ],\n \"owners\": [\n \"<string>\"\n ],\n \"members\": [\n \"<string>\"\n ],\n \"statuses\": [\n \"started\"\n ],\n \"external_links\": [],\n \"linked_cards\": [\n \"blocks\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"parent_cards\": [\n \"<string>\"\n ],\n \"epics\": [\n \"<string>\"\n ]\n },\n \"sort_by\": {\n \"field\": \"time_created\",\n \"order_ascending\": true\n }\n },\n \"page_filters\": {\n \"is_archived\": true,\n \"time_created\": {\n \"before\": \"now-1d\",\n \"after\": \"1620997103||-2h\"\n },\n \"time_updated\": {\n \"before\": \"now-1d\",\n \"after\": \"1620997103||-2h\"\n },\n \"include\": {\n \"ids\": [\n \"<string>\"\n ],\n \"content\": \"<string>\",\n \"projects\": [\n \"<string>\"\n ],\n \"creators\": [\n \"<string>\"\n ],\n \"members\": [\n \"<string>\"\n ]\n },\n \"exclude\": {\n \"ids\": [\n \"<string>\"\n ],\n \"content\": \"<string>\",\n \"projects\": [\n \"<string>\"\n ],\n \"creators\": [\n \"<string>\"\n ],\n \"members\": [\n \"<string>\"\n ]\n },\n \"sort_by\": {\n \"field\": \"time_created\",\n \"order_ascending\": true\n }\n },\n \"name\": \"my view\",\n \"type\": \"card\",\n \"shared\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.superthread.com/v1/{team_id}/views")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"board_filters\": {\n \"time_created\": {\n \"before\": \"now-1d\",\n \"after\": \"1620997103||-2h\"\n },\n \"time_updated\": {\n \"before\": \"now-1d\",\n \"after\": \"1620997103||-2h\"\n },\n \"include\": {\n \"ids\": [\n \"<string>\"\n ],\n \"content\": \"<string>\",\n \"projects\": [\n \"<string>\"\n ],\n \"creators\": [\n \"<string>\"\n ],\n \"members\": [\n \"<string>\"\n ]\n },\n \"exclude\": {\n \"ids\": [\n \"<string>\"\n ],\n \"content\": \"<string>\",\n \"projects\": [\n \"<string>\"\n ],\n \"creators\": [\n \"<string>\"\n ],\n \"members\": [\n \"<string>\"\n ]\n },\n \"sort_by\": {\n \"field\": \"time_created\",\n \"order_ascending\": true\n }\n },\n \"card_filters\": {\n \"is_parent\": true,\n \"is_child\": true,\n \"has_estimate\": true,\n \"has_members\": true,\n \"has_priority\": true,\n \"has_status\": true,\n \"has_tags\": true,\n \"has_linked_card\": true,\n \"has_due_date\": true,\n \"has_start_date\": true,\n \"has_completed_date\": true,\n \"has_parent_card\": true,\n \"is_archived\": true,\n \"is_watching\": true,\n \"created_from_form\": true,\n \"start_date\": {\n \"before\": \"now-1d\",\n \"after\": \"1620997103||-2h\"\n },\n \"completed_date\": {\n \"before\": \"now-1d\",\n \"after\": \"1620997103||-2h\"\n },\n \"due_date\": {\n \"before\": \"now-1d\",\n \"after\": \"1620997103||-2h\"\n },\n \"time_created\": {\n \"before\": \"now-1d\",\n \"after\": \"1620997103||-2h\"\n },\n \"time_updated\": {\n \"before\": \"now-1d\",\n \"after\": \"1620997103||-2h\"\n },\n \"include\": {\n \"ids\": [\n \"<string>\"\n ],\n \"content\": \"<string>\",\n \"title\": \"<string>\",\n \"boards\": [\n \"<string>\"\n ],\n \"estimates\": [\n 123\n ],\n \"lists\": [\n \"<string>\"\n ],\n \"priority\": [\n 123\n ],\n \"projects\": [\n \"<string>\"\n ],\n \"creators\": [\n \"<string>\"\n ],\n \"owners\": [\n \"<string>\"\n ],\n \"members\": [\n \"<string>\"\n ],\n \"statuses\": [\n \"started\"\n ],\n \"external_links\": [],\n \"linked_cards\": [\n \"blocks\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"parent_cards\": [\n \"<string>\"\n ],\n \"epics\": [\n \"<string>\"\n ]\n },\n \"exclude\": {\n \"ids\": [\n \"<string>\"\n ],\n \"content\": \"<string>\",\n \"title\": \"<string>\",\n \"boards\": [\n \"<string>\"\n ],\n \"estimates\": [\n 123\n ],\n \"lists\": [\n \"<string>\"\n ],\n \"priority\": [\n 123\n ],\n \"projects\": [\n \"<string>\"\n ],\n \"creators\": [\n \"<string>\"\n ],\n \"owners\": [\n \"<string>\"\n ],\n \"members\": [\n \"<string>\"\n ],\n \"statuses\": [\n \"started\"\n ],\n \"external_links\": [],\n \"linked_cards\": [\n \"blocks\"\n ],\n \"tags\": [\n \"<string>\"\n ],\n \"parent_cards\": [\n \"<string>\"\n ],\n \"epics\": [\n \"<string>\"\n ]\n },\n \"sort_by\": {\n \"field\": \"time_created\",\n \"order_ascending\": true\n }\n },\n \"page_filters\": {\n \"is_archived\": true,\n \"time_created\": {\n \"before\": \"now-1d\",\n \"after\": \"1620997103||-2h\"\n },\n \"time_updated\": {\n \"before\": \"now-1d\",\n \"after\": \"1620997103||-2h\"\n },\n \"include\": {\n \"ids\": [\n \"<string>\"\n ],\n \"content\": \"<string>\",\n \"projects\": [\n \"<string>\"\n ],\n \"creators\": [\n \"<string>\"\n ],\n \"members\": [\n \"<string>\"\n ]\n },\n \"exclude\": {\n \"ids\": [\n \"<string>\"\n ],\n \"content\": \"<string>\",\n \"projects\": [\n \"<string>\"\n ],\n \"creators\": [\n \"<string>\"\n ],\n \"members\": [\n \"<string>\"\n ]\n },\n \"sort_by\": {\n \"field\": \"time_created\",\n \"order_ascending\": true\n }\n },\n \"name\": \"my view\",\n \"type\": \"card\",\n \"shared\": false\n}"
response = http.request(request)
puts response.read_body{
"board_filters": {
"time_created": {
"before": "now-1d",
"after": "1620997103||-2h"
},
"time_updated": {
"before": "now-1d",
"after": "1620997103||-2h"
},
"include": {
"ids": [
"<string>"
],
"content": "<string>",
"projects": [
"<string>"
],
"creators": [
"<string>"
],
"members": [
"<string>"
]
},
"exclude": {
"ids": [
"<string>"
],
"content": "<string>",
"projects": [
"<string>"
],
"creators": [
"<string>"
],
"members": [
"<string>"
]
},
"sort_by": {
"field": "time_created",
"order_ascending": true
}
},
"card_filters": {
"is_parent": true,
"is_child": true,
"has_estimate": true,
"has_members": true,
"has_priority": true,
"has_status": true,
"has_tags": true,
"has_linked_card": true,
"has_due_date": true,
"has_start_date": true,
"has_completed_date": true,
"has_parent_card": true,
"is_archived": true,
"is_watching": true,
"created_from_form": true,
"start_date": {
"before": "now-1d",
"after": "1620997103||-2h"
},
"completed_date": {
"before": "now-1d",
"after": "1620997103||-2h"
},
"due_date": {
"before": "now-1d",
"after": "1620997103||-2h"
},
"time_created": {
"before": "now-1d",
"after": "1620997103||-2h"
},
"time_updated": {
"before": "now-1d",
"after": "1620997103||-2h"
},
"include": {
"ids": [
"<string>"
],
"content": "<string>",
"title": "<string>",
"boards": [
"<string>"
],
"estimates": [
123
],
"lists": [
"<string>"
],
"priority": [
123
],
"projects": [
"<string>"
],
"creators": [
"<string>"
],
"owners": [
"<string>"
],
"members": [
"<string>"
],
"statuses": [
"started"
],
"external_links": [
"github_pull_request"
],
"linked_cards": [
"blocks"
],
"tags": [
"<string>"
],
"parent_cards": [
"<string>"
],
"epics": [
"<string>"
]
},
"exclude": {
"ids": [
"<string>"
],
"content": "<string>",
"title": "<string>",
"boards": [
"<string>"
],
"estimates": [
123
],
"lists": [
"<string>"
],
"priority": [
123
],
"projects": [
"<string>"
],
"creators": [
"<string>"
],
"owners": [
"<string>"
],
"members": [
"<string>"
],
"statuses": [
"started"
],
"external_links": [
"github_pull_request"
],
"linked_cards": [
"blocks"
],
"tags": [
"<string>"
],
"parent_cards": [
"<string>"
],
"epics": [
"<string>"
]
},
"sort_by": {
"field": "time_created",
"order_ascending": true
}
},
"page_filters": {
"is_archived": true,
"time_created": {
"before": "now-1d",
"after": "1620997103||-2h"
},
"time_updated": {
"before": "now-1d",
"after": "1620997103||-2h"
},
"include": {
"ids": [
"<string>"
],
"content": "<string>",
"projects": [
"<string>"
],
"creators": [
"<string>"
],
"members": [
"<string>"
]
},
"exclude": {
"ids": [
"<string>"
],
"content": "<string>",
"projects": [
"<string>"
],
"creators": [
"<string>"
],
"members": [
"<string>"
]
},
"sort_by": {
"field": "time_created",
"order_ascending": true
}
},
"id": "1",
"team_id": "tARGLH5d",
"owner_user_id": "u2DdoERz",
"type": "card",
"name": "my view",
"shared": false,
"time_created": 1608742037016,
"time_updated": 1608742037016
}{
"error": {
"id": "err5f744ab",
"code": 403,
"sec": "SEC:000-00014",
"message": "You do not have access to this resource",
"date": 1608742037016
}
}