{ "swagger": "2.0", "info": { "description": "", "title": "standard public schema", "version": "12.2.0 (ec89f6b)" }, "host": "localhost:8000", "basePath": "/rest/v1", "schemes": ["http"], "consumes": [ "application/json", "application/vnd.pgrst.object+json;nulls=stripped", "application/vnd.pgrst.object+json", "text/csv" ], "produces": [ "application/json", "application/vnd.pgrst.object+json;nulls=stripped", "application/vnd.pgrst.object+json", "text/csv" ], "paths": { "/": { "get": { "produces": ["application/openapi+json", "application/json"], "responses": { "200": { "description": "OK" } }, "summary": "OpenAPI description (this document)", "tags": ["Introspection"] } }, "/lists": { "get": { "parameters": [ { "$ref": "#/parameters/rowFilter.lists.id" }, { "$ref": "#/parameters/rowFilter.lists.user_id" }, { "$ref": "#/parameters/rowFilter.lists.name" }, { "$ref": "#/parameters/select" }, { "$ref": "#/parameters/order" }, { "$ref": "#/parameters/range" }, { "$ref": "#/parameters/rangeUnit" }, { "$ref": "#/parameters/offset" }, { "$ref": "#/parameters/limit" }, { "$ref": "#/parameters/preferCount" } ], "responses": { "200": { "description": "OK", "schema": { "items": { "$ref": "#/definitions/lists" }, "type": "array" } }, "206": { "description": "Partial Content" } }, "tags": ["lists"] }, "post": { "parameters": [ { "$ref": "#/parameters/body.lists" }, { "$ref": "#/parameters/select" }, { "$ref": "#/parameters/preferPost" } ], "responses": { "201": { "description": "Created" } }, "tags": ["lists"] }, "delete": { "parameters": [ { "$ref": "#/parameters/rowFilter.lists.id" }, { "$ref": "#/parameters/rowFilter.lists.user_id" }, { "$ref": "#/parameters/rowFilter.lists.name" }, { "$ref": "#/parameters/preferReturn" } ], "responses": { "204": { "description": "No Content" } }, "tags": ["lists"] }, "patch": { "parameters": [ { "$ref": "#/parameters/rowFilter.lists.id" }, { "$ref": "#/parameters/rowFilter.lists.user_id" }, { "$ref": "#/parameters/rowFilter.lists.name" }, { "$ref": "#/parameters/body.lists" }, { "$ref": "#/parameters/preferReturn" } ], "responses": { "204": { "description": "No Content" } }, "tags": ["lists"] } }, "/tasks": { "get": { "parameters": [ { "$ref": "#/parameters/rowFilter.tasks.id" }, { "$ref": "#/parameters/rowFilter.tasks.list_id" }, { "$ref": "#/parameters/rowFilter.tasks.category_id" }, { "$ref": "#/parameters/rowFilter.tasks.name" }, { "$ref": "#/parameters/rowFilter.tasks.description" }, { "$ref": "#/parameters/rowFilter.tasks.due_date" }, { "$ref": "#/parameters/rowFilter.tasks.priority" }, { "$ref": "#/parameters/rowFilter.tasks.completed" }, { "$ref": "#/parameters/select" }, { "$ref": "#/parameters/order" }, { "$ref": "#/parameters/range" }, { "$ref": "#/parameters/rangeUnit" }, { "$ref": "#/parameters/offset" }, { "$ref": "#/parameters/limit" }, { "$ref": "#/parameters/preferCount" } ], "responses": { "200": { "description": "OK", "schema": { "items": { "$ref": "#/definitions/tasks" }, "type": "array" } }, "206": { "description": "Partial Content" } }, "tags": ["tasks"] }, "post": { "parameters": [ { "$ref": "#/parameters/body.tasks" }, { "$ref": "#/parameters/select" }, { "$ref": "#/parameters/preferPost" } ], "responses": { "201": { "description": "Created" } }, "tags": ["tasks"] }, "delete": { "parameters": [ { "$ref": "#/parameters/rowFilter.tasks.id" }, { "$ref": "#/parameters/rowFilter.tasks.list_id" }, { "$ref": "#/parameters/rowFilter.tasks.category_id" }, { "$ref": "#/parameters/rowFilter.tasks.name" }, { "$ref": "#/parameters/rowFilter.tasks.description" }, { "$ref": "#/parameters/rowFilter.tasks.due_date" }, { "$ref": "#/parameters/rowFilter.tasks.priority" }, { "$ref": "#/parameters/rowFilter.tasks.completed" }, { "$ref": "#/parameters/preferReturn" } ], "responses": { "204": { "description": "No Content" } }, "tags": ["tasks"] }, "patch": { "parameters": [ { "$ref": "#/parameters/rowFilter.tasks.id" }, { "$ref": "#/parameters/rowFilter.tasks.list_id" }, { "$ref": "#/parameters/rowFilter.tasks.category_id" }, { "$ref": "#/parameters/rowFilter.tasks.name" }, { "$ref": "#/parameters/rowFilter.tasks.description" }, { "$ref": "#/parameters/rowFilter.tasks.due_date" }, { "$ref": "#/parameters/rowFilter.tasks.priority" }, { "$ref": "#/parameters/rowFilter.tasks.completed" }, { "$ref": "#/parameters/body.tasks" }, { "$ref": "#/parameters/preferReturn" } ], "responses": { "204": { "description": "No Content" } }, "tags": ["tasks"] } }, "/users": { "get": { "parameters": [ { "$ref": "#/parameters/rowFilter.users.id" }, { "$ref": "#/parameters/rowFilter.users.username" }, { "$ref": "#/parameters/rowFilter.users.email" }, { "$ref": "#/parameters/rowFilter.users.password_hash" }, { "$ref": "#/parameters/select" }, { "$ref": "#/parameters/order" }, { "$ref": "#/parameters/range" }, { "$ref": "#/parameters/rangeUnit" }, { "$ref": "#/parameters/offset" }, { "$ref": "#/parameters/limit" }, { "$ref": "#/parameters/preferCount" } ], "responses": { "200": { "description": "OK", "schema": { "items": { "$ref": "#/definitions/users" }, "type": "array" } }, "206": { "description": "Partial Content" } }, "tags": ["users"] }, "post": { "parameters": [ { "$ref": "#/parameters/body.users" }, { "$ref": "#/parameters/select" }, { "$ref": "#/parameters/preferPost" } ], "responses": { "201": { "description": "Created" } }, "tags": ["users"] }, "delete": { "parameters": [ { "$ref": "#/parameters/rowFilter.users.id" }, { "$ref": "#/parameters/rowFilter.users.username" }, { "$ref": "#/parameters/rowFilter.users.email" }, { "$ref": "#/parameters/rowFilter.users.password_hash" }, { "$ref": "#/parameters/preferReturn" } ], "responses": { "204": { "description": "No Content" } }, "tags": ["users"] }, "patch": { "parameters": [ { "$ref": "#/parameters/rowFilter.users.id" }, { "$ref": "#/parameters/rowFilter.users.username" }, { "$ref": "#/parameters/rowFilter.users.email" }, { "$ref": "#/parameters/rowFilter.users.password_hash" }, { "$ref": "#/parameters/body.users" }, { "$ref": "#/parameters/preferReturn" } ], "responses": { "204": { "description": "No Content" } }, "tags": ["users"] } }, "/categories": { "get": { "parameters": [ { "$ref": "#/parameters/rowFilter.categories.id" }, { "$ref": "#/parameters/rowFilter.categories.name" }, { "$ref": "#/parameters/select" }, { "$ref": "#/parameters/order" }, { "$ref": "#/parameters/range" }, { "$ref": "#/parameters/rangeUnit" }, { "$ref": "#/parameters/offset" }, { "$ref": "#/parameters/limit" }, { "$ref": "#/parameters/preferCount" } ], "responses": { "200": { "description": "OK", "schema": { "items": { "$ref": "#/definitions/categories" }, "type": "array" } }, "206": { "description": "Partial Content" } }, "tags": ["categories"] }, "post": { "parameters": [ { "$ref": "#/parameters/body.categories" }, { "$ref": "#/parameters/select" }, { "$ref": "#/parameters/preferPost" } ], "responses": { "201": { "description": "Created" } }, "tags": ["categories"] }, "delete": { "parameters": [ { "$ref": "#/parameters/rowFilter.categories.id" }, { "$ref": "#/parameters/rowFilter.categories.name" }, { "$ref": "#/parameters/preferReturn" } ], "responses": { "204": { "description": "No Content" } }, "tags": ["categories"] }, "patch": { "parameters": [ { "$ref": "#/parameters/rowFilter.categories.id" }, { "$ref": "#/parameters/rowFilter.categories.name" }, { "$ref": "#/parameters/body.categories" }, { "$ref": "#/parameters/preferReturn" } ], "responses": { "204": { "description": "No Content" } }, "tags": ["categories"] } } }, "definitions": { "lists": { "required": ["id", "user_id", "name"], "properties": { "id": { "description": "Note:\nThis is a Primary Key.", "format": "bigint", "type": "integer" }, "user_id": { "description": "Note:\nThis is a Foreign Key to `users.id`.", "format": "bigint", "type": "integer" }, "name": { "format": "text", "type": "string" } }, "type": "object" }, "tasks": { "required": ["id", "list_id", "name"], "properties": { "id": { "description": "Note:\nThis is a Primary Key.", "format": "bigint", "type": "integer" }, "list_id": { "description": "Note:\nThis is a Foreign Key to `lists.id`.", "format": "bigint", "type": "integer" }, "category_id": { "description": "Note:\nThis is a Foreign Key to `categories.id`.", "format": "bigint", "type": "integer" }, "name": { "format": "text", "type": "string" }, "description": { "format": "text", "type": "string" }, "due_date": { "format": "date", "type": "string" }, "priority": { "format": "integer", "type": "integer" }, "completed": { "default": false, "format": "boolean", "type": "boolean" } }, "type": "object" }, "users": { "required": ["id", "username", "email", "password_hash"], "properties": { "id": { "description": "Note:\nThis is a Primary Key.", "format": "bigint", "type": "integer" }, "username": { "format": "text", "type": "string" }, "email": { "format": "text", "type": "string" }, "password_hash": { "format": "text", "type": "string" } }, "type": "object" }, "categories": { "required": ["id", "name"], "properties": { "id": { "description": "Note:\nThis is a Primary Key.", "format": "bigint", "type": "integer" }, "name": { "format": "text", "type": "string" } }, "type": "object" } }, "parameters": { "preferParams": { "name": "Prefer", "description": "Preference", "required": false, "enum": ["params=single-object"], "in": "header", "type": "string" }, "preferReturn": { "name": "Prefer", "description": "Preference", "required": false, "enum": ["return=representation", "return=minimal", "return=none"], "in": "header", "type": "string" }, "preferCount": { "name": "Prefer", "description": "Preference", "required": false, "enum": ["count=none"], "in": "header", "type": "string" }, "preferPost": { "name": "Prefer", "description": "Preference", "required": false, "enum": [ "return=representation", "return=minimal", "return=none", "resolution=ignore-duplicates", "resolution=merge-duplicates" ], "in": "header", "type": "string" }, "select": { "name": "select", "description": "Filtering Columns", "required": false, "in": "query", "type": "string" }, "on_conflict": { "name": "on_conflict", "description": "On Conflict", "required": false, "in": "query", "type": "string" }, "order": { "name": "order", "description": "Ordering", "required": false, "in": "query", "type": "string" }, "range": { "name": "Range", "description": "Limiting and Pagination", "required": false, "in": "header", "type": "string" }, "rangeUnit": { "name": "Range-Unit", "description": "Limiting and Pagination", "required": false, "default": "items", "in": "header", "type": "string" }, "offset": { "name": "offset", "description": "Limiting and Pagination", "required": false, "in": "query", "type": "string" }, "limit": { "name": "limit", "description": "Limiting and Pagination", "required": false, "in": "query", "type": "string" }, "body.lists": { "name": "lists", "description": "lists", "required": false, "in": "body", "schema": { "$ref": "#/definitions/lists" } }, "rowFilter.lists.id": { "name": "id", "required": false, "format": "bigint", "in": "query", "type": "string" }, "rowFilter.lists.user_id": { "name": "user_id", "required": false, "format": "bigint", "in": "query", "type": "string" }, "rowFilter.lists.name": { "name": "name", "required": false, "format": "text", "in": "query", "type": "string" }, "body.tasks": { "name": "tasks", "description": "tasks", "required": false, "in": "body", "schema": { "$ref": "#/definitions/tasks" } }, "rowFilter.tasks.id": { "name": "id", "required": false, "format": "bigint", "in": "query", "type": "string" }, "rowFilter.tasks.list_id": { "name": "list_id", "required": false, "format": "bigint", "in": "query", "type": "string" }, "rowFilter.tasks.category_id": { "name": "category_id", "required": false, "format": "bigint", "in": "query", "type": "string" }, "rowFilter.tasks.name": { "name": "name", "required": false, "format": "text", "in": "query", "type": "string" }, "rowFilter.tasks.description": { "name": "description", "required": false, "format": "text", "in": "query", "type": "string" }, "rowFilter.tasks.due_date": { "name": "due_date", "required": false, "format": "date", "in": "query", "type": "string" }, "rowFilter.tasks.priority": { "name": "priority", "required": false, "format": "integer", "in": "query", "type": "string" }, "rowFilter.tasks.completed": { "name": "completed", "required": false, "format": "boolean", "in": "query", "type": "string" }, "body.users": { "name": "users", "description": "users", "required": false, "in": "body", "schema": { "$ref": "#/definitions/users" } }, "rowFilter.users.id": { "name": "id", "required": false, "format": "bigint", "in": "query", "type": "string" }, "rowFilter.users.username": { "name": "username", "required": false, "format": "text", "in": "query", "type": "string" }, "rowFilter.users.email": { "name": "email", "required": false, "format": "text", "in": "query", "type": "string" }, "rowFilter.users.password_hash": { "name": "password_hash", "required": false, "format": "text", "in": "query", "type": "string" }, "body.categories": { "name": "categories", "description": "categories", "required": false, "in": "body", "schema": { "$ref": "#/definitions/categories" } }, "rowFilter.categories.id": { "name": "id", "required": false, "format": "bigint", "in": "query", "type": "string" }, "rowFilter.categories.name": { "name": "name", "required": false, "format": "text", "in": "query", "type": "string" } }, "externalDocs": { "description": "PostgREST Documentation", "url": "https://postgrest.org/en/v12.2/api.html" } }