Created
November 15, 2023 21:23
-
-
Save 0x7466/f874ebb98b14a542f78936c009bbe72e to your computer and use it in GitHub Desktop.
Todoist OpenAPI
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openapi: 3.0.0 | |
info: | |
version: 1.0.0 | |
title: Todoist API | |
license: | |
name: MIT | |
servers: | |
- url: https://api.todoist.com/rest/v2 | |
paths: | |
/projects: | |
get: | |
summary: Get all projects | |
operationId: getAllProjects | |
tags: | |
- projects | |
responses: | |
'200': | |
description: An array of projects | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Projects' | |
default: | |
description: unexpected error | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Error' | |
post: | |
summary: Create a new project | |
description: '' | |
operationId: createProject | |
tags: | |
- projects | |
requestBody: | |
required: true | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/NewProject' | |
responses: | |
'200': | |
description: Project successfully created | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Project' | |
default: | |
description: unexpected error | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Error' | |
/tasks: | |
get: | |
summary: Get active tasks | |
operationId: getActiveTasks | |
tags: | |
- tasks | |
parameters: | |
- name: projectId | |
in: query | |
description: The id of the project to retrieve tasks for | |
required: false | |
schema: | |
type: integer | |
responses: | |
'200': | |
description: An array of active tasks | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Tasks' | |
default: | |
description: unexpected error | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Error' | |
post: | |
summary: Create a new task | |
operationId: createTask | |
tags: | |
- tasks | |
requestBody: | |
required: true | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/NewTask' | |
responses: | |
'200': | |
description: Task successfully created | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Task' | |
default: | |
description: unexpected error | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Error' | |
components: | |
schemas: | |
Project: | |
type: object | |
required: | |
- id | |
- name | |
properties: | |
id: | |
type: integer | |
name: | |
type: string | |
NewProject: | |
type: object | |
required: | |
- name | |
properties: | |
name: | |
type: string | |
parent_id: | |
type: string | |
Projects: | |
type: array | |
items: | |
$ref: '#/components/schemas/Project' | |
Task: | |
type: object | |
required: | |
- id | |
- content | |
properties: | |
id: | |
type: integer | |
content: | |
type: string | |
Tasks: | |
type: array | |
items: | |
$ref: '#/components/schemas/Task' | |
NewTask: | |
type: object | |
required: | |
- content | |
properties: | |
content: | |
type: string | |
projectId: | |
type: integer | |
description: The id of the project to which the task belongs | |
Error: | |
type: object | |
required: | |
- code | |
- message | |
properties: | |
code: | |
type: integer | |
format: int32 | |
message: | |
type: string |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment