{ "swagger": "2.0", "info": { "contact": {} }, "paths": { "/playbook/": { "get": { "description": "return all stored playbooks default limit:100", "produces": [ "application/json" ], "tags": [ "playbook" ], "summary": "gets all the UUIDs for the stored playbooks", "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/cacao.Playbook" } } } } }, "post": { "description": "submit a new playbook api", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "playbook" ], "summary": "submit playbook via the api", "parameters": [ { "description": "playbook", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/cacao.Playbook" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/cacao.Playbook" } } } } }, "/playbook/meta": { "get": { "description": "get playbook meta information for playbook", "produces": [ "application/json" ], "tags": [ "playbook" ], "summary": "gets all the meta information for the stored playbooks", "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/api.PlaybookMeta" } } } } } }, "/playbook/{id}": { "get": { "description": "get playbook by ID", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "playbook" ], "summary": "get CACAO playbook by its ID", "parameters": [ { "type": "string", "description": "playbook ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/cacao.Playbook" } } } }, "put": { "description": "update playbook by Id", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "playbook" ], "summary": "update playbook", "parameters": [ { "type": "string", "description": "playbook Id", "name": "id", "in": "path", "required": true }, { "description": "playbook", "name": "data", "in": "body", "required": true, "schema": { "$ref": "#/definitions/cacao.Playbook" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/cacao.Playbook" } } } }, "delete": { "description": "delete playbook by Id", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "playbook" ], "summary": "delete playbook by Id", "parameters": [ { "type": "string", "description": "playbook ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK" } } } }, "/trigger/playbook": { "post": { "description": "trigger playbook", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "trigger" ], "summary": "trigger a playbook by supplying a cacao playbook payload", "parameters": [ { "description": "execute playbook by payload", "name": "playbook", "in": "body", "required": true, "schema": { "$ref": "#/definitions/cacao.Playbook" } } ], "responses": { "200": { "description": "{\"execution_id\":\"uuid\",\"payload\":\"playbook--uuid\"}" } } } } }, "definitions": { "api.PlaybookMeta": { "type": "object", "properties": { "description": { "type": "string" }, "id": { "type": "string" }, "labels": { "type": "array", "items": { "type": "string" } }, "name": { "type": "string" }, "valid_from": { "type": "string" }, "valid_until": { "type": "string" } } }, "cacao.AgentTarget": { "type": "object", "required": [ "name", "type" ], "properties": { "address": { "type": "object", "additionalProperties": { "type": "array", "items": { "type": "string" } } }, "agent_target_extensions": { "$ref": "#/definitions/cacao.Extensions" }, "authentication_info": { "type": "string" }, "category": { "type": "array", "items": { "type": "string" } }, "contact": { "$ref": "#/definitions/cacao.Contact" }, "description": { "type": "string" }, "id": { "type": "string" }, "location": { "$ref": "#/definitions/cacao.CivicLocation" }, "logical": { "type": "array", "items": { "type": "string" } }, "name": { "type": "string" }, "port": { "type": "string" }, "sector": { "type": "string" }, "type": { "type": "string" } } }, "cacao.AuthenticationInformation": { "type": "object", "required": [ "type" ], "properties": { "description": { "type": "string" }, "id": { "type": "string" }, "kms": { "type": "boolean" }, "kms_key_identifier": { "type": "string" }, "name": { "type": "string" }, "oauth_header": { "type": "string" }, "password": { "type": "string" }, "private_key": { "type": "string" }, "token": { "type": "string" }, "type": { "type": "string" }, "user_id": { "type": "string" }, "username": { "type": "string" } } }, "cacao.CivicLocation": { "type": "object", "properties": { "administrative_area": { "type": "string" }, "building_details": { "type": "string" }, "city": { "type": "string" }, "country": { "type": "string" }, "description": { "type": "string" }, "latitude": { "type": "string" }, "longitude": { "type": "string" }, "name": { "type": "string" }, "network_details": { "type": "string" }, "postal_code": { "type": "string" }, "precision": { "type": "string" }, "region": { "type": "string" }, "street_address": { "type": "string" } } }, "cacao.Command": { "type": "object", "required": [ "command", "type" ], "properties": { "command": { "type": "string" }, "command_b64": { "type": "string" }, "content": { "type": "string" }, "content_b64": { "type": "string" }, "description": { "type": "string" }, "headers": { "type": "object", "additionalProperties": { "type": "array", "items": { "type": "string" } } }, "playbook_activity": { "type": "string" }, "type": { "type": "string" }, "version": { "type": "string" } } }, "cacao.Contact": { "type": "object", "properties": { "contact_details": { "type": "string" }, "email": { "type": "object", "additionalProperties": { "type": "string" } }, "phone": { "type": "object", "additionalProperties": { "type": "string" } } } }, "cacao.DataMarking": { "type": "object", "required": [ "created", "created_by", "id", "type" ], "properties": { "affected_party_notifications": { "type": "string" }, "attribution": { "type": "string" }, "created": { "type": "string" }, "created_by": { "type": "string" }, "description": { "type": "string" }, "encrypt_in_transit": { "type": "string" }, "end_date": { "type": "string" }, "external_references": { "type": "array", "items": { "$ref": "#/definitions/cacao.ExternalReferences" } }, "id": { "type": "string" }, "iep_version": { "type": "string" }, "labels": { "type": "array", "items": { "type": "string" } }, "marking_extensions": { "$ref": "#/definitions/cacao.Extensions" }, "name": { "type": "string" }, "permitted_actions": { "type": "string" }, "revoked": { "type": "boolean" }, "start_date": { "type": "string" }, "statement": { "type": "string" }, "tlp": { "type": "string" }, "tlpv2_level": { "type": "string" }, "type": { "type": "string" }, "unmodified_resale": { "type": "string" }, "valid_from": { "type": "string" }, "valid_until": { "type": "string" } } }, "cacao.ExtensionDefinition": { "type": "object", "required": [ "created_by", "schema", "type", "version" ], "properties": { "created_by": { "type": "string" }, "description": { "type": "string" }, "external_references": { "type": "array", "items": { "$ref": "#/definitions/cacao.ExternalReferences" } }, "name": { "type": "string" }, "schema": { "type": "string" }, "type": { "type": "string" }, "version": { "type": "string" } } }, "cacao.Extensions": { "type": "object", "additionalProperties": true }, "cacao.ExternalReferences": { "type": "object", "required": [ "name" ], "properties": { "description": { "type": "string" }, "external_id": { "type": "string" }, "name": { "type": "string" }, "reference_id": { "type": "string" }, "source": { "type": "string" }, "url": { "type": "string" } } }, "cacao.Playbook": { "type": "object", "required": [ "created", "created_by", "id", "modified", "name", "spec_version", "type", "workflow", "workflow_start" ], "properties": { "agent_definitions": { "type": "object", "additionalProperties": { "$ref": "#/definitions/cacao.AgentTarget" } }, "authentication_info_definitions": { "type": "object", "additionalProperties": { "$ref": "#/definitions/cacao.AuthenticationInformation" } }, "created": { "type": "string" }, "created_by": { "type": "string" }, "data_marking_definitions": { "type": "object", "additionalProperties": { "$ref": "#/definitions/cacao.DataMarking" } }, "derived_from": { "type": "array", "items": { "type": "string" } }, "description": { "type": "string" }, "extension_definitions": { "type": "object", "additionalProperties": { "$ref": "#/definitions/cacao.ExtensionDefinition" } }, "external_references": { "type": "array", "items": { "$ref": "#/definitions/cacao.ExternalReferences" } }, "id": { "type": "string" }, "impact": { "type": "integer" }, "labels": { "type": "array", "items": { "type": "string" } }, "markings": { "type": "array", "items": { "type": "string" } }, "modified": { "type": "string" }, "name": { "type": "string" }, "playbook_extensions": { "$ref": "#/definitions/cacao.Extensions" }, "playbook_types": { "type": "array", "items": { "type": "string" } }, "playbook_variables": { "$ref": "#/definitions/cacao.Variables" }, "priority": { "type": "integer" }, "severity": { "type": "integer" }, "spec_version": { "type": "string" }, "target_definitions": { "type": "object", "additionalProperties": { "$ref": "#/definitions/cacao.AgentTarget" } }, "type": { "type": "string" }, "valid_from": { "type": "string" }, "valid_until": { "type": "string" }, "workflow": { "$ref": "#/definitions/cacao.Workflow" }, "workflow_exception": { "type": "string" }, "workflow_start": { "type": "string" } } }, "cacao.Step": { "type": "object", "required": [ "type" ], "properties": { "agent": { "type": "string" }, "authentication_info": { "type": "string" }, "cases": { "type": "object", "additionalProperties": { "type": "string" } }, "commands": { "type": "array", "items": { "$ref": "#/definitions/cacao.Command" } }, "condition": { "type": "string" }, "delay": { "type": "integer" }, "description": { "type": "string" }, "external_references": { "type": "array", "items": { "$ref": "#/definitions/cacao.ExternalReferences" } }, "id": { "type": "string" }, "in_args": { "type": "array", "items": { "type": "string" } }, "name": { "type": "string" }, "next_steps": { "type": "array", "items": { "type": "string" } }, "on_completion": { "type": "string" }, "on_failure": { "type": "string" }, "on_false": { "type": "string" }, "on_success": { "type": "string" }, "on_true": { "type": "string" }, "out_args": { "type": "array", "items": { "type": "string" } }, "owner": { "type": "string" }, "playbook_id": { "type": "string" }, "playbook_version": { "type": "string" }, "step_extensions": { "$ref": "#/definitions/cacao.Extensions" }, "step_variables": { "$ref": "#/definitions/cacao.Variables" }, "switch": { "type": "string" }, "targets": { "type": "array", "items": { "type": "string" } }, "timeout": { "type": "integer" }, "type": { "type": "string" } } }, "cacao.Variable": { "type": "object", "required": [ "type" ], "properties": { "constant": { "type": "boolean" }, "description": { "type": "string" }, "external": { "type": "boolean" }, "name": { "type": "string" }, "type": { "type": "string" }, "value": { "type": "string" } } }, "cacao.Variables": { "type": "object", "additionalProperties": { "$ref": "#/definitions/cacao.Variable" } }, "cacao.Workflow": { "type": "object", "additionalProperties": { "$ref": "#/definitions/cacao.Step" } } } }