{ "swagger": "2.0", "info": { "title": "Paasta API", "version": "1.0.0" }, "basePath": "/v1", "schemes": [ "http" ], "consumes": [ "application/x-www-form-urlencoded" ], "produces": [ "application/json" ], "tags": [ { "name": "service", "description": "Information about a paasta service" } ], "paths": { "/version": { "get": { "responses": { "200": { "description": "Version of paasta_tools package", "schema": { "type": "string" } } }, "summary": "Version of paasta_tools package", "operationId": "showVersion" } }, "/metastatus": { "get": { "parameters": [ { "in": "query", "description": "comma separated list of command arguments", "name": "cmd_args", "required": true, "type": "array", "collectionFormat": "csv", "items": { "type": "string" } } ], "responses": { "200": { "description": "Detailed metastatus", "schema": { "$ref": "#/definitions/MetaStatus" } }, "500": { "description": "Metastatus failure" } }, "summary": "Get metastatus", "operationId": "metastatus" } }, "/deploy_queue": { "get": { "responses": { "200": { "description": "Contents of deploy queue", "schema": { "$ref": "#/definitions/DeployQueue" } } }, "summary": "Get deploy queue contents", "operationId": "deploy_queue" } }, "/service_autoscaler/pause": { "get": { "responses": { "200": { "description": "The time until which the servcie autoscaler is paused for", "schema": { "type": "string" } }, "500": { "description": "Unable to talk to zookeeper" } }, "summary": "Get autoscaling pause time", "operationId": "get_service_autoscaler_pause" }, "post": { "responses": { "200": { "description": "Service autoscaler successfully paused" }, "500": { "description": "Unable to talk to zookeeper" } }, "operationId": "update_service_autoscaler_pause", "parameters": [ { "in": "body", "name": "json_body", "required": true, "schema": { "type": "object", "properties": { "minutes": { "type": "integer" } } } } ] }, "delete": { "responses": { "200": { "description": "Service autoscaler successfully unpaused" }, "500": { "description": "Unable to talk to zookeeper" } }, "summary": "Unpause the autoscaler", "operationId": "delete_service_autoscaler_pause" } }, "/marathon_dashboard": { "get": { "responses": { "200": { "description": "List of service instances and information on their Marathon shard", "schema": { "$ref": "#/definitions/MarathonDashboard" } } }, "summary": "Get marathon service instances and their shards", "operationId": "marathon_dashboard", "tags": [ "marathon_dashboard" ] } }, "/resources/utilization": { "get": { "responses": { "200": { "description": "Resources in the cluster, filtered and grouped by parameters", "schema": { "$ref": "#/definitions/Resource" } }, "400": { "description": "Poorly formated query parameters" } }, "summary": "Get resources in the cluster", "operationId": "resources", "tags": [ "resources" ], "parameters": [ { "in": "query", "description": "comma separated list of keys to group by", "name": "groupings", "required": false, "type": "array", "collectionFormat": "csv", "items": { "type": "string" } }, { "in": "query", "description": "List of slave filters in format 'filter=attr_name:value1,value2&filter=attr2:value3,value4'. Matches attr_name=(value1 OR value2) AND attr2=(value3 OR value4)", "name": "filter", "required": false, "type": "array", "collectionFormat": "multi", "items": { "type": "string", "pattern": "(.*):(.*,)*(.*)" } } ] } }, "/services": { "get": { "responses": { "200": { "description": "Services and their instances on the current cluster", "schema": { "type": "object", "properties": { "services": { "type": "array", "items": { "type": "array", "items": {} } } } } } }, "summary": "List service names and service instance names on the current cluster", "operationId": "list_services_for_cluster", "tags": [ "service" ] } }, "/services/{service}": { "get": { "responses": { "200": { "description": "Instances of a service", "schema": { "type": "object", "properties": { "instances": { "type": "array", "items": { "type": "string" } } } } } }, "summary": "List instances of service_name", "operationId": "list_instances", "tags": [ "service" ], "parameters": [ { "in": "path", "description": "Service name", "name": "service", "required": true, "type": "string" } ] } }, "/services/{service}/{instance}/state/{desired_state}": { "post": { "responses": { "200": { "description": "Result of instance state change" }, "404": { "description": "Deployment key not found" }, "500": { "description": "Instance failure" } }, "summary": "Change state of service_name.instance_name", "operationId": "instance_set_state", "tags": [ "service" ], "parameters": [ { "in": "path", "description": "Service name", "name": "service", "required": true, "type": "string" }, { "in": "path", "description": "Instance name", "name": "instance", "required": true, "type": "string" }, { "in": "path", "description": "Desired state", "name": "desired_state", "required": true, "type": "string" } ] } }, "/services/{service}/{instance}/status": { "get": { "responses": { "200": { "description": "Detailed status of an instance", "schema": { "$ref": "#/definitions/InstanceStatus" } }, "404": { "description": "Deployment key not found" }, "500": { "description": "Instance failure" } }, "summary": "Get status of service_name.instance_name", "operationId": "status_instance", "tags": [ "service" ], "parameters": [ { "in": "path", "description": "Service name", "name": "service", "required": true, "type": "string" }, { "in": "path", "description": "Instance name", "name": "instance", "required": true, "type": "string" }, { "in": "query", "description": "Include verbose status information", "name": "verbose", "required": false, "type": "integer", "format": "int32" }, { "in": "query", "description": "Include Smartstack information", "name": "include_smartstack", "required": false, "type": "boolean" }, { "in": "query", "description": "Include Envoy information", "name": "include_envoy", "required": false, "type": "boolean" }, { "in": "query", "description": "Include Mesos information", "name": "include_mesos", "required": false, "type": "boolean" } ] } }, "/services/{service}/{instance}/delay": { "get": { "responses": { "200": { "description": "The service is delayed for these possible reasons", "schema": { "$ref": "#/definitions/InstanceDelay" } }, "204": { "description": "Could not find any reasons for a delay" }, "404": { "description": "Deployment key not found" }, "500": { "description": "Instance failure" } }, "summary": "Get the possible reasons for a deployment delay for a marathon service.instance", "operationId": "delay_instance", "tags": [ "service" ], "parameters": [ { "in": "path", "description": "Service name", "name": "service", "required": true, "type": "string" }, { "in": "path", "description": "Instance name", "name": "instance", "required": true, "type": "string" } ] } }, "/services/{service}/{instance}/tasks": { "get": { "responses": { "200": { "description": "List of tasks associated with an instance", "schema": { "$ref": "#/definitions/InstanceTasks" } }, "400": { "description": "Bad request" }, "404": { "description": "Deployment key not found" }, "500": { "description": "Instance failure" } }, "summary": "Get mesos tasks of service_name.instance_name", "operationId": "tasks_instance", "tags": [ "service" ], "parameters": [ { "in": "path", "description": "Service name", "name": "service", "required": true, "type": "string" }, { "in": "path", "description": "Instance name", "name": "instance", "required": true, "type": "string" }, { "in": "query", "description": "slave hostname to filter tasks by", "name": "slave_hostname", "required": false, "type": "string" }, { "in": "query", "description": "Return slave and executor for task", "name": "verbose", "required": false, "type": "boolean" } ] } }, "/services/{service}/{instance}/tasks/{task_id}": { "get": { "responses": { "200": { "description": "Task associated with an instance with specified ID", "schema": { "$ref": "#/definitions/InstanceTask" } }, "400": { "description": "Bad request" }, "404": { "description": "Task with ID not found" }, "500": { "description": "Instance failure" } }, "summary": "Get mesos task of service_name.instance_name by task_id", "operationId": "task_instance", "tags": [ "service" ], "parameters": [ { "in": "path", "description": "Service name", "name": "service", "required": true, "type": "string" }, { "in": "path", "description": "Instance name", "name": "instance", "required": true, "type": "string" }, { "in": "path", "description": "mesos task id", "name": "task_id", "required": true, "type": "string" }, { "in": "query", "description": "Return slave and executor for task", "name": "verbose", "required": false, "type": "boolean" } ] } }, "/services/{service}/{instance}/autoscaler": { "get": { "responses": { "200": { "description": "Get desired instance count for a service instance", "schema": { "$ref": "#/definitions/AutoscalerCountMsg" } }, "404": { "description": "Deployment key not found" }, "500": { "description": "Instance failure" } }, "summary": "Get status of service_name.instance_name", "operationId": "get_autoscaler_count", "tags": [ "autoscaler" ], "parameters": [ { "in": "path", "description": "Service name", "name": "service", "required": true, "type": "string" }, { "in": "path", "description": "Instance name", "name": "instance", "required": true, "type": "string" } ] }, "post": { "responses": { "202": { "description": "Set desired instance count for a service instance", "schema": { "$ref": "#/definitions/AutoscalerCountMsg" } }, "404": { "description": "Deployment key not found" }, "500": { "description": "Instance failure" } }, "summary": "Get status of service_name.instance_name", "operationId": "update_autoscaler_count", "tags": [ "autoscaler" ], "parameters": [ { "in": "path", "description": "Service name", "name": "service", "required": true, "type": "string" }, { "in": "path", "description": "Instance name", "name": "instance", "required": true, "type": "string" }, { "in": "body", "name": "json_body", "required": true, "schema": { "$ref": "#/definitions/AutoscalerCountMsg" } } ] } } }, "definitions": { "AutoscalerCountMsg": { "description": "Specification for autoscaler count endpoints.", "type": "object", "properties": { "calculated_instances": { "type": "integer" }, "desired_instances": { "type": "integer" }, "status": { "type": "string" } } }, "InstanceStatus": { "type": "object", "properties": { "service": { "type": "string", "description": "Service name" }, "instance": { "type": "string", "description": "Instance name" }, "git_sha": { "type": "string", "description": "Git sha of a service" }, "marathon": { "$ref": "#/definitions/InstanceStatusMarathon", "description": "Marathon instance status" }, "kubernetes": { "$ref": "#/definitions/InstanceStatusKubernetes", "description": "Kubernetes instance status" }, "tron": { "$ref": "#/definitions/InstanceStatusTron", "description": "Tron instance status" }, "adhoc": { "$ref": "#/definitions/InstanceStatusAdhoc", "description": "Adhoc instance status" }, "flink": { "type": "object", "properties": { "status": { "$ref": "#/definitions/InstanceStatusFlinkStatus" }, "metadata": { "$ref": "#/definitions/InstanceStatusFlinkMetadata" } }, "description": "Nullable Flink instance status and metadata" }, "kafkacluster": { "type": "object", "properties": { "status": { "$ref": "#/definitions/InstanceStatusKafkaCluster" }, "metadata": { "$ref": "#/definitions/InstanceMetadataKafkaCluster" } }, "description": "Nullable KafkaCluster instance status and metadata" } } }, "InstanceDelay": { "type": "object" }, "InstanceStatusMarathon": { "type": "object", "properties": { "desired_state": { "type": "string", "description": "Desired state of a service, for Marathon", "enum": [ "start", "stop" ] }, "app_count": { "type": "integer", "format": "int32", "description": "The number of different running versions of the same service (0 for stopped, 1 for running and 1+ for bouncing)" }, "desired_app_id": { "type": "string", "description": "ID of the desired version of a service instance" }, "bounce_method": { "type": "string", "description": "Method to transit between new and old versions of a service", "enum": [ "brutal", "upthendown", "downthenup", "crossover" ] }, "deploy_status": { "type": "string", "description": "Deploy status of a marathon service", "enum": [ "Running", "Deploying", "Stopped", "Delayed", "Waiting", "Waiting for bounce", "NotRunning" ] }, "backoff_seconds": { "type": "integer", "format": "int32", "description": "backoff in seconds before launching the next task" }, "running_instance_count": { "type": "integer", "format": "int32", "description": "The number of actual running instances of the service" }, "expected_instance_count": { "type": "integer", "format": "int32", "description": "The number of desired instances of the service" }, "autoscaling_info": { "$ref": "#/definitions/MarathonAutoscalingInfo", "description": "Autoscaling information for the service" }, "app_statuses": { "type": "array", "description": "Statuses of each app of the service", "items": { "$ref": "#/definitions/MarathonAppStatus" } }, "mesos": { "$ref": "#/definitions/MarathonMesosStatus", "description": "Status of the service in Mesos" }, "smartstack": { "$ref": "#/definitions/SmartstackStatus", "description": "Status of the service in smartstack" }, "envoy": { "$ref": "#/definitions/EnvoyStatus", "description": "Status of the service in Envoy" }, "error_message": { "type": "string", "description": "Error message when a marathon job ID cannot be found" } }, "required": [ "desired_state", "app_count", "bounce_method" ] }, "MarathonMesosStatus": { "type": "object", "properties": { "running_task_count": { "type": "integer", "format": "int32", "description": "The number of running Mesos tasks associated to this service" }, "running_tasks": { "type": "array", "description": "Currently running tasks associated to this service", "items": { "$ref": "#/definitions/MarathonMesosRunningTask" } }, "non_running_tasks": { "type": "array", "description": "Non-running tasks associated to this service", "items": { "$ref": "#/definitions/MarathonMesosNonrunningTask" } }, "error_message": { "type": "string", "description": "Error message when Mesos tasks cannot be queried" } } }, "MarathonMesosRunningTask": { "type": "object", "properties": { "id": { "type": "string", "description": "The ID of the task in Mesos" }, "hostname": { "type": "string", "description": "Name of the Mesos agent on which this task is running" }, "mem_limit": { "$ref": "#/definitions/IntegerAndError", "description": "The maximum amount of memory the task is allowed to use" }, "rss": { "$ref": "#/definitions/IntegerAndError", "description": "The tasks's resident set size" }, "cpu_shares": { "$ref": "#/definitions/FloatAndError", "description": "The portion of a CPU that the task can use" }, "cpu_used_seconds": { "$ref": "#/definitions/FloatAndError", "description": "The number of seconds of CPU time the task has used" }, "duration_seconds": { "type": "integer", "format": "int32", "description": "The duration over which the task has been running in seconds" }, "deployed_timestamp": { "type": "number", "format": "float", "description": "The unix timestamp at which the task was deployed" }, "tail_lines": { "$ref": "#/definitions/TaskTailLines", "description": "Stdout and stderr tail of the task" } } }, "MarathonMesosNonrunningTask": { "type": "object", "properties": { "id": { "type": "string", "description": "The ID of the task in Mesos" }, "hostname": { "type": "string", "description": "Name of the Mesos agent on which this task is running" }, "deployed_timestamp": { "type": "number", "format": "float", "description": "The unix timestamp at which the task was deployed" }, "state": { "type": "string", "description": "The current state of the task" }, "tail_lines": { "$ref": "#/definitions/TaskTailLines", "description": "Stdout and stderr tail of the task" } } }, "TaskTailLines": { "type": "object", "properties": { "stdout": { "type": "array", "description": "The requested number of lines from the task's stdout", "items": { "type": "string" } }, "stderr": { "type": "array", "description": "The requested number of lines from the task's stderr", "items": { "type": "string" } }, "error_message": { "type": "string", "description": "Error message when fetching tail lines fails" } } }, "MarathonAutoscalingInfo": { "type": "object", "properties": { "current_instances": { "type": "integer", "format": "int32", "description": "The number of instances of the service currently running" }, "max_instances": { "type": "integer", "format": "int32", "description": "The maximum number of instances that the autoscaler will scale to" }, "min_instances": { "type": "integer", "format": "int32", "description": "The minimum number of instances that the autoscaler will scale to" }, "current_utilization": { "type": "number", "format": "float", "description": "The current utilization of the instances' allocated resources" }, "target_instances": { "type": "integer", "format": "int32", "description": "The autoscaler's current target number of instances of this service to run" } } }, "MarathonAppStatus": { "type": "object", "properties": { "tasks_running": { "type": "integer", "format": "int32", "description": "Number running tasks for this app" }, "tasks_healthy": { "type": "integer", "format": "int32", "description": "Number of healthy tasks for this app" }, "tasks_staged": { "type": "integer", "format": "int32", "description": "Number of staged tasks for this app" }, "tasks_total": { "type": "integer", "format": "int32", "description": "Total number of tasks for this app" }, "create_timestamp": { "type": "number", "format": "float", "description": "Unix timestamp when this app was created" }, "deploy_status": { "type": "string", "description": "Deploy status of this app" }, "dashboard_url": { "type": "string", "description": "Marathon dashboard URL for this app" }, "backoff_seconds": { "type": "integer", "format": "int32", "description": "Backoff in seconds before launching next task" }, "unused_offer_reason_counts": { "type": "object", "description": "Mapping of reason offer was refused to the number of times that type of refusal was seen" }, "tasks": { "type": "array", "description": "Tasks associated to this app", "items": { "$ref": "#/definitions/MarathonTask" } } } }, "MarathonTask": { "type": "object", "properties": { "id": { "type": "string", "description": "ID of the task in Mesos" }, "host": { "type": "string", "description": "Name of the host on which the task is running" }, "port": { "type": "integer", "format": "int32", "description": "Port on which the task is listening" }, "deployed_timestamp": { "type": "number", "format": "float", "description": "Time at which the task was deployed" }, "is_healthy": { "type": "boolean", "description": "Whether Marathon thinks the task is healthy" } } }, "SmartstackStatus": { "type": "object", "properties": { "registration": { "type": "string", "description": "Registration name of the service in Smartstack" }, "expected_backends_per_location": { "type": "integer", "format": "int32", "description": "Number of backends expected to be present in each location" }, "locations": { "type": "array", "description": "Locations the service is deployed", "items": { "$ref": "#/definitions/SmartstackLocation" } } } }, "SmartstackLocation": { "type": "object", "properties": { "name": { "type": "string", "description": "Name of the location" }, "running_backends_count": { "type": "integer", "format": "int32", "description": "Number of running backends for the service in this location" }, "backends": { "type": "array", "description": "Smartstack backends running in this location", "items": { "$ref": "#/definitions/SmartstackBackend" } } } }, "SmartstackBackend": { "type": "object", "properties": { "hostname": { "type": "string", "description": "Name of the host on which the backend is running" }, "port": { "type": "integer", "format": "int32", "description": "Port number on which the backend responds" }, "status": { "type": "string", "description": "Status of the backend in HAProxy" }, "check_status": { "type": "string", "description": "Status of last health check of the backend" }, "check_code": { "type": "string", "description": "Check code reported by HAProxy" }, "check_duration": { "type": "integer", "format": "int32", "description": "Duration in ms of the last health check performed by HAProxy" }, "last_change": { "type": "integer", "format": "int32", "description": "Seconds since last change in backend status" }, "has_associated_task": { "type": "boolean", "description": "Whether this backend has an associated task running" } } }, "EnvoyStatus": { "type": "object", "properties": { "registration": { "type": "string", "description": "Registration name of the service in Smartstack" }, "expected_backends_per_location": { "type": "integer", "format": "int32", "description": "Number of backends expected to be present in each location" }, "locations": { "type": "array", "description": "Locations the service is deployed", "items": { "$ref": "#/definitions/EnvoyLocation" } } } }, "EnvoyLocation": { "type": "object", "properties": { "name": { "type": "string", "description": "Name of the location" }, "running_backends_count": { "type": "integer", "format": "int32", "description": "Number of running backends for the service in this location" }, "backends": { "type": "array", "description": "Envoy backends running in this location", "items": { "$ref": "#/definitions/EnvoyBackend" } }, "is_proxied_through_casper": { "type": "boolean", "description": "Whether this backend is proxied through Casper" } } }, "EnvoyBackend": { "type": "object", "properties": { "address": { "type": "string", "description": "Address of the host on which the backend is running" }, "port_value": { "type": "integer", "format": "int32", "description": "Port number on which the backend responds" }, "hostname": { "type": "string", "description": "Name of the host on which the backend is running" }, "eds_health_status": { "type": "string", "description": "Status of the backend in Envoy as reported by the EDS" }, "weight": { "type": "integer", "format": "int32", "description": "The weight of this backend in the cluster" }, "has_associated_task": { "type": "boolean", "description": "Whether this backend has an associated task running" } } }, "InstanceStatusKubernetes": { "type": "object", "properties": { "desired_state": { "type": "string", "description": "Desired state of a service, for Kubernetes", "enum": [ "start", "stop" ] }, "app_count": { "type": "integer", "format": "int32", "description": "The number of different running versions of the same service (0 for stopped, 1 for running and 1+ for bouncing)" }, "app_id": { "type": "string", "description": "ID of the desired version of a service instance" }, "bounce_method": { "type": "string", "description": "Method to transit between new and old versions of a service", "enum": [ "brutal", "upthendown", "downthenup", "crossover" ] }, "deploy_status": { "type": "string", "description": "Deploy status of a Kubernetes service", "enum": [ "Running", "Deploying", "Stopped", "Delayed", "Waiting", "NotRunning" ] }, "deploy_status_message": { "type": "string", "description": "Reason for the deploy status" }, "backoff_seconds": { "type": "integer", "format": "int32", "description": "backoff in seconds before launching the next task" }, "running_instance_count": { "type": "integer", "format": "int32", "description": "The number of actual running instances of the service" }, "expected_instance_count": { "type": "integer", "format": "int32", "description": "The number of desired instances of the service" }, "create_timestamp": { "type": "number", "format": "float", "description": "Unix timestamp when this app was created" }, "smartstack": { "$ref": "#/definitions/SmartstackStatus", "description": "Status of the service in smartstack" }, "envoy": { "$ref": "#/definitions/EnvoyStatus", "description": "Status of the service in Envoy" }, "namespace": { "type": "string", "description": "The namespace this app is running" }, "replicasets": { "type": "array", "description": "ReplicaSets associated to this app", "items": { "$ref": "#/definitions/KubernetesReplicaSet" } }, "pods": { "type": "array", "description": "Pods associated to this app", "items": { "$ref": "#/definitions/KubernetesPod" } }, "autoscaling_status": { "type": "object", "description": "HPA associated to this app", "properties": { "min_instances": { "type": "integer", "description": "min_instances as specified in yelpsoa_configs" }, "max_instances": { "type": "integer", "description": "min_instances as specified in yelpsoa_configs" }, "desired_replicas": { "type": "integer", "description": "desired number of _instances as calculated by HPA" }, "last_scale_time": { "type": "string", "description": "timestamp of last autoscale" }, "metrics": { "type": "array", "description": "Current metrics", "items": { "$ref": "#/definitions/HPAMetric" } } } }, "error_message": { "type": "string", "description": "Error message when a kubernetes object (Deployment/Statefulset) cannot be found" } }, "required": [ "desired_state", "app_count", "bounce_method" ] }, "HPAMetric": { "type": "object", "properties": { "name": { "type": "string", "description": "name of the metric" }, "target_value": { "type": "string", "description": "setpoint/target_value as specified in yelpsoa_configs" }, "current_value": { "type": "string", "description": "setpoint/target_value as specified in yelpsoa_configs" } } }, "KubernetesReplicaSet": { "type": "object", "properties": { "name": { "type": "string", "description": "name of the replicaset in Kubernetes" }, "ready_replicas": { "type": "integer", "format": "int32", "description": "number of ready replicas for the replicaset" }, "replicas": { "type": "integer", "format": "int32", "description": "number of desired replicas for the replicaset" }, "create_timestamp": { "type": "number", "format": "float", "description": "Time at which the replicaset was created" } } }, "KubernetesPod": { "type": "object", "properties": { "name": { "type": "string", "description": "name of the pod in Kubernetes" }, "host": { "type": "string", "description": "name of the pod's host" }, "deployed_timestamp": { "type": "number", "format": "float", "description": "Time at which the pod was deployed" }, "phase": { "type": "string", "description": "The status of the pod" }, "ready": { "type": "boolean", "description": "Whether or not the pod is ready (i.e. all containers up)" }, "containers": { "type": "array", "items": { "$ref": "#/definitions/KubernetesContainer", "description": "List of containers in the pod" } }, "reason": { "type": "string", "x-nullable": true, "description": "short message explaining the pod's state" }, "message": { "type": "string", "x-nullable": true, "description": "long message explaining the pod's state" } } }, "KubernetesContainer": { "type": "object", "properties": { "name": { "type": "string", "description": "Name of the container" }, "tail_lines": { "$ref": "#/definitions/TaskTailLines", "description": "Stdout and stderr tail of the container" } } }, "InstanceStatusTron": { "type": "object", "required": [ "job_name", "job_url" ], "properties": { "job_name": { "type": "string", "description": "The name of this job" }, "job_status": { "type": "string", "description": "The status of the job" }, "job_schedule": { "type": "string", "description": "The job schedule of the job" }, "job_url": { "type": "string", "description": "The dashboard url of the job" }, "action_name": { "type": "string", "description": "The name of the action" }, "action_state": { "type": "string", "description": "The state of the action" }, "action_raw_command": { "type": "string", "description": "The raw command of the action" }, "action_command": { "type": "string", "description": "The command of the action" }, "action_start_time": { "type": "string", "description": "The start time of the action" }, "action_stderr": { "type": "string", "description": "The stderr command of the action" }, "action_stdout": { "type": "string", "description": "The stdout command of the action" } } }, "InstanceStatusFlinkStatus": { "type": "object", "description": "Flink instance status" }, "InstanceStatusFlinkMetadata": { "type": "object", "description": "Flink instance metadata" }, "InstanceStatusKafkaCluster": { "type": "object", "description": "Kafka instance status" }, "InstanceMetadataKafkaCluster": { "type": "object", "description": "Kafka instance metadata" }, "InstanceSpecKafkaCluster": { "type": "object", "description": "Kafka instance spec" }, "InstanceTasks": { "type": "array", "description": "List of tasks associated with instance", "items": { "$ref": "#/definitions/InstanceTask" } }, "InstanceTask": { "type": "object" }, "InstanceStatusAdhoc": { "type": "array", "description": "List of runs associated with job", "items": { "$ref": "#/definitions/AdhocLaunchHistory" } }, "AdhocLaunchHistory": { "type": "object", "description": "A single run", "properties": { "launch_time": { "type": "string", "description": "when the job was launched" }, "run_id": { "type": "string", "description": "id of the single run" }, "framework_id": { "type": "string", "description": "framework id" } } }, "MarathonDashboard": { "type": "object", "description": "A list of Marathon service, instance, and shard url for one or more clusters", "additionalProperties": { "$ref": "#/definitions/MarathonDashboardCluster" } }, "MarathonDashboardCluster": { "type": "array", "description": "List of all the MarathonDashboardItems for a cluster", "items": { "$ref": "#/definitions/MarathonDashboardItem" } }, "MarathonDashboardItem": { "type": "object", "description": "Marathon service, instance, and shard url", "properties": { "service": { "type": "string", "description": "Service name" }, "instance": { "type": "string", "description": "Instance name" }, "shard_url": { "type": "string", "description": "Marathon Shard URL" } } }, "MetaStatus": { "type": "object", "description": "Result of `paasta metastatus` command", "properties": { "output": { "type": "string", "description": "Output from `paasta metastatus` command" }, "exit_code": { "type": "integer", "description": "Exit code from `paasta metastatus` command" } } }, "DeployQueue": { "type": "object", "description": "Current state of the deployd queue", "properties": { "available_service_instances": { "type": "array", "description": "Service instances that are ready to be acted on by deployd", "items": { "$ref": "#/definitions/DeployQueueServiceInstance" } }, "unavailable_service_instances": { "type": "array", "description": "Service instances that deployd is waiting to act on", "items": { "$ref": "#/definitions/DeployQueueServiceInstance" } } } }, "DeployQueueServiceInstance": { "type": "object", "description": "An instance of a service in the deploy queue", "properties": { "service": { "type": "string", "description": "Name of the service" }, "instance": { "type": "string", "description": "Name of the instance of the service" }, "bounce_by": { "type": "number", "format": "float", "description": "Desired timestamp by which the service instance should be bounced" }, "wait_until": { "type": "number", "format": "float", "description": "Timestamp before which no action should be taken on this service instance" }, "enqueue_time": { "type": "number", "format": "float", "description": "Timestamp at which the service instance was last added to the queue" }, "bounce_start_time": { "type": "number", "format": "float", "description": "Timestamp at which service instance was first added to the queue" }, "watcher": { "type": "string", "description": "The process that enqueued the task" }, "failures": { "type": "integer", "format": "int32", "description": "Number of times deployment actions have failed on this service instance" }, "processed_count": { "type": "integer", "format": "int32", "description": "Number of times any deployment action has been taken on this service instance" } } }, "Resource": { "type": "array", "items": { "$ref": "#/definitions/ResourceItem" } }, "ResourceItem": { "type": "object", "properties": { "groupings": { "type": "object" }, "cpus": { "$ref": "#/definitions/ResourceValue" }, "mem": { "$ref": "#/definitions/ResourceValue" }, "disk": { "$ref": "#/definitions/ResourceValue" } } }, "ResourceValue": { "type": "object", "properties": { "free": { "type": "number" }, "used": { "type": "number" }, "total": { "type": "number" } } }, "FloatAndError": { "type": "object", "properties": { "value": { "type": "number", "format": "float" }, "error_message": { "type": "string" } } }, "IntegerAndError": { "type": "object", "properties": { "value": { "type": "integer", "format": "int32" }, "error_message": { "type": "string" } } } } }