{ "swagger": "2.0", "info": { "title": "Uffizzi docs", "description": "Your API does this", "version": "1.0" }, "host": "lvh.me:7000", "basePath": "/", "schemes": [ "http" ], "paths": { "/api/cli/v1/account/credentials": { "post": { "tags": [ "Account/Credential" ], "operationId": "Account/Credential-create", "parameters": [ { "name": "credential", "description": "credential", "required": true, "in": "body", "schema": { "type": "object", "properties": { "username": { "type": "string" }, "password": { "type": "string" }, "type": { "type": "string" } } } } ], "responses": { "default": { "description": "rubocop:disable Metrics/LineLength\nCreate account credential", "examples": { "application/json": "type can be one of UffizziCore::Credential::Amazon, UffizziCore::Credential::Azure, UffizziCore::Credential::DockerHub, UffizziCore::Credential::Google" } }, "201": { "description": "Created successfully", "schema": { "type": "object", "properties": { "id": { "type": "integer" }, "username": { "type": "string" }, "password": { "type": "string" }, "type": { "type": "string" }, "state": { "type": "string" } } } }, "422": { "description": "Unprocessable entity", "schema": { "type": "object", "additionalProperties": { "type": "errors" } } } }, "description": "rubocop:disable Metrics/LineLength\nCreate account credential\n\nrubocop:enable Metrics/LineLength", "summary": "rubocop:disable Metrics/LineLength\nCreate account credential", "x-controller": "uffizzi_core/api/cli/v1/account/credentials", "x-action": "create" } }, "/api/cli/v1/projects/{project_slug}/compose_file": { "get": { "tags": [ "ComposeFile" ], "operationId": "ComposeFile-show", "parameters": [ { "name": "project_slug", "description": "The project_slug for the project", "required": true, "in": "path", "type": "string" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/ComposeFile" } }, "401": { "description": "Not authorized" }, "404": { "description": "Not found", "schema": { "type": "object", "properties": { "errors": { "type": "object", "properties": { "title": { "type": "string" } } } } } } }, "description": "Get the compose file for the project", "summary": "Get the compose file for the project", "x-controller": "uffizzi_core/api/cli/v1/projects/compose_files", "x-action": "show" }, "post": { "tags": [ "ComposeFile" ], "operationId": "ComposeFile-create", "parameters": [ { "name": "params", "description": "params", "required": true, "in": "body", "schema": { "type": "object", "properties": { "compose_file": { "type": "object", "properties": { "path": { "type": "string" }, "source": { "type": "string" }, "content": { "type": "string" } } }, "dependencies": { "type": "array", "items": { "type": "object", "properties": { "path": { "type": "string" }, "source": { "type": "string" }, "content": { "type": "string" } } } } } } }, { "name": "project_slug", "description": "The project_slug for the project", "required": true, "in": "path", "type": "string" } ], "responses": { "201": { "description": "OK", "schema": { "$ref": "#/definitions/ComposeFile" } }, "422": { "description": "Invalid compose file", "schema": { "$ref": "#/definitions/ComposeFile" } }, "401": { "description": "Not authorized" } }, "description": "Create a compose file for the project", "summary": "Create a compose file for the project", "x-controller": "uffizzi_core/api/cli/v1/projects/compose_files", "x-action": "create" }, "delete": { "tags": [ "ComposeFile" ], "operationId": "ComposeFile-destroy", "parameters": [ { "name": "project_slug", "description": "The project_slug for the project", "required": true, "in": "path", "type": "string" } ], "responses": { "204": { "description": "No Content" }, "401": { "description": "Not authorized" } }, "description": "Delete the compose file for the project", "summary": "Delete the compose file for the project", "x-controller": "uffizzi_core/api/cli/v1/projects/compose_files", "x-action": "destroy" } }, "/api/cli/v1/projects/{project_slug}/deployments/{deployment_id}/contaiers": { "get": { "tags": [ "Container" ], "operationId": "Container-index", "parameters": [ { "name": "deployment_d", "description": "The id of the deployment", "required": true, "in": "path", "type": "integer" }, { "name": "deployment_id", "description": "Scope response to deployment_id", "required": true, "in": "path", "type": "string" }, { "name": "project_slug", "description": "The project_slug for the project", "required": true, "in": "path", "type": "string" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/Container" } }, "401": { "description": "Not authorized" }, "404": { "description": "Not found" } }, "description": "Get a list of container services for a deployment", "summary": "Get a list of container services for a deployment", "x-controller": "uffizzi_core/api/cli/v1/projects/deployments/containers", "x-action": "index" } }, "/api/cli/v1/projects/{project_slug}/deployments/{deployment_id}/events": { "get": { "tags": [ "Event" ], "operationId": "Event-index", "parameters": [ { "name": "deployment_id", "description": "The id of the deployment", "required": true, "in": "path", "type": "integer" }, { "name": "project_slug", "description": "The project_slug for the project", "required": true, "in": "path", "type": "string" } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "properties": { "events": { "type": "array", "items": { "type": "object", "properties": { "first_timestamp": { "type": "string" }, "last_timestamp": { "type": "string" }, "reason": { "type": "string" }, "message": { "type": "string" } } } } } } }, "401": { "description": "Not authorized" }, "404": { "description": "Not found" } }, "description": "Get the events associated with deployment", "summary": "Get the events associated with deployment", "x-controller": "uffizzi_core/api/cli/v1/projects/deployments/events", "x-action": "index" } }, "/api/cli/v1/projects/{project_slug}/deployments": { "get": { "tags": [ "Deployment" ], "operationId": "Deployment-index", "parameters": [ { "name": "project_slug", "description": "The slug for the project", "required": true, "in": "path", "type": "string" } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/Deployment" } } }, "401": { "description": "Not authorized" } }, "description": "Get a list of active deployements for a project", "summary": "Get a list of active deployements for a project", "x-controller": "uffizzi_core/api/cli/v1/projects/deployments", "x-action": "index" }, "post": { "tags": [ "Deployment" ], "operationId": "Deployment-create", "parameters": [ { "name": "params", "description": "params", "required": true, "in": "body", "schema": { "type": "object", "properties": { "compose_file": { "type": "object", "properties": { "path": { "type": "string" }, "source": { "type": "string" }, "content": { "type": "string" } } }, "dependencies": { "type": "array", "items": { "type": "object", "properties": { "path": { "type": "string" }, "source": { "type": "string" }, "content": { "type": "string" } } } } } } }, { "name": "project_slug", "description": "The slug for the project", "required": true, "in": "path", "type": "string" } ], "responses": { "201": { "description": "OK", "schema": { "$ref": "#/definitions/Deployment" } }, "422": { "description": "Unprocessable Entity", "schema": { "type": "object", "properties": { "errors": { "type": "object", "properties": { "state": { "type": "string" } } } } } }, "404": { "description": "Not found", "schema": { "type": "object", "properties": { "errors": { "type": "object", "properties": { "title": { "type": "string" } } } } } }, "401": { "description": "Not authorized" } }, "description": "Create a deployment from a compose file", "summary": "Create a deployment from a compose file", "x-controller": "uffizzi_core/api/cli/v1/projects/deployments", "x-action": "create" } }, "/api/cli/v1/projects/{project_slug}/deployments/{id}": { "get": { "tags": [ "Deployment" ], "operationId": "Deployment-show", "parameters": [ { "name": "id", "description": "Scope response to id", "required": true, "in": "path", "type": "string" }, { "name": "project_slug", "description": "The slug for the project", "required": true, "in": "path", "type": "string" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/Deployment" } }, "404": { "description": "Not found", "schema": { "type": "object", "properties": { "errors": { "type": "object", "properties": { "title": { "type": "string" } } } } } }, "401": { "description": "Not authorized" } }, "description": "Get deployment information by id", "summary": "Get deployment information by id", "x-controller": "uffizzi_core/api/cli/v1/projects/deployments", "x-action": "show" }, "delete": { "tags": [ "Deployment" ], "operationId": "Deployment-destroy", "parameters": [ { "name": "id", "description": "Scope response to id", "required": true, "in": "path", "type": "string" }, { "name": "project_slug", "description": "The slug for the project", "required": true, "in": "path", "type": "string" } ], "responses": { "204": { "description": "No Content" }, "401": { "description": "Not authorized" } }, "description": "Disable deployment by id", "summary": "Disable deployment by id", "x-controller": "uffizzi_core/api/cli/v1/projects/deployments", "x-action": "destroy" } }, "/api/cli/v1/projects/{project_slug}/deployments/{id}/deploy_containers": { "post": { "tags": [ "Deployment" ], "operationId": "Deployment-deploy_containers", "parameters": [ { "name": "id", "description": "The id of the deployment", "required": true, "in": "path", "type": "string" }, { "name": "project_slug", "description": "The slug for the project", "required": true, "in": "path", "type": "string" } ], "responses": { "204": { "description": "No Content" }, "404": { "description": "Not found", "schema": { "type": "object", "properties": { "errors": { "type": "object", "properties": { "title": { "type": "string" } } } } } }, "401": { "description": "Not authorized" } }, "x-controller": "uffizzi_core/api/cli/v1/projects/deployments", "x-action": "deploy_containers" } }, "/api/cli/v1/projects/{project_slug}/secrets": { "get": { "tags": [ "Project/Secrets" ], "operationId": "Project/Secrets-index", "parameters": [ { "name": "project_slug", "description": "project_slug", "required": true, "in": "path", "type": "string" } ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "properties": { "secrets": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" } } } } } } }, "401": { "description": "Not authorized" } }, "description": "Get secrets for the project", "summary": "Get secrets for the project", "x-controller": "uffizzi_core/api/cli/v1/projects/secrets", "x-action": "index" } }, "/api/cli/v1/projects/{project_slug}/secrets/bulk_create": { "post": { "tags": [ "Project/Secrets" ], "operationId": "Project/Secrets-bulk_create", "parameters": [ { "name": "project_slug", "description": "project_slug", "required": true, "in": "path", "type": "string" }, { "name": "secrets", "description": "secrets", "required": true, "in": "body", "schema": { "type": "object", "properties": { "secrets": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" }, "value": { "type": "string" } } } } } } } ], "responses": { "201": { "description": "Created", "schema": { "type": "object", "properties": { "secrets": { "type": "array", "items": { "type": "object", "properties": { "name": { "type": "string" } } } } } } }, "422": { "description": "A compose file already exists for this project" }, "401": { "description": "Not authorized" } }, "description": "Add secret to project", "summary": "Add secret to project", "x-controller": "uffizzi_core/api/cli/v1/projects/secrets", "x-action": "bulk_create" } }, "/api/cli/v1/projects/{project_slug}/secrets/{id}": { "delete": { "tags": [ "Project/Secrets" ], "operationId": "Project/Secrets-destroy", "parameters": [ { "name": "id", "description": "Scope response to id", "required": true, "in": "path", "type": "string" }, { "name": "project_slug", "description": "project_slug", "required": true, "in": "path", "type": "string" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/Project" } }, "422": { "description": "Delete a secret from project by secret id" }, "401": { "description": "Not authorized" } }, "description": "Delete a secret from project by secret id", "summary": "Delete a secret from project by secret id", "x-controller": "uffizzi_core/api/cli/v1/projects/secrets", "x-action": "destroy" } }, "/api/cli/v1/projects": { "get": { "tags": [ "Project" ], "operationId": "Project-index", "parameters": [ ], "responses": { "200": { "description": "OK", "schema": { "type": "object", "properties": { "projects": { "type": "array", "items": { "type": "object", "properties": { "slug": { "type": "string" } } } } } } }, "401": { "description": "Not authorized" } }, "description": "Get projects of current user", "summary": "Get projects of current user", "x-controller": "uffizzi_core/api/cli/v1/projects", "x-action": "index" } }, "/api/cli/v1/session": { "post": { "tags": [ "Uffizzi" ], "operationId": "Uffizzi-create", "parameters": [ { "name": "user", "description": "user", "required": true, "in": "body", "schema": { "type": "object", "properties": { "email": { "type": "string" }, "password": { "type": "string" } } } } ], "responses": { "201": { "description": "Created successfully", "schema": { "type": "object", "properties": { "user": { "type": "object", "properties": { "accounts": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "integer" }, "state": { "type": "string" } } } } } } } } }, "422": { "description": "Unprocessable entity", "schema": { "type": "object", "properties": { "errors": { "type": "object", "properties": { "password": { "type": "string" } } } } } } }, "description": "Create session", "summary": "Create session", "x-controller": "uffizzi_core/api/cli/v1/sessions", "x-action": "create" }, "delete": { "tags": [ "Uffizzi" ], "operationId": "Uffizzi-destroy", "parameters": [ ], "responses": { "204": { "description": "No Content" } }, "description": "Destroy session", "summary": "Destroy session", "x-controller": "uffizzi_core/api/cli/v1/sessions", "x-action": "destroy" } } }, "tags": [ { "name": "Account/Credential", "description": "" }, { "name": "ComposeFile", "description": "" }, { "name": "Container", "description": "" }, { "name": "Deployment", "description": "" }, { "name": "Event", "description": "" }, { "name": "Project", "description": "" }, { "name": "Project/Secrets", "description": "" }, { "name": "Uffizzi", "description": "" } ], "securityDefinitions": { }, "definitions": { "UffizziCore_ActivityItem": { "type": "object", "properties": { "id": { "type": "integer" }, "namespace": { "type": "string" }, "name": { "type": "string" }, "tag": { "type": "string" }, "branch": { "type": "string" }, "type": { "type": "string" }, "container_id": { "type": "string" }, "commit": { "type": "string" }, "commit_message": { "type": "string" }, "build_id": { "type": "integer" }, "created_at": { "type": "string", "format": "date" }, "updated_at": { "type": "string", "format": "date" }, "data": { "type": "object" }, "digest": { "type": "string" }, "meta": { "type": "object" } }, "required": [ "name" ] }, "UffizziCore_ComposeFile": { "type": "object", "properties": { "id": { "type": "integer" }, "source": { "type": "string" }, "path": { "type": "string" }, "content": { "type": "string" }, "auto_deploy": { "type": "boolean" }, "state": { "type": "string" }, "payload": { "type": "string" } }, "required": [ "content" ] }, "UffizziCore_ConfigFile": { "type": "object", "properties": { "filename": { "type": "string" }, "kind": { "type": "string" }, "payload": { "type": "string" }, "source": { "type": "string" } } }, "UffizziCore_Container": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "memory_limit": { "type": "integer" }, "memory_request": { "type": "integer" }, "continuously_deploy": { "type": "string" }, "variables": { "type": "object" }, "secret_variables": { "type": "object" }, "container_config_files": { "$ref": "#/definitions/ConfigFile" } } }, "UffizziCore_Deployment": { "type": "object", "properties": { "id": { "type": "integer" }, "project_id": { "type": "integer" }, "kind": { "type": "string" }, "state": { "type": "string" }, "preview_url": { "type": "string" }, "tag": { "type": "string" }, "branch": { "type": "string" }, "commit": { "type": "string" }, "image_id": { "type": "string" }, "created_at": { "type": "string", "format": "date-time" }, "updated_at": { "type": "string", "format": "date-time" }, "ingress_container_ready": { "type": "boolean" }, "ingress_container_state": { "type": "string" }, "creation_source": { "type": "string" }, "contaners": { "type": "array", "items": { "type": "string" } }, "deployed_by": { "type": "object" } } }, "UffizziCore_Project": { "type": "object", "properties": { "slug": { "type": "string" } } } } }