Skip to content

Instantly share code, notes, and snippets.

@knivets
Last active June 19, 2019 09:08
Show Gist options
  • Save knivets/e2d71acb3b3fd1056afb06cc799fd526 to your computer and use it in GitHub Desktop.
Save knivets/e2d71acb3b3fd1056afb06cc799fd526 to your computer and use it in GitHub Desktop.
{
"swagger": "2.0",
"info": {
"title": "DjaoApp API",
"description": "API to deploy apps on the djaodjin platform",
"termsOfService": "https://djaodjin.com/legal/terms-of-use/",
"contact": {
"email": "test@example.com"
},
"license": {
"name": "BSD License"
},
"version": "v1"
},
"basePath": "/api",
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"securityDefinitions": {
"basic": {
"type": "basic"
}
},
"security": [
{
"basic": []
}
],
"paths": {
"/accounts/": {
"get": {
"operationId": "accounts_list",
"description": "Queries a page (``PAGE_SIZE`` records) of organization and user profiles.\n\nThe queryset can be filtered for at least one field to match a search\nterm (``q``).\n\nThe queryset can be ordered by a field by adding an HTTP query parameter\n``o=`` followed by the field name. A sequence of fields can be used\nto create a complete ordering by adding a sequence of ``o`` HTTP query\nparameters. To reverse the natural order of a field, prefix the field\nname by a minus (-) sign.\n\n**Tags: profile\n\n**Examples\n\n.. code-block:: http\n\n GET /api/accounts/?o=created_at HTTP/1.1\n\nresponds\n\n.. code-block:: json\n\n {\n \"count\": 1,\n \"next\": null,\n \"previous\": null,\n \"results\": [{\n \"slug\": \"xia\",\n \"full_name\": \"Xia Lee\",\n \"printable_name\": \"Xia Lee\",\n \"created_at\": \"2016-01-14T23:16:55Z\"\n }]\n }",
"parameters": [
{
"name": "start_at",
"in": "query",
"description": "date/time in ISO format after which records were created.",
"required": false,
"type": "string"
},
{
"name": "ends_at",
"in": "query",
"description": "date/time in ISO format before which records were created.",
"required": false,
"type": "string"
},
{
"name": "q",
"in": "query",
"description": "search for matching text in slug, full_name, email, phone, street_address, locality, region, postal_code, country, username, first_name, last_name",
"required": false,
"type": "string"
},
{
"name": "o",
"in": "query",
"description": "sort by u, r",
"required": false,
"type": "string"
},
{
"name": "ot",
"in": "query",
"description": "sort by natural ascending or descending order",
"required": false,
"type": "string"
},
{
"name": "page",
"in": "query",
"description": "A page number within the paginated result set.",
"required": false,
"type": "integer"
}
],
"responses": {
"200": {
"description": "",
"schema": {
"required": [
"count",
"results"
],
"type": "object",
"properties": {
"count": {
"type": "integer"
},
"next": {
"type": "string",
"format": "uri"
},
"previous": {
"type": "string",
"format": "uri"
},
"results": {
"type": "array",
"items": {
"$ref": "#/definitions/Organization"
}
}
}
}
}
},
"tags": [
"accounts"
]
},
"parameters": []
},
"/accounts/profiles/": {
"get": {
"operationId": "accounts_profiles_list",
"description": "Queries a page (``PAGE_SIZE`` records) of candidate profiles based\nof a search criteria (``q``).\n\nThis API differs from /api/profile in that it is designed to be used\nin auto-completion input fields instead of designed to list all profiles.\n\nThe queryset can be ordered by a field by adding an HTTP query parameter\n``o=`` followed by the field name. A sequence of fields can be used\nto create a complete ordering by adding a sequence of ``o`` HTTP query\nparameters. To reverse the natural order of a field, prefix the field\nname by a minus (-) sign.\n\n**Tags: profile\n\n**Examples\n\n.. code-block:: http\n\n GET /api/accounts/profile/?q=xia HTTP/1.1\n\nresponds\n\n.. code-block:: json\n\n {\n \"count\": 1,\n \"next\": null,\n \"previous\": null,\n \"results\": [{\n \"slug\": \"xia\",\n \"full_name\": \"Xia Lee\",\n \"printable_name\": \"Xia Lee\",\n \"created_at\": \"2016-01-14T23:16:55Z\"\n }]\n }",
"parameters": [
{
"name": "start_at",
"in": "query",
"description": "date/time in ISO format after which records were created.",
"required": false,
"type": "string"
},
{
"name": "ends_at",
"in": "query",
"description": "date/time in ISO format before which records were created.",
"required": false,
"type": "string"
},
{
"name": "q",
"in": "query",
"description": "search for matching text in slug, full_name, email, phone, street_address, locality, region, postal_code, country, username, first_name, last_name",
"required": false,
"type": "string"
},
{
"name": "o",
"in": "query",
"description": "sort by u, r",
"required": false,
"type": "string"
},
{
"name": "ot",
"in": "query",
"description": "sort by natural ascending or descending order",
"required": false,
"type": "string"
},
{
"name": "page",
"in": "query",
"description": "A page number within the paginated result set.",
"required": false,
"type": "integer"
}
],
"responses": {
"200": {
"description": "",
"schema": {
"required": [
"count",
"results"
],
"type": "object",
"properties": {
"count": {
"type": "integer"
},
"next": {
"type": "string",
"format": "uri"
},
"previous": {
"type": "string",
"format": "uri"
},
"results": {
"type": "array",
"items": {
"$ref": "#/definitions/Organization"
}
}
}
}
}
},
"tags": [
"accounts"
]
},
"parameters": []
},
"/accounts/users/": {
"get": {
"operationId": "accounts_users_list",
"description": "Queries a page (``PAGE_SIZE`` records) of ``User``.\n\nThe queryset can be filtered to a range of dates\n([``start_at``, ``ends_at``]) and for at least one field to match a search\nterm (``q``).\n\nQuery results can be ordered by natural fields (``o``) in either ascending\nor descending order (``ot``).\n\n**Tags: profile\n\n**Examples\n\n.. code-block:: http\n\n GET /api/users/?o=created_at&ot=desc HTTP/1.1\n\nresponds\n\n.. code-block:: json\n\n {\n \"count\": 1,\n \"next\": null,\n \"previous\": null,\n \"results\": [\n {\n \"slug\": \"alice\",\n \"email\": \"alice@djaodjin.com\",\n \"full_name\": \"Alice Cooper\",\n \"created_at\": \"2014-01-01T00:00:00Z\"\n }\n ]\n }",
"parameters": [
{
"name": "start_at",
"in": "query",
"description": "date/time in ISO format after which records were created.",
"required": false,
"type": "string"
},
{
"name": "ends_at",
"in": "query",
"description": "date/time in ISO format before which records were created.",
"required": false,
"type": "string"
},
{
"name": "o",
"in": "query",
"description": "sort by first_name, last_name, email, created_at",
"required": false,
"type": "string"
},
{
"name": "ot",
"in": "query",
"description": "sort by natural ascending or descending order",
"required": false,
"type": "string"
},
{
"name": "q",
"in": "query",
"description": "search for matching text in first_name, last_name, email",
"required": false,
"type": "string"
},
{
"name": "page",
"in": "query",
"description": "A page number within the paginated result set.",
"required": false,
"type": "integer"
}
],
"responses": {
"200": {
"description": "",
"schema": {
"required": [
"count",
"results"
],
"type": "object",
"properties": {
"count": {
"type": "integer"
},
"next": {
"type": "string",
"format": "uri"
},
"previous": {
"type": "string",
"format": "uri"
},
"results": {
"type": "array",
"items": {
"$ref": "#/definitions/User"
}
}
}
}
}
},
"tags": [
"accounts"
]
},
"parameters": []
},
"/auth/": {
"post": {
"operationId": "auth_create",
"description": "Returns a JSON Web Token that can be used in requests that require\nauthentication.\n\n**Tags: auth\n\n**Example\n\n.. code-block:: http\n\n POST /api/auth/ HTTP/1.1\n\n.. code-block:: json\n\n {\n \"username\": \"donny\",\n \"password\": \"yoyo\"\n }\n\nresponds\n\n.. code-block:: json\n\n {\"token\":\"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VybmFtZSI6ImRvbm55IiwiZW1haWwiOiJzbWlyb2xvKzRAZGphb2RqaW4uY29tIiwiZnVsbF9uYW1lIjoiRG9ubnkgQ29vcGVyIiwiZXhwIjoxNTI5NjU4NzEwfQ.F2y1iwj5NHlImmPfSff6IHLN7sUXpBFmX0qjCbFTe6A\"}",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/Credentials"
}
}
],
"responses": {
"201": {
"description": "",
"schema": {
"$ref": "#/definitions/Token"
}
},
"400": {
"description": "parameters error",
"schema": {
"$ref": "#/definitions/ValidationError"
}
}
},
"tags": [
"auth"
]
},
"parameters": []
},
"/auth/logout/": {
"post": {
"operationId": "auth_logout_create",
"description": "Removes all cookies associated with the session.\n\nThis API endpoint is only useful when the user is using Cookie-based\nauthentication. Tokens expire; they cannot be revoked.\n\n**Tags: auth\n\n**Example\n\n.. code-block:: http\n\n POST /api/auth/logout/ HTTP/1.1\n\n.. code-block:: json\n\n {\n \"token\": \"670yoaq34rotlgqpoxzmw435Alrdf\"\n }",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/Token"
}
}
],
"responses": {
"201": {
"description": "",
"schema": {
"$ref": "#/definitions/Token"
}
}
},
"tags": [
"auth"
]
},
"parameters": []
},
"/auth/recover/": {
"post": {
"operationId": "auth_recover_create",
"description": "",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/PasswordReset"
}
}
],
"responses": {
"201": {
"description": "",
"schema": {
"$ref": "#/definitions/PasswordReset"
}
}
},
"tags": [
"auth"
]
},
"parameters": []
},
"/auth/register/": {
"post": {
"operationId": "auth_register_create",
"description": "Creates a new user and returns a JSON Web Token that can subsequently\nbe used to authenticate the new user in HTTP requests.\n\n**Tags: auth\n\n**Example\n\n.. code-block:: http\n\n POST /api/auth/register/ HTTP/1.1\n\n.. code-block:: json\n\n {\n \"username\": \"joe1\",\n \"password\": \"yoyo\",\n \"email\": \"joe+1@example.com\",\n \"full_name\": \"Joe Card1\"\n }\n\nresponds\n\n.. code-block:: json\n\n {\n \"token\": \"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VybmFtZSI6ImpvZTEiLCJlbWFpbCI6ImpvZSsxQGRqYW9kamluLmNvbSIsImZ1bGxfbmFtZSI6IkpvZSAgQ2FyZDEiLCJleHAiOjE1Mjk2NTUyMjR9.GFxjU5AvcCQbVylF1PJwcBUUMECj8AKxsHtRHUSypco\"\n }",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/CreateUser"
}
}
],
"responses": {
"201": {
"description": "",
"schema": {
"$ref": "#/definitions/Token"
}
},
"400": {
"description": "parameters error",
"schema": {
"$ref": "#/definitions/ValidationError"
}
}
},
"tags": [
"auth"
]
},
"parameters": []
},
"/auth/tokens/": {
"post": {
"operationId": "auth_tokens_create",
"description": "Refreshes a JSON Web Token by verifying the token and creating\na new one that expires further in the future.\n\nThe authenticated user and the user associated to the token should be\nidentical.\n\n**Tags: auth\n\n**Example\n\n.. code-block:: http\n\n POST /api/tokens/ HTTP/1.1\n\n.. code-block:: json\n\n {\n \"token\": \"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VybmFtZSI6ImRvbm55IiwiZW1haWwiOiJzbWlyb2xvKzRAZGphb2RqaW4uY29tIiwiZnVsbF9uYW1lIjoiRG9ubnkgQ29vcGVyIiwiZXhwIjoxNTI5NjU4NzEwfQ.F2y1iwj5NHlImmPfSff6IHLN7sUXpBFmX0qjCbFTe6A\"\n }\n\n.. code-block:: json\n\n {\n \"token\": \"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VybmFtZSI6ImRvbm55IiwiZW1haWwiOiJzbWlyb2xvKzRAZGphb2RqaW4uY29tIiwiZnVsbF9uYW1lIjoiRG9ubnkgQ29vcGVyIiwiZXhwIjoxNTI5Njk1NjA1fQ.-uuZb8R68jWw1Tc9FJocOWe1KHFklRffXbH0Rg6d_0c\"\n }",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/Token"
}
}
],
"responses": {
"201": {
"description": "",
"schema": {
"$ref": "#/definitions/Token"
}
}
},
"tags": [
"auth"
]
},
"parameters": []
},
"/auth/tokens/realms/": {
"get": {
"operationId": "auth_tokens_realms_read",
"description": "Gets temporary credentials to access S3 directly from the browser.\n\n**Examples\n\n.. code-block:: http\n\n GET /api/auth/realms/cowork/ HTTP/1.1\n\nresponds\n\n.. code-block:: json\n\n {\n \"location\": \"\",\n \"access_key\": \"\",\n \"acl\": \"private\",\n \"policy\": \"\",\n \"signature\": \"\",\n \"security_token\": \"\",\n \"x_amz_credential\": \"\",\n \"x_amz_date\": \"\"\n }",
"parameters": [],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/AuthRealms"
}
}
},
"tags": [
"auth"
]
},
"parameters": []
},
"/auth/tokens/realms/{organization}/": {
"get": {
"operationId": "auth_tokens_realms_read_org",
"description": "Gets temporary credentials to access S3 directly from the browser.\n\n**Examples\n\n.. code-block:: http\n\n GET /api/auth/realms/cowork/ HTTP/1.1\n\nresponds\n\n.. code-block:: json\n\n {\n \"location\": \"\",\n \"access_key\": \"\",\n \"acl\": \"private\",\n \"policy\": \"\",\n \"signature\": \"\",\n \"security_token\": \"\",\n \"x_amz_credential\": \"\",\n \"x_amz_date\": \"\"\n }",
"parameters": [],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/AuthRealms"
}
}
},
"tags": [
"auth"
]
},
"parameters": [
{
"name": "organization",
"in": "path",
"required": true,
"type": "string"
}
]
},
"/auth/tokens/verify/": {
"post": {
"operationId": "auth_tokens_verify_create",
"description": "Verifies a JSON Web Token.\n\nThe authenticated user and the user associated to the token should be\nidentical.\n\n**Tags: auth\n\n**Example\n\n.. code-block:: http\n\n POST /api/tokens/verify/ HTTP/1.1\n\n.. code-block:: json\n\n {\n \"token\": \"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VybmFtZSI6ImRvbm55IiwiZW1haWwiOiJzbWlyb2xvKzRAZGphb2RqaW4uY29tIiwiZnVsbF9uYW1lIjoiRG9ubnkgQ29vcGVyIiwiZXhwIjoxNTI5NjU4NzEwfQ.F2y1iwj5NHlImmPfSff6IHLN7sUXpBFmX0qjCbFTe6A\"\n }\n\nresponds\n\n.. code-block:: json\n\n {\n \"token\": \"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VybmFtZSI6ImRvbm55IiwiZW1haWwiOiJzbWlyb2xvKzRAZGphb2RqaW4uY29tIiwiZnVsbF9uYW1lIjoiRG9ubnkgQ29vcGVyIiwiZXhwIjoxNTI5NjU4NzEwfQ.F2y1iwj5NHlImmPfSff6IHLN7sUXpBFmX0qjCbFTe6A\"\n }",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/Token"
}
}
],
"responses": {
"200": {
"description": "Token is valid",
"schema": {
"$ref": "#/definitions/Token"
}
},
"400": {
"description": "Token is invalid",
"schema": {
"$ref": "#/definitions/ValidationError"
}
}
},
"tags": [
"auth"
]
},
"parameters": []
},
"/billing/charges/": {
"get": {
"operationId": "billing_charges_list",
"description": "Queries a page (``PAGE_SIZE`` records) of ``Charge`` that were created\non the processor.\n\nThe queryset can be filtered to a range of dates\n([``start_at``, ``ends_at``]) and for at least one field to match a search\nterm (``q``).\n\nQuery results can be ordered by natural fields (``o``) in either ascending\nor descending order (``ot``).\n\n**Tags: billing\n\n**Examples\n\n.. code-block:: http\n\n GET /api/billing/charges?start_at=2015-07-05T07:00:00.000Z&o=date&ot=desc HTTP/1.1\n\nRetrieve the list of charges that were created before\n2015-07-05T07:00:00.000Z, sort them by date in descending order.\n\n.. code-block:: json\n\n {\n \"count\": 1,\n \"unit\": \"usd\",\n \"total\": \"112120\",\n \"next\": null,\n \"previous\": null,\n \"results\": [{\n \"created_at\": \"2016-01-01T00:00:00Z\",\n \"readable_amount\": \"$1121.20\",\n \"amount\": 112120,\n \"unit\": \"usd\",\n \"description\": \"Charge for subscription to cowork open-space\",\n \"last4\": \"1234\",\n \"exp_date\"\" \"12/2016\",\n \"processor_key\": \"ch_XAb124EF\",\n \"state\": \"DONE\"\n } ...]",
"parameters": [
{
"name": "start_at",
"in": "query",
"description": "date/time in ISO format after which records were created.",
"required": false,
"type": "string"
},
{
"name": "ends_at",
"in": "query",
"description": "date/time in ISO format before which records were created.",
"required": false,
"type": "string"
},
{
"name": "o",
"in": "query",
"description": "sort by description, amount, Full name, created_at",
"required": false,
"type": "string"
},
{
"name": "ot",
"in": "query",
"description": "sort by natural ascending or descending order",
"required": false,
"type": "string"
},
{
"name": "q",
"in": "query",
"description": "search for matching text in description, processor_key, customer__full_name",
"required": false,
"type": "string"
},
{
"name": "page",
"in": "query",
"description": "A page number within the paginated result set.",
"required": false,
"type": "integer"
}
],
"responses": {
"200": {
"description": "",
"schema": {
"required": [
"total",
"count",
"results"
],
"type": "object",
"properties": {
"total": {
"description": "The sum of all Charge amount (in unit)",
"type": "integer"
},
"count": {
"description": "The number of records",
"type": "integer"
},
"next": {
"description": "API end point to get the next pageof records matching the query",
"type": "string",
"format": "uri"
},
"previous": {
"description": "API end point to get the previous pageof records matching the query",
"type": "string",
"format": "uri"
},
"results": {
"type": "array",
"items": {
"$ref": "#/definitions/Charge"
}
}
}
}
}
},
"tags": [
"billing"
]
},
"parameters": []
},
"/billing/charges/{charge}/": {
"get": {
"operationId": "billing_charges_read",
"description": "Pass through to the processor and returns details about a ``Charge``.\n\n**Tags: billing\n\n**Examples\n\n.. code-block:: http\n\n GET /api/billing/charges/ch_XAb124EF/ HTTP/1.1\n\n.. code-block:: json\n\n {\n \"created_at\": \"2016-01-01T00:00:00Z\",\n \"readable_amount\": \"$1121.20\",\n \"amount\": 112120,\n \"unit\": \"usd\",\n \"description\": \"Charge for subscription to cowork open-space\",\n \"last4\": \"1234\",\n \"exp_date\"\" \"12/2016\",\n \"processor_key\": \"ch_XAb124EF\",\n \"state\": \"DONE\"\n }",
"parameters": [],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/Charge"
}
}
},
"tags": [
"billing"
]
},
"parameters": [
{
"name": "charge",
"in": "path",
"required": true,
"type": "string"
}
]
},
"/billing/charges/{charge}/email/": {
"post": {
"operationId": "billing_charges_email_create",
"description": "Email the charge receipt to the customer email address on file.\n\n**Tags: billing\n\n**Example\n\n.. code-block:: http\n\n POST /api/billing/charges/ch_XAb124EF/email/ HTTP/1.1\n\nresponds\n\n.. code-block:: json\n\n {\n \"charge_id\": \"ch_XAb124EF\",\n \"email\": \"joe@localhost.localdomain\"\n }\n\nThe service sends a duplicate e-mail receipt for charge `ch_XAb124EF`\nto the e-mail address of the customer, i.e. `joe@localhost.localdomain`.",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/EmailChargeReceipt"
}
}
],
"responses": {
"201": {
"description": "",
"schema": {
"$ref": "#/definitions/EmailChargeReceipt"
}
}
},
"tags": [
"billing"
]
},
"parameters": [
{
"name": "charge",
"in": "path",
"required": true,
"type": "string"
}
]
},
"/billing/charges/{charge}/refund/": {
"post": {
"operationId": "billing_charges_refund_create",
"description": "Partially or totally refund all or a subset of line items on a ``Charge``.\n\n**Tags: billing\n\n**Example\n\n.. code-block:: http\n\n POST /api/billing/charges/ch_XAb124EF/refund/ HTTP/1.1\n\n.. code-block:: json\n\n {\n \"lines\": [\n {\n \"num\": 0,\n \"refunded_amount\": 4000,\n },\n {\n \"num\": 1,\n \"refunded_amount\": 82120,\n }\n ]\n }\n\nRefunds $40 and $821.20 from first and second line item on the receipt\nrespectively. The API call responds with the Charge.\n\n.. code-block:: json\n\n {\n \"created_at\": \"2016-01-01T00:00:00Z\",\n \"readable_amount\": \"$1121.20\",\n \"amount\": 112120,\n \"unit\": \"usd\",\n \"description\": \"Charge for subscription to cowork open-space\",\n \"last4\": \"1234\",\n \"exp_date\"\" \"12/2016\",\n \"processor_key\": \"ch_XAb124EF\",\n \"state\": \"DONE\"\n }",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/RefundCharge"
}
}
],
"responses": {
"200": {
"description": "Refund successful",
"schema": {
"$ref": "#/definitions/Charge"
}
},
"400": {
"description": "parameters error",
"schema": {
"$ref": "#/definitions/ValidationError"
}
}
},
"tags": [
"billing"
]
},
"parameters": [
{
"name": "charge",
"in": "path",
"required": true,
"type": "string"
}
]
},
"/billing/transactions/": {
"get": {
"operationId": "billing_transactions_list",
"description": "Queries a page (``PAGE_SIZE`` records) of ``Transaction`` from\nthe :doc:`ledger <ledger>`.\n\nThe queryset can be filtered to a range of dates\n([``start_at``, ``ends_at``]) and for at least one field to match a search\nterm (``q``).\n\nQuery results can be ordered by natural fields (``o``) in either ascending\nor descending order (``ot``).\n\n**Tags: billing\n\n**Examples\n\n.. code-block:: http\n\n GET /api/billing/transactions?start_at=2015-07-05T07:00:00.000Z&o=date&ot=desc HTTP/1.1\n\nresponds\n\n.. code-block:: json\n\n {\n \"ends_at\": \"2017-03-30T18:10:12.962859Z\",\n \"balance\": 11000,\n \"unit\": \"usd\",\n \"count\": 1,\n \"next\": null,\n \"previous\": null,\n \"results\": [\n {\n \"created_at\": \"2017-02-01T00:00:00Z\",\n \"description\": \"Charge for 4 periods\",\n \"amount\": \"($356.00)\",\n \"is_debit\": true,\n \"orig_account\": \"Liability\",\n \"orig_organization\": \"xia\",\n \"orig_amount\": 112120,\n \"orig_unit\": \"usd\",\n \"dest_account\": \"Funds\",\n \"dest_organization\": \"stripe\",\n \"dest_amount\": 112120,\n \"dest_unit\": \"usd\"\n }\n ]\n }",
"parameters": [
{
"name": "start_at",
"in": "query",
"description": "date/time in ISO format after which records were created.",
"required": false,
"type": "string"
},
{
"name": "ends_at",
"in": "query",
"description": "date/time in ISO format before which records were created.",
"required": false,
"type": "string"
},
{
"name": "q",
"in": "query",
"description": "search for matching text in descr, orig_organization__full_name, dest_organization__full_name",
"required": false,
"type": "string"
},
{
"name": "o",
"in": "query",
"description": "sort by description, amount, dest_organization, dest_account, orig_organization, orig_account, created_at",
"required": false,
"type": "string"
},
{
"name": "ot",
"in": "query",
"description": "sort by natural ascending or descending order",
"required": false,
"type": "string"
},
{
"name": "page",
"in": "query",
"description": "A page number within the paginated result set.",
"required": false,
"type": "integer"
}
],
"responses": {
"200": {
"description": "",
"schema": {
"required": [
"balance",
"unit",
"count",
"results"
],
"type": "object",
"properties": {
"balance": {
"description": "balance of all transactions in cents (i.e. 100ths) of unit",
"type": "integer"
},
"unit": {
"description": "three-letter ISO 4217 code for currency unit (ex: usd)",
"type": "integer"
},
"count": {
"description": "The number of records",
"type": "integer"
},
"next": {
"description": "API end point to get the next pageof records matching the query",
"type": "string",
"format": "uri"
},
"previous": {
"description": "API end point to get the previous pageof records matching the query",
"type": "string",
"format": "uri"
},
"results": {
"type": "array",
"items": {
"$ref": "#/definitions/Transaction"
}
}
}
}
}
},
"tags": [
"billing"
]
},
"parameters": []
},
"/billing/{organization}/balance/cancel/": {
"delete": {
"operationId": "billing_balance_cancel_delete",
"description": "Cancel the balance for a provider organization. This will create\na transaction for this balance cancellation. A manager can use\nthis endpoint to cancel balance dues that is known impossible\nto be recovered (e.g. an external bank or credit card company\nact).\n\nThe endpoint returns the transaction created to cancel the\nbalance due.\n\n**Tags: billing\n\n**Examples\n\n.. code-block:: http\n\n DELETE /api/billing/cowork/balance/ HTTP/1.1",
"parameters": [],
"responses": {
"204": {
"description": ""
}
},
"tags": [
"billing"
]
},
"parameters": [
{
"name": "organization",
"in": "path",
"required": true,
"type": "string"
}
]
},
"/billing/{organization}/bank/": {
"get": {
"operationId": "billing_bank_read",
"description": "Pass through that calls the processor API to retrieve some details about\nthe deposit account associated to a provider (if that information is\navailable through the :doc:`payment processor backend<backends>` API).\n\nThis API does not trigger payment of a subscriber to a provider. Checkout\nof a subscription cart is done either through the\n:ref:`HTML page<pages_cart>` or :ref:`API end point<api_checkout>`.\n\n**Examples\n\n.. code-block:: http\n\n GET /api/billing/cowork/bank/ HTTP/1.1\n\nresponds\n\n.. code-block:: json\n\n {\n \"bank_name\": \"Stripe Test Bank\",\n \"last4\": \"***-htrTZ\",\n \"balance_amount\": 0,\n \"balance_unit\": \"usd\"\n }",
"parameters": [],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/Bank"
}
}
},
"tags": [
"billing"
]
},
"parameters": [
{
"name": "organization",
"in": "path",
"required": true,
"type": "string"
}
]
},
"/billing/{organization}/card/": {
"get": {
"operationId": "billing_card_read",
"description": "Pass through to the processor to retrieve some details about\nthe payment method (ex: credit card) associated to a subscriber.\n\n**Examples\n\n.. code-block:: http\n\n GET /api/billing/cowork/card/ HTTP/1.1\n\nresponds\n\n.. code-block:: json\n\n {\n \"last4\": \"1234\",\n \"exp_date\": \"12/2019\"\n }",
"parameters": [],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/Card"
}
}
},
"tags": [
"billing"
]
},
"put": {
"operationId": "billing_card_update",
"description": "Pass through to the processor to update some details about\nthe payment method (ex: credit card) associated to a subscriber.\n\n**Examples\n\n.. code-block:: http\n\n PUT /api/billing/cowork/card/ HTTP/1.1\n\n.. code-block:: json\n\n {\n \"token\": \"xyz\",\n }\n\nresponds\n\n.. code-block:: json\n\n {\n \"last4\": \"1234\",\n \"exp_date\": \"12/2019\"\n }",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/Card"
}
}
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/Card"
}
}
},
"tags": [
"billing"
]
},
"patch": {
"operationId": "billing_card_partial_update",
"description": "Pass through to the processor to retrieve some details about\nthe payment method (ex: credit card) associated to a subscriber.\n\n**Examples\n\n.. code-block:: http\n\n GET /api/billing/cowork/card/ HTTP/1.1\n\nresponds\n\n.. code-block:: json\n\n {\n \"last4\": \"1234\",\n \"exp_date\": \"12/2019\"\n }",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/Card"
}
}
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/Card"
}
}
},
"tags": [
"billing"
]
},
"delete": {
"operationId": "billing_card_delete",
"description": "Pass through to the processor to remove the payment method (ex: credit\ncard) associated to a subscriber.\n\n**Examples\n\n.. code-block:: http\n\n DELETE /api/billing/cowork/card/ HTTP/1.1",
"parameters": [],
"responses": {
"204": {
"description": ""
}
},
"tags": [
"billing"
]
},
"parameters": [
{
"name": "organization",
"in": "path",
"required": true,
"type": "string"
}
]
},
"/billing/{organization}/checkout/": {
"get": {
"operationId": "billing_checkout_read",
"description": "Get a list indexed by plans of items that will be charged\n(`lines`) and options that could be charged instead.\n\nIn many subscription businesses, it is possible to buy multiple\nperiod in advance at a discount. The options reflects that.\n\n**Tags: billing\n\n**Examples\n\n.. code-block:: http\n\n GET /api/billing/xia/checkout HTTP/1.1\n\nresponds\n\n.. code-block:: json\n\n {\"items\":\n [{\n \"subscription\":{\n \"created_at\":\"2016-06-21T23:24:09.242925Z\",\n \"ends_at\":\"2016-10-21T23:24:09.229768Z\",\n \"description\":null,\n \"organization\":{\n \"slug\":\"xia\",\n \"full_name\":\"Xia\",\n \"printable_name\":\"Xia\",\n \"created_at\":\"2012-08-14T23:16:55Z\",\n \"email\":\"xia@localhost.localdomain\"\n },\n \"plan\":{\n \"slug\":\"basic\",\n \"title\":\"Basic\",\n \"description\":\"Basic Plan\",\n \"is_active\":true,\n \"setup_amount\":0,\n \"period_amount\":2000,\n \"interval\":4,\n \"app_url\":\"/app/\"\n },\n \"auto_renew\":true\n },\n \"lines\":[{\n \"created_at\":\"2016-06-21T23:42:13.863739Z\",\n \"description\":\"Subscription to basic until 2016/11/21 (1 month)\",\n \"amount\":\"$20.00\",\n \"is_debit\":false,\n \"orig_account\":\"Receivable\",\n \"orig_organization\":\"cowork\",\n \"orig_amount\":2000,\n \"orig_unit\":\"usd\",\n \"dest_account\":\"Payable\",\n \"dest_organization\":\"xia\",\n \"dest_amount\":2000,\n \"dest_unit\":\"usd\"\n }],\n \"options\":[]\n }]\n }",
"parameters": [],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/OrganizationCart"
}
}
},
"tags": [
"billing"
]
},
"post": {
"operationId": "billing_checkout_create",
"description": "Places an order for the subscription items in the cart and creates\na ``Charge`` on the ``{organization}`` payment card.\n\nIf the charge fails a balance is due, to be collected later.\n\nThe cart is manipulated through various API endpoints:\n\n- `/api/cart/redeem/` applies a coupon code for a potential discount.\n- `/api/cart/` adds or updates a cart item.\n- `/api/cart/{plan}` removes a cart item.\n\n**Tags: billing\n\n**Examples\n\n.. code-block:: http\n\n POST /api/billing/xia/checkout\n\n {\n \"remember_card\": true,\n \"processor_token\": \"tok_23prgoqpstf56todq\"\n }\n\nresponds\n\n.. code-block:: json\n\n {\n \"created_at\": \"2016-06-21T23:42:44.270977Z\",\n \"processor_key\": \"pay_5lK5TacFH3gbKe\"\n \"amount\": 2000,\n \"unit\": \"usd\",\n \"description\": \"Charge pay_5lK5TacFH3gblP on credit card\"\" of Xia\",\n \"last4\": \"1234\",\n \"exp_date\": \"2016-06-01\",\n \"state\": \"created\"\n }",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/Checkout"
}
}
],
"responses": {
"201": {
"description": "",
"schema": {
"$ref": "#/definitions/Charge"
}
}
},
"tags": [
"billing"
]
},
"parameters": [
{
"name": "organization",
"in": "path",
"required": true,
"type": "string"
}
]
},
"/billing/{organization}/coupons/": {
"get": {
"operationId": "billing_coupons_list",
"description": "Queries a page (``PAGE_SIZE`` records) of ``Coupon`` associated\nto a provider.\n\nThe queryset can be filtered to a range of dates\n([``start_at``, ``ends_at``]) and for at least one field to match a search\nterm (``q``).\n\nQuery results can be ordered by natural fields (``o``) in either ascending\nor descending order (``ot``).\n\n**Tags: billing\n\n**Examples\n\n.. code-block:: http\n\n GET /api/billing/cowork/coupons?o=code&ot=asc&q=DIS HTTP/1.1\n\nretrieves the list of Coupon for provider cowork where `code`\nmatches 'DIS', ordered by `code` in ascending order.\n\n.. code-block:: json\n\n {\n \"count\": 2,\n \"next\": null,\n \"previous\": null,\n \"results\": [\n {\n \"code\": \"DIS100\",\n \"percent\": 100,\n \"created_at\": \"2014-01-01T09:00:00Z\",\n \"ends_at\": null,\n \"description\": null\n },\n {\n \"code\": \"DIS50\",\n \"percent\": 50,\n \"created_at\": \"2014-01-01T09:00:00Z\",\n \"ends_at\": null,\n \"description\": null\n }\n ]\n }",
"parameters": [
{
"name": "o",
"in": "query",
"description": "sort by code, created_at, description, ends_at, percent",
"required": false,
"type": "string"
},
{
"name": "ot",
"in": "query",
"description": "sort by natural ascending or descending order",
"required": false,
"type": "string"
},
{
"name": "q",
"in": "query",
"description": "search for matching text in code, description, percent, organization__full_name",
"required": false,
"type": "string"
},
{
"name": "start_at",
"in": "query",
"description": "date/time in ISO format after which records were created.",
"required": false,
"type": "string"
},
{
"name": "ends_at",
"in": "query",
"description": "date/time in ISO format before which records were created.",
"required": false,
"type": "string"
},
{
"name": "page",
"in": "query",
"description": "A page number within the paginated result set.",
"required": false,
"type": "integer"
}
],
"responses": {
"200": {
"description": "",
"schema": {
"required": [
"count",
"results"
],
"type": "object",
"properties": {
"count": {
"type": "integer"
},
"next": {
"type": "string",
"format": "uri"
},
"previous": {
"type": "string",
"format": "uri"
},
"results": {
"type": "array",
"items": {
"$ref": "#/definitions/Coupon"
}
}
}
}
}
},
"tags": [
"billing"
]
},
"post": {
"operationId": "billing_coupons_create",
"description": "Creates a ``Coupon`` to be used on provider's plans.\n\nCustomers will be able to use the `code` until `ends_at`\nto subscribe to plans from the Coupon's provider at a discount.\n\n**Examples\n\n.. code-block:: http\n\n POST /api/billing/cowork/coupons HTTP/1.1\n\n.. code-block:: json\n\n {\n \"code\": \"DIS100\",\n \"percent\": 100,\n \"ends_at\": null,\n \"description\": null\n }",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/Coupon"
}
}
],
"responses": {
"201": {
"description": "",
"schema": {
"$ref": "#/definitions/Coupon"
}
}
},
"tags": [
"billing"
]
},
"parameters": [
{
"name": "organization",
"in": "path",
"required": true,
"type": "string"
}
]
},
"/billing/{organization}/coupons/{coupon}/": {
"get": {
"operationId": "billing_coupons_read",
"description": "Retrieves a ``Coupon``.\n\n**Tags: billing\n\n**Examples\n\n.. code-block:: http\n\n GET /api/billing/cowork/coupons/DIS100 HTTP/1.1\n\n.. code-block:: json\n\n {\n \"code\": \"DIS100\",\n \"percent\": 100,\n \"created_at\": \"2014-01-01T09:00:00Z\",\n \"ends_at\": null,\n \"description\": null\n }",
"parameters": [],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/Coupon"
}
}
},
"tags": [
"billing"
]
},
"put": {
"operationId": "billing_coupons_update",
"description": "Updates a ``Coupon``.\n\n**Tags: billing\n\n**Examples\n\n.. code-block:: http\n\n PUT /api/billing/cowork/coupons/DIS100 HTTP/1.1\n\n.. code-block:: json\n\n {\n \"percent\": 100,\n \"ends_at\": null,\n \"description\": null\n }",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/Coupon"
}
}
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/Coupon"
}
}
},
"tags": [
"billing"
]
},
"patch": {
"operationId": "billing_coupons_partial_update",
"description": "Retrieves a ``Coupon``.\n\n**Tags: billing\n\n**Examples\n\n.. code-block:: http\n\n GET /api/billing/cowork/coupons/DIS100 HTTP/1.1\n\n.. code-block:: json\n\n {\n \"code\": \"DIS100\",\n \"percent\": 100,\n \"created_at\": \"2014-01-01T09:00:00Z\",\n \"ends_at\": null,\n \"description\": null\n }",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/Coupon"
}
}
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/Coupon"
}
}
},
"tags": [
"billing"
]
},
"delete": {
"operationId": "billing_coupons_delete",
"description": "Deletes a ``Coupon``.\n\nOnly coupons which have never been applied to an oder will\nbe permanently deleted. Coupons which have already be used\nat least once will be de-activated and still available for\nperformance measurements.\n\n**Tags: billing\n\n**Examples\n\n.. code-block:: http\n\n DELETE /api/billing/cowork/coupons/DIS100 HTTP/1.1",
"parameters": [],
"responses": {
"204": {
"description": ""
}
},
"tags": [
"billing"
]
},
"parameters": [
{
"name": "coupon",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "organization",
"in": "path",
"required": true,
"type": "string"
}
]
},
"/billing/{organization}/history/": {
"get": {
"operationId": "billing_history_list",
"description": "Queries a page (``PAGE_SIZE`` records) of ``Transaction`` associated\nto ``{organization}`` while the organization acts as a subscriber.\n\nThe queryset can be filtered to a range of dates\n([``start_at``, ``ends_at``]) and for at least one field to match a search\nterm (``q``).\n\nQuery results can be ordered by natural fields (``o``) in either ascending\nor descending order (``ot``).\n\nThis API end point is typically used to display orders, payments and refunds\nof a subscriber (see :ref:`subscribers pages <_pages_subscribers>`)\n\n**Tags: billing\n\n**Examples\n\n.. code-block:: http\n\n GET /api/billing/xia/history?start_at=2015-07-05T07:00:00.000Z&o=date&ot=desc HTTP/1.1\n\n.. code-block:: json\n\n {\n \"count\": 1,\n \"next\": null,\n \"previous\": null,\n \"balance\": 11000,\n \"unit\": \"usd\",\n \"results\": [\n {\n \"created_at\": \"2015-08-01T00:00:00Z\",\n \"description\": \"Charge for 4 periods\",\n \"amount\": \"($356.00)\",\n \"is_debit\": true,\n \"orig_account\": \"Liability\",\n \"orig_organization\": \"xia\",\n \"orig_amount\": 112120,\n \"orig_unit\": \"usd\",\n \"dest_account\": \"Funds\",\n \"dest_organization\": \"stripe\",\n \"dest_amount\": 112120,\n \"dest_unit\": \"usd\"\n }\n ]\n }",
"parameters": [
{
"name": "start_at",
"in": "query",
"description": "date/time in ISO format after which records were created.",
"required": false,
"type": "string"
},
{
"name": "ends_at",
"in": "query",
"description": "date/time in ISO format before which records were created.",
"required": false,
"type": "string"
},
{
"name": "q",
"in": "query",
"description": "search for matching text in descr, orig_organization__full_name, dest_organization__full_name",
"required": false,
"type": "string"
},
{
"name": "o",
"in": "query",
"description": "sort by description, amount, dest_organization, dest_account, orig_organization, orig_account, created_at",
"required": false,
"type": "string"
},
{
"name": "ot",
"in": "query",
"description": "sort by natural ascending or descending order",
"required": false,
"type": "string"
},
{
"name": "page",
"in": "query",
"description": "A page number within the paginated result set.",
"required": false,
"type": "integer"
}
],
"responses": {
"200": {
"description": "",
"schema": {
"required": [
"count",
"results"
],
"type": "object",
"properties": {
"count": {
"type": "integer"
},
"next": {
"type": "string",
"format": "uri"
},
"previous": {
"type": "string",
"format": "uri"
},
"results": {
"type": "array",
"items": {
"$ref": "#/definitions/Transaction"
}
}
}
}
}
},
"tags": [
"billing"
]
},
"parameters": [
{
"name": "organization",
"in": "path",
"required": true,
"type": "string"
}
]
},
"/billing/{organization}/receivables/": {
"get": {
"operationId": "billing_receivables_list",
"description": "Queries a page (``PAGE_SIZE`` records) of ``Transaction`` marked\nas receivables associated to ``{organization}`` while the organization\nacts as a provider.\n\nThe queryset can be filtered to a range of dates\n([``start_at``, ``ends_at``]) and for at least one field to match a search\nterm (``q``).\n\nQuery results can be ordered by natural fields (``o``) in either ascending\nor descending order (``ot``).\n\nThis API endpoint is typically used to find all sales for ``{organization}``\nwhether it was paid or not.\n\n**Tags: billing\n\n**Examples\n\n.. code-block:: http\n\n GET /api/billing/cowork/receivables?start_at=2015-07-05T07:00:00.000Z&o=date&ot=desc HTTP/1.1\n\n.. code-block:: json\n\n {\n \"count\": 1,\n \"total\": \"112120\",\n \"unit\": \"usd\",\n \"next\": null,\n \"previous\": null,\n \"results\": [\n {\n \"created_at\": \"2015-08-01T00:00:00Z\",\n \"description\": \"Charge <a href=\"/billing/cowork/receipt/1123\">1123</a> distribution for demo562-open-plus\",\n \"amount\": \"112120\",\n \"is_debit\": false,\n \"orig_account\": \"Funds\",\n \"orig_organization\": \"stripe\",\n \"orig_amount\": 112120,\n \"orig_unit\": \"usd\",\n \"dest_account\": \"Funds\",\n \"dest_organization\": \"cowork\",\n \"dest_amount\": 112120,\n \"dest_unit\": \"usd\"\n }\n ]\n }",
"parameters": [
{
"name": "start_at",
"in": "query",
"description": "date/time in ISO format after which records were created.",
"required": false,
"type": "string"
},
{
"name": "ends_at",
"in": "query",
"description": "date/time in ISO format before which records were created.",
"required": false,
"type": "string"
},
{
"name": "q",
"in": "query",
"description": "search for matching text in descr, orig_organization__full_name, dest_organization__full_name",
"required": false,
"type": "string"
},
{
"name": "o",
"in": "query",
"description": "sort by description, amount, dest_organization, dest_account, orig_organization, orig_account, created_at",
"required": false,
"type": "string"
},
{
"name": "ot",
"in": "query",
"description": "sort by natural ascending or descending order",
"required": false,
"type": "string"
},
{
"name": "page",
"in": "query",
"description": "A page number within the paginated result set.",
"required": false,
"type": "integer"
}
],
"responses": {
"200": {
"description": "",
"schema": {
"required": [
"count",
"results"
],
"type": "object",
"properties": {
"count": {
"type": "integer"
},
"next": {
"type": "string",
"format": "uri"
},
"previous": {
"type": "string",
"format": "uri"
},
"results": {
"type": "array",
"items": {
"$ref": "#/definitions/Transaction"
}
}
}
}
}
},
"tags": [
"billing"
]
},
"parameters": [
{
"name": "organization",
"in": "path",
"required": true,
"type": "string"
}
]
},
"/billing/{organization}/transfers/": {
"get": {
"operationId": "billing_transfers_list",
"description": "Queries a page (``PAGE_SIZE`` records) of ``Transaction`` associated\nto ``{organization}`` while the organization acts as a provider.\n\nThe queryset can be filtered to a range of dates\n([``start_at``, ``ends_at``]) and for at least one field to match a search\nterm (``q``).\n\nQuery results can be ordered by natural fields (``o``) in either ascending\nor descending order (``ot``).\n\nThis API endpoint is typically used to find sales, payments, refunds\nand bank deposits for a provider.\n(see :ref:`provider pages <_pages_provider_transactions>`)\n\n**Tags: billing\n\n**Examples\n\n.. code-block:: http\n\n GET /api/billing/cowork/transfers?start_at=2015-07-05T07:00:00.000Z&o=date&ot=desc HTTP/1.1\n\n.. code-block:: json\n\n {\n \"count\": 1,\n \"next\": null,\n \"previous\": null,\n \"results\": [\n {\n \"created_at\": \"2015-08-01T00:00:00Z\",\n \"description\": \"Charge <a href=\"/billing/cowork/receipt/1123\">1123</a> distribution for demo562-open-plus\",\n \"amount\": \"$1121.20\",\n \"is_debit\": false,\n \"orig_account\": \"Funds\",\n \"orig_organization\": \"stripe\",\n \"orig_amount\": 112120,\n \"orig_unit\": \"usd\",\n \"dest_account\": \"Funds\",\n \"dest_organization\": \"cowork\",\n \"dest_amount\": 112120,\n \"dest_unit\": \"usd\"\n }\n ]\n }",
"parameters": [
{
"name": "start_at",
"in": "query",
"description": "date/time in ISO format after which records were created.",
"required": false,
"type": "string"
},
{
"name": "ends_at",
"in": "query",
"description": "date/time in ISO format before which records were created.",
"required": false,
"type": "string"
},
{
"name": "q",
"in": "query",
"description": "search for matching text in descr, orig_organization__full_name, dest_organization__full_name",
"required": false,
"type": "string"
},
{
"name": "o",
"in": "query",
"description": "sort by description, amount, dest_organization, dest_account, orig_organization, orig_account, created_at",
"required": false,
"type": "string"
},
{
"name": "ot",
"in": "query",
"description": "sort by natural ascending or descending order",
"required": false,
"type": "string"
},
{
"name": "page",
"in": "query",
"description": "A page number within the paginated result set.",
"required": false,
"type": "integer"
}
],
"responses": {
"200": {
"description": "",
"schema": {
"required": [
"count",
"results"
],
"type": "object",
"properties": {
"count": {
"type": "integer"
},
"next": {
"type": "string",
"format": "uri"
},
"previous": {
"type": "string",
"format": "uri"
},
"results": {
"type": "array",
"items": {
"$ref": "#/definitions/Transaction"
}
}
}
}
}
},
"tags": [
"billing"
]
},
"parameters": [
{
"name": "organization",
"in": "path",
"required": true,
"type": "string"
}
]
},
"/billing/{organization}/transfers/import/": {
"post": {
"operationId": "billing_transfers_import_create",
"description": "Inserts transactions that were done offline.\n\nThe primary purpose of this API call is for a provider to keep\naccurate metrics for the performance of the product sold, regardless\nof payment options (online or offline).\n\n**Tags: billing\n\n**Examples\n\n.. code-block:: http\n\n POST /api/billing/cowork/transfers/import/ HTTP/1.1\n\n.. code-block:: json\n\n {\n \"subscription\": \"demo562-open-plus\",\n \"amount\": \"10.00\",\n \"descr\": \"Paid by check\"\n }",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/OfflineTransaction"
}
}
],
"responses": {
"201": {
"description": "",
"schema": {
"$ref": "#/definitions/OfflineTransaction"
}
}
},
"tags": [
"billing"
]
},
"parameters": [
{
"name": "organization",
"in": "path",
"required": true,
"type": "string"
}
]
},
"/cart/": {
"post": {
"operationId": "cart_create",
"description": "Adds a ``Plan`` into the cart of the ``request.user``.\n\nThe cart can later be checked out and paid by an ``Organization``,\neither through the :ref:`HTML page<pages_cart>`\nor :ref:`API end point<api_checkout>`.\n\nThis end point is typically used when a user is presented with a list\nof add-ons that she can subscribes to in one checkout screen. The end-point\nworks in both cases, authenticated or anonymous users. For authenticated\nusers, the cart is stored in the database as ``CartItem`` objects.\nFor anonymous users, the cart is stored in an HTTP Cookie.\n\nThe end-point accepts a single item or a list of items.\n\n``quantity`` is optional. When it is not specified, subsquent checkout\nscreens will provide choices to pay multiple periods in advance\nWhen additional ``full_name``, ``email`` and ``sync_on`` are specified,\npayment can be made by one ``Organization`` for another ``Organization``\nto be subscribed (see :ref:`GroupBuy orders<group_buy>`).\n\n**Tags: billing\n\n**Examples\n\n.. code-block:: http\n\n POST /api/cart/ HTTP/1.1\n\n.. code-block:: json\n\n {\n \"plan\": \"open-space\",\n \"option\": 1\n }\n\nresponds\n\n.. code-block:: json\n\n {\n \"plan\": \"open-space\",\n \"option\": 1\n }\n\n``option`` is optional. When it is not specified, subsquent checkout\nscreens will provide choices to pay multiple periods in advance\nWhen additional ``full_name`` and ``sync_on`` are specified,\npayment can be made by one ``Organization`` for another ``Organization``\nto be subscribed (see :ref:`GroupBuy orders<group_buy>`).",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/CartItemCreate"
}
}
],
"responses": {
"201": {
"description": "",
"schema": {
"$ref": "#/definitions/CartItemCreate"
}
}
},
"tags": [
"cart"
]
},
"delete": {
"operationId": "cart_delete",
"description": "Removes an item from the ``request.user`` cart.\n\n**Tags: billing\n\n**Examples\n\n.. code-block:: http\n\n DELETE /api/cart/?plan=open-space HTTP/1.1",
"parameters": [],
"responses": {
"204": {
"description": ""
}
},
"tags": [
"cart"
]
},
"parameters": []
},
"/cart/redeem/": {
"post": {
"operationId": "cart_redeem_create",
"description": "Redeems a ``Coupon`` and applies the discount to the eligible items\nin the cart.\n\n**Tags: billing\n\n**Examples\n\n.. code-block:: http\n\n POST /api/redeem HTTP/1.1\n\n.. code-block:: json\n\n {\n \"code\": \"LABORDAY\"\n }\n\nresponds\n\n.. code-block:: json\n\n {\n \"details\": \"Coupon 'LABORDAY' was successfully applied.\"\n }",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/RedeemCoupon"
}
}
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/ValidationError"
}
}
},
"tags": [
"cart"
]
},
"parameters": []
},
"/cart/{plan}/upload/": {
"post": {
"operationId": "cart_upload_create",
"description": "Add a ``Plan`` into the subscription cart of multiple users as per the\ncontent of an uploaded file.\n\nThis works bulk fashion of :ref:`/cart/ endpoint<api_cart>`. The\nuploaded file must be a CSV containing the fields ``first_name``,\n``last_name`` and email. The CSV file must not contain a header\nline, only data.\n\n**Tags: billing\n\n**Examples\n\nContent of ``names.csv``:\n\n.. code-block:: csv\n\n Joe,Smith,joesmith@example.com\n Marie,Johnson,mariejohnson@example.com\n\n.. code-block:: http\n\n POST /api/cart/:plan/upload/ HTTP/1.1\n\n Content-Disposition: form-data; name=\"file\"; filename=\"names.csv\"\n Content-Type: text/csv\n\nresponds\n\n.. code-block:: json\n\n {\n \"created\" [\n {\n \"first_name\": \"Joe\",\n \"last_name\": \"Smith\",\n \"email\": \"joesmith@example.com\"\n },\n {\n \"first_name\": \"Marie\",\n \"last_name\": \"Johnson\",\n \"email\": \"mariejohnson@example.com\"\n }\n ],\n \"updated\": [],\n \"failed\": []\n }",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/CartItemUpload"
}
}
],
"responses": {
"201": {
"description": "",
"schema": {
"$ref": "#/definitions/CartItemUpload"
}
}
},
"tags": [
"cart"
]
},
"parameters": [
{
"name": "plan",
"in": "path",
"required": true,
"type": "string"
}
]
},
"/contacts/{user}/activities/": {
"get": {
"operationId": "contacts_activities_list",
"description": "Lists activities for a contact.\n\n**Tags: profile\n\n**Example\n\n.. code-block:: http\n\n GET /api/contacts/xia/activities HTTP/1.1\n\nresponds\n\n.. code-block:: json\n\n {\n \"count\": 1,\n \"next\": null,\n \"previous\": null,\n \"results\": [{\n \"created_at\": \"2018-01-01T00:00:00Z\",\n \"created_by\": \"alice\",\n \"text\": \"Phone call\",\n \"account\": null\n },{\n \"created_at\": \"2018-01-02T00:00:00Z\",\n \"created_by\": \"alice\",\n \"text\": \"Follow up e-mail\",\n \"account\": \"cowork\"\n }]\n }",
"parameters": [
{
"name": "q",
"in": "query",
"description": "A search term.",
"required": false,
"type": "string"
},
{
"name": "o",
"in": "query",
"description": "Which field to use when ordering the results.",
"required": false,
"type": "string"
},
{
"name": "page",
"in": "query",
"description": "A page number within the paginated result set.",
"required": false,
"type": "integer"
}
],
"responses": {
"200": {
"description": "",
"schema": {
"required": [
"count",
"results"
],
"type": "object",
"properties": {
"count": {
"type": "integer"
},
"next": {
"type": "string",
"format": "uri"
},
"previous": {
"type": "string",
"format": "uri"
},
"results": {
"type": "array",
"items": {
"$ref": "#/definitions/Activity"
}
}
}
}
}
},
"tags": [
"contacts"
]
},
"post": {
"operationId": "contacts_activities_create",
"description": "Records new activity with a contact.\n\n**Tags: profile\n\n**Examples\n\n.. code-block:: http\n\n POST /api/contacts/xia/activities/ HTTP/1.1\n\n.. code-block:: json\n\n {\n \"text\": \"Phone call\",\n \"account\": null\n }",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/Activity"
}
}
],
"responses": {
"201": {
"description": "",
"schema": {
"$ref": "#/definitions/Activity"
}
}
},
"tags": [
"contacts"
]
},
"parameters": [
{
"name": "user",
"in": "path",
"required": true,
"type": "string"
}
]
},
"/legal/{agreement}/sign/": {
"post": {
"operationId": "legal_sign_create",
"description": "",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/AgreementSign"
}
}
],
"responses": {
"201": {
"description": "",
"schema": {
"$ref": "#/definitions/AgreementSign"
}
}
},
"tags": [
"legal"
]
},
"parameters": [
{
"name": "agreement",
"in": "path",
"required": true,
"type": "string"
}
]
},
"/metrics/balances/{report}/": {
"get": {
"operationId": "metrics_balances_read",
"description": "Queries a balance sheet named ``{report}`` for the broker.\n\nTo add lines in the report see `/api/metrics/balances/{report}/lines/`.\n\n**Tags: metrics\n\n**Examples\n\n.. code-block:: http\n\n GET /api/metrics/balances/taxes/ HTTP/1.1\n\nresponds\n\n.. code-block:: json\n\n {\n \"scale\": 0.01,\n \"unit\": \"usd\",\n \"title\": \"Balances: taxes\",\n \"table\": [\n {\n \"key\": \"Sales\",\n \"selector\": \"Receivable\",\n \"values\": [\n [\"2015-05-01T00:00:00Z\", 0],\n [\"2015-08-01T00:00:00Z\", 0],\n [\"2015-11-01T00:00:00Z\", 0],\n [\"2016-02-01T00:00:00Z\", 0],\n [\"2016-05-01T00:00:00Z\", 0],\n [\"2016-05-16T21:08:15.637Z\", 0]\n ]\n }\n ]\n }",
"parameters": [],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/Metrics"
}
}
},
"tags": [
"metrics"
]
},
"parameters": [
{
"name": "report",
"in": "path",
"required": true,
"type": "string"
}
]
},
"/metrics/balances/{report}/lines/": {
"get": {
"operationId": "metrics_balances_lines_list",
"description": "Queries the list of rows reported on a balance sheet named `{report}`.\n\n**Tags: metrics\n\n**Examples\n\n.. code-block:: http\n\n GET /api/metrics/balances/taxes/lines/ HTTP/1.1\n\nresponds\n\n.. code-block:: json\n\n {\n \"count\": 1,\n \"next\": null,\n \"previous\": null,\n \"results\": [\n {\n \"title\": \"Sales\",\n \"selector\": \"Receivable\",\n \"rank\": 1\n }\n ]\n }",
"parameters": [
{
"name": "page",
"in": "query",
"description": "A page number within the paginated result set.",
"required": false,
"type": "integer"
}
],
"responses": {
"200": {
"description": "",
"schema": {
"required": [
"count",
"results"
],
"type": "object",
"properties": {
"count": {
"type": "integer"
},
"next": {
"type": "string",
"format": "uri"
},
"previous": {
"type": "string",
"format": "uri"
},
"results": {
"type": "array",
"items": {
"$ref": "#/definitions/BalanceLine"
}
}
}
}
}
},
"tags": [
"metrics"
]
},
"post": {
"operationId": "metrics_balances_lines_create",
"description": "Adds a new row on the ``{report}`` balance sheet.\n\n**Tags: metrics\n\n**Examples\n\n.. code-block:: http\n\n POST /api/metrics/balances/taxes/lines/ HTTP/1.1\n\n.. code-block:: json\n\n {\n \"title\": \"Sales\",\n \"selector\": \"Receivable\",\n \"rank\": 1\n }\n\nresponds\n\n.. code-block:: json\n\n {\n \"title\": \"Sales\",\n \"selector\": \"Receivable\",\n \"rank\": 1\n }",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/BalanceLine"
}
}
],
"responses": {
"201": {
"description": "",
"schema": {
"$ref": "#/definitions/BalanceLine"
}
}
},
"tags": [
"metrics"
]
},
"patch": {
"operationId": "metrics_balances_lines_partial_update",
"description": "Updates the order in which lines are displayed.\n\nWhen receiving a request like [{u'newpos': 1, u'oldpos': 3}],\nit will move the line at position 3 to position 1, updating the\nrank of all lines in-between.\n\n**Tags: metrics",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/BalanceLine"
}
}
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/BalanceLine"
}
}
},
"tags": [
"metrics"
]
},
"parameters": [
{
"name": "report",
"in": "path",
"required": true,
"type": "string",
"format": "slug",
"pattern": "^[-a-zA-Z0-9_]+$"
}
]
},
"/metrics/balances/{report}/lines/{rank}/": {
"get": {
"operationId": "metrics_balances_lines_read",
"description": "Describes a row reported on a balance sheet named `{report}`.\n\n**Tags: metrics\n\n**Examples\n\n.. code-block:: http\n\n GET /api/metrics/balances/taxes/lines/1/ HTTP/1.1\n\nresponds\n\n.. code-block:: json\n\n {\n \"title\": \"Sales\",\n \"selector\": \"Receivable\",\n \"rank\": 1\n }",
"parameters": [],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/BalanceLine"
}
}
},
"tags": [
"metrics"
]
},
"put": {
"operationId": "metrics_balances_lines_update",
"description": "Updates a row reported on a balance sheet named `{report}`.\n\n**Tags: metrics\n\n**Examples\n\n.. code-block:: http\n\n PUT /api/metrics/balances/taxes/lines/1/ HTTP/1.1\n\n.. code-block:: json\n\n {\n \"title\": \"Sales\",\n \"selector\": \"Receivable\",\n \"rank\": 1\n }\n\nresponds\n\n.. code-block:: json\n\n {\n \"title\": \"Sales\",\n \"selector\": \"Receivable\",\n \"rank\": 1\n }",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/BalanceLine"
}
}
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/BalanceLine"
}
}
},
"tags": [
"metrics"
]
},
"patch": {
"operationId": "metrics_balances_lines_partial_update_2",
"description": "Describes a row reported on a balance sheet named `{report}`.\n\n**Tags: metrics\n\n**Examples\n\n.. code-block:: http\n\n GET /api/metrics/balances/taxes/lines/1/ HTTP/1.1\n\nresponds\n\n.. code-block:: json\n\n {\n \"title\": \"Sales\",\n \"selector\": \"Receivable\",\n \"rank\": 1\n }",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/BalanceLine"
}
}
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/BalanceLine"
}
}
},
"tags": [
"metrics"
]
},
"delete": {
"operationId": "metrics_balances_lines_delete",
"description": "Deletes a row reported on a balance sheet named `{report}`.\n\n**Tags: metrics\n\n**Examples\n\n.. code-block:: http\n\n DELETE /api/metrics/balances/taxes/lines/1/ HTTP/1.1",
"parameters": [],
"responses": {
"204": {
"description": ""
}
},
"tags": [
"metrics"
]
},
"parameters": [
{
"name": "rank",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "report",
"in": "path",
"required": true,
"type": "string"
}
]
},
"/metrics/registered/": {
"get": {
"operationId": "metrics_registered_list",
"description": "Lists all ``User`` which have no associated role or a role\nto an ``Organization`` which has no Subscription, active or inactive.\n\nThe queryset can be filtered to a range of dates\n([``start_at``, ``ends_at``]) and for at least one field to match a search\nterm (``q``).\n\nQuery results can be ordered by natural fields (``o``) in either ascending\nor descending order (``ot``).\n\n**Tags: metrics\n\n**Examples\n\n.. code-block:: http\n\n GET /api/metrics/registered?o=created_at&ot=desc HTTP/1.1\n\nresponds\n\n.. code-block:: json\n\n {\n \"count\": 1,\n \"next\": null,\n \"previous\": null,\n \"results\": [\n {\n \"slug\": \"alice\",\n \"email\": \"alice@djaodjin.com\",\n \"full_name\": \"Alice Cooper\",\n \"created_at\": \"2014-01-01T00:00:00Z\"\n }\n ]\n }",
"parameters": [
{
"name": "start_at",
"in": "query",
"description": "date/time in ISO format after which records were created.",
"required": false,
"type": "string"
},
{
"name": "ends_at",
"in": "query",
"description": "date/time in ISO format before which records were created.",
"required": false,
"type": "string"
},
{
"name": "o",
"in": "query",
"description": "sort by first_name, last_name, email, created_at",
"required": false,
"type": "string"
},
{
"name": "ot",
"in": "query",
"description": "sort by natural ascending or descending order",
"required": false,
"type": "string"
},
{
"name": "q",
"in": "query",
"description": "search for matching text in first_name, last_name, email",
"required": false,
"type": "string"
},
{
"name": "page",
"in": "query",
"description": "A page number within the paginated result set.",
"required": false,
"type": "integer"
}
],
"responses": {
"200": {
"description": "",
"schema": {
"required": [
"count",
"results"
],
"type": "object",
"properties": {
"count": {
"type": "integer"
},
"next": {
"type": "string",
"format": "uri"
},
"previous": {
"type": "string",
"format": "uri"
},
"results": {
"type": "array",
"items": {
"$ref": "#/definitions/User"
}
}
}
}
}
},
"tags": [
"metrics"
]
},
"parameters": []
},
"/metrics/{organization}/active/": {
"get": {
"operationId": "metrics_active_list",
"description": "Lists all ``Subscription`` to a plan whose provider is\n``{organization}`` and which are currently in progress.\n\nOptionnaly when an ``ends_at`` query parameter is specified,\nreturns a queryset of ``Subscription`` that were active\nat ``ends_at``. When a ``start_at`` query parameter is specified,\nonly considers ``Subscription`` that were created after ``start_at``.\n\nThe queryset can be filtered for at least one field to match a search\nterm (``q``).\n\nQuery results can be ordered by natural fields (``o``) in either ascending\nor descending order (``ot``).\n\n**Tags: metrics\n\n**Examples\n\n.. code-block:: http\n\n GET /api/metrics/cowork/active?o=created_at&ot=desc HTTP/1.1\n\n.. code-block:: json\n\n {\n \"count\": 1,\n \"next\": null,\n \"previous\": null,\n \"results\": [\n {\n \"created_at\": \"2016-01-14T23:16:55Z\",\n \"ends_at\": \"2017-01-14T23:16:55Z\",\n \"description\": null,\n \"organization\": {\n \"slug\": \"xia\",\n \"printable_name\": \"Xia Lee\"\n },\n \"plan\": {\n \"slug\": \"open-space\",\n \"title\": \"Open Space\",\n \"description\": \"open space desk, High speed internet\n - Ethernet or WiFi, Unlimited printing,\n Unlimited scanning, Unlimited fax service\n (send and receive)\",\n \"is_active\": true,\n \"setup_amount\": 0,\n \"period_amount\": 17999,\n \"interval\": 4,\n \"app_url\": \"http://localhost:8020/app\"\n },\n \"auto_renew\": true\n }\n ]\n }",
"parameters": [
{
"name": "o",
"in": "query",
"description": "sort by organization, plan, created_at, ends_at",
"required": false,
"type": "string"
},
{
"name": "ot",
"in": "query",
"description": "sort by natural ascending or descending order",
"required": false,
"type": "string"
},
{
"name": "q",
"in": "query",
"description": "search for matching text in organization__slug, organization__full_name, organization__email, organization__phone, organization__street_address, organization__locality, organization__region, organization__postal_code, organization__country, plan__title",
"required": false,
"type": "string"
},
{
"name": "start_at",
"in": "query",
"description": "date/time in ISO format after which records were created.",
"required": false,
"type": "string"
},
{
"name": "ends_at",
"in": "query",
"description": "date/time in ISO format before which records were created.",
"required": false,
"type": "string"
},
{
"name": "page",
"in": "query",
"description": "A page number within the paginated result set.",
"required": false,
"type": "integer"
}
],
"responses": {
"200": {
"description": "",
"schema": {
"required": [
"count",
"results"
],
"type": "object",
"properties": {
"count": {
"type": "integer"
},
"next": {
"type": "string",
"format": "uri"
},
"previous": {
"type": "string",
"format": "uri"
},
"results": {
"type": "array",
"items": {
"$ref": "#/definitions/Subscription"
}
}
}
}
}
},
"tags": [
"metrics"
]
},
"parameters": [
{
"name": "organization",
"in": "path",
"required": true,
"type": "string"
}
]
},
"/metrics/{organization}/balances/": {
"get": {
"operationId": "metrics_balances_list",
"description": "Generate a table of revenue (rows) per months (columns).\n\n**Tags: metrics\n\n**Examples\n\n.. code-block:: http\n\n GET /api/metrics/cowork/balances HTTP/1.1\n\n.. code-block:: json\n\n {\n \"title\": \"Balances\",\n \"scale\": 0.01,\n \"unit\": \"usd\",\n \"table\": [\n {\n \"key\": \"Income\",\n \"values\": [\n [\"2014-09-01T00:00:00Z\", 0],\n [\"2014-10-01T00:00:00Z\", 1532624],\n [\"2014-11-01T00:00:00Z\", 2348340],\n [\"2014-12-01T00:00:00Z\", 3244770],\n [\"2015-01-01T00:00:00Z\", 5494221],\n [\"2015-02-01T00:00:00Z\", 7214221],\n [\"2015-03-01T00:00:00Z\", 8444221],\n [\"2015-04-01T00:00:00Z\", 9784221],\n [\"2015-05-01T00:00:00Z\", 12784221],\n [\"2015-06-01T00:00:00Z\", 14562341],\n [\"2015-07-01T00:00:00Z\", 16567341],\n [\"2015-08-01T00:00:00Z\", 17893214],\n [\"2015-08-06T02:24:50.485Z\", 221340]\n ],\n },\n {\n \"key\": \"Backlog\",\n \"values\": [\n [\"2014-09-01T00:00:00Z\", 1712624],\n [\"2014-10-01T00:00:00Z\", 3698340],\n [\"2014-11-01T00:00:00Z\", 7214770],\n [\"2014-12-01T00:00:00Z\", 10494221],\n [\"2015-01-01T00:00:00Z\", 14281970],\n [\"2015-02-01T00:00:00Z\", 18762845],\n [\"2015-03-01T00:00:00Z\", 24258765],\n [\"2015-04-01T00:00:00Z\", 31937741],\n [\"2015-05-01T00:00:00Z\", 43002401],\n [\"2015-06-01T00:00:00Z\", 53331444],\n [\"2015-07-01T00:00:00Z\", 64775621],\n [\"2015-08-01T00:00:00Z\", 75050033],\n [\"2015-08-06T02:24:50.485Z\", 89156321]\n ],\n },\n {\n \"key\": \"Receivable\",\n \"values\": [\n [\"2014-09-01T00:00:00Z\", 0],\n [\"2014-10-01T00:00:00Z\", 0],\n [\"2014-11-01T00:00:00Z\", 0],\n [\"2014-12-01T00:00:00Z\", 0],\n [\"2015-01-01T00:00:00Z\", 0],\n [\"2015-02-01T00:00:00Z\", 0],\n [\"2015-03-01T00:00:00Z\", 0],\n [\"2015-04-01T00:00:00Z\", 0],\n [\"2015-05-01T00:00:00Z\", 0],\n [\"2015-06-01T00:00:00Z\", 0],\n [\"2015-07-01T00:00:00Z\", 0],\n [\"2015-08-01T00:00:00Z\", 0],\n [\"2015-08-06T02:24:50.485Z\", 0]\n ],\n }\n ]\n }",
"parameters": [
{
"name": "start_at",
"in": "query",
"description": "date/time in ISO format after which records were created.",
"required": false,
"type": "string"
},
{
"name": "ends_at",
"in": "query",
"description": "date/time in ISO format before which records were created.",
"required": false,
"type": "string"
},
{
"name": "page",
"in": "query",
"description": "A page number within the paginated result set.",
"required": false,
"type": "integer"
}
],
"responses": {
"200": {
"description": "",
"schema": {
"required": [
"count",
"results"
],
"type": "object",
"properties": {
"count": {
"type": "integer"
},
"next": {
"type": "string",
"format": "uri"
},
"previous": {
"type": "string",
"format": "uri"
},
"results": {
"type": "array",
"items": {
"$ref": "#/definitions/Metrics"
}
}
}
}
}
},
"tags": [
"metrics"
]
},
"parameters": [
{
"name": "organization",
"in": "path",
"required": true,
"type": "string"
}
]
},
"/metrics/{organization}/churned/": {
"get": {
"operationId": "metrics_churned_list",
"description": "Lists all ``Subscription`` to a plan whose provider is\n``:organization`` which have ended already.\n\nThe queryset can be further filtered to a range of dates between\n``start_at`` and ``ends_at``.\n\nThe queryset can be further filtered by passing a ``q`` parameter.\nThe result queryset can be ordered.\n\n**Tags: metrics\n\n**Examples\n\n.. code-block:: http\n\n GET /api/metrics/cowork/churned?o=created_at&ot=desc HTTP/1.1\n\n.. code-block:: json\n\n {\n \"count\": 1,\n \"next\": null,\n \"previous\": null,\n \"results\": [\n {\n \"created_at\": \"2016-01-14T23:16:55Z\",\n \"ends_at\": \"2017-01-14T23:16:55Z\",\n \"description\": null,\n \"organization\": {\n \"slug\": \"xia\",\n \"printable_name\": \"Xia Lee\"\n },\n \"plan\": {\n \"slug\": \"open-space\",\n \"title\": \"Open Space\",\n \"description\": \"open space desk, High speed internet\n - Ethernet or WiFi, Unlimited printing,\n Unlimited scanning, Unlimited fax service\n (send and receive)\",\n \"is_active\": true,\n \"setup_amount\": 0,\n \"period_amount\": 17999,\n \"interval\": 4,\n \"app_url\": \"http://localhost:8020/app\"\n },\n \"auto_renew\": true\n }\n ]\n }",
"parameters": [
{
"name": "o",
"in": "query",
"description": "sort by organization, plan, created_at, ends_at",
"required": false,
"type": "string"
},
{
"name": "ot",
"in": "query",
"description": "sort by natural ascending or descending order",
"required": false,
"type": "string"
},
{
"name": "q",
"in": "query",
"description": "search for matching text in organization__slug, organization__full_name, organization__email, organization__phone, organization__street_address, organization__locality, organization__region, organization__postal_code, organization__country, plan__title",
"required": false,
"type": "string"
},
{
"name": "page",
"in": "query",
"description": "A page number within the paginated result set.",
"required": false,
"type": "integer"
}
],
"responses": {
"200": {
"description": "",
"schema": {
"required": [
"count",
"results"
],
"type": "object",
"properties": {
"count": {
"type": "integer"
},
"next": {
"type": "string",
"format": "uri"
},
"previous": {
"type": "string",
"format": "uri"
},
"results": {
"type": "array",
"items": {
"$ref": "#/definitions/Subscription"
}
}
}
}
}
},
"tags": [
"metrics"
]
},
"parameters": [
{
"name": "organization",
"in": "path",
"required": true,
"type": "string"
}
]
},
"/metrics/{organization}/coupons/{coupon}/": {
"get": {
"operationId": "metrics_coupons_read",
"description": "Queries a page (``PAGE_SIZE`` records) of ``Coupon`` usage.\n\nThe queryset can be filtered to a range of dates\n([``start_at``, ``ends_at``]) and for at least one field to match a search\nterm (``q``).\n\nThe result queryset can be ordered by passing an ``o`` (field name)\nand ``ot`` (asc or desc) parameter.\n\n**Tags: metrics\n\n**Examples\n\n.. code-block:: http\n\n GET /api/metrics/cowork/coupons/DIS100/ HTTP/1.1\n\n.. code-block:: json\n\n {\n \"count\": 1,\n \"next\": null,\n \"previous\": null,\n \"results\": [\n {\n \"user\": {\n \"slug\": \"xia\",\n \"email\": \"xia@localhost.localdomain\",\n \"full_name\": \"Xia Doe\",\n \"created_at\": \"2012-09-14T23:16:55Z\"\n },\n \"plan\": \"basic\",\n \"created_at\": \"2014-01-01T09:00:00Z\"\n }\n ]\n }",
"parameters": [],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/CartItem"
}
}
},
"tags": [
"metrics"
]
},
"parameters": [
{
"name": "coupon",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "organization",
"in": "path",
"required": true,
"type": "string"
}
]
},
"/metrics/{organization}/customers/": {
"get": {
"operationId": "metrics_customers_list",
"description": "Produce revenue stats\n\n**Tags: metrics\n\n**Examples\n\n.. code-block:: http\n\n GET /api/metrics/cowork/customers HTTP/1.1\n\n.. code-block:: json\n\n {\n \"title\": \"Customers\"\n \"table\": [\n {\n \"key\": \"Total # of Customers\",\n \"values\": [\n [\"2014-10-01T00:00:00Z\", 15],\n [\"2014-11-01T00:00:00Z\", 17],\n [\"2014-12-01T00:00:00Z\", 19],\n [\"2015-01-01T00:00:00Z\", 19],\n [\"2015-02-01T00:00:00Z\", 25],\n [\"2015-03-01T00:00:00Z\", 29],\n [\"2015-04-01T00:00:00Z\", 37],\n [\"2015-05-01T00:00:00Z\", 43],\n [\"2015-06-01T00:00:00Z\", 46],\n [\"2015-07-01T00:00:00Z\", 48],\n [\"2015-08-01T00:00:00Z\", 54],\n [\"2015-08-06T05:20:24.537Z\", 60]\n ]\n },\n {\n \"key\": \"# of new Customers\"\n \"values\": [\n [\"2014-10-01T00:00:00Z\", 2],\n [\"2014-11-01T00:00:00Z\", 2],\n [\"2014-12-01T00:00:00Z\", 0],\n [\"2015-01-01T00:00:00Z\", 6],\n [\"2015-02-01T00:00:00Z\", 4],\n [\"2015-03-01T00:00:00Z\", 8],\n [\"2015-04-01T00:00:00Z\", 6],\n [\"2015-05-01T00:00:00Z\", 3],\n [\"2015-06-01T00:00:00Z\", 2],\n [\"2015-07-01T00:00:00Z\", 6],\n [\"2015-08-01T00:00:00Z\", 7],\n [\"2015-08-06T05:20:24.537Z\", 0]\n ]\n },\n {\n \"key\": \"# of churned Customers\"\n \"values\": [\n [\"2014-10-01T00:00:00Z\", 0],\n [\"2014-11-01T00:00:00Z\", 0],\n [\"2014-12-01T00:00:00Z\", 0],\n [\"2015-01-01T00:00:00Z\", 0],\n [\"2015-02-01T00:00:00Z\", 0],\n [\"2015-03-01T00:00:00Z\", 0],\n [\"2015-04-01T00:00:00Z\", 0],\n [\"2015-05-01T00:00:00Z\", 0],\n [\"2015-06-01T00:00:00Z\", 0],\n [\"2015-07-01T00:00:00Z\", 0],\n [\"2015-08-01T00:00:00Z\", 1],\n [\"2015-08-06T05:20:24.537Z\", 60]\n ]\n },\n {\n \"key\": \"Net New Customers\",\n \"values\": [\n [\"2014-10-01T00:00:00Z\", 2],\n [\"2014-11-01T00:00:00Z\", 2],\n [\"2014-12-01T00:00:00Z\", 0],\n [\"2015-01-01T00:00:00Z\", 6],\n [\"2015-02-01T00:00:00Z\", 4],\n [\"2015-03-01T00:00:00Z\", 8],\n [\"2015-04-01T00:00:00Z\", 6],\n [\"2015-05-01T00:00:00Z\", 3],\n [\"2015-06-01T00:00:00Z\", 2],\n [\"2015-07-01T00:00:00Z\", 6],\n [\"2015-08-01T00:00:00Z\", 6],\n [\"2015-08-06T05:20:24.537Z\", -60]\n ]\n }\n ],\n \"extra\": [\n {\n \"key\": \"% Customer Churn\",\n \"values\": [\n [\"2014-10-01T00:00:00Z\", 0],\n [\"2014-11-01T00:00:00Z\", 0.0],\n [\"2014-12-01T00:00:00Z\", 0.0],\n [\"2015-01-01T00:00:00Z\", 0.0],\n [\"2015-02-01T00:00:00Z\", 0.0],\n [\"2015-03-01T00:00:00Z\", 0.0],\n [\"2015-04-01T00:00:00Z\", 0.0],\n [\"2015-05-01T00:00:00Z\", 0.0],\n [\"2015-06-01T00:00:00Z\", 0.0],\n [\"2015-07-01T00:00:00Z\", 0.0],\n [\"2015-08-01T00:00:00Z\", 2.08],\n [\"2015-08-06T05:20:24.537Z\", 111.11]\n ]\n }\n ]\n }",
"parameters": [
{
"name": "start_at",
"in": "query",
"description": "date/time in ISO format after which records were created.",
"required": false,
"type": "string"
},
{
"name": "ends_at",
"in": "query",
"description": "date/time in ISO format before which records were created.",
"required": false,
"type": "string"
},
{
"name": "page",
"in": "query",
"description": "A page number within the paginated result set.",
"required": false,
"type": "integer"
}
],
"responses": {
"200": {
"description": "",
"schema": {
"required": [
"count",
"results"
],
"type": "object",
"properties": {
"count": {
"type": "integer"
},
"next": {
"type": "string",
"format": "uri"
},
"previous": {
"type": "string",
"format": "uri"
},
"results": {
"type": "array",
"items": {
"$ref": "#/definitions/Metrics"
}
}
}
}
}
},
"tags": [
"metrics"
]
},
"parameters": [
{
"name": "organization",
"in": "path",
"required": true,
"type": "string"
}
]
},
"/metrics/{organization}/funds/": {
"get": {
"operationId": "metrics_funds_list",
"description": "Produces sales, payments and refunds over a period of time.\n\n**Tags: metrics\n\n**Examples\n\n.. code-block:: http\n\n GET /api/metrics/cowork/funds/ HTTP/1.1\n\n.. code-block:: json\n\n {\n \"title\": \"Amount\",\n \"scale\": 0.01,\n \"unit\": \"usd\",\n \"table\": [\n {\n \"key\": \"Total Sales\",\n \"values\": [\n [\"2014-10-01T00:00:00Z\", 1985716],\n [\"2014-11-01T00:00:00Z\", 3516430],\n [\"2014-12-01T00:00:00Z\", 3279451],\n [\"2015-01-01T00:00:00Z\", 3787749],\n [\"2015-02-01T00:00:00Z\", 4480875],\n [\"2015-03-01T00:00:00Z\", 5495920],\n [\"2015-04-01T00:00:00Z\", 7678976],\n [\"2015-05-01T00:00:00Z\", 11064660],\n [\"2015-06-01T00:00:00Z\", 10329043],\n [\"2015-07-01T00:00:00Z\", 11444177],\n [\"2015-08-01T00:00:00Z\", 10274412],\n [\"2015-08-06T04:59:14.721Z\", 14106288]\n ]\n },\n {\n \"key\": \"New Sales\",\n \"values\": [\n [\"2014-10-01T00:00:00Z\", 0],\n [\"2014-11-01T00:00:00Z\", 0],\n [\"2014-12-01T00:00:00Z\", 0],\n [\"2015-01-01T00:00:00Z\", 0],\n [\"2015-02-01T00:00:00Z\", 0],\n [\"2015-03-01T00:00:00Z\", 0],\n [\"2015-04-01T00:00:00Z\", 0],\n [\"2015-05-01T00:00:00Z\", 0],\n [\"2015-06-01T00:00:00Z\", 0],\n [\"2015-07-01T00:00:00Z\", 0],\n [\"2015-08-01T00:00:00Z\", 0],\n [\"2015-08-06T04:59:14.721Z\", 0]\n ]\n },\n {\n \"key\": \"Churned Sales\",\n \"values\": [\n [\"2014-10-01T00:00:00Z\", 0],\n [\"2014-11-01T00:00:00Z\", 0],\n [\"2014-12-01T00:00:00Z\", 0],\n [\"2015-01-01T00:00:00Z\", 0],\n [\"2015-02-01T00:00:00Z\", 0],\n [\"2015-03-01T00:00:00Z\", 0],\n [\"2015-04-01T00:00:00Z\", 0],\n [\"2015-05-01T00:00:00Z\", 0],\n [\"2015-06-01T00:00:00Z\", 0],\n [\"2015-07-01T00:00:00Z\", 0],\n [\"2015-08-01T00:00:00Z\", 0],\n [\"2015-08-06T04:59:14.721Z\", 0]\n ]\n },\n {\n \"key\": \"Payments\",\n \"values\": [\n [\"2014-10-01T00:00:00Z\", 1787144],\n [\"2014-11-01T00:00:00Z\", 3164787],\n [\"2014-12-01T00:00:00Z\", 2951505],\n [\"2015-01-01T00:00:00Z\", 3408974],\n [\"2015-02-01T00:00:00Z\", 4032787],\n [\"2015-03-01T00:00:00Z\", 4946328],\n [\"2015-04-01T00:00:00Z\", 6911079],\n [\"2015-05-01T00:00:00Z\", 9958194],\n [\"2015-06-01T00:00:00Z\", 9296138],\n [\"2015-07-01T00:00:00Z\", 10299759],\n [\"2015-08-01T00:00:00Z\", 9246970],\n [\"2015-08-06T04:59:14.721Z\", 12695659]\n ]\n },\n {\n \"key\": \"Refunds\",\n \"values\": [\n [\"2014-10-01T00:00:00Z\", 0],\n [\"2014-11-01T00:00:00Z\", 0],\n [\"2014-12-01T00:00:00Z\", 0],\n [\"2015-01-01T00:00:00Z\", 0],\n [\"2015-02-01T00:00:00Z\", 0],\n [\"2015-03-01T00:00:00Z\", 0],\n [\"2015-04-01T00:00:00Z\", 0],\n [\"2015-05-01T00:00:00Z\", 0],\n [\"2015-06-01T00:00:00Z\", 0],\n [\"2015-07-01T00:00:00Z\", 0],\n [\"2015-08-01T00:00:00Z\", 0],\n [\"2015-08-06T04:59:14.721Z\", 0]\n ]\n }\n ],\n }",
"parameters": [
{
"name": "start_at",
"in": "query",
"description": "date/time in ISO format after which records were created.",
"required": false,
"type": "string"
},
{
"name": "ends_at",
"in": "query",
"description": "date/time in ISO format before which records were created.",
"required": false,
"type": "string"
},
{
"name": "page",
"in": "query",
"description": "A page number within the paginated result set.",
"required": false,
"type": "integer"
}
],
"responses": {
"200": {
"description": "",
"schema": {
"required": [
"count",
"results"
],
"type": "object",
"properties": {
"count": {
"type": "integer"
},
"next": {
"type": "string",
"format": "uri"
},
"previous": {
"type": "string",
"format": "uri"
},
"results": {
"type": "array",
"items": {
"$ref": "#/definitions/Metrics"
}
}
}
}
}
},
"tags": [
"metrics"
]
},
"parameters": [
{
"name": "organization",
"in": "path",
"required": true,
"type": "string"
}
]
},
"/metrics/{organization}/plans/": {
"get": {
"operationId": "metrics_plans_list",
"description": "Produce plan stats\n\n**Tags: metrics\n\n**Examples\n\n.. code-block:: http\n\n GET /api/metrics/cowork/plans HTTP/1.1\n\n.. code-block:: json\n\n {\n \"title\": \"Active Subscribers\",\n \"table\": [\n {\n \"is_active\": true,\n \"key\": \"open-space\",\n \"location\": \"/profile/plan/open-space/\",\n \"values\": [\n [\"2014-09-01T00:00:00Z\", 4],\n [\"2014-10-01T00:00:00Z\", 5],\n [\"2014-11-01T00:00:00Z\", 6],\n [\"2014-12-01T00:00:00Z\", 6],\n [\"2015-01-01T00:00:00Z\", 6],\n [\"2015-02-01T00:00:00Z\", 9],\n [\"2015-03-01T00:00:00Z\", 9],\n [\"2015-04-01T00:00:00Z\", 9],\n [\"2015-05-01T00:00:00Z\", 11],\n [\"2015-06-01T00:00:00Z\", 11],\n [\"2015-07-01T00:00:00Z\", 14],\n [\"2015-08-01T00:00:00Z\", 16],\n [\"2015-08-06T05:37:50.004Z\", 16]\n ]\n },\n {\n \"is_active\": true,\n \"key\": \"open-plus\",\n \"location\": \"/profile/plan/open-plus/\",\n \"values\": [\n [\"2014-09-01T00:00:00Z\", 7],\n [\"2014-10-01T00:00:00Z\", 8],\n [\"2014-11-01T00:00:00Z\", 9],\n [\"2014-12-01T00:00:00Z\", 9],\n [\"2015-01-01T00:00:00Z\", 12],\n [\"2015-02-01T00:00:00Z\", 13],\n [\"2015-03-01T00:00:00Z\", 18],\n [\"2015-04-01T00:00:00Z\", 19],\n [\"2015-05-01T00:00:00Z\", 19],\n [\"2015-06-01T00:00:00Z\", 20],\n [\"2015-07-01T00:00:00Z\", 23],\n [\"2015-08-01T00:00:00Z\", 25],\n [\"2015-08-06T05:37:50.014Z\", 25]\n ]\n },\n {\n \"is_active\": true,\n \"key\": \"private\",\n \"location\": \"/profile/plan/private/\",\n \"values\": [\n [\"2014-09-01T00:00:00Z\", 3],\n [\"2014-10-01T00:00:00Z\", 3],\n [\"2014-11-01T00:00:00Z\", 3],\n [\"2014-12-01T00:00:00Z\", 3],\n [\"2015-01-01T00:00:00Z\", 6],\n [\"2015-02-01T00:00:00Z\", 7],\n [\"2015-03-01T00:00:00Z\", 10],\n [\"2015-04-01T00:00:00Z\", 15],\n [\"2015-05-01T00:00:00Z\", 16],\n [\"2015-06-01T00:00:00Z\", 17],\n [\"2015-07-01T00:00:00Z\", 17],\n [\"2015-08-01T00:00:00Z\", 18],\n [\"2015-08-06T05:37:50.023Z\", 18]\n ]\n }\n ],\n \"extra\": [\n {\n \"key\": \"churn\",\n \"values\": [\n [\"2014-09-01T00:00:00Z\", 0],\n [\"2014-10-01T00:00:00Z\", 0],\n [\"2014-11-01T00:00:00Z\", 0],\n [\"2014-12-01T00:00:00Z\", 0],\n [\"2015-01-01T00:00:00Z\", 0],\n [\"2015-02-01T00:00:00Z\", 0],\n [\"2015-03-01T00:00:00Z\", 0],\n [\"2015-04-01T00:00:00Z\", 0],\n [\"2015-05-01T00:00:00Z\", 0],\n [\"2015-06-01T00:00:00Z\", 0],\n [\"2015-07-01T00:00:00Z\", 0],\n [\"2015-08-01T00:00:00Z\", 1],\n [\"2015-08-06T05:37:50.031Z\", 1]\n ]\n }\n ]\n }",
"parameters": [
{
"name": "start_at",
"in": "query",
"description": "date/time in ISO format after which records were created.",
"required": false,
"type": "string"
},
{
"name": "ends_at",
"in": "query",
"description": "date/time in ISO format before which records were created.",
"required": false,
"type": "string"
},
{
"name": "page",
"in": "query",
"description": "A page number within the paginated result set.",
"required": false,
"type": "integer"
}
],
"responses": {
"200": {
"description": "",
"schema": {
"required": [
"count",
"results"
],
"type": "object",
"properties": {
"count": {
"type": "integer"
},
"next": {
"type": "string",
"format": "uri"
},
"previous": {
"type": "string",
"format": "uri"
},
"results": {
"type": "array",
"items": {
"$ref": "#/definitions/Metrics"
}
}
}
}
}
},
"tags": [
"metrics"
]
},
"parameters": [
{
"name": "organization",
"in": "path",
"required": true,
"type": "string"
}
]
},
"/notifications/{template}/": {
"post": {
"operationId": "notifications_create",
"description": "Sends a test notification e-mail.\n\n**Tags: themes\n\n**Example\n\n.. code-block:: http\n\n POST /api/notifications/contact_requested_notice/ HTTP/1.1",
"parameters": [],
"responses": {
"201": {
"description": ""
}
},
"tags": [
"notifications"
]
},
"parameters": [
{
"name": "template",
"in": "path",
"required": true,
"type": "string"
}
]
},
"/profile/": {
"get": {
"operationId": "profile_list",
"description": "Queries a page (``PAGE_SIZE`` records) of organization and user profiles.\n\nThe queryset can be filtered for at least one field to match a search\nterm (``q``).\n\nThe queryset can be ordered by a field by adding an HTTP query parameter\n``o=`` followed by the field name. A sequence of fields can be used\nto create a complete ordering by adding a sequence of ``o`` HTTP query\nparameters. To reverse the natural order of a field, prefix the field\nname by a minus (-) sign.\n\n**Tags: profile\n\n**Examples\n\n.. code-block:: http\n\n GET /api/profile/?o=created_at HTTP/1.1\n\nresponds\n\n.. code-block:: json\n\n {\n \"count\": 1,\n \"next\": null,\n \"previous\": null,\n \"results\": [{\n \"slug\": \"xia\",\n \"full_name\": \"Xia Lee\",\n \"printable_name\": \"Xia Lee\",\n \"created_at\": \"2016-01-14T23:16:55Z\"\n }]\n }",
"parameters": [
{
"name": "start_at",
"in": "query",
"description": "date/time in ISO format after which records were created.",
"required": false,
"type": "string"
},
{
"name": "ends_at",
"in": "query",
"description": "date/time in ISO format before which records were created.",
"required": false,
"type": "string"
},
{
"name": "q",
"in": "query",
"description": "search for matching text in slug, full_name, email, phone, street_address, locality, region, postal_code, country, username, first_name, last_name",
"required": false,
"type": "string"
},
{
"name": "o",
"in": "query",
"description": "sort by u, r",
"required": false,
"type": "string"
},
{
"name": "ot",
"in": "query",
"description": "sort by natural ascending or descending order",
"required": false,
"type": "string"
},
{
"name": "page",
"in": "query",
"description": "A page number within the paginated result set.",
"required": false,
"type": "integer"
}
],
"responses": {
"200": {
"description": "",
"schema": {
"required": [
"count",
"results"
],
"type": "object",
"properties": {
"count": {
"type": "integer"
},
"next": {
"type": "string",
"format": "uri"
},
"previous": {
"type": "string",
"format": "uri"
},
"results": {
"type": "array",
"items": {
"$ref": "#/definitions/Organization"
}
}
}
}
}
},
"tags": [
"profile"
]
},
"post": {
"operationId": "profile_create",
"description": "Creates an organization, personal or user profile.\n\n**Examples\n\n.. code-block:: http\n\n POST /api/profile/ HTTP/1.1\n\n.. code-block:: json\n\n {\n \"email\": \"xia@locahost.localdomain\",\n \"full_name\": \"Xia Lee\"\n }",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/OrganizationCreate"
}
}
],
"responses": {
"201": {
"description": "",
"schema": {
"$ref": "#/definitions/OrganizationCreate"
}
}
},
"tags": [
"profile"
]
},
"parameters": []
},
"/profile/{organization}/": {
"get": {
"operationId": "profile_read",
"description": "Retrieves an organization, personal or user profile.\n\n**Tags: profile\n\n**Examples\n\n.. code-block:: http\n\n GET /api/profile/xia/ HTTP/1.1\n\nresponds\n\n.. code-block:: json\n\n {\n \"created_at\": \"2018-01-01T00:00:00Z\",\n \"email\": \"xia@locahost.localdomain\",\n \"full_name\": \"Xia Lee\",\n \"printable_name\": \"Xia Lee\",\n \"slug\": \"xia\",\n \"subscriptions\": [\n {\n \"created_at\": \"2018-01-01T00:00:00Z\",\n \"ends_at\": \"2019-01-01T00:00:00Z\",\n \"plan\": \"open-space\",\n \"auto_renew\": true\n }\n ]\n }",
"parameters": [],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/OrganizationWithSubscriptions"
}
}
},
"tags": [
"profile"
]
},
"put": {
"operationId": "profile_update",
"description": "Updates an organization, personal or user profile.\n\n**Examples\n\n.. code-block:: http\n\n PUT /api/profile/xia/ HTTP/1.1\n\n.. code-block:: json\n\n {\n \"email\": \"xia@locahost.localdomain\",\n \"full_name\": \"Xia Lee\"\n }",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/OrganizationWithSubscriptions"
}
}
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/OrganizationWithSubscriptions"
}
}
},
"tags": [
"profile"
]
},
"patch": {
"operationId": "profile_partial_update",
"description": "Retrieves an organization, personal or user profile.\n\n**Tags: profile\n\n**Examples\n\n.. code-block:: http\n\n GET /api/profile/xia/ HTTP/1.1\n\nresponds\n\n.. code-block:: json\n\n {\n \"created_at\": \"2018-01-01T00:00:00Z\",\n \"email\": \"xia@locahost.localdomain\",\n \"full_name\": \"Xia Lee\",\n \"printable_name\": \"Xia Lee\",\n \"slug\": \"xia\",\n \"subscriptions\": [\n {\n \"created_at\": \"2018-01-01T00:00:00Z\",\n \"ends_at\": \"2019-01-01T00:00:00Z\",\n \"plan\": \"open-space\",\n \"auto_renew\": true\n }\n ]\n }",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/OrganizationWithSubscriptions"
}
}
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/OrganizationWithSubscriptions"
}
}
},
"tags": [
"profile"
]
},
"delete": {
"operationId": "profile_delete",
"description": "Deletes a profile.\n\nWe anonymize the organization instead of purely deleting\nit from the database because we don't want to loose history\non subscriptions and transactions.\n\n**Tags: profile\n\n**Examples\n\n.. code-block:: http\n\n DELETE /api/profile/xia/ HTTP/1.1",
"parameters": [],
"responses": {
"204": {
"description": ""
}
},
"tags": [
"profile"
]
},
"parameters": [
{
"name": "organization",
"in": "path",
"required": true,
"type": "string"
}
]
},
"/profile/{organization}/plans/": {
"get": {
"operationId": "profile_plans_list",
"description": "Create a ``Plan`` for a provider.\n\n**Tags: subscriptions\n\n**Examples\n\n.. code-block:: http\n\n POST /api/profile/cowork/plans HTTP/1.1\n\n.. code-block:: json\n\n {\n \"title\": \"Open Space\",\n \"description\": \"A desk in our coworking space\",\n \"is_active\": false,\n \"period_amount\": 12000,\n \"interval\": 1\n }\n\nresponds\n\n.. code-block:: json\n\n {\n \"title\": \"Open Space\",\n \"description\": \"A desk in our coworking space\",\n \"is_active\": false,\n \"period_amount\": 12000,\n \"interval\": 1\n }",
"parameters": [
{
"name": "start_at",
"in": "query",
"description": "date/time in ISO format after which records were created.",
"required": false,
"type": "string"
},
{
"name": "ends_at",
"in": "query",
"description": "date/time in ISO format before which records were created.",
"required": false,
"type": "string"
},
{
"name": "o",
"in": "query",
"description": "sort by title, period_amount, is_active, created_at",
"required": false,
"type": "string"
},
{
"name": "ot",
"in": "query",
"description": "sort by natural ascending or descending order",
"required": false,
"type": "string"
},
{
"name": "page",
"in": "query",
"description": "A page number within the paginated result set.",
"required": false,
"type": "integer"
}
],
"responses": {
"200": {
"description": "",
"schema": {
"required": [
"count",
"results"
],
"type": "object",
"properties": {
"count": {
"type": "integer"
},
"next": {
"type": "string",
"format": "uri"
},
"previous": {
"type": "string",
"format": "uri"
},
"results": {
"type": "array",
"items": {
"$ref": "#/definitions/Plan"
}
}
}
}
}
},
"tags": [
"profile"
]
},
"post": {
"operationId": "profile_plans_create",
"description": "Create a ``Plan`` for a provider.\n\n**Tags: subscriptions\n\n**Examples\n\n.. code-block:: http\n\n POST /api/profile/cowork/plans HTTP/1.1\n\n.. code-block:: json\n\n {\n \"title\": \"Open Space\",\n \"description\": \"A desk in our coworking space\",\n \"is_active\": false,\n \"period_amount\": 12000,\n \"interval\": 1\n }\n\nresponds\n\n.. code-block:: json\n\n {\n \"title\": \"Open Space\",\n \"description\": \"A desk in our coworking space\",\n \"is_active\": false,\n \"period_amount\": 12000,\n \"interval\": 1\n }",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/Plan"
}
}
],
"responses": {
"201": {
"description": "",
"schema": {
"$ref": "#/definitions/Plan"
}
}
},
"tags": [
"profile"
]
},
"parameters": [
{
"name": "organization",
"in": "path",
"required": true,
"type": "string"
}
]
},
"/profile/{organization}/plans/{plan}/": {
"get": {
"operationId": "profile_plans_read",
"description": "Retrieves a ``Plan``.\n\nThe ``is_active`` boolean is used to activate a plan, enabling users\nto subscribe to it, or deactivate a plan, disabling users from subscribing\nto it.\n\n**Tags: subscriptions\n\n**Examples\n\n.. code-block:: http\n\n GET /api/profile/cowork/plans/open-space HTTP/1.1\n\n.. code-block:: json\n\n {\n \"title\": \"Open Space\",\n \"description\": \"A desk in our coworking space\",\n \"is_active\": false,\n \"period_amount\": 12000,\n \"interval\": 1\n }",
"parameters": [],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/Plan"
}
}
},
"tags": [
"profile"
]
},
"put": {
"operationId": "profile_plans_update",
"description": "Updates a ``Plan``.\n\nThe ``is_active`` boolean is used to activate a plan, enabling users\nto subscribe to it, or deactivate a plan, disabling users\nfrom subscribing to it.\n\n**Tags: subscriptions\n\n**Examples\n\n.. code-block:: http\n\n PUT /api/profile/cowork/plans/open-space HTTP/1.1\n\n.. code-block:: json\n\n {\n \"title\": \"Open Space\",\n }\n\nresponds\n\n.. code-block:: json\n\n {\n \"title\": \"Open Space\",\n \"description\": \"A desk in our coworking space\",\n \"is_active\": false,\n \"period_amount\": 12000,\n \"interval\": 1\n }",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/Plan"
}
}
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/Plan"
}
}
},
"tags": [
"profile"
]
},
"patch": {
"operationId": "profile_plans_partial_update",
"description": "Retrieves a ``Plan``.\n\nThe ``is_active`` boolean is used to activate a plan, enabling users\nto subscribe to it, or deactivate a plan, disabling users from subscribing\nto it.\n\n**Tags: subscriptions\n\n**Examples\n\n.. code-block:: http\n\n GET /api/profile/cowork/plans/open-space HTTP/1.1\n\n.. code-block:: json\n\n {\n \"title\": \"Open Space\",\n \"description\": \"A desk in our coworking space\",\n \"is_active\": false,\n \"period_amount\": 12000,\n \"interval\": 1\n }",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/Plan"
}
}
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/Plan"
}
}
},
"tags": [
"profile"
]
},
"delete": {
"operationId": "profile_plans_delete",
"description": "Deletes a ``Plan``.\n\n**Tags: subscriptions\n\n**Examples\n\n.. code-block:: http\n\n DELETE /api/profile/cowork/plans/open-space HTTP/1.1",
"parameters": [],
"responses": {
"204": {
"description": ""
}
},
"tags": [
"profile"
]
},
"parameters": [
{
"name": "organization",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "plan",
"in": "path",
"required": true,
"type": "string"
}
]
},
"/profile/{organization}/plans/{plan}/subscriptions/": {
"get": {
"operationId": "profile_plans_subscriptions_list",
"description": "A GET request will list all ``Subscription`` to\na specified ``:plan`` provided by ``:organization``.\n\n**Tags: subscriptions\n\n**Examples\n\n.. code-block:: http\n\n GET /api/profile/cowork/plans/premium/subscriptions/ HTTP/1.1\n\n.. code-block:: json\n\n {\n \"count\": 1,\n \"next\": null,\n \"previous\": null,\n \"results\": [\n {\n \"slug\": \"xia\",\n \"full_name\": \"Xia Lee\",\n \"created_at\": \"2016-01-14T23:16:55Z\"\n }\n ]\n }",
"parameters": [
{
"name": "o",
"in": "query",
"description": "sort by organization, plan, created_at, ends_at",
"required": false,
"type": "string"
},
{
"name": "ot",
"in": "query",
"description": "sort by natural ascending or descending order",
"required": false,
"type": "string"
},
{
"name": "q",
"in": "query",
"description": "search for matching text in organization__slug, organization__full_name, organization__email, organization__phone, organization__street_address, organization__locality, organization__region, organization__postal_code, organization__country, plan__title",
"required": false,
"type": "string"
},
{
"name": "start_at",
"in": "query",
"description": "date/time in ISO format after which records were created.",
"required": false,
"type": "string"
},
{
"name": "ends_at",
"in": "query",
"description": "date/time in ISO format before which records were created.",
"required": false,
"type": "string"
},
{
"name": "page",
"in": "query",
"description": "A page number within the paginated result set.",
"required": false,
"type": "integer"
}
],
"responses": {
"200": {
"description": "",
"schema": {
"required": [
"count",
"results"
],
"type": "object",
"properties": {
"count": {
"type": "integer"
},
"next": {
"type": "string",
"format": "uri"
},
"previous": {
"type": "string",
"format": "uri"
},
"results": {
"type": "array",
"items": {
"$ref": "#/definitions/Subscription"
}
}
}
}
}
},
"tags": [
"profile"
]
},
"post": {
"operationId": "profile_plans_subscriptions_create",
"description": "A POST request will subscribe an organization to the ``:plan``.\n\n**Tags: subscriptions\n\n**Examples\n\n.. code-block:: http\n\n POST /api/profile/cowork/plans/premium/subscriptions/ HTTP/1.1\n\n.. code-block:: json\n\n {\n \"organization\": {\n \"slug\": \"xia\"\n }\n }\n\nresponds\n\n.. code-block:: json\n\n {\n \"created_at\": \"2016-01-14T23:16:55Z\",\n \"ends_at\": \"2017-01-14T23:16:55Z\",\n \"description\": null,\n \"organization\": {\n \"slug\": \"xia\",\n \"printable_name\": \"Xia Lee\"\n },\n \"plan\": {\n \"slug\": \"open-space\",\n \"title\": \"Open Space\",\n \"description\": \"open space desk, High speed internet\n - Ethernet or WiFi, Unlimited printing,\n Unlimited scanning, Unlimited fax service\n (send and receive)\",\n \"is_active\": true,\n \"setup_amount\": 0,\n \"period_amount\": 17999,\n \"interval\": 4,\n \"app_url\": \"http://localhost:8020/app\"\n },\n \"auto_renew\": true\n }",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/SubscriptionCreate"
}
},
{
"name": "force",
"in": "query",
"description": "Forces invite of user/organization that could not be found",
"required": false,
"type": "boolean"
}
],
"responses": {
"201": {
"description": "",
"schema": {
"$ref": "#/definitions/SubscriptionCreate"
}
}
},
"tags": [
"profile"
]
},
"parameters": [
{
"name": "organization",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "plan",
"in": "path",
"required": true,
"type": "string"
}
]
},
"/profile/{organization}/plans/{plan}/subscriptions/{subscriber}/": {
"get": {
"operationId": "profile_plans_subscriptions_read",
"description": "Unsubscribe an organization from a plan.\n\n**Tags: subscriptions\n\n**Examples\n\n.. code-block:: http\n\n GET /api/profile/cowork/plans/open-space/subscriptions/xia/ HTTP/1.1\n\n.. code-block:: json\n\n {\n ... XXX ...\n }",
"parameters": [],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/Subscription"
}
}
},
"tags": [
"profile"
]
},
"put": {
"operationId": "profile_plans_subscriptions_update",
"description": "Updates an organization subscription.\n\n**Tags: subscriptions\n\n**Examples\n\n.. code-block:: http\n\n PUT /api/profile/cowork/plans/open-space/subscriptions/xia/ HTTP/1.1\n\n.. code-block:: json\n\n {\n ... XXX ...\n }\n\nresponds\n\n.. code-block:: json\n\n {\n ... XXX ...\n }",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/Subscription"
}
}
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/Subscription"
}
}
},
"tags": [
"profile"
]
},
"patch": {
"operationId": "profile_plans_subscriptions_partial_update",
"description": "Unsubscribe an organization from a plan.\n\n**Tags: subscriptions\n\n**Examples\n\n.. code-block:: http\n\n GET /api/profile/cowork/plans/open-space/subscriptions/xia/ HTTP/1.1\n\n.. code-block:: json\n\n {\n ... XXX ...\n }",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/Subscription"
}
}
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/Subscription"
}
}
},
"tags": [
"profile"
]
},
"delete": {
"operationId": "profile_plans_subscriptions_delete",
"description": "Unsubscribe an organization from a plan.\n\n**Tags: subscriptions\n\n**Examples\n\n.. code-block:: http\n\n DELETE /api/profile/cowork/plans/open-space/subscriptions/xia/ HTTP/1.1",
"parameters": [],
"responses": {
"204": {
"description": ""
}
},
"tags": [
"profile"
]
},
"parameters": [
{
"name": "organization",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "plan",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "subscriber",
"in": "path",
"required": true,
"type": "string"
}
]
},
"/profile/{organization}/roles/": {
"get": {
"operationId": "profile_roles_list",
"description": "Lists all roles for an organization\n\n**Tags: rbac\n\n**Examples\n\n.. code-block:: http\n\n GET /api/profile/cowork/roles/ HTTP/1.1\n\nresponds\n\n.. code-block:: json\n\n {\n \"count\": 1,\n \"next\": null,\n \"previous\": null,\n \"results\": [\n {\n \"created_at\": \"2018-01-01T00:00:00Z\",\n \"role_description\": {\n \"name\": \"Manager\",\n \"slug\": \"manager\",\n \"organization\": {\n \"slug\": \"cowork\",\n \"full_name\": \"ABC Corp.\",\n \"printable_name\": \"ABC Corp.\",\n \"created_at\": \"2018-01-01T00:00:00Z\",\n \"email\": \"support@localhost.localdomain\"\n }\n },\n \"user\": {\n \"slug\": \"alice\",\n \"email\": \"alice@localhost.localdomain\",\n \"full_name\": \"Alice Doe\",\n \"created_at\": \"2018-01-01T00:00:00Z\"\n },\n \"request_key\": \"1\",\n \"grant_key\": null\n },\n ]\n }",
"parameters": [
{
"name": "start_at",
"in": "query",
"description": "date/time in ISO format after which records were created.",
"required": false,
"type": "string"
},
{
"name": "ends_at",
"in": "query",
"description": "date/time in ISO format before which records were created.",
"required": false,
"type": "string"
},
{
"name": "q",
"in": "query",
"description": "search for matching text in organization__slug, organization__full_name, organization__email, user__username, user__email, role_description__title, role_description__slug",
"required": false,
"type": "string"
},
{
"name": "o",
"in": "query",
"description": "sort by full_name, username, role_name, grant_key, request_key, created_at",
"required": false,
"type": "string"
},
{
"name": "ot",
"in": "query",
"description": "sort by natural ascending or descending order",
"required": false,
"type": "string"
},
{
"name": "page",
"in": "query",
"description": "A page number within the paginated result set.",
"required": false,
"type": "integer"
}
],
"responses": {
"200": {
"description": "",
"schema": {
"required": [
"count",
"results"
],
"type": "object",
"properties": {
"count": {
"type": "integer"
},
"next": {
"type": "string",
"format": "uri"
},
"previous": {
"type": "string",
"format": "uri"
},
"results": {
"type": "array",
"items": {
"$ref": "#/definitions/Role"
}
}
}
}
}
},
"tags": [
"profile"
]
},
"parameters": [
{
"name": "organization",
"in": "path",
"required": true,
"type": "string"
}
]
},
"/profile/{organization}/roles/describe/": {
"get": {
"operationId": "profile_roles_describe_list",
"description": "Lists roles by description``RoleDescription``.\n\nsee :doc:`Flexible Security Framework <security>`.\n\n**Tags: rbac\n\n**Examples\n\n.. code-block:: http\n\n GET /api/profile/cowork/roles/describe/ HTTP/1.1\n\nresponds\n\n.. code-block:: json\n\n {\n \"count\": 2,\n \"next\": null,\n \"previous\": null,\n \"results\": [\n {\n \"created_at\": \"2018-01-01T00:00:00Z\",\n \"title\": \"Managers\",\n \"slug\": \"manager\",\n \"is_global\": true,\n \"roles\": [\n {\n \"created_at\": \"2018-01-01T00:00:00Z\",\n \"user\": {\n \"slug\": \"donny\",\n \"email\": \"donny@localhost.localdomain\",\n \"full_name\": \"Donny Cooper\",\n \"created_at\": \"2018-01-01T00:00:00Z\"\n },\n \"request_key\": null,\n \"grant_key\": null\n },\n ]\n },\n {\n \"created_at\": \"2018-01-01T00:00:00Z\",\n \"name\": \"Contributors\",\n \"slug\": \"contributor\",\n \"is_global\": false,\n \"roles\": []\n }\n ]\n }",
"parameters": [
{
"name": "page",
"in": "query",
"description": "A page number within the paginated result set.",
"required": false,
"type": "integer"
}
],
"responses": {
"200": {
"description": "",
"schema": {
"required": [
"count",
"results"
],
"type": "object",
"properties": {
"count": {
"type": "integer"
},
"next": {
"type": "string",
"format": "uri"
},
"previous": {
"type": "string",
"format": "uri"
},
"results": {
"type": "array",
"items": {
"$ref": "#/definitions/RoleDescriptionCRUD"
}
}
}
}
}
},
"tags": [
"profile"
]
},
"post": {
"operationId": "profile_roles_describe_create",
"description": "Creates a new role that users can take on an organization.\n\nsee :doc:`Flexible Security Framework <security>`.\n\n**Tags: rbac\n\n**Examples\n\n.. code-block:: http\n\n GET /api/profile/cowork/roles/describe/ HTTP/1.1\n\n.. code-block:: json\n\n {\n \"title\": \"Managers\",\n }\n\nresponds\n\n.. code-block:: json\n\n {\n \"count\": 2,\n \"next\": null,\n \"previous\": null,\n \"results\": [\n {\n \"created_at\": \"2018-01-01T00:00:00Z\",\n \"name\": \"Managers\",\n \"slug\": \"manager\",\n \"is_global\": true,\n \"roles\": [\n {\n \"created_at\": \"2018-01-01T00:00:00Z\",\n \"user\": {\n \"slug\": \"donny\",\n \"email\": \"donny@localhost.localdomain\",\n \"full_name\": \"Donny Cooper\",\n \"created_at\": \"2018-01-01T00:00:00Z\"\n },\n \"request_key\": null,\n \"grant_key\": null\n },\n ]\n },\n {\n \"created_at\": \"2018-01-01T00:00:00Z\",\n \"name\": \"Contributors\",\n \"slug\": \"contributor\",\n \"is_global\": false,\n \"roles\": []\n }\n ]\n }",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/RoleDescriptionCRUD"
}
}
],
"responses": {
"201": {
"description": "",
"schema": {
"$ref": "#/definitions/RoleDescriptionCRUD"
}
}
},
"tags": [
"profile"
]
},
"parameters": [
{
"name": "organization",
"in": "path",
"required": true,
"type": "string"
}
]
},
"/profile/{organization}/roles/describe/{role}/": {
"get": {
"operationId": "profile_roles_describe_read",
"description": "Retrieves a ``RoleDescription``.\n\nsee :doc:`Flexible Security Framework <security>`.\n\n**Tags: rbac\n\n**Examples\n\n.. code-block:: http\n\n GET /api/profile/cowork/roles/describe/manager HTTP/1.1\n\nresponds\n\n.. code-block:: json\n\n {\n \"created_at\": \"2018-01-01T00:00:00Z\",\n \"name\": \"Managers\",\n \"slug\": \"manager\",\n \"is_global\": true,\n \"roles\": [\n {\n \"created_at\": \"2018-01-01T00:00:00Z\",\n \"user\": {\n \"slug\": \"donny\",\n \"email\": \"donny@localhost.localdomain\",\n \"full_name\": \"Donny Cooper\",\n \"created_at\": \"2018-01-01T00:00:00Z\"\n },\n \"request_key\": null,\n \"grant_key\": null\n },\n ]\n }",
"parameters": [],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/RoleDescriptionCRUD"
}
}
},
"tags": [
"profile"
]
},
"put": {
"operationId": "profile_roles_describe_update",
"description": "Updates ``RoleDescription``.\n\nsee :doc:`Flexible Security Framework <security>`.\n\n**Tags: rbac\n\n**Examples\n\n.. code-block:: http\n\n PUT /api/profile/cowork/roles/describe/manager HTTP/1.1\n\n.. code-block:: json\n\n {\n \"title\": \"Profile managers\"\n }\n\nresponds\n\n.. code-block:: json\n\n {\n \"created_at\": \"2018-01-01T00:00:00Z\",\n \"title\": \"Profile managers\",\n \"slug\": \"manager\",\n \"is_global\": true,\n \"roles\": [\n {\n \"created_at\": \"2018-01-01T00:00:00Z\",\n \"user\": {\n \"slug\": \"donny\",\n \"email\": \"donny@localhost.localdomain\",\n \"full_name\": \"Donny Cooper\",\n \"created_at\": \"2018-01-01T00:00:00Z\"\n },\n \"request_key\": null,\n \"grant_key\": null\n },\n ]\n }",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/RoleDescriptionCRUD"
}
}
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/RoleDescriptionCRUD"
}
}
},
"tags": [
"profile"
]
},
"patch": {
"operationId": "profile_roles_describe_partial_update",
"description": "Retrieves a ``RoleDescription``.\n\nsee :doc:`Flexible Security Framework <security>`.\n\n**Tags: rbac\n\n**Examples\n\n.. code-block:: http\n\n GET /api/profile/cowork/roles/describe/manager HTTP/1.1\n\nresponds\n\n.. code-block:: json\n\n {\n \"created_at\": \"2018-01-01T00:00:00Z\",\n \"name\": \"Managers\",\n \"slug\": \"manager\",\n \"is_global\": true,\n \"roles\": [\n {\n \"created_at\": \"2018-01-01T00:00:00Z\",\n \"user\": {\n \"slug\": \"donny\",\n \"email\": \"donny@localhost.localdomain\",\n \"full_name\": \"Donny Cooper\",\n \"created_at\": \"2018-01-01T00:00:00Z\"\n },\n \"request_key\": null,\n \"grant_key\": null\n },\n ]\n }",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/RoleDescriptionCRUD"
}
}
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/RoleDescriptionCRUD"
}
}
},
"tags": [
"profile"
]
},
"delete": {
"operationId": "profile_roles_describe_delete",
"description": "Deletes ``RoleDescription``.\n\nsee :doc:`Flexible Security Framework <security>`.\n\n**Tags: rbac\n\n**Examples\n\n.. code-block:: http\n\n DELETE /api/profile/cowork/roles/describe/manager HTTP/1.1",
"parameters": [],
"responses": {
"204": {
"description": ""
}
},
"tags": [
"profile"
]
},
"parameters": [
{
"name": "organization",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "role",
"in": "path",
"required": true,
"type": "string"
}
]
},
"/profile/{organization}/roles/{role}/": {
"get": {
"operationId": "profile_roles_read",
"description": "``GET`` lists the specified role assignments for an organization.\n\n**Tags: rbac\n\n**Examples\n\n.. code-block:: http\n\n GET /api/profile/cowork/roles/manager/ HTTP/1.1\n\nresponds\n\n.. code-block:: json\n\n {\n \"count\": 1,\n \"next\": null,\n \"previous\": null,\n \"results\": [\n {\n \"created_at\": \"2018-01-01T00:00:00Z\",\n \"role_description\": {\n \"name\": \"Manager\",\n \"slug\": \"manager\",\n \"organization\": {\n \"slug\": \"cowork\",\n \"full_name\": \"ABC Corp.\",\n \"printable_name\": \"ABC Corp.\",\n \"created_at\": \"2018-01-01T00:00:00Z\",\n \"email\": \"support@localhost.localdomain\"\n }\n },\n \"user\": {\n \"slug\": \"alice\",\n \"email\": \"alice@localhost.localdomain\",\n \"full_name\": \"Alice Doe\",\n \"created_at\": \"2018-01-01T00:00:00Z\"\n },\n \"request_key\": \"1\",\n \"grant_key\": null\n },\n ]\n }",
"parameters": [],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/Role"
}
}
},
"tags": [
"profile"
]
},
"post": {
"operationId": "profile_roles_create",
"description": "Attaches a user to a role on an organization, typically granting\npermissions to the user with regards to managing an organization profile\n(see :doc:`Flexible Security Framework <security>`).\n\n**Tags: rbac\n\n**Examples\n\n.. code-block:: http\n\n POST /api/profile/cowork/roles/manager/ HTTP/1.1\n\n.. code-block:: json\n\n {\n \"slug\": \"xia\"\n }\n\nresponds\n\n.. code-block:: json\n\n {\n \"slug\": \"xia\"\n }",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/UserRoleCreate"
}
},
{
"name": "force",
"in": "query",
"description": "Forces invite of user/organization that could not be found",
"required": false,
"type": "boolean"
}
],
"responses": {
"201": {
"description": "",
"schema": {
"$ref": "#/definitions/UserRoleCreate"
}
}
},
"tags": [
"profile"
]
},
"parameters": [
{
"name": "organization",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "role",
"in": "path",
"required": true,
"type": "string"
}
]
},
"/profile/{organization}/roles/{role}/{user}/": {
"post": {
"operationId": "profile_roles_create_user",
"description": "Re-sends the invite e-mail that the user was granted a role\non the organization.\n\n**Tags: rbac\n\n**Examples\n\n.. code-block:: http\n\n POST /api/profile/cowork/roles/manager/xia/ HTTP/1.1\n\nresponds\n\n.. code-block:: json\n\n {\n \"created_at\": \"2018-01-01T00:00:00Z\",\n \"role_description\": {\n \"created_at\": \"2018-01-01T00:00:00Z\",\n \"title\": \"Profile Manager\",\n \"slug\": \"manager\",\n \"is_global\": true,\n \"organization\": {\n \"slug\": \"cowork\",\n \"full_name\": \"ABC Corp.\",\n \"printable_name\": \"ABC Corp.\",\n \"created_at\": \"2018-01-01T00:00:00Z\",\n \"email\": \"support@localhost.localdomain\"\n }\n },\n \"user\": {\n \"slug\": \"alice\",\n \"email\": \"alice@localhost.localdomain\",\n \"full_name\": \"Alice Doe\",\n \"created_at\": \"2018-01-01T00:00:00Z\"\n },\n \"request_key\": \"1\",\n \"grant_key\": null\n }",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/RoleAccessible"
}
}
],
"responses": {
"201": {
"description": "",
"schema": {
"$ref": "#/definitions/RoleAccessible"
}
}
},
"tags": [
"profile"
]
},
"delete": {
"operationId": "profile_roles_delete",
"description": "Dettach a user from one or all roles with regards to an organization,\ntypically resulting in revoking permissions from this user to manage\npart of an organization profile.\n\n**Tags: rbac\n\n**Examples\n\n.. code-block:: http\n\n DELETE /api/profile/cowork/roles/managers/xia/ HTTP/1.1",
"parameters": [],
"responses": {
"204": {
"description": ""
}
},
"tags": [
"profile"
]
},
"parameters": [
{
"name": "organization",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "role",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "user",
"in": "path",
"required": true,
"type": "string"
}
]
},
"/profile/{organization}/subscribers/": {
"get": {
"operationId": "profile_subscribers_list",
"description": "List all ``Organization`` which have or had a subscription to a plan\nprovided by ``:organization``.\n\n**Tags: subscriptions\n\n**Examples\n\n.. code-block:: http\n\n GET /api/profile/cowork/subscribers/?o=created_at&ot=desc HTTP/1.1\n\n.. code-block:: json\n\n {\n \"count\": 1,\n \"next\": null,\n \"previous\": null,\n \"results\": [\n {\n \"slug\": \"xia\",\n \"full_name\": \"Xia Lee\",\n \"created_at\": \"2016-01-14T23:16:55Z\"\n }\n ]\n }",
"parameters": [
{
"name": "start_at",
"in": "query",
"description": "date/time in ISO format after which records were created.",
"required": false,
"type": "string"
},
{
"name": "ends_at",
"in": "query",
"description": "date/time in ISO format before which records were created.",
"required": false,
"type": "string"
},
{
"name": "q",
"in": "query",
"description": "search for matching text in slug, full_name, email, phone, street_address, locality, region, postal_code, country, username, first_name, last_name",
"required": false,
"type": "string"
},
{
"name": "o",
"in": "query",
"description": "sort by u, r",
"required": false,
"type": "string"
},
{
"name": "ot",
"in": "query",
"description": "sort by natural ascending or descending order",
"required": false,
"type": "string"
},
{
"name": "page",
"in": "query",
"description": "A page number within the paginated result set.",
"required": false,
"type": "integer"
}
],
"responses": {
"200": {
"description": "",
"schema": {
"required": [
"count",
"results"
],
"type": "object",
"properties": {
"count": {
"type": "integer"
},
"next": {
"type": "string",
"format": "uri"
},
"previous": {
"type": "string",
"format": "uri"
},
"results": {
"type": "array",
"items": {
"$ref": "#/definitions/Organization"
}
}
}
}
}
},
"tags": [
"profile"
]
},
"parameters": [
{
"name": "organization",
"in": "path",
"required": true,
"type": "string"
}
]
},
"/profile/{organization}/subscribers/accept/{request_key}/": {
"put": {
"operationId": "profile_subscribers_accept_update",
"description": "Accepts a subscription request.\n\n**Tags: rbac\n\n**Examples\n\n.. code-block:: http\n\n PUT /api/profile/xia/subscribers/accept/abcdef12 HTTP/1.1",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/Subscription"
}
}
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/Subscription"
}
}
},
"tags": [
"profile"
]
},
"patch": {
"operationId": "profile_subscribers_accept_partial_update",
"description": "",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/Subscription"
}
}
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/Subscription"
}
}
},
"tags": [
"profile"
]
},
"parameters": [
{
"name": "organization",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "request_key",
"in": "path",
"required": true,
"type": "string"
}
]
},
"/profile/{organization}/subscriptions/": {
"get": {
"operationId": "profile_subscriptions_list",
"description": "GET queries all ``Subscription`` of an ``Organization``. The queryset\ncan be further refined to match a search filter (``q``) and sorted\non a specific field. The returned queryset is always paginated.\n\n**Tags: subscriptions\n\n**Examples\n\n.. code-block:: http\n\n GET /api/profile/:organization/subscriptions/?o=created_at&ot=desc HTTP/1.1\n\n.. code-block:: json\n\n {\n \"count\": 1,\n \"next\": null,\n \"previous\": null,\n \"results\": [\n {\n \"created_at\": \"2016-01-14T23:16:55Z\",\n \"ends_at\": \"2017-01-14T23:16:55Z\",\n \"description\": null,\n \"organization\": {\n \"slug\": \"xia\",\n \"printable_name\": \"Xia Lee\"\n },\n \"plan\": {\n \"slug\": \"open-space\",\n \"title\": \"Open Space\",\n \"description\": \"open space desk, High speed internet\n - Ethernet or WiFi, Unlimited printing,\n Unlimited scanning, Unlimited fax service\n (send and receive)\",\n \"is_active\": true,\n \"setup_amount\": 0,\n \"period_amount\": 17999,\n \"interval\": 4,\n \"app_url\": \"http://localhost:8020/app\"\n },\n \"auto_renew\": true\n }\n ]\n }",
"parameters": [
{
"name": "o",
"in": "query",
"description": "sort by organization, plan, created_at, ends_at",
"required": false,
"type": "string"
},
{
"name": "ot",
"in": "query",
"description": "sort by natural ascending or descending order",
"required": false,
"type": "string"
},
{
"name": "q",
"in": "query",
"description": "search for matching text in organization__slug, organization__full_name, organization__email, organization__phone, organization__street_address, organization__locality, organization__region, organization__postal_code, organization__country, plan__title",
"required": false,
"type": "string"
},
{
"name": "page",
"in": "query",
"description": "A page number within the paginated result set.",
"required": false,
"type": "integer"
}
],
"responses": {
"200": {
"description": "",
"schema": {
"required": [
"count",
"results"
],
"type": "object",
"properties": {
"count": {
"type": "integer"
},
"next": {
"type": "string",
"format": "uri"
},
"previous": {
"type": "string",
"format": "uri"
},
"results": {
"type": "array",
"items": {
"$ref": "#/definitions/Subscription"
}
}
}
}
}
},
"tags": [
"profile"
]
},
"post": {
"operationId": "profile_subscriptions_create",
"description": "Subscribes the organization to a plan.\n\n**Tags: subscriptions\n\n**Examples\n\n.. code-block:: http\n\n POST /api/profile/:organization/subscriptions/ HTTP/1.1\n\n.. code-block:: json\n\n {\n \"plan\": \"open-space\"\n }",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/Subscription"
}
}
],
"responses": {
"201": {
"description": "",
"schema": {
"$ref": "#/definitions/Subscription"
}
}
},
"tags": [
"profile"
]
},
"parameters": [
{
"name": "organization",
"in": "path",
"required": true,
"type": "string"
}
]
},
"/profile/{organization}/subscriptions/{subscribed_plan}/": {
"get": {
"operationId": "profile_subscriptions_read",
"description": "Retrieves a ``Subscription``.\n\n**Tags: subscriptions\n\n**Examples\n\n.. code-block:: http\n\n GET /api/profile/cowork/plans/open-space/subscriptions/xia/ HTTP/1.1\n\n.. code-block:: json\n\n {\n ... XXX ...\n }",
"parameters": [],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/Subscription"
}
}
},
"tags": [
"profile"
]
},
"put": {
"operationId": "profile_subscriptions_update",
"description": "Updates an organization subscription.\n\n**Tags: subscriptions\n\n**Examples\n\n.. code-block:: http\n\n PUT /api/profile/cowork/plans/open-space/subscriptions/xia/ HTTP/1.1\n\n.. code-block:: json\n\n {\n ... XXX ...\n }\n\nresponds\n\n.. code-block:: json\n\n {\n ... XXX ...\n }",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/Subscription"
}
}
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/Subscription"
}
}
},
"tags": [
"profile"
]
},
"patch": {
"operationId": "profile_subscriptions_partial_update",
"description": "Retrieves a ``Subscription``.\n\n**Tags: subscriptions\n\n**Examples\n\n.. code-block:: http\n\n GET /api/profile/cowork/plans/open-space/subscriptions/xia/ HTTP/1.1\n\n.. code-block:: json\n\n {\n ... XXX ...\n }",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/Subscription"
}
}
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/Subscription"
}
}
},
"tags": [
"profile"
]
},
"delete": {
"operationId": "profile_subscriptions_delete",
"description": "Unsubscribe an organization from a plan.\n\n**Tags: subscriptions\n\n**Examples\n\n.. code-block:: http\n\n DELETE /api/profile/cowork/plans/open-space/subscriptions/xia/ HTTP/1.1",
"parameters": [],
"responses": {
"204": {
"description": ""
}
},
"tags": [
"profile"
]
},
"parameters": [
{
"name": "organization",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "subscribed_plan",
"in": "path",
"required": true,
"type": "string"
}
]
},
"/proxy/": {
"get": {
"operationId": "proxy_read",
"description": "Returns the URL endpoint to which requests passing the access rules\nare forwarded to, and the format in which the session information\nis encoded.\n\nWhen running tests, you can retrieve the actual session information\nfor a specific user through the `/proxy/sessions/{user}/` API call.\n\n**Tags: rbac\n\n**Examples\n\n.. code-block:: http\n\n GET /api/proxy/ HTTP/1.1\n\nresponds\n\n.. code-block:: json\n\n {\n \"slug\": \"cowork\",\n \"entry_point\": \"http://localhost:8001/\",\n \"session_backend\": 1\n }",
"parameters": [],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/App"
}
}
},
"tags": [
"proxy"
]
},
"put": {
"operationId": "proxy_update",
"description": "Updates the URL endpoint to which requests passing the access rules\nare forwarded to and/or the format in which the session information\nis encoded.\n\n**Tags: rbac\n\n**Examples\n\n.. code-block:: http\n\n PUT /api/proxy/ HTTP/1.1\n\n.. code-block:: json\n\n {\n \"entry_point\": \"http://localhost:8001/\",\n \"session_backend\": 1\n }\n\nresponds\n\n.. code-block:: json\n\n {\n \"slug\": \"cowork\",\n \"entry_point\": \"http://localhost:8001/\",\n \"session_backend\": 1\n }",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/App"
}
}
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/App"
}
}
},
"tags": [
"proxy"
]
},
"patch": {
"operationId": "proxy_partial_update",
"description": "Returns the URL endpoint to which requests passing the access rules\nare forwarded to, and the format in which the session information\nis encoded.\n\nWhen running tests, you can retrieve the actual session information\nfor a specific user through the `/proxy/sessions/{user}/` API call.\n\n**Tags: rbac\n\n**Examples\n\n.. code-block:: http\n\n GET /api/proxy/ HTTP/1.1\n\nresponds\n\n.. code-block:: json\n\n {\n \"slug\": \"cowork\",\n \"entry_point\": \"http://localhost:8001/\",\n \"session_backend\": 1\n }",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/App"
}
}
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/App"
}
}
},
"tags": [
"proxy"
]
},
"parameters": []
},
"/proxy/engagement/": {
"get": {
"operationId": "proxy_engagement_list",
"description": "",
"parameters": [
{
"name": "page",
"in": "query",
"description": "A page number within the paginated result set.",
"required": false,
"type": "integer"
}
],
"responses": {
"200": {
"description": "",
"schema": {
"required": [
"count",
"results"
],
"type": "object",
"properties": {
"count": {
"type": "integer"
},
"next": {
"type": "string",
"format": "uri"
},
"previous": {
"type": "string",
"format": "uri"
},
"results": {
"type": "array",
"items": {
"$ref": "#/definitions/Engagements"
}
}
}
}
}
},
"tags": [
"proxy"
]
},
"parameters": []
},
"/proxy/engagement/users/": {
"get": {
"operationId": "proxy_engagement_users_list",
"description": "",
"parameters": [
{
"name": "page",
"in": "query",
"description": "A page number within the paginated result set.",
"required": false,
"type": "integer"
}
],
"responses": {
"200": {
"description": "",
"schema": {
"required": [
"count",
"results"
],
"type": "object",
"properties": {
"count": {
"type": "integer"
},
"next": {
"type": "string",
"format": "uri"
},
"previous": {
"type": "string",
"format": "uri"
},
"results": {
"type": "array",
"items": {
"$ref": "#/definitions/UserEngagement"
}
}
}
}
}
},
"tags": [
"proxy"
]
},
"parameters": []
},
"/proxy/key/": {
"put": {
"operationId": "proxy_key_update",
"description": "Rotates the key used to encode the session information forwarded\nto the application entry point.\n\n**Tags: rbac\n\n**Examples\n\n.. code-block:: http\n\n PUT /api/proxy/key/ HTTP/1.1\n\nresponds\n\n.. code-block:: json\n\n {\n \"enc_key\": \"********\",\n }",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/AppKey"
}
}
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/AppKey"
}
}
},
"tags": [
"proxy"
]
},
"patch": {
"operationId": "proxy_key_partial_update",
"description": "Rotates the key used to encode the session information forwarded\nto the application entry point.\n\n**Tags: rbac\n\n**Examples\n\n.. code-block:: http\n\n PUT /api/proxy/key/ HTTP/1.1\n\nresponds\n\n.. code-block:: json\n\n {\n \"enc_key\": \"********\",\n }",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/AppKey"
}
}
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/AppKey"
}
}
},
"tags": [
"proxy"
]
},
"parameters": []
},
"/proxy/recent/": {
"get": {
"operationId": "proxy_recent_list",
"description": "",
"parameters": [
{
"name": "page",
"in": "query",
"description": "A page number within the paginated result set.",
"required": false,
"type": "integer"
}
],
"responses": {
"200": {
"description": "",
"schema": {
"required": [
"count",
"results"
],
"type": "object",
"properties": {
"count": {
"type": "integer"
},
"next": {
"type": "string",
"format": "uri"
},
"previous": {
"type": "string",
"format": "uri"
},
"results": {
"type": "array",
"items": {
"$ref": "#/definitions/Activity"
}
}
}
}
}
},
"tags": [
"proxy"
]
},
"parameters": []
},
"/proxy/rules": {
"get": {
"operationId": "proxy_rules_list",
"description": "Queries a page (``PAGE_SIZE`` records) of ``Rule``.\n\n**Tags: rbac\n\n**Examples\n\n.. code-block:: http\n\n GET /api/proxy/rules/ HTTP/1.1\n\nresponds\n\n.. code-block:: json\n\n {\n \"count\": 1,\n \"next\": null,\n \"previous\": null,\n \"results\": [\n {\n \"rank\": 0,\n \"path\": \"/\",\n \"allow\": \"authenticated\",\n \"is_forward\": true,\n \"engaged\": \"\"\n }\n ]\n }",
"parameters": [
{
"name": "page",
"in": "query",
"description": "A page number within the paginated result set.",
"required": false,
"type": "integer"
}
],
"responses": {
"200": {
"description": "",
"schema": {
"required": [
"count",
"results"
],
"type": "object",
"properties": {
"count": {
"type": "integer"
},
"next": {
"type": "string",
"format": "uri"
},
"previous": {
"type": "string",
"format": "uri"
},
"results": {
"type": "array",
"items": {
"$ref": "#/definitions/Rule"
}
}
}
}
}
},
"tags": [
"proxy"
]
},
"post": {
"operationId": "proxy_rules_create",
"description": "Creates a new ``Rule``.\n\n**Tags: rbac\n\n**Examples\n\n.. code-block:: http\n\n POST /api/proxy/rules/ HTTP/1.1\n\n.. code-block:: json\n\n {\n \"rank\": 0,\n \"path\": \"/\",\n \"allow\": \"authenticated\",\n \"is_forward\": true,\n \"engaged\": \"\"\n }",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/Rule"
}
}
],
"responses": {
"201": {
"description": "",
"schema": {
"$ref": "#/definitions/Rule"
}
}
},
"tags": [
"proxy"
]
},
"patch": {
"operationId": "proxy_rules_partial_update",
"description": "Update the rank of rules.\n\nWhen receiving a request like [{u'newpos': 1, u'oldpos': 3}],\nit will move the rule at position 3 to position 1, updating all\nrules ranks in-between.\n\n**Tags: rbac",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/Rule"
}
}
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/Rule"
}
}
},
"tags": [
"proxy"
]
},
"parameters": []
},
"/proxy/rules{rule}": {
"get": {
"operationId": "proxy_rule_read",
"description": "Retrieves details on a ``Rule``.\n\n**Tags: rbac\n\n**Examples\n\n.. code-block:: http\n\n GET /api/proxy/rules/app/ HTTP/1.1\n\nresponds\n\n.. code-block:: json\n\n {\n \"rank\": 0,\n \"path\": \"/app/\",\n \"allow\": \"authenticated\",\n \"is_forward\": true,\n \"engaged\": \"\"\n }",
"parameters": [],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/UpdateRule"
}
}
},
"tags": [
"proxy"
]
},
"put": {
"operationId": "proxy_update_rule",
"description": "Updates a ``Rule``.\n\n**Tags: rbac\n\n**Examples\n\n.. code-block:: http\n\n PUT /api/proxy/rules/app/ HTTP/1.1\n\n.. code-block:: json\n\n {\n \"rank\": 0,\n \"path\": \"/app/\",\n \"allow\": \"authenticated\",\n \"is_forward\": true,\n \"engaged\": \"\"\n }\n\nresponds\n\n.. code-block:: json\n\n {\n \"rank\": 0,\n \"path\": \"/app/\",\n \"allow\": \"authenticated\",\n \"is_forward\": true,\n \"engaged\": \"\"\n }",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/UpdateRule"
}
}
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/UpdateRule"
}
}
},
"tags": [
"proxy"
]
},
"patch": {
"operationId": "proxy_partial_update_rule",
"description": "Retrieves details on a ``Rule``.\n\n**Tags: rbac\n\n**Examples\n\n.. code-block:: http\n\n GET /api/proxy/rules/app/ HTTP/1.1\n\nresponds\n\n.. code-block:: json\n\n {\n \"rank\": 0,\n \"path\": \"/app/\",\n \"allow\": \"authenticated\",\n \"is_forward\": true,\n \"engaged\": \"\"\n }",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/UpdateRule"
}
}
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/UpdateRule"
}
}
},
"tags": [
"proxy"
]
},
"delete": {
"operationId": "proxy_delete",
"description": "Deletes a ``Rule``.\n\n**Tags: rbac\n\n**Examples\n\n.. code-block:: http\n\n DELETE /api/proxy/rules/app/ HTTP/1.1",
"parameters": [],
"responses": {
"204": {
"description": ""
}
},
"tags": [
"proxy"
]
},
"parameters": [
{
"name": "rule",
"in": "path",
"required": true,
"type": "string"
}
]
},
"/proxy/sessions/{user}/": {
"get": {
"operationId": "proxy_sessions_read",
"description": "Returns a session data for a user as it will be passed to the backend\nservice.\n\n**Tags: rbac\n\n**Examples\n\n.. code-block:: http\n\n GET /api/proxy/sessions/xia/ HTTP/1.1\n\nresponds\n\n.. code-block:: json\n\n {\n \"forward_session\": \"{username: xia}\",\n \"forward_session_header\": \"Authorization: XXX\",\n \"forward_url\": \"http://localhost:8001/\"\n }",
"parameters": [],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/SessionData"
}
}
},
"tags": [
"proxy"
]
},
"parameters": [
{
"name": "user",
"in": "path",
"required": true,
"type": "string"
}
]
},
"/themes/": {
"post": {
"operationId": "themes_create",
"description": "Uploads a theme package with templates that will override the default\nones. See `references and tutorials on creating themes\n<https://djaodjin.com/docs/themes/>`_ for details on the theme package\nstructure and customizing the default templates.\n\n**Tags: themes\n\n**Examples\n\n.. code-block:: shell\n\n curl -i -u *api_key*: -X POST -F file=@*package*.zip https://*mydomain*/api/themes/",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/ThemePackageUploadBody"
}
}
],
"responses": {
"200": {
"description": "Upload successful",
"schema": {
"$ref": "#/definitions/ThemePackageUpload"
}
}
},
"tags": [
"themes"
]
},
"delete": {
"operationId": "themes_delete",
"description": "Removes the custom theme templates and assets.\n\nPages will be using the default theme after a reset.\n\n**Tags: themes\n\n**Examples\n\n.. code-block:: http\n\n DELETE /api/themes HTTP/1.1",
"parameters": [],
"responses": {
"204": {
"description": ""
}
},
"tags": [
"themes"
]
},
"parameters": []
},
"/themes/assets{path}/": {
"get": {
"operationId": "themes_read",
"description": "Lists static asset files.\n\n**Examples\n\n.. code-block:: http\n\n GET /api/assets/ HTTP/1.1\n\n.. code-block:: json\n\n {\n \"count\": 1,\n results: [{\n \"location\": \"/media/image-001.jpg\",\n \"updated_at\": \"2016-10-26T00:00:00.00000+00:00\",\n \"tags\": []\n }]\n }",
"parameters": [],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/Asset"
}
}
},
"consumes": [
"application/json",
"*/*"
],
"tags": [
"themes"
]
},
"post": {
"operationId": "themes_create_asset",
"description": "Uploads a static asset file.\n\n**Examples\n\n.. code-block:: http\n\n POST /api/assets/ HTTP/1.1",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/Asset"
}
}
],
"responses": {
"201": {
"description": "",
"schema": {
"$ref": "#/definitions/Asset"
}
}
},
"consumes": [
"application/json",
"*/*"
],
"tags": [
"themes"
]
},
"put": {
"operationId": "themes_update",
"description": "Updates meta tags on assets.\n\n**Examples\n\n.. code-block:: http\n\n PUT /api/assets/ HTTP/1.1\n\n.. code-block:: json\n\n {\n items: [\n {location: \"/media/item/url1.jpg\"},\n {location: \"/media/item/url2.jpg\"},\n ....\n ],\n tags: ['photo', 'homepage']\n }\n\nWhen the API returns, both assets file listed in items will be tagged\nwith 'photo' and 'homepage'. Those tags can then be used later on\nin searches.",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/Asset"
}
}
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/Asset"
}
}
},
"consumes": [
"application/json",
"*/*"
],
"tags": [
"themes"
]
},
"delete": {
"operationId": "themes_delete_file",
"description": "Deletes static assets file\n\n**Examples\n\n.. code-block:: http\n\n DELETE /api/assets/ HTTP/1.1\n\n.. code-block:: json\n\n {\n items: [\n {location: \"/media/item/url1.jpg\"},\n {location: \"/media/item/url2.jpg\"},\n ....\n ]\n }",
"parameters": [],
"responses": {
"204": {
"description": ""
}
},
"consumes": [
"application/json",
"*/*"
],
"tags": [
"themes"
]
},
"parameters": [
{
"name": "path",
"in": "path",
"required": true,
"type": "string"
}
]
},
"/themes/editables/": {
"get": {
"operationId": "themes_editables_list",
"description": "",
"parameters": [
{
"name": "page",
"in": "query",
"description": "A page number within the paginated result set.",
"required": false,
"type": "integer"
}
],
"responses": {
"200": {
"description": "",
"schema": {
"required": [
"count",
"results"
],
"type": "object",
"properties": {
"count": {
"type": "integer"
},
"next": {
"type": "string",
"format": "uri"
},
"previous": {
"type": "string",
"format": "uri"
},
"results": {
"type": "array",
"items": {
"$ref": "#/definitions/PageElement"
}
}
}
}
}
},
"tags": [
"themes"
]
},
"post": {
"operationId": "themes_editables_create",
"description": "",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/PageElement"
}
}
],
"responses": {
"201": {
"description": "",
"schema": {
"$ref": "#/definitions/PageElement"
}
}
},
"tags": [
"themes"
]
},
"parameters": []
},
"/themes/editables/alias{path}/": {
"post": {
"operationId": "themes_editables_create_edit",
"description": "Alias the content of a PageElement at another node.",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/EdgeCreate"
}
}
],
"responses": {
"201": {
"description": "",
"schema": {
"$ref": "#/definitions/EdgeCreate"
}
}
},
"tags": [
"themes"
]
},
"parameters": [
{
"name": "path",
"in": "path",
"required": true,
"type": "string"
}
]
},
"/themes/editables/attach{path}": {
"post": {
"operationId": "themes_editables_create_attach",
"description": "Move an PageElement from one attachement to another.",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/EdgeCreate"
}
}
],
"responses": {
"201": {
"description": "",
"schema": {
"$ref": "#/definitions/EdgeCreate"
}
}
},
"tags": [
"themes"
]
},
"parameters": [
{
"name": "path",
"in": "path",
"required": true,
"type": "string"
}
]
},
"/themes/editables/mirror{path}/": {
"post": {
"operationId": "themes_editables_create_mirror",
"description": "Mirror the content of a PageElement and attach the mirror\nunder another node.",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/EdgeCreate"
}
}
],
"responses": {
"201": {
"description": "",
"schema": {
"$ref": "#/definitions/EdgeCreate"
}
}
},
"tags": [
"themes"
]
},
"parameters": [
{
"name": "path",
"in": "path",
"required": true,
"type": "string"
}
]
},
"/themes/editables/relationship/": {
"get": {
"operationId": "themes_editables_relationship_list",
"description": "",
"parameters": [],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/RelationShip"
}
}
},
"tags": [
"themes"
]
},
"post": {
"operationId": "themes_editables_relationship_create",
"description": "",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/RelationShip"
}
}
],
"responses": {
"201": {
"description": "",
"schema": {
"$ref": "#/definitions/RelationShip"
}
}
},
"tags": [
"themes"
]
},
"delete": {
"operationId": "themes_editables_relationship_delete",
"description": "",
"parameters": [],
"responses": {
"204": {
"description": ""
}
},
"tags": [
"themes"
]
},
"parameters": []
},
"/themes/editables/{slug}/": {
"get": {
"operationId": "themes_editables_read",
"description": "Create or Update an editable element on a ``PageElement``.",
"parameters": [],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/PageElement"
}
}
},
"tags": [
"themes"
]
},
"put": {
"operationId": "themes_editables_update",
"description": "Create or Update an editable element on a ``PageElement``.",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/PageElement"
}
}
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/PageElement"
}
}
},
"tags": [
"themes"
]
},
"patch": {
"operationId": "themes_editables_partial_update",
"description": "Create or Update an editable element on a ``PageElement``.",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/PageElement"
}
}
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/PageElement"
}
}
},
"tags": [
"themes"
]
},
"delete": {
"operationId": "themes_editables_delete",
"description": "Create or Update an editable element on a ``PageElement``.",
"parameters": [],
"responses": {
"204": {
"description": ""
}
},
"tags": [
"themes"
]
},
"parameters": [
{
"name": "slug",
"in": "path",
"required": true,
"type": "string"
}
]
},
"/themes/editables/{slug}/add-tags/": {
"put": {
"operationId": "themes_editables_add-tags_update",
"description": "Add tags to a ``PageElement`` if they are not already present.\n\n**Tags: themes\n\n**Example\n\n.. sourcecode:: http\n\n PUT /api/editables/_my-element_/add-tags\n\n.. sourcecode:: json\n\n {\n \"tag\": \"sometag\"\n }\n\n.. sourcecode:: json\n\n {\n }",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/PageElementTag"
}
}
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/PageElementTag"
}
}
},
"tags": [
"themes"
]
},
"patch": {
"operationId": "themes_editables_add-tags_partial_update",
"description": "Add tags to a ``PageElement`` if they are not already present.\n\n**Tags: themes\n\n**Example\n\n.. sourcecode:: http\n\n PUT /api/editables/_my-element_/add-tags\n\n.. sourcecode:: json\n\n {\n \"tag\": \"sometag\"\n }\n\n.. sourcecode:: json\n\n {\n }",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/PageElementTag"
}
}
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/PageElementTag"
}
}
},
"tags": [
"themes"
]
},
"parameters": [
{
"name": "slug",
"in": "path",
"required": true,
"type": "string"
}
]
},
"/themes/editables/{slug}/remove-tags/": {
"put": {
"operationId": "themes_editables_remove-tags_update",
"description": "Remove tags from a ``PageElement``.\n\n**Tags: themes\n\n**Examples\n\n.. sourcecode:: http\n\n PUT /api/editables/_my-element_/reomve-tags\n\n.. sourcecode:: json\n\n {\n \"tag\": \"sometag\"\n }\n\n**Examples\n\n.. sourcecode:: json\n\n {\n }",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/PageElementTag"
}
}
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/PageElementTag"
}
}
},
"tags": [
"themes"
]
},
"patch": {
"operationId": "themes_editables_remove-tags_partial_update",
"description": "Remove tags from a ``PageElement``.\n\n**Tags: themes\n\n**Examples\n\n.. sourcecode:: http\n\n PUT /api/editables/_my-element_/reomve-tags\n\n.. sourcecode:: json\n\n {\n \"tag\": \"sometag\"\n }\n\n**Examples\n\n.. sourcecode:: json\n\n {\n }",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/PageElementTag"
}
}
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/PageElementTag"
}
}
},
"tags": [
"themes"
]
},
"parameters": [
{
"name": "slug",
"in": "path",
"required": true,
"type": "string"
}
]
},
"/themes/sitecss": {
"get": {
"operationId": "themes_sitecss_list",
"description": "",
"parameters": [
{
"name": "page",
"in": "query",
"description": "A page number within the paginated result set.",
"required": false,
"type": "integer"
}
],
"responses": {
"200": {
"description": "",
"schema": {
"required": [
"count",
"results"
],
"type": "object",
"properties": {
"count": {
"type": "integer"
},
"next": {
"type": "string",
"format": "uri"
},
"previous": {
"type": "string",
"format": "uri"
},
"results": {
"type": "array",
"items": {
"$ref": "#/definitions/Asset"
}
}
}
}
}
},
"consumes": [
"application/json",
"*/*"
],
"tags": [
"themes"
]
},
"post": {
"operationId": "themes_sitecss_create",
"description": "Uploads a static asset file.\n\n**Examples\n\n.. code-block:: http\n\n POST /api/assets/ HTTP/1.1",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/Asset"
}
}
],
"responses": {
"201": {
"description": "",
"schema": {
"$ref": "#/definitions/Asset"
}
}
},
"consumes": [
"application/json",
"*/*"
],
"tags": [
"themes"
]
},
"put": {
"operationId": "themes_sitecss_update",
"description": "Updates meta tags on assets.\n\n**Examples\n\n.. code-block:: http\n\n PUT /api/assets/ HTTP/1.1\n\n.. code-block:: json\n\n {\n items: [\n {location: \"/media/item/url1.jpg\"},\n {location: \"/media/item/url2.jpg\"},\n ....\n ],\n tags: ['photo', 'homepage']\n }\n\nWhen the API returns, both assets file listed in items will be tagged\nwith 'photo' and 'homepage'. Those tags can then be used later on\nin searches.",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/Asset"
}
}
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/Asset"
}
}
},
"consumes": [
"application/json",
"*/*"
],
"tags": [
"themes"
]
},
"delete": {
"operationId": "themes_sitecss_delete",
"description": "Deletes static assets file\n\n**Examples\n\n.. code-block:: http\n\n DELETE /api/assets/ HTTP/1.1\n\n.. code-block:: json\n\n {\n items: [\n {location: \"/media/item/url1.jpg\"},\n {location: \"/media/item/url2.jpg\"},\n ....\n ]\n }",
"parameters": [],
"responses": {
"204": {
"description": ""
}
},
"consumes": [
"application/json",
"*/*"
],
"tags": [
"themes"
]
},
"parameters": []
},
"/themes/sitecss/variables/": {
"get": {
"operationId": "themes_sitecss_variables_list",
"description": "",
"parameters": [
{
"name": "page",
"in": "query",
"description": "A page number within the paginated result set.",
"required": false,
"type": "integer"
}
],
"responses": {
"200": {
"description": "",
"schema": {
"required": [
"count",
"results"
],
"type": "object",
"properties": {
"count": {
"type": "integer"
},
"next": {
"type": "string",
"format": "uri"
},
"previous": {
"type": "string",
"format": "uri"
},
"results": {
"type": "array",
"items": {
"$ref": "#/definitions/LessVariable"
}
}
}
}
}
},
"tags": [
"themes"
]
},
"put": {
"operationId": "themes_sitecss_variables_update",
"description": "",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/LessVariable"
}
}
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/LessVariable"
}
}
},
"tags": [
"themes"
]
},
"parameters": []
},
"/themes/sitecss/variables/{name}/": {
"get": {
"operationId": "themes_sitecss_variables_read",
"description": "Create or update the value of a ``LessVariable``.",
"parameters": [],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/LessVariable"
}
}
},
"tags": [
"themes"
]
},
"put": {
"operationId": "themes_sitecss_variables_update_2",
"description": "Create or update the value of a ``LessVariable``.",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/LessVariable"
}
}
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/LessVariable"
}
}
},
"tags": [
"themes"
]
},
"patch": {
"operationId": "themes_sitecss_variables_partial_update",
"description": "Create or update the value of a ``LessVariable``.",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/LessVariable"
}
}
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/LessVariable"
}
}
},
"tags": [
"themes"
]
},
"delete": {
"operationId": "themes_sitecss_variables_delete",
"description": "Create or update the value of a ``LessVariable``.",
"parameters": [],
"responses": {
"204": {
"description": ""
}
},
"tags": [
"themes"
]
},
"parameters": [
{
"name": "name",
"in": "path",
"required": true,
"type": "string"
}
]
},
"/themes/sources/{page}": {
"get": {
"operationId": "themes_sources_read",
"description": "",
"parameters": [],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/SourceCode"
}
}
},
"tags": [
"themes"
]
},
"post": {
"operationId": "themes_sources_create",
"description": "",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/SourceCode"
}
}
],
"responses": {
"201": {
"description": "",
"schema": {
"$ref": "#/definitions/SourceCode"
}
}
},
"tags": [
"themes"
]
},
"put": {
"operationId": "themes_sources_update",
"description": "",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/SourceCode"
}
}
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/SourceCode"
}
}
},
"tags": [
"themes"
]
},
"patch": {
"operationId": "themes_sources_partial_update",
"description": "",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/SourceCode"
}
}
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/SourceCode"
}
}
},
"tags": [
"themes"
]
},
"parameters": [
{
"name": "page",
"in": "path",
"required": true,
"type": "string"
}
]
},
"/users/": {
"get": {
"operationId": "users_list",
"description": "Queries a page (``PAGE_SIZE`` records) of organization and user profiles.\n\nThe queryset can be filtered for at least one field to match a search\nterm (``q``).\n\nThe queryset can be ordered by a field by adding an HTTP query parameter\n``o=`` followed by the field name. A sequence of fields can be used\nto create a complete ordering by adding a sequence of ``o`` HTTP query\nparameters. To reverse the natural order of a field, prefix the field\nname by a minus (-) sign.\n\n**Tags: profile\n\n**Example\n\n.. code-block:: http\n\n GET /api/users/?q=xia HTTP/1.1\n\n.. code-block:: json\n\n {\n \"count\": 1,\n \"next\": null,\n \"previous\": null,\n \"results\": [{\n \"slug\": \"xia\",\n \"email\": \"xia@locahost.localdomain\",\n \"full_name\": \"Xia Lee\",\n \"nick_name\": \"Xia\",\n \"created_at\": \"2018-01-01T00:00:00Z\",\n \"activities\": [{\n \"created_at\": \"2018-01-01T00:00:00Z\",\n \"created_by\": \"alice\",\n \"text\": \"Phone call\",\n \"account\": null\n },{\n \"created_at\": \"2018-01-02T00:00:00Z\",\n \"created_by\": \"alice\",\n \"text\": \"Follow up e-mail\",\n \"account\": \"cowork\"\n }]\n }]\n }",
"parameters": [
{
"name": "q",
"in": "query",
"description": "A search term.",
"required": false,
"type": "string"
},
{
"name": "o",
"in": "query",
"description": "Which field to use when ordering the results.",
"required": false,
"type": "string"
},
{
"name": "page",
"in": "query",
"description": "A page number within the paginated result set.",
"required": false,
"type": "integer"
}
],
"responses": {
"200": {
"description": "",
"schema": {
"required": [
"count",
"results"
],
"type": "object",
"properties": {
"count": {
"type": "integer"
},
"next": {
"type": "string",
"format": "uri"
},
"previous": {
"type": "string",
"format": "uri"
},
"results": {
"type": "array",
"items": {
"$ref": "#/definitions/Contact"
}
}
}
}
}
},
"tags": [
"users"
]
},
"post": {
"operationId": "users_create",
"description": "Creates a new user profile.\n\n**Tags: profile\n\n**Examples\n\n.. code-block:: http\n\n POST /api/users/ HTTP/1.1\n\n.. code-block:: json\n\n {\n \"email\": \"xia@locahost.localdomain\",\n \"full_name\": \"Xia Lee\",\n \"nick_name\": \"Xia\"\n }",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/Contact"
}
}
],
"responses": {
"201": {
"description": "",
"schema": {
"$ref": "#/definitions/Contact"
}
}
},
"tags": [
"users"
]
},
"parameters": []
},
"/users/{user}/": {
"get": {
"operationId": "users_read",
"description": "Retrieves details on one single user profile with slug ``{user}``.\n\n**Tags: profile\n\n**Examples\n\n.. code-block:: http\n\n GET /api/users/xia HTTP/1.1\n\n.. code-block:: json\n\n {\n \"slug\": \"xia\",\n \"email\": \"xia@locahost.localdomain\",\n \"full_name\": \"Xia Lee\",\n \"nick_name\": \"Xia\",\n \"created_at\": \"2018-01-01T00:00:00Z\",\n \"activities\": [{\n \"created_at\": \"2018-01-01T00:00:00Z\",\n \"created_by\": \"alice\",\n \"text\": \"Phone call\",\n \"account\": null\n },{\n \"created_at\": \"2018-01-02T00:00:00Z\",\n \"created_by\": \"alice\",\n \"text\": \"Follow up e-mail\",\n \"account\": \"cowork\"\n }]\n }",
"parameters": [],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/ContactDetail"
}
}
},
"tags": [
"users"
]
},
"put": {
"operationId": "users_update",
"description": "Updates a user profile.\n\n**Tags: profile\n\n**Examples\n\n.. code-block:: http\n\n PUT /api/users/xia/ HTTP/1.1\n\n.. code-block:: json\n\n {\n \"email\": \"xia@locahost.localdomain\",\n \"full_name\": \"Xia Lee\",\n \"nick_name\": \"Xia\",\n }",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/ContactDetail"
}
}
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/ContactDetail"
}
}
},
"tags": [
"users"
]
},
"patch": {
"operationId": "users_partial_update",
"description": "Retrieves details on one single user profile with slug ``{user}``.\n\n**Tags: profile\n\n**Examples\n\n.. code-block:: http\n\n GET /api/users/xia HTTP/1.1\n\n.. code-block:: json\n\n {\n \"slug\": \"xia\",\n \"email\": \"xia@locahost.localdomain\",\n \"full_name\": \"Xia Lee\",\n \"nick_name\": \"Xia\",\n \"created_at\": \"2018-01-01T00:00:00Z\",\n \"activities\": [{\n \"created_at\": \"2018-01-01T00:00:00Z\",\n \"created_by\": \"alice\",\n \"text\": \"Phone call\",\n \"account\": null\n },{\n \"created_at\": \"2018-01-02T00:00:00Z\",\n \"created_by\": \"alice\",\n \"text\": \"Follow up e-mail\",\n \"account\": \"cowork\"\n }]\n }",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/ContactDetail"
}
}
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/ContactDetail"
}
}
},
"tags": [
"users"
]
},
"delete": {
"operationId": "users_delete",
"description": "Deletes a user profile.\n\n**Tags: profile\n\n**Examples\n\n.. code-block:: http\n\n DELETE /api/users/xia/ HTTP/1.1",
"parameters": [],
"responses": {
"204": {
"description": ""
}
},
"tags": [
"users"
]
},
"parameters": [
{
"name": "user",
"in": "path",
"required": true,
"type": "string"
}
]
},
"/users/{user}/accessibles/": {
"get": {
"operationId": "users_accessibles_list",
"description": "Lists all relations where an ``Organization`` is accessible by\na ``User``. Typically the user was granted specific permissions through\na ``Role``.\n\nsee :doc:`Flexible Security Framework <security>`.\n\n**Tags: rbac\n\n**Examples\n\n.. code-block:: http\n\n GET /api/users/alice/accessibles/ HTTP/1.1\n\nresponds\n\n.. code-block:: json\n\n {\n \"count\": 1,\n \"next\": null,\n \"previous\": null,\n \"results\": [\n {\n \"created_at\": \"2018-01-01T00:00:00Z\",\n \"slug\": \"cowork\",\n \"printable_name\": \"ABC Corp.\",\n \"role_description\": \"manager\",\n \"request_key\": null,\n \"grant_key\": null\n }\n ]\n }",
"parameters": [
{
"name": "start_at",
"in": "query",
"description": "date/time in ISO format after which records were created.",
"required": false,
"type": "string"
},
{
"name": "ends_at",
"in": "query",
"description": "date/time in ISO format before which records were created.",
"required": false,
"type": "string"
},
{
"name": "q",
"in": "query",
"description": "search for matching text in organization__slug, organization__full_name, organization__email, user__username, user__email, role_description__title, role_description__slug",
"required": false,
"type": "string"
},
{
"name": "o",
"in": "query",
"description": "sort by full_name, username, role_name, grant_key, request_key, created_at",
"required": false,
"type": "string"
},
{
"name": "ot",
"in": "query",
"description": "sort by natural ascending or descending order",
"required": false,
"type": "string"
},
{
"name": "page",
"in": "query",
"description": "A page number within the paginated result set.",
"required": false,
"type": "integer"
}
],
"responses": {
"200": {
"description": "",
"schema": {
"required": [
"count",
"results"
],
"type": "object",
"properties": {
"count": {
"type": "integer"
},
"next": {
"type": "string",
"format": "uri"
},
"previous": {
"type": "string",
"format": "uri"
},
"results": {
"type": "array",
"items": {
"$ref": "#/definitions/Accessible"
}
}
}
}
}
},
"tags": [
"users"
]
},
"post": {
"operationId": "users_accessibles_create",
"description": "Creates a request to attach a user to a role on an organization\n\nsee :doc:`Flexible Security Framework <security>`.\n\n**Tags: rbac\n\n**Examples\n\n.. code-block:: http\n\n POST /api/users/xia/accessibles/ HTTP/1.1\n\n.. code-block:: json\n\n {\n \"slug\": \"cowork\"\n }\n\nresponds\n\n.. code-block:: json\n\n {\n \"slug\": \"cowork\"\n }",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/Accessible"
}
}
],
"responses": {
"201": {
"description": "",
"schema": {
"$ref": "#/definitions/Accessible"
}
}
},
"tags": [
"users"
]
},
"parameters": [
{
"name": "user",
"in": "path",
"required": true,
"type": "string"
}
]
},
"/users/{user}/accessibles/accept/{verification_key}/": {
"put": {
"operationId": "users_accessibles_accept_update",
"description": "Accepts a role on an organization.\n\n**Tags: rbac\n\n**Examples\n\n.. code-block:: http\n\n PUT /api/users/xia/accessibles/accept/0123456789abcef/ HTTP/1.1\n\nresponds\n\n.. code-block:: json\n\n {\n \"created_at\": \"2018-01-01T00:00:00Z\",\n \"role_description\": {\n \"created_at\": \"2018-01-01T00:00:00Z\",\n \"title\": \"Profile Manager\",\n \"slug\": \"manager\",\n \"is_global\": true,\n \"organization\": {\n \"slug\": \"cowork\",\n \"full_name\": \"ABC Corp.\",\n \"printable_name\": \"ABC Corp.\",\n \"created_at\": \"2018-01-01T00:00:00Z\",\n \"email\": \"support@localhost.localdomain\"\n }\n },\n \"user\": {\n \"slug\": \"alice\",\n \"email\": \"alice@localhost.localdomain\",\n \"full_name\": \"Alice Doe\",\n \"created_at\": \"2018-01-01T00:00:00Z\"\n },\n \"request_key\": \"1\",\n \"grant_key\": null\n }",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/Accessible"
}
}
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/Accessible"
}
}
},
"tags": [
"users"
]
},
"parameters": [
{
"name": "user",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "verification_key",
"in": "path",
"required": true,
"type": "string"
}
]
},
"/users/{user}/accessibles/{role}/": {
"get": {
"operationId": "users_accessibles_read",
"description": "Lists all relations where a ``User`` has a specified ``Role``\non an ``Organization``.\n\nsee :doc:`Flexible Security Framework <security>`.\n\n**Tags: rbac\n\n**Examples\n\n.. code-block:: http\n\n GET /api/users/alice/accessibles/manager HTTP/1.1\n\nresponds\n\n.. code-block:: json\n\n {\n \"count\": 1,\n \"next\": null,\n \"previous\": null,\n \"results\": [\n {\n \"created_at\": \"2018-01-01T00:00:00Z\",\n \"slug\": \"cowork\",\n \"printable_name\": \"ABC Corp.\",\n \"role_description\": \"manager\",\n \"request_key\": null,\n \"grant_key\": null\n }\n ]\n }",
"parameters": [],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/Accessible"
}
}
},
"tags": [
"users"
]
},
"post": {
"operationId": "users_accessibles_create_2",
"description": "Lists all relations where a ``User`` has a specified ``Role``\non an ``Organization``.\n\nsee :doc:`Flexible Security Framework <security>`.\n\n**Tags: rbac\n\n**Examples\n\n.. code-block:: http\n\n GET /api/users/alice/accessibles/manager HTTP/1.1\n\nresponds\n\n.. code-block:: json\n\n {\n \"count\": 1,\n \"next\": null,\n \"previous\": null,\n \"results\": [\n {\n \"created_at\": \"2018-01-01T00:00:00Z\",\n \"slug\": \"cowork\",\n \"printable_name\": \"ABC Corp.\",\n \"role_description\": \"manager\",\n \"request_key\": null,\n \"grant_key\": null\n }\n ]\n }",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/Accessible"
}
}
],
"responses": {
"201": {
"description": "",
"schema": {
"$ref": "#/definitions/Accessible"
}
}
},
"tags": [
"users"
]
},
"parameters": [
{
"name": "role",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "user",
"in": "path",
"required": true,
"type": "string"
}
]
},
"/users/{user}/accessibles/{role}/{organization}/": {
"post": {
"operationId": "users_accessibles_create_3",
"description": "Re-sends the request e-mail that the user is requested a role\non the organization.\n\n**Tags: rbac\n\n**Examples\n\n.. code-block:: http\n\n POST /api/users/xia/accessibles/manager/cowork/ HTTP/1.1\n\nresponds\n\n.. code-block:: json\n\n {\n \"created_at\": \"2018-01-01T00:00:00Z\",\n \"role_description\": {\n \"created_at\": \"2018-01-01T00:00:00Z\",\n \"title\": \"Profile Manager\",\n \"slug\": \"manager\",\n \"is_global\": true,\n \"organization\": {\n \"slug\": \"cowork\",\n \"full_name\": \"ABC Corp.\",\n \"printable_name\": \"ABC Corp.\",\n \"created_at\": \"2018-01-01T00:00:00Z\",\n \"email\": \"support@localhost.localdomain\"\n }\n },\n \"user\": {\n \"slug\": \"alice\",\n \"email\": \"alice@localhost.localdomain\",\n \"full_name\": \"Alice Doe\",\n \"created_at\": \"2018-01-01T00:00:00Z\"\n },\n \"request_key\": \"1\",\n \"grant_key\": null\n }",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/RoleAccessible"
}
}
],
"responses": {
"201": {
"description": "",
"schema": {
"$ref": "#/definitions/RoleAccessible"
}
}
},
"tags": [
"users"
]
},
"delete": {
"operationId": "users_accessibles_delete",
"description": "Dettach a user from one or all roles with regards to an organization,\ntypically resulting in revoking permissions from this user to manage\npart of an organization profile.\n\n**Tags: rbac\n\n**Examples\n\n.. code-block:: http\n\n DELETE /api/users/xia/accessibles/manager/cowork/ HTTP/1.1",
"parameters": [],
"responses": {
"204": {
"description": ""
}
},
"tags": [
"users"
]
},
"parameters": [
{
"name": "organization",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "role",
"in": "path",
"required": true,
"type": "string"
},
{
"name": "user",
"in": "path",
"required": true,
"type": "string"
}
]
},
"/users/{user}/activate/": {
"post": {
"operationId": "users_activate_create",
"description": "Re-send an activation e-mail if the user is not already activated.\n\nThe template for the e-mail sent to the user can be found in\nnotification/verification.eml.\n\n**Tags: auth\n\n**Example\n\n.. code-block:: http\n\n POST /api/users/donny/activate/ HTTP/1.1\n\nresponds\n\n.. code-block:: json\n\n {\n \"slug\": \"xia\",\n \"email\": \"xia@locahost.localdomain\",\n \"full_name\": \"Xia Lee\",\n \"nick_name\": \"Xia\",\n \"created_at\": \"2018-01-01T00:00:00Z\",\n }",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/NoModel"
}
}
],
"responses": {
"201": {
"description": "success",
"schema": {
"$ref": "#/definitions/Contact"
}
},
"400": {
"description": "parameters error",
"schema": {
"$ref": "#/definitions/ValidationError"
}
}
},
"tags": [
"users"
]
},
"parameters": [
{
"name": "user",
"in": "path",
"required": true,
"type": "string"
}
]
},
"/users/{user}/api-keys/": {
"post": {
"operationId": "users_api-keys_create",
"description": "Reset the secret API key with which a user can authenticate\nwith the service.\n\n**Tags: auth\n\n**Example\n\n.. code-block:: http\n\n POST /api/users/donny/api-keys/ HTTP/1.1\n\nresponds\n\n.. code-block:: json\n\n {\n \"secret\": \"tgLwDw5ErQ2pQr5TTdAzSYjvZenHC9pSy7fB3sXWERzynbG5zG6h67pTN4dh7fpy\"\n }",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/APIKeys"
}
}
],
"responses": {
"201": {
"description": "",
"schema": {
"$ref": "#/definitions/APIKeys"
}
}
},
"tags": [
"users"
]
},
"parameters": [
{
"name": "user",
"in": "path",
"required": true,
"type": "string"
}
]
},
"/users/{user}/notifications/": {
"put": {
"operationId": "users_notifications_update",
"description": "Changes notifications preferences for a user.\n\n**Tags: profile\n\n**Example\n\n.. code-block:: http\n\n POST /api/users/donny/notifications/ HTTP/1.1\n\n.. code-block:: json\n\n {\n \"notifications\": [\"user_registered_notice\"]\n }\n\nresponds\n\n.. code-block:: json\n\n {\n \"notifications\": [\"user_registered_notice\"]\n }",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/Notifications"
}
}
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/Notifications"
}
}
},
"tags": [
"users"
]
},
"patch": {
"operationId": "users_notifications_partial_update",
"description": "Changes notifications preferences for a user.\n\n**Tags: profile\n\n**Example\n\n.. code-block:: http\n\n POST /api/users/donny/notifications/ HTTP/1.1\n\n.. code-block:: json\n\n {\n \"notifications\": [\"user_registered_notice\"]\n }\n\nresponds\n\n.. code-block:: json\n\n {\n \"notifications\": [\"user_registered_notice\"]\n }",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/Notifications"
}
}
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/Notifications"
}
}
},
"tags": [
"users"
]
},
"parameters": [
{
"name": "user",
"in": "path",
"required": true,
"type": "string"
}
]
},
"/users/{user}/password/": {
"put": {
"operationId": "users_password_update",
"description": "Changes the password for a user.\n\n**Tags: auth\n\n**Example\n\n.. code-block:: http\n\n PUT /api/users/donny/password/ HTTP/1.1\n\nresponds\n\n.. code-block:: json\n\n {\n \"password\": \"yeye\"\n }",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/PasswordChange"
}
}
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/PasswordChange"
}
}
},
"tags": [
"users"
]
},
"patch": {
"operationId": "users_password_partial_update",
"description": "Changes the password for a user.\n\n**Tags: auth\n\n**Example\n\n.. code-block:: http\n\n PUT /api/users/donny/password/ HTTP/1.1\n\nresponds\n\n.. code-block:: json\n\n {\n \"password\": \"yeye\"\n }",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/PasswordChange"
}
}
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/PasswordChange"
}
}
},
"tags": [
"users"
]
},
"parameters": [
{
"name": "user",
"in": "path",
"required": true,
"type": "string"
}
]
},
"/users/{user}/ssh-keys/": {
"put": {
"operationId": "users_ssh-keys_update",
"description": "Update public key for a User\n\n**Tags: auth\n\n**Example\n\n.. code-block:: http\n\n PUT /api/users/donny/ssh-keys/ HTTP/1.1\n\n.. code-block:: json\n\n {\n \"pubkey\": \"ssh-rsa AAAAB3N...\",\n \"password\": \"secret\"\n }\n\nresponds\n\n.. code-block:: json\n\n {\n \"detail\": \"ok\"\n }",
"parameters": [
{
"name": "data",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/PublicKey"
}
}
],
"responses": {
"200": {
"description": "",
"schema": {
"$ref": "#/definitions/PublicKey"
}
}
},
"tags": [
"users"
]
},
"parameters": [
{
"name": "user",
"in": "path",
"required": true,
"type": "string"
}
]
}
},
"definitions": {
"Organization": {
"required": [
"full_name",
"email"
],
"type": "object",
"properties": {
"slug": {
"title": "Slug",
"description": "Unique identifier shown in the URL bar",
"type": "string"
},
"created_at": {
"title": "Created at",
"description": "Date/time of creation (in ISO format)",
"type": "string",
"format": "date-time",
"readOnly": true
},
"full_name": {
"title": "Full name",
"description": "Full name",
"type": "string",
"minLength": 1
},
"email": {
"title": "Email",
"description": "E-mail address",
"type": "string",
"format": "email",
"minLength": 1
},
"phone": {
"title": "Phone",
"description": "Phone number",
"type": "string"
},
"street_address": {
"title": "Street address",
"description": "Street address",
"type": "string"
},
"locality": {
"title": "Locality",
"description": "City/Town",
"type": "string"
},
"region": {
"title": "Region",
"description": "State/Province/County",
"type": "string"
},
"postal_code": {
"title": "Postal code",
"description": "Zip/Postal code",
"type": "string"
},
"country": {
"title": "Country",
"description": "Country",
"type": "string",
"enum": [
"AF",
"AX",
"AL",
"DZ",
"AS",
"AD",
"AO",
"AI",
"AQ",
"AG",
"AR",
"AM",
"AW",
"AU",
"AT",
"AZ",
"BS",
"BH",
"BD",
"BB",
"BY",
"BE",
"BZ",
"BJ",
"BM",
"BT",
"BO",
"BQ",
"BA",
"BW",
"BV",
"BR",
"IO",
"BN",
"BG",
"BF",
"BI",
"CV",
"KH",
"CM",
"CA",
"KY",
"CF",
"TD",
"CL",
"CN",
"CX",
"CC",
"CO",
"KM",
"CG",
"CD",
"CK",
"CR",
"CI",
"HR",
"CU",
"CW",
"CY",
"CZ",
"DK",
"DJ",
"DM",
"DO",
"EC",
"EG",
"SV",
"GQ",
"ER",
"EE",
"SZ",
"ET",
"FK",
"FO",
"FJ",
"FI",
"FR",
"GF",
"PF",
"TF",
"GA",
"GM",
"GE",
"DE",
"GH",
"GI",
"GR",
"GL",
"GD",
"GP",
"GU",
"GT",
"GG",
"GN",
"GW",
"GY",
"HT",
"HM",
"VA",
"HN",
"HK",
"HU",
"IS",
"IN",
"ID",
"IR",
"IQ",
"IE",
"IM",
"IL",
"IT",
"JM",
"JP",
"JE",
"JO",
"KZ",
"KE",
"KI",
"KW",
"KG",
"LA",
"LV",
"LB",
"LS",
"LR",
"LY",
"LI",
"LT",
"LU",
"MO",
"MK",
"MG",
"MW",
"MY",
"MV",
"ML",
"MT",
"MH",
"MQ",
"MR",
"MU",
"YT",
"MX",
"FM",
"MD",
"MC",
"MN",
"ME",
"MS",
"MA",
"MZ",
"MM",
"NA",
"NR",
"NP",
"NL",
"NC",
"NZ",
"NI",
"NE",
"NG",
"NU",
"NF",
"KP",
"MP",
"NO",
"OM",
"PK",
"PW",
"PS",
"PA",
"PG",
"PY",
"PE",
"PH",
"PN",
"PL",
"PT",
"PR",
"QA",
"RE",
"RO",
"RU",
"RW",
"BL",
"SH",
"KN",
"LC",
"MF",
"PM",
"VC",
"WS",
"SM",
"ST",
"SA",
"SN",
"RS",
"SC",
"SL",
"SG",
"SX",
"SK",
"SI",
"SB",
"SO",
"ZA",
"GS",
"KR",
"SS",
"ES",
"LK",
"SD",
"SR",
"SJ",
"SE",
"CH",
"SY",
"TW",
"TJ",
"TZ",
"TH",
"TL",
"TG",
"TK",
"TO",
"TT",
"TN",
"TR",
"TM",
"TC",
"TV",
"UG",
"UA",
"AE",
"GB",
"UM",
"US",
"UY",
"UZ",
"VU",
"VE",
"VN",
"VG",
"VI",
"WF",
"EH",
"YE",
"ZM",
"ZW"
]
},
"default_timezone": {
"title": "Default timezone",
"description": "Timezone to use when reporting metrics",
"type": "string",
"minLength": 1
},
"printable_name": {
"title": "Printable name",
"type": "string",
"readOnly": true,
"minLength": 1
},
"is_provider": {
"title": "Is provider",
"description": "The organization can fulfill the provider side of a subscription.",
"type": "boolean"
},
"is_bulk_buyer": {
"title": "Is bulk buyer",
"description": "Enable GroupBuy (<a href=\"https://djaodjin.com/docs/#group-billing\" target=\"_blank\">what is it?</a>)",
"type": "boolean"
},
"type": {
"title": "Type",
"description": "One of 'organization', 'personal' or 'user'",
"type": "string",
"readOnly": true
},
"credentials": {
"title": "Credentials",
"type": "string",
"readOnly": true
},
"extra": {
"title": "Extra",
"description": "Extra meta data (can be stringify JSON)",
"type": "string",
"minLength": 1
}
}
},
"User": {
"required": [
"slug"
],
"type": "object",
"properties": {
"slug": {
"title": "Slug",
"description": "Effectively the username. The variable is named `slug` such that front-end code can be re-used between Organization and User records.",
"type": "string",
"pattern": "^[\\w.@+-]+$",
"minLength": 1
},
"email": {
"title": "Email",
"description": "E-mail address for the user",
"type": "string",
"format": "email",
"readOnly": true,
"minLength": 1
},
"full_name": {
"title": "Full name",
"description": "Full name for the contact (effectively first name followed by last name)",
"type": "string",
"readOnly": true
},
"created_at": {
"title": "Created at",
"description": "Date/time of creation (in ISO format)",
"type": "string",
"format": "date-time"
}
}
},
"Credentials": {
"required": [
"username",
"password"
],
"type": "object",
"properties": {
"username": {
"title": "Username",
"description": "Username to identify the account",
"type": "string",
"pattern": "^[\\w.@+-]+$",
"minLength": 1
},
"password": {
"title": "Password",
"description": "Secret password for the account",
"type": "string",
"minLength": 1
},
"code": {
"title": "Code",
"description": "One-time code. This field will be checked against an expected code when multi-factor authentication (MFA) is enabled.",
"type": "integer"
}
}
},
"Token": {
"required": [
"token"
],
"type": "object",
"properties": {
"token": {
"title": "Token",
"description": "Token used to authenticate user on every HTTP request",
"type": "string",
"minLength": 1
}
}
},
"ValidationError": {
"required": [
"detail"
],
"type": "object",
"properties": {
"detail": {
"title": "Detail",
"description": "Describes the reason for the error in plain text",
"type": "string",
"minLength": 1
}
}
},
"PasswordReset": {
"required": [
"email"
],
"type": "object",
"properties": {
"email": {
"title": "Email",
"description": "Primary e-mail to contact user",
"type": "string",
"format": "email",
"minLength": 1
}
}
},
"Register": {
"required": [
"email",
"full_name"
],
"type": "object",
"properties": {
"username": {
"title": "Username",
"description": "Username to identify the account",
"type": "string",
"minLength": 1
},
"password": {
"title": "Password",
"description": "Password with which a user can authenticate with the service",
"type": "string",
"minLength": 1
},
"email": {
"title": "Email",
"description": "Primary e-mail to contact user",
"type": "string",
"format": "email",
"minLength": 1
},
"full_name": {
"title": "Full name",
"description": "Full name (effectively first name followed by last name)",
"type": "string",
"minLength": 1
},
"organization_name": {
"title": "Organization name",
"description": "Organization name that owns the billing, registered with the user as profile manager",
"type": "string",
"minLength": 1
},
"street_address": {
"title": "Street address",
"description": "Street address for the billing profile",
"type": "string",
"minLength": 1
},
"locality": {
"title": "Locality",
"description": "City/Town for the billing profile",
"type": "string",
"minLength": 1
},
"region": {
"title": "Region",
"description": "State/Province/County for the billing profile",
"type": "string",
"minLength": 1
},
"postal_code": {
"title": "Postal code",
"description": "Zip/Postal Code for the billing profile",
"type": "string",
"minLength": 1
},
"country": {
"title": "Country",
"description": "Country for the billing profile",
"type": "string",
"minLength": 1
},
"phone": {
"title": "Phone",
"description": "Phone number for the billing profile",
"type": "string",
"minLength": 1
}
}
},
"CreateUser": {
"required": [
"email",
"full_name"
],
"type": "object",
"properties": {
"username": {
"title": "Username",
"description": "Username to identify the account",
"type": "string",
"minLength": 1
},
"password": {
"title": "Password",
"description": "Password with which a user can authenticate with the service",
"type": "string",
"minLength": 1
},
"email": {
"title": "Email",
"description": "Primary e-mail to contact user",
"type": "string",
"format": "email",
"minLength": 1
},
"full_name": {
"title": "Full name",
"description": "Full name (effectively first name followed by last name)",
"type": "string",
"minLength": 1
}
}
},
"AuthRealms": {
"required": [
"location",
"access_key",
"acl",
"policy",
"signature",
"security_token",
"x_amz_credential",
"x_amz_date"
],
"type": "object",
"properties": {
"location": {
"title": "Location",
"description": "URL to upload files",
"type": "string",
"minLength": 1
},
"access_key": {
"title": "Access key",
"description": "Access key",
"type": "string",
"minLength": 1
},
"acl": {
"title": "Acl",
"description": "ACL (i.e. private or public-read)",
"type": "string",
"minLength": 1
},
"policy": {
"title": "Policy",
"description": "Policy",
"type": "string",
"minLength": 1
},
"signature": {
"title": "Signature",
"description": "Signature",
"type": "string",
"minLength": 1
},
"security_token": {
"title": "Security token",
"description": "Security token",
"type": "string",
"minLength": 1
},
"x_amz_credential": {
"title": "X amz credential",
"description": "AMZ Credential",
"type": "string",
"minLength": 1
},
"x_amz_date": {
"title": "X amz date",
"description": "AMZ Date",
"type": "string",
"minLength": 1
}
}
},
"Charge": {
"required": [
"created_at",
"last4",
"exp_date",
"processor_key",
"state"
],
"type": "object",
"properties": {
"created_at": {
"title": "Created at",
"description": "Date/time of creation (in ISO format)",
"type": "string",
"format": "date-time"
},
"amount": {
"title": "Amount",
"description": "Total amount in currency unit",
"type": "integer"
},
"unit": {
"title": "Unit",
"description": "Three-letter ISO 4217 code for currency unit (ex: usd)",
"type": "string",
"maxLength": 3,
"minLength": 1
},
"readable_amount": {
"title": "Readable amount",
"description": "Amount and unit in a commonly accepted readable format",
"type": "string",
"readOnly": true
},
"description": {
"title": "Description",
"description": "Description for the charge as appears on billing statements",
"type": "string",
"minLength": 1
},
"last4": {
"title": "Last4",
"description": "Last 4 digits of the credit card used",
"type": "integer"
},
"exp_date": {
"title": "Exp date",
"description": "Expiration date of the credit card used",
"type": "string",
"format": "date"
},
"processor_key": {
"title": "Processor key",
"type": "string",
"format": "slug",
"pattern": "^[-a-zA-Z0-9_]+$",
"maxLength": 50,
"minLength": 1
},
"state": {
"title": "State",
"description": "Current state (i.e. created, done, failed, disputed)",
"type": "string",
"minLength": 1
}
}
},
"EmailChargeReceipt": {
"type": "object",
"properties": {
"charge_id": {
"title": "Charge id",
"description": "Charge identifier (i.e. matches the URL {charge} parameter)",
"type": "string",
"readOnly": true,
"minLength": 1
},
"email": {
"title": "Email",
"description": "E-mail address to which the receipt was sent.",
"type": "string",
"format": "email",
"readOnly": true,
"minLength": 1
}
}
},
"RefundChargeItem": {
"required": [
"num"
],
"type": "object",
"properties": {
"num": {
"title": "Num",
"description": "Line item index counting from zero.",
"type": "integer"
},
"refunded_amount": {
"title": "Refunded amount",
"description": "The amount to refund cannot be higher than the amount of the line item minus the total amount already refunded on that line item.",
"type": "integer"
}
}
},
"RefundCharge": {
"required": [
"lines"
],
"type": "object",
"properties": {
"lines": {
"type": "array",
"items": {
"$ref": "#/definitions/RefundChargeItem"
}
}
}
},
"Transaction": {
"required": [
"created_at"
],
"type": "object",
"properties": {
"created_at": {
"title": "Created at",
"description": "Date/time of creation (in ISO format)",
"type": "string",
"format": "date-time"
},
"description": {
"title": "Description",
"description": "Free-form text description for the transaction",
"type": "string",
"readOnly": true,
"minLength": 1
},
"amount": {
"title": "Amount",
"description": "Amount being transfered",
"type": "string",
"readOnly": true,
"minLength": 1
},
"is_debit": {
"title": "Is debit",
"description": "True if the transaction is indentified as a debit in the API context",
"type": "string",
"readOnly": true,
"minLength": 1
},
"orig_account": {
"title": "Orig account",
"description": "Source account from which funds are withdrawn",
"type": "string",
"maxLength": 255,
"minLength": 1
},
"orig_organization": {
"title": "Orig organization",
"description": "Source organization from which funds are withdrawn",
"type": "string",
"format": "slug",
"pattern": "^[-a-zA-Z0-9_]+$",
"readOnly": true
},
"orig_amount": {
"title": "Orig amount",
"description": "Amount withdrawn from source in orig_unit",
"type": "integer"
},
"orig_unit": {
"title": "Orig unit",
"description": "Three-letter ISO 4217 code for source currency unit (ex: usd)",
"type": "string",
"maxLength": 3,
"minLength": 1
},
"dest_account": {
"title": "Dest account",
"description": "Target account to which funds are deposited",
"type": "string",
"maxLength": 255,
"minLength": 1
},
"dest_organization": {
"title": "Dest organization",
"description": "Target organization to which funds are deposited",
"type": "string",
"format": "slug",
"pattern": "^[-a-zA-Z0-9_]+$",
"readOnly": true
},
"dest_amount": {
"title": "Dest amount",
"description": "Amount deposited into target in dest_unit",
"type": "integer"
},
"dest_unit": {
"title": "Dest unit",
"description": "Three-letter ISO 4217 code for target currency unit (ex: usd)",
"type": "string",
"maxLength": 3,
"minLength": 1
}
}
},
"Bank": {
"required": [
"bank_name",
"last4",
"balance_amount",
"balance_unit"
],
"type": "object",
"properties": {
"bank_name": {
"title": "Bank name",
"description": "Name of the deposit account",
"type": "string",
"minLength": 1
},
"last4": {
"title": "Last4",
"description": "Last 4 characters of the deposit account identifier",
"type": "string",
"minLength": 1
},
"balance_amount": {
"title": "Balance amount",
"description": "Amount available to transfer to the provider deposit account",
"type": "integer"
},
"balance_unit": {
"title": "Balance unit",
"description": "Three-letter ISO 4217 code for currency unit (ex: usd)",
"type": "string",
"minLength": 1
}
}
},
"Card": {
"required": [
"last4",
"exp_date"
],
"type": "object",
"properties": {
"last4": {
"title": "Last4",
"description": "Last 4 digits of the credit card on file",
"type": "string",
"minLength": 1
},
"exp_date": {
"title": "Exp date",
"description": "Expiration date of the credit card on file",
"type": "string",
"minLength": 1
}
}
},
"Plan": {
"title": "Plan",
"type": "object",
"properties": {
"slug": {
"title": "Slug",
"type": "string",
"format": "slug",
"pattern": "^[-a-zA-Z0-9_]+$",
"readOnly": true,
"minLength": 1
},
"title": {
"title": "Title",
"description": "Title for the plan",
"type": "string",
"minLength": 1
},
"description": {
"title": "Description",
"description": "Free-form text description for the plan",
"type": "string",
"minLength": 1
},
"is_active": {
"title": "Is active",
"description": "True when customers can subscribe to the plan",
"type": "boolean"
},
"setup_amount": {
"title": "Setup amount",
"description": "One-time amount to pay when the subscription starts",
"type": "integer"
},
"period_amount": {
"title": "Period amount",
"description": "Amount billed every period",
"type": "integer"
},
"interval": {
"title": "Interval",
"description": "Natural period for the subscription",
"type": "string"
},
"app_url": {
"title": "App url",
"type": "string",
"readOnly": true
},
"advance_discount": {
"title": "Advance discount",
"description": "Incremental discount for payment of multiple periods (in %%).",
"type": "integer",
"maximum": 10000
},
"unit": {
"title": "Unit",
"type": "string",
"maxLength": 3,
"minLength": 1
},
"organization": {
"title": "Organization",
"description": "Provider of the plan",
"type": "string",
"format": "slug",
"pattern": "^[-a-zA-Z0-9_]+$",
"readOnly": true
},
"extra": {
"title": "Extra",
"description": "Extra meta data (can be stringify JSON)",
"type": "string",
"minLength": 1
},
"period_length": {
"title": "Period length",
"description": "Natural period length of a subscription to the plan (monthly, yearly, etc.)",
"type": "integer"
},
"renewal_type": {
"title": "Renewal type",
"description": "Natural period for the subscription",
"type": "string"
},
"is_not_priced": {
"title": "Is not priced",
"type": "boolean"
},
"created_at": {
"title": "Created at",
"type": "string",
"format": "date-time",
"readOnly": true
},
"skip_optin_on_grant": {
"title": "Skip optin on grant",
"description": "True when a subscriber can automatically be subscribed to the plan by its provider. Otherwise the subscriber must manually accept the subscription. (defaults to False)",
"type": "boolean"
},
"optin_on_request": {
"title": "Optin on request",
"description": "True when a provider must manually accept a subscription to the plan initiated by a subscriber. (defaults to False)",
"type": "boolean"
}
},
"readOnly": true
},
"Subscription": {
"title": "Subscription",
"description": "Subscription lines and options refer to.",
"required": [
"ends_at"
],
"type": "object",
"properties": {
"created_at": {
"title": "Created at",
"description": "Date/time of creation (in ISO format)",
"type": "string",
"format": "date-time",
"readOnly": true
},
"ends_at": {
"title": "Ends at",
"description": "Date/time when the subscription period currently ends (in ISO format)",
"type": "string",
"format": "date-time"
},
"description": {
"title": "Description",
"description": "Free-form text description for the subscription",
"type": "string"
},
"organization": {
"$ref": "#/definitions/Organization"
},
"plan": {
"$ref": "#/definitions/Plan"
},
"auto_renew": {
"title": "Auto renew",
"description": "The subscription is set to auto-renew at the end of the period",
"type": "boolean"
},
"editable": {
"title": "Editable",
"description": "True if the request user is able to update the subscription. Typically a manager for the plan provider.",
"type": "string",
"readOnly": true
},
"extra": {
"title": "Extra",
"description": "Extra meta data (can be stringify JSON)",
"type": "string",
"minLength": 1
},
"grant_key": {
"title": "Grant key",
"type": "string",
"readOnly": true,
"minLength": 1
},
"request_key": {
"title": "Request key",
"type": "string",
"readOnly": true,
"minLength": 1
}
},
"readOnly": true
},
"Invoicable": {
"required": [
"lines"
],
"type": "object",
"properties": {
"subscription": {
"$ref": "#/definitions/Subscription"
},
"lines": {
"description": "Line items to charge on checkout.",
"type": "array",
"items": {
"$ref": "#/definitions/Transaction"
}
},
"options": {
"description": "Options to replace line items.",
"type": "array",
"items": {
"$ref": "#/definitions/Transaction"
},
"readOnly": true
}
}
},
"OrganizationCart": {
"required": [
"items"
],
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/Invoicable"
}
}
}
},
"CheckoutItem": {
"required": [
"option"
],
"type": "object",
"properties": {
"option": {
"title": "Option",
"description": "selected plan option during checkout",
"type": "integer"
}
}
},
"Checkout": {
"type": "object",
"properties": {
"items": {
"type": "array",
"items": {
"$ref": "#/definitions/CheckoutItem"
}
},
"remember_card": {
"title": "Remember card",
"description": "attaches the payment card to the Organization when true",
"type": "boolean"
},
"processor_token": {
"title": "Processor token",
"description": "one-time token generated by the processorfrom the payment card.",
"type": "string",
"maxLength": 255,
"minLength": 1
},
"street_address": {
"title": "Street address",
"description": "Street address",
"type": "string"
},
"locality": {
"title": "Locality",
"description": "City/Town",
"type": "string"
},
"region": {
"title": "Region",
"description": "State/Province/County",
"type": "string"
},
"postal_code": {
"title": "Postal code",
"description": "Zip/Postal code",
"type": "string"
},
"country": {
"title": "Country",
"description": "Country",
"type": "string"
}
}
},
"Coupon": {
"required": [
"code"
],
"type": "object",
"properties": {
"code": {
"title": "Code",
"description": "Unique identifier per provider, typically used in URLs",
"type": "string",
"format": "slug",
"pattern": "^[-a-zA-Z0-9_]+$",
"maxLength": 50,
"minLength": 1
},
"percent": {
"title": "Percent",
"description": "Percentage discounted",
"type": "integer",
"maximum": 100
},
"created_at": {
"title": "Created at",
"description": "Date/time of creation (in ISO format)",
"type": "string",
"format": "date-time",
"readOnly": true
},
"ends_at": {
"title": "Ends at",
"description": "Date/time at which the coupon code expires (in ISO format)",
"type": "string",
"format": "date-time"
},
"description": {
"title": "Description",
"description": "Free-form text description for the coupon",
"type": "string"
}
}
},
"OfflineTransaction": {
"required": [
"subscription",
"created_at",
"amount"
],
"type": "object",
"properties": {
"subscription": {
"title": "Subscription",
"description": "The subscription the offline transaction refers to.",
"type": "string",
"minLength": 1
},
"created_at": {
"title": "Created at",
"description": "Date/time of creation (in ISO format)",
"type": "string",
"format": "date-time"
},
"amount": {
"title": "Amount",
"type": "string",
"format": "decimal"
},
"descr": {
"title": "Descr",
"description": "Free-form text description for the transaction",
"type": "string",
"minLength": 1
}
}
},
"CartItemCreate": {
"required": [
"plan"
],
"type": "object",
"properties": {
"plan": {
"title": "Plan",
"description": "The plan to add into the request.user cart.",
"type": "string"
},
"option": {
"title": "Option",
"type": "integer"
},
"full_name": {
"title": "Full name",
"description": "Full name of the person that will benefit from the subscription (GroupBuy)",
"type": "string",
"maxLength": 150
},
"sync_on": {
"title": "Sync on",
"type": "string",
"maxLength": 255
},
"email": {
"title": "Email",
"type": "string",
"maxLength": 255
}
}
},
"RedeemCoupon": {
"required": [
"code"
],
"type": "object",
"properties": {
"code": {
"title": "Code",
"description": "Coupon code to redeem",
"type": "string",
"minLength": 1
}
}
},
"CartItemUpload": {
"required": [
"created",
"updated",
"failed"
],
"type": "object",
"properties": {
"created": {
"title": "Created",
"type": "string",
"minLength": 1
},
"updated": {
"title": "Updated",
"type": "string",
"minLength": 1
},
"failed": {
"title": "Failed",
"type": "string",
"minLength": 1
}
}
},
"Activity": {
"required": [
"account"
],
"type": "object",
"properties": {
"created_at": {
"title": "Created at",
"description": "Date/time of creation (in ISO format)",
"type": "string",
"format": "date-time",
"readOnly": true
},
"created_by": {
"title": "Created by",
"description": "User that created the activity",
"type": "string",
"pattern": "^[\\w.@+-]+$",
"readOnly": true
},
"text": {
"title": "Text",
"description": "Free form text description of the activity",
"type": "string"
},
"account": {
"title": "Account",
"description": "Account the activity is associated to",
"type": "string",
"format": "slug",
"pattern": "^[-a-zA-Z0-9_]+$"
}
}
},
"AgreementSign": {
"required": [
"read_terms"
],
"type": "object",
"properties": {
"read_terms": {
"title": "Read terms",
"description": "I have read and understand these terms and conditions",
"type": "boolean"
},
"last_signed": {
"title": "Last signed",
"type": "string",
"format": "date-time",
"readOnly": true
}
}
},
"Table": {
"required": [
"key",
"selector",
"values"
],
"type": "object",
"properties": {
"key": {
"title": "Key",
"description": "Unique key in the table for the data series",
"type": "string",
"minLength": 1
},
"selector": {
"title": "Selector",
"description": "Filter on the Transaction accounts",
"type": "string",
"minLength": 1
},
"values": {
"title": "Values",
"description": "Datapoints in the serie",
"type": "string",
"minLength": 1
}
}
},
"Metrics": {
"required": [
"scale",
"unit",
"title",
"table"
],
"type": "object",
"properties": {
"scale": {
"title": "Scale",
"description": "The scale of the number reported in the tables (ex: 1000 when numbers are reported in thousands of dollars)",
"type": "number"
},
"unit": {
"title": "Unit",
"description": "Three-letter ISO 4217 code for currency unit (ex: usd)",
"type": "string",
"minLength": 1
},
"title": {
"title": "Title",
"description": "Title for the table",
"type": "string",
"minLength": 1
},
"table": {
"type": "array",
"items": {
"$ref": "#/definitions/Table"
}
}
}
},
"BalanceLine": {
"required": [
"title",
"rank"
],
"type": "object",
"properties": {
"title": {
"title": "Title",
"description": "Title for the row",
"type": "string",
"maxLength": 255,
"minLength": 1
},
"selector": {
"title": "Selector",
"description": "Filter on the Transaction accounts",
"type": "string",
"maxLength": 255
},
"rank": {
"title": "Rank",
"description": "Absolute position of the row in the list of rows for the table",
"type": "integer"
}
}
},
"CartItem": {
"required": [
"plan"
],
"type": "object",
"properties": {
"created_at": {
"title": "Created at",
"description": "Date/time of creation (in ISO format)",
"type": "string",
"format": "date-time",
"readOnly": true
},
"user": {
"$ref": "#/definitions/User"
},
"plan": {
"title": "Plan",
"type": "string"
},
"option": {
"title": "Option",
"type": "integer"
},
"full_name": {
"title": "Full name",
"description": "Full name of the person that will benefit from the subscription (GroupBuy)",
"type": "string",
"maxLength": 150
},
"sync_on": {
"title": "Sync on",
"type": "string",
"maxLength": 255
}
}
},
"OrganizationCreate": {
"required": [
"full_name",
"email",
"type"
],
"type": "object",
"properties": {
"slug": {
"title": "Slug",
"description": "Unique identifier shown in the URL bar",
"type": "string"
},
"full_name": {
"title": "Full name",
"description": "Full name",
"type": "string",
"minLength": 1
},
"default_timezone": {
"title": "Default timezone",
"description": "Timezone to use when reporting metrics",
"type": "string",
"minLength": 1
},
"email": {
"title": "Email",
"description": "E-mail address",
"type": "string",
"format": "email",
"minLength": 1
},
"phone": {
"title": "Phone",
"description": "Phone number",
"type": "string"
},
"street_address": {
"title": "Street address",
"description": "Street address",
"type": "string"
},
"locality": {
"title": "Locality",
"description": "City/Town",
"type": "string"
},
"region": {
"title": "Region",
"description": "State/Province/County",
"type": "string"
},
"postal_code": {
"title": "Postal code",
"description": "Zip/Postal code",
"type": "string"
},
"country": {
"title": "Country",
"description": "Country",
"type": "string",
"enum": [
"AF",
"AX",
"AL",
"DZ",
"AS",
"AD",
"AO",
"AI",
"AQ",
"AG",
"AR",
"AM",
"AW",
"AU",
"AT",
"AZ",
"BS",
"BH",
"BD",
"BB",
"BY",
"BE",
"BZ",
"BJ",
"BM",
"BT",
"BO",
"BQ",
"BA",
"BW",
"BV",
"BR",
"IO",
"BN",
"BG",
"BF",
"BI",
"CV",
"KH",
"CM",
"CA",
"KY",
"CF",
"TD",
"CL",
"CN",
"CX",
"CC",
"CO",
"KM",
"CG",
"CD",
"CK",
"CR",
"CI",
"HR",
"CU",
"CW",
"CY",
"CZ",
"DK",
"DJ",
"DM",
"DO",
"EC",
"EG",
"SV",
"GQ",
"ER",
"EE",
"SZ",
"ET",
"FK",
"FO",
"FJ",
"FI",
"FR",
"GF",
"PF",
"TF",
"GA",
"GM",
"GE",
"DE",
"GH",
"GI",
"GR",
"GL",
"GD",
"GP",
"GU",
"GT",
"GG",
"GN",
"GW",
"GY",
"HT",
"HM",
"VA",
"HN",
"HK",
"HU",
"IS",
"IN",
"ID",
"IR",
"IQ",
"IE",
"IM",
"IL",
"IT",
"JM",
"JP",
"JE",
"JO",
"KZ",
"KE",
"KI",
"KW",
"KG",
"LA",
"LV",
"LB",
"LS",
"LR",
"LY",
"LI",
"LT",
"LU",
"MO",
"MK",
"MG",
"MW",
"MY",
"MV",
"ML",
"MT",
"MH",
"MQ",
"MR",
"MU",
"YT",
"MX",
"FM",
"MD",
"MC",
"MN",
"ME",
"MS",
"MA",
"MZ",
"MM",
"NA",
"NR",
"NP",
"NL",
"NC",
"NZ",
"NI",
"NE",
"NG",
"NU",
"NF",
"KP",
"MP",
"NO",
"OM",
"PK",
"PW",
"PS",
"PA",
"PG",
"PY",
"PE",
"PH",
"PN",
"PL",
"PT",
"PR",
"QA",
"RE",
"RO",
"RU",
"RW",
"BL",
"SH",
"KN",
"LC",
"MF",
"PM",
"VC",
"WS",
"SM",
"ST",
"SA",
"SN",
"RS",
"SC",
"SL",
"SG",
"SX",
"SK",
"SI",
"SB",
"SO",
"ZA",
"GS",
"KR",
"SS",
"ES",
"LK",
"SD",
"SR",
"SJ",
"SE",
"CH",
"SY",
"TW",
"TJ",
"TZ",
"TH",
"TL",
"TG",
"TK",
"TO",
"TT",
"TN",
"TR",
"TM",
"TC",
"TV",
"UG",
"UA",
"AE",
"GB",
"UM",
"US",
"UY",
"UZ",
"VU",
"VE",
"VN",
"VG",
"VI",
"WF",
"EH",
"YE",
"ZM",
"ZW"
]
},
"extra": {
"title": "Extra",
"description": "Extra meta data (can be stringify JSON)",
"type": "string",
"minLength": 1
},
"type": {
"title": "Type",
"description": "One of 'organization', 'personal' or 'user'",
"type": "string",
"minLength": 1
}
}
},
"WithSubscription": {
"required": [
"ends_at"
],
"type": "object",
"properties": {
"created_at": {
"title": "Created at",
"description": "Date/time of creation (in ISO format)",
"type": "string",
"format": "date-time",
"readOnly": true
},
"ends_at": {
"title": "Ends at",
"description": "Date/time when the subscription period currently ends (in ISO format)",
"type": "string",
"format": "date-time"
},
"plan": {
"title": "Plan",
"type": "string",
"readOnly": true
},
"auto_renew": {
"title": "Auto renew",
"description": "The subscription is set to auto-renew at the end of the period",
"type": "boolean"
}
}
},
"Profile": {
"required": [
"full_name",
"email"
],
"type": "object",
"properties": {
"slug": {
"title": "Slug",
"description": "Unique identifier shown in the URL bar",
"type": "string"
},
"created_at": {
"title": "Created at",
"description": "Date/time of creation (in ISO format)",
"type": "string",
"format": "date-time",
"readOnly": true
},
"full_name": {
"title": "Full name",
"description": "Full name",
"type": "string",
"minLength": 1
},
"email": {
"title": "Email",
"description": "E-mail address",
"type": "string",
"format": "email",
"minLength": 1
},
"phone": {
"title": "Phone",
"description": "Phone number",
"type": "string"
},
"street_address": {
"title": "Street address",
"description": "Street address",
"type": "string"
},
"locality": {
"title": "Locality",
"description": "City/Town",
"type": "string"
},
"region": {
"title": "Region",
"description": "State/Province/County",
"type": "string"
},
"postal_code": {
"title": "Postal code",
"description": "Zip/Postal code",
"type": "string"
},
"country": {
"title": "Country",
"description": "Country",
"type": "string",
"enum": [
"AF",
"AX",
"AL",
"DZ",
"AS",
"AD",
"AO",
"AI",
"AQ",
"AG",
"AR",
"AM",
"AW",
"AU",
"AT",
"AZ",
"BS",
"BH",
"BD",
"BB",
"BY",
"BE",
"BZ",
"BJ",
"BM",
"BT",
"BO",
"BQ",
"BA",
"BW",
"BV",
"BR",
"IO",
"BN",
"BG",
"BF",
"BI",
"CV",
"KH",
"CM",
"CA",
"KY",
"CF",
"TD",
"CL",
"CN",
"CX",
"CC",
"CO",
"KM",
"CG",
"CD",
"CK",
"CR",
"CI",
"HR",
"CU",
"CW",
"CY",
"CZ",
"DK",
"DJ",
"DM",
"DO",
"EC",
"EG",
"SV",
"GQ",
"ER",
"EE",
"SZ",
"ET",
"FK",
"FO",
"FJ",
"FI",
"FR",
"GF",
"PF",
"TF",
"GA",
"GM",
"GE",
"DE",
"GH",
"GI",
"GR",
"GL",
"GD",
"GP",
"GU",
"GT",
"GG",
"GN",
"GW",
"GY",
"HT",
"HM",
"VA",
"HN",
"HK",
"HU",
"IS",
"IN",
"ID",
"IR",
"IQ",
"IE",
"IM",
"IL",
"IT",
"JM",
"JP",
"JE",
"JO",
"KZ",
"KE",
"KI",
"KW",
"KG",
"LA",
"LV",
"LB",
"LS",
"LR",
"LY",
"LI",
"LT",
"LU",
"MO",
"MK",
"MG",
"MW",
"MY",
"MV",
"ML",
"MT",
"MH",
"MQ",
"MR",
"MU",
"YT",
"MX",
"FM",
"MD",
"MC",
"MN",
"ME",
"MS",
"MA",
"MZ",
"MM",
"NA",
"NR",
"NP",
"NL",
"NC",
"NZ",
"NI",
"NE",
"NG",
"NU",
"NF",
"KP",
"MP",
"NO",
"OM",
"PK",
"PW",
"PS",
"PA",
"PG",
"PY",
"PE",
"PH",
"PN",
"PL",
"PT",
"PR",
"QA",
"RE",
"RO",
"RU",
"RW",
"BL",
"SH",
"KN",
"LC",
"MF",
"PM",
"VC",
"WS",
"SM",
"ST",
"SA",
"SN",
"RS",
"SC",
"SL",
"SG",
"SX",
"SK",
"SI",
"SB",
"SO",
"ZA",
"GS",
"KR",
"SS",
"ES",
"LK",
"SD",
"SR",
"SJ",
"SE",
"CH",
"SY",
"TW",
"TJ",
"TZ",
"TH",
"TL",
"TG",
"TK",
"TO",
"TT",
"TN",
"TR",
"TM",
"TC",
"TV",
"UG",
"UA",
"AE",
"GB",
"UM",
"US",
"UY",
"UZ",
"VU",
"VE",
"VN",
"VG",
"VI",
"WF",
"EH",
"YE",
"ZM",
"ZW"
]
},
"default_timezone": {
"title": "Default timezone",
"description": "Timezone to use when reporting metrics",
"type": "string",
"minLength": 1
},
"printable_name": {
"title": "Printable name",
"type": "string",
"readOnly": true,
"minLength": 1
},
"is_provider": {
"title": "Is provider",
"description": "The organization can fulfill the provider side of a subscription.",
"type": "boolean"
},
"is_bulk_buyer": {
"title": "Is bulk buyer",
"description": "Enable GroupBuy (<a href=\"https://djaodjin.com/docs/#group-billing\" target=\"_blank\">what is it?</a>)",
"type": "boolean"
},
"type": {
"title": "Type",
"description": "One of 'organization', 'personal' or 'user'",
"type": "string",
"readOnly": true
},
"credentials": {
"title": "Credentials",
"type": "string",
"readOnly": true
},
"extra": {
"title": "Extra",
"description": "Extra meta data (can be stringify JSON)",
"type": "string",
"minLength": 1
},
"activities": {
"type": "array",
"items": {
"$ref": "#/definitions/Activity"
},
"readOnly": true
},
"subscriptions": {
"type": "array",
"items": {
"$ref": "#/definitions/WithSubscription"
},
"readOnly": true
}
}
},
"OrganizationWithSubscriptions": {
"required": [
"full_name",
"email"
],
"type": "object",
"properties": {
"slug": {
"title": "Slug",
"description": "Unique identifier shown in the URL bar",
"type": "string"
},
"created_at": {
"title": "Created at",
"description": "Date/time of creation (in ISO format)",
"type": "string",
"format": "date-time",
"readOnly": true
},
"full_name": {
"title": "Full name",
"description": "Full name",
"type": "string",
"minLength": 1
},
"email": {
"title": "Email",
"description": "E-mail address",
"type": "string",
"format": "email",
"minLength": 1
},
"phone": {
"title": "Phone",
"description": "Phone number",
"type": "string"
},
"street_address": {
"title": "Street address",
"description": "Street address",
"type": "string"
},
"locality": {
"title": "Locality",
"description": "City/Town",
"type": "string"
},
"region": {
"title": "Region",
"description": "State/Province/County",
"type": "string"
},
"postal_code": {
"title": "Postal code",
"description": "Zip/Postal code",
"type": "string"
},
"country": {
"title": "Country",
"description": "Country",
"type": "string",
"enum": [
"AF",
"AX",
"AL",
"DZ",
"AS",
"AD",
"AO",
"AI",
"AQ",
"AG",
"AR",
"AM",
"AW",
"AU",
"AT",
"AZ",
"BS",
"BH",
"BD",
"BB",
"BY",
"BE",
"BZ",
"BJ",
"BM",
"BT",
"BO",
"BQ",
"BA",
"BW",
"BV",
"BR",
"IO",
"BN",
"BG",
"BF",
"BI",
"CV",
"KH",
"CM",
"CA",
"KY",
"CF",
"TD",
"CL",
"CN",
"CX",
"CC",
"CO",
"KM",
"CG",
"CD",
"CK",
"CR",
"CI",
"HR",
"CU",
"CW",
"CY",
"CZ",
"DK",
"DJ",
"DM",
"DO",
"EC",
"EG",
"SV",
"GQ",
"ER",
"EE",
"SZ",
"ET",
"FK",
"FO",
"FJ",
"FI",
"FR",
"GF",
"PF",
"TF",
"GA",
"GM",
"GE",
"DE",
"GH",
"GI",
"GR",
"GL",
"GD",
"GP",
"GU",
"GT",
"GG",
"GN",
"GW",
"GY",
"HT",
"HM",
"VA",
"HN",
"HK",
"HU",
"IS",
"IN",
"ID",
"IR",
"IQ",
"IE",
"IM",
"IL",
"IT",
"JM",
"JP",
"JE",
"JO",
"KZ",
"KE",
"KI",
"KW",
"KG",
"LA",
"LV",
"LB",
"LS",
"LR",
"LY",
"LI",
"LT",
"LU",
"MO",
"MK",
"MG",
"MW",
"MY",
"MV",
"ML",
"MT",
"MH",
"MQ",
"MR",
"MU",
"YT",
"MX",
"FM",
"MD",
"MC",
"MN",
"ME",
"MS",
"MA",
"MZ",
"MM",
"NA",
"NR",
"NP",
"NL",
"NC",
"NZ",
"NI",
"NE",
"NG",
"NU",
"NF",
"KP",
"MP",
"NO",
"OM",
"PK",
"PW",
"PS",
"PA",
"PG",
"PY",
"PE",
"PH",
"PN",
"PL",
"PT",
"PR",
"QA",
"RE",
"RO",
"RU",
"RW",
"BL",
"SH",
"KN",
"LC",
"MF",
"PM",
"VC",
"WS",
"SM",
"ST",
"SA",
"SN",
"RS",
"SC",
"SL",
"SG",
"SX",
"SK",
"SI",
"SB",
"SO",
"ZA",
"GS",
"KR",
"SS",
"ES",
"LK",
"SD",
"SR",
"SJ",
"SE",
"CH",
"SY",
"TW",
"TJ",
"TZ",
"TH",
"TL",
"TG",
"TK",
"TO",
"TT",
"TN",
"TR",
"TM",
"TC",
"TV",
"UG",
"UA",
"AE",
"GB",
"UM",
"US",
"UY",
"UZ",
"VU",
"VE",
"VN",
"VG",
"VI",
"WF",
"EH",
"YE",
"ZM",
"ZW"
]
},
"default_timezone": {
"title": "Default timezone",
"description": "Timezone to use when reporting metrics",
"type": "string",
"minLength": 1
},
"printable_name": {
"title": "Printable name",
"type": "string",
"readOnly": true,
"minLength": 1
},
"is_provider": {
"title": "Is provider",
"description": "The organization can fulfill the provider side of a subscription.",
"type": "boolean"
},
"is_bulk_buyer": {
"title": "Is bulk buyer",
"description": "Enable GroupBuy (<a href=\"https://djaodjin.com/docs/#group-billing\" target=\"_blank\">what is it?</a>)",
"type": "boolean"
},
"type": {
"title": "Type",
"description": "One of 'organization', 'personal' or 'user'",
"type": "string",
"readOnly": true
},
"picture": {
"title": "Profile picture",
"description": "Profile picture",
"type": "string",
"format": "uri",
"maxLength": 2083
},
"extra": {
"title": "Extra",
"description": "Extra meta data (can be stringify JSON)",
"type": "string",
"minLength": 1
},
"subscriptions": {
"type": "array",
"items": {
"$ref": "#/definitions/WithSubscription"
},
"readOnly": true
}
}
},
"SubscriptionCreate": {
"required": [
"organization"
],
"type": "object",
"properties": {
"organization": {
"$ref": "#/definitions/OrganizationCreate"
},
"message": {
"title": "Message",
"type": "string",
"minLength": 1
}
}
},
"Role": {
"type": "object",
"properties": {
"created_at": {
"title": "Created at",
"type": "string",
"format": "date-time",
"readOnly": true
},
"user": {
"$ref": "#/definitions/User"
},
"request_key": {
"title": "Request key",
"type": "string",
"readOnly": true,
"minLength": 1
},
"grant_key": {
"title": "Grant key",
"type": "string",
"readOnly": true,
"minLength": 1
},
"organization": {
"$ref": "#/definitions/Organization"
},
"role_description": {
"title": "Role description",
"type": "string",
"readOnly": true
},
"accept_request_api_url": {
"title": "Accept request api url",
"type": "string",
"readOnly": true
},
"remove_api_url": {
"title": "Remove api url",
"type": "string",
"readOnly": true
}
}
},
"RoleDescriptionCRUD": {
"required": [
"title"
],
"type": "object",
"properties": {
"created_at": {
"title": "Created at",
"description": "Date/time of creation (in ISO format)",
"type": "string",
"format": "date-time",
"readOnly": true
},
"title": {
"title": "Title",
"description": "Short description of the role. Grammatical rules to pluralize the title might be used in User Interfaces.",
"type": "string",
"maxLength": 20,
"minLength": 1
},
"slug": {
"title": "Slug",
"description": "Unique identifier shown in the URL bar",
"type": "string",
"format": "slug",
"pattern": "^[-a-zA-Z0-9_]+$",
"readOnly": true,
"minLength": 1
},
"is_global": {
"title": "Is global",
"type": "string",
"readOnly": true
},
"roles": {
"title": "Roles",
"type": "string",
"readOnly": true
}
}
},
"UserRoleCreate": {
"required": [
"slug"
],
"type": "object",
"properties": {
"slug": {
"title": "Slug",
"type": "string",
"pattern": "[a-zA-Z0-9_\\-\\+\\.]+",
"minLength": 1
},
"email": {
"title": "Email",
"type": "string",
"format": "email",
"maxLength": 254,
"minLength": 1
},
"message": {
"title": "Message",
"type": "string",
"maxLength": 255,
"minLength": 1
}
}
},
"RoleDescription": {
"title": "Role description",
"required": [
"title",
"slug"
],
"type": "object",
"properties": {
"created_at": {
"title": "Created at",
"description": "Date/time of creation (in ISO format)",
"type": "string",
"format": "date-time",
"readOnly": true
},
"title": {
"title": "Title",
"description": "Short description of the role. Grammatical rules to pluralize the title might be used in User Interfaces.",
"type": "string",
"maxLength": 20,
"minLength": 1
},
"slug": {
"title": "Slug",
"description": "Unique identifier shown in the URL bar",
"type": "string",
"format": "slug",
"pattern": "^[-a-zA-Z0-9_]+$",
"maxLength": 50,
"minLength": 1
},
"is_global": {
"title": "Is global",
"type": "string",
"readOnly": true
},
"organization": {
"$ref": "#/definitions/Organization"
}
},
"readOnly": true
},
"RoleAccessible": {
"type": "object",
"properties": {
"created_at": {
"title": "Created at",
"type": "string",
"format": "date-time",
"readOnly": true
},
"request_key": {
"title": "Request key",
"type": "string",
"maxLength": 40
},
"grant_key": {
"title": "Grant key",
"type": "string",
"maxLength": 40
},
"role_description": {
"$ref": "#/definitions/RoleDescription"
},
"user": {
"$ref": "#/definitions/User"
}
}
},
"App": {
"type": "object",
"properties": {
"slug": {
"title": "Slug",
"description": "unique identifier for the site (also serves as subdomain)",
"type": "string",
"format": "slug",
"pattern": "^[-a-zA-Z0-9_]+$",
"readOnly": true,
"minLength": 1
},
"entry_point": {
"title": "Entry point",
"description": "Entry point to which requests will be redirected to",
"type": "string",
"format": "uri",
"maxLength": 100,
"minLength": 1
},
"session_backend": {
"title": "Session backend",
"description": "Format to encode session in the forwarded HTTP request",
"type": "integer",
"enum": [
0,
1,
2
]
},
"authentication": {
"title": "Authentication",
"description": "Restricted authentication and registration",
"type": "string"
},
"welcome_email": {
"title": "Welcome email",
"description": "Send a welcome e-mail to newly registered users",
"type": "boolean"
},
"show_edit_tools": {
"title": "Show edit tools",
"type": "boolean"
}
}
},
"Engagement": {
"required": [
"slug",
"count"
],
"type": "object",
"properties": {
"slug": {
"title": "Slug",
"type": "string",
"minLength": 1
},
"count": {
"title": "Count",
"type": "integer"
}
}
},
"Engagements": {
"required": [
"engagements",
"active_users"
],
"type": "object",
"properties": {
"engagements": {
"type": "array",
"items": {
"$ref": "#/definitions/Engagement"
}
},
"active_users": {
"title": "Active users",
"type": "integer"
}
}
},
"UserEngagement": {
"required": [
"username"
],
"type": "object",
"properties": {
"username": {
"title": "Username",
"description": "Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.",
"type": "string",
"pattern": "^[\\w.@+-]+$",
"maxLength": 150,
"minLength": 1
},
"engagements": {
"title": "Engagements",
"type": "string",
"readOnly": true
}
}
},
"AppKey": {
"type": "object",
"properties": {
"enc_key": {
"title": "Enc key",
"description": "Key used to decrypt the encoded session information.",
"type": "string",
"readOnly": true,
"minLength": 1
}
}
},
"Rule": {
"required": [
"rank",
"path"
],
"type": "object",
"properties": {
"rank": {
"title": "Rank",
"description": "Determines the order in which rules are considered",
"type": "integer"
},
"path": {
"title": "Path",
"description": "OpenAPI path against which requests are matched",
"type": "string",
"maxLength": 255,
"minLength": 1
},
"allow": {
"title": "Allow",
"description": "Method applied to grant or deny access",
"type": "string",
"minLength": 1
},
"is_forward": {
"title": "Is forward",
"description": "When access is granted, should the request be forwarded",
"type": "boolean"
},
"engaged": {
"title": "Engaged",
"description": "Tags to check if it is the first time a user engages",
"type": "string"
}
}
},
"UpdateRule": {
"required": [
"rank"
],
"type": "object",
"properties": {
"rank": {
"title": "Rank",
"description": "Determines the order in which rules are considered",
"type": "integer"
},
"path": {
"title": "Path",
"description": "OpenAPI path against which requests are matched",
"type": "string",
"readOnly": true,
"minLength": 1
},
"allow": {
"title": "Allow",
"description": "Method applied to grant or deny access",
"type": "string",
"minLength": 1
},
"is_forward": {
"title": "Is forward",
"description": "When access is granted, should the request be forwarded",
"type": "boolean"
},
"engaged": {
"title": "Engaged",
"description": "Tags to check if it is the first time a user engages",
"type": "string"
}
}
},
"SessionData": {
"required": [
"forward_session",
"forward_session_header",
"forward_url"
],
"type": "object",
"properties": {
"forward_session": {
"title": "Forward session",
"description": "The session being forwarded",
"type": "string",
"minLength": 1
},
"forward_session_header": {
"title": "Forward session header",
"description": "The HTTP header that encodes the session",
"type": "string",
"minLength": 1
},
"forward_url": {
"title": "Forward url",
"description": "The URL end point where the request is forwarded",
"type": "string",
"minLength": 1
}
}
},
"ThemePackageUploadBody": {
"required": [
"files"
],
"type": "object",
"properties": {
"files": {
"title": "Files",
"description": "Content of the theme package as a zip file.",
"type": "string",
"minLength": 1
}
}
},
"ThemePackageUpload": {
"type": "object",
"properties": {
"location": {
"title": "Location",
"description": "URL where the theme package was uploaded.",
"type": "string",
"readOnly": true,
"minLength": 1
}
}
},
"Asset": {
"required": [
"location"
],
"type": "object",
"properties": {
"location": {
"title": "Location",
"description": "URL where the asset content is stored.",
"type": "string",
"minLength": 1
},
"updated_at": {
"title": "Updated at",
"description": "Last date/time the asset content was updated.",
"type": "string",
"format": "date-time"
},
"tags": {
"title": "Tags",
"description": "Tags associated to the asset.",
"type": "string",
"minLength": 1
}
}
},
"PageElement": {
"type": "object",
"properties": {
"slug": {
"title": "Slug",
"type": "string",
"format": "slug",
"pattern": "^[-a-zA-Z0-9_]+$",
"minLength": 1
},
"path": {
"title": "Path",
"type": "string",
"readOnly": true
},
"title": {
"title": "Title",
"type": "string",
"maxLength": 300
},
"text": {
"title": "Text",
"type": "string",
"minLength": 1
},
"tag": {
"title": "Tag",
"type": "string",
"minLength": 1
},
"orig_elements": {
"type": "array",
"items": {
"type": "string",
"format": "slug",
"pattern": "^[-a-zA-Z0-9_]+$",
"minLength": 1
}
},
"dest_elements": {
"type": "array",
"items": {
"type": "string",
"format": "slug",
"pattern": "^[-a-zA-Z0-9_]+$",
"minLength": 1
}
}
}
},
"EdgeCreate": {
"required": [
"source"
],
"type": "object",
"properties": {
"source": {
"title": "Source",
"type": "string",
"minLength": 1
},
"rank": {
"title": "Rank",
"type": "integer"
},
"external_key": {
"title": "External key",
"type": "string",
"minLength": 1
}
}
},
"RelationShip": {
"type": "object",
"properties": {
"orig_elements": {
"type": "array",
"items": {
"type": "string",
"format": "slug",
"pattern": "^[-a-zA-Z0-9_]+$",
"minLength": 1
}
},
"dest_elements": {
"type": "array",
"items": {
"type": "string",
"format": "slug",
"pattern": "^[-a-zA-Z0-9_]+$",
"minLength": 1
}
}
}
},
"PageElementTag": {
"type": "object",
"properties": {
"tag": {
"title": "Tag",
"type": "string",
"maxLength": 255
}
}
},
"LessVariable": {
"required": [
"name",
"value"
],
"type": "object",
"properties": {
"name": {
"title": "Name",
"type": "string",
"maxLength": 250,
"minLength": 1
},
"value": {
"title": "Value",
"type": "string",
"maxLength": 250,
"minLength": 1
},
"created_at": {
"title": "Created at",
"type": "string",
"format": "date-time",
"readOnly": true
},
"updated_at": {
"title": "Updated at",
"type": "string",
"format": "date-time",
"readOnly": true
}
}
},
"SourceCode": {
"type": "object",
"properties": {
"path": {
"title": "Path",
"type": "string",
"maxLength": 255,
"minLength": 1
},
"text": {
"title": "Text",
"type": "string",
"maxLength": 100000,
"minLength": 1
}
}
},
"Contact": {
"required": [
"email"
],
"type": "object",
"properties": {
"slug": {
"title": "Slug",
"description": "Unique identifier shown in the URL bar, effectively the username for profiles with login credentials.",
"type": "string",
"format": "slug",
"pattern": "^[-a-zA-Z0-9_]+$",
"readOnly": true,
"minLength": 1
},
"printable_name": {
"title": "Printable name",
"type": "string",
"readOnly": true
},
"picture": {
"title": "URL to a profile picture",
"description": "Profile picture",
"type": "string",
"format": "uri",
"maxLength": 2083
},
"email": {
"title": "E-mail address",
"description": "E-mail address",
"type": "string",
"format": "email",
"maxLength": 254,
"minLength": 1
},
"created_at": {
"title": "Created at",
"description": "Date/time of creation (in ISO format)",
"type": "string",
"format": "date-time",
"readOnly": true
},
"credentials": {
"title": "Credentials",
"description": "True if the user has valid login credentials",
"type": "string",
"readOnly": true
}
}
},
"ContactDetail": {
"required": [
"email"
],
"type": "object",
"properties": {
"slug": {
"title": "Slug",
"description": "Unique identifier shown in the URL bar, effectively the username for profiles with login credentials.",
"type": "string",
"format": "slug",
"pattern": "^[-a-zA-Z0-9_]+$",
"readOnly": true,
"minLength": 1
},
"printable_name": {
"title": "Printable name",
"type": "string",
"readOnly": true
},
"picture": {
"title": "URL to a profile picture",
"description": "Profile picture",
"type": "string",
"format": "uri",
"maxLength": 2083
},
"email": {
"title": "E-mail address",
"description": "E-mail address",
"type": "string",
"format": "email",
"maxLength": 254,
"minLength": 1
},
"created_at": {
"title": "Created at",
"description": "Date/time of creation (in ISO format)",
"type": "string",
"format": "date-time",
"readOnly": true
},
"credentials": {
"title": "Credentials",
"description": "True if the user has valid login credentials",
"type": "string",
"readOnly": true
},
"full_name": {
"title": "Full name",
"description": "Full name (effectively first name followed by last name)",
"type": "string",
"maxLength": 60
},
"nick_name": {
"title": "Nick name",
"description": "Short casual name used to address the contact",
"type": "string",
"maxLength": 60
},
"extra": {
"title": "Extra",
"description": "Extra meta data (can be stringify JSON)",
"type": "string",
"minLength": 1
},
"activities": {
"type": "array",
"items": {
"$ref": "#/definitions/Activity"
},
"readOnly": true
}
}
},
"Accessible": {
"required": [
"slug",
"printable_name",
"email"
],
"type": "object",
"properties": {
"created_at": {
"title": "Created at",
"type": "string",
"format": "date-time",
"readOnly": true
},
"request_key": {
"title": "Request key",
"type": "string",
"readOnly": true,
"minLength": 1
},
"slug": {
"title": "Slug",
"type": "string",
"format": "slug",
"pattern": "^[-a-zA-Z0-9_]+$",
"minLength": 1
},
"printable_name": {
"title": "Printable name",
"type": "string",
"minLength": 1
},
"email": {
"title": "Email",
"type": "string",
"minLength": 1
},
"role_description": {
"$ref": "#/definitions/RoleDescription"
},
"home_url": {
"title": "Home url",
"type": "string",
"readOnly": true
},
"settings_url": {
"title": "Settings url",
"type": "string",
"readOnly": true
},
"accept_grant_api_url": {
"title": "Accept grant api url",
"type": "string",
"readOnly": true
},
"remove_api_url": {
"title": "Remove api url",
"type": "string",
"readOnly": true
}
}
},
"NoModel": {
"type": "object",
"properties": {}
},
"APIKeys": {
"required": [
"password"
],
"type": "object",
"properties": {
"secret": {
"title": "Secret",
"description": "Secret API Key used to authenticate user on every HTTP request",
"type": "string",
"readOnly": true,
"maxLength": 128,
"minLength": 1
},
"password": {
"title": "Password",
"description": "Password of the user making the HTTP request",
"type": "string",
"maxLength": 128,
"minLength": 1
}
}
},
"Notifications": {
"required": [
"notifications"
],
"type": "object",
"properties": {
"notifications": {
"type": "array",
"items": {
"type": "string",
"format": "slug",
"pattern": "^[-a-zA-Z0-9_]+$"
},
"uniqueItems": true
}
}
},
"PasswordChange": {
"required": [
"password",
"new_password"
],
"type": "object",
"properties": {
"password": {
"title": "Password",
"description": "Password of the user making the HTTP request",
"type": "string",
"minLength": 1
},
"new_password": {
"title": "New password",
"description": "New password for the user referenced in the URL",
"type": "string",
"minLength": 1
}
}
},
"PublicKey": {
"required": [
"password",
"pubkey"
],
"type": "object",
"properties": {
"password": {
"title": "Password",
"description": "Password of the user making the HTTP request",
"type": "string",
"minLength": 1
},
"pubkey": {
"title": "Pubkey",
"description": "New public key for the user referenced in the URL",
"type": "string",
"maxLength": 500,
"minLength": 1
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment