{ "swagger": "2.0", "info": { "title": "Paasta API", "version": "1.3.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" } }, "/deploy_queue": { "get": { "responses": { "200": { "description": "Contents of deploy queue", "schema": { "$ref": "#/definitions/DeployQueue" } } }, "summary": "Get deploy queue contents", "operationId": "deploy_queue" } }, "/flink/{service}/{instance}/config": { "get": { "operationId": "get_flink_cluster_config", "parameters": [ { "description": "Service name", "in": "path", "name": "service", "required": true, "type": "string" }, { "description": "Instance name", "in": "path", "name": "instance", "required": true, "type": "string" } ], "responses": { "200": { "description": "Get config of a flink cluster", "schema": { "$ref": "#/definitions/FlinkConfig" } }, "404": { "description": "Flink cluster not found" }, "500": { "description": "Instance failure" }, "599": { "description": "Temporary issue fetching instance" } }, "summary": "Get config of a flink cluster", "tags": [ "service" ] } }, "/flink/{service}/{instance}/jobs": { "get": { "operationId": "list_flink_cluster_jobs", "parameters": [ { "description": "Service name", "in": "path", "name": "service", "required": true, "type": "string" }, { "description": "Instance name", "in": "path", "name": "instance", "required": true, "type": "string" } ], "responses": { "200": { "description": "Get list of flink jobs in a flink cluster", "schema": { "$ref": "#/definitions/FlinkJobs" } }, "400": { "description": "Flink cluster not found" }, "500": { "description": "Instance failure" }, "599": { "description": "Temporary issue fetching instance" } }, "summary": "Get list of flink jobs in a flink cluster", "tags": [ "service" ] } }, "/flink/{service}/{instance}/jobs/{job_id}": { "get": { "operationId": "get_flink_cluster_job_details", "parameters": [ { "description": "Service name", "in": "path", "name": "service", "required": true, "type": "string" }, { "description": "Instance name", "in": "path", "name": "instance", "required": true, "type": "string" }, { "description": "Job id", "in": "path", "name": "job_id", "required": true, "type": "string" } ], "responses": { "200": { "description": "Get details of a flink job in a flink cluster", "schema": { "$ref": "#/definitions/FlinkJobDetails" } }, "400": { "description": "Flink cluster not found" }, "500": { "description": "Instance failure" }, "599": { "description": "Temporary issue fetching instance" } }, "summary": "Get details of a flink job in a flink cluster", "tags": [ "service" ] } }, "/flink/{service}/{instance}/jobs/{job_id}/checkpoints": { "get": { "operationId": "get_flink_cluster_job_checkpoints", "parameters": [ { "description": "Service name", "in": "path", "name": "service", "required": true, "type": "string" }, { "description": "Instance name", "in": "path", "name": "instance", "required": true, "type": "string" }, { "description": "Job id", "in": "path", "name": "job_id", "required": true, "type": "string" } ], "responses": { "200": { "description": "Get checkpoint status of a flink job", "schema": { "$ref": "#/definitions/FlinkCheckpointStatus" } }, "400": { "description": "Flink cluster not found" }, "500": { "description": "Instance failure" }, "599": { "description": "Temporary issue fetching instance" } }, "summary": "Get checkpoint status of a flink job", "tags": [ "service" ] } }, "/flink/{service}/{instance}/overview": { "get": { "operationId": "get_flink_cluster_overview", "parameters": [ { "description": "Service name", "in": "path", "name": "service", "required": true, "type": "string" }, { "description": "Instance name", "in": "path", "name": "instance", "required": true, "type": "string" } ], "responses": { "200": { "description": "Get overview of a flink cluster", "schema": { "$ref": "#/definitions/FlinkClusterOverview" } }, "404": { "description": "Flink cluster not found" }, "500": { "description": "Instance failure" }, "599": { "description": "Temporary issue fetching instance" } }, "summary": "Get overview of a flink cluster", "tags": [ "service" ] } }, "/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" } }, "/service_autoscaler/{service}/{instance}/autoscaling_override": { "post": { "operationId": "set_autoscaling_override", "parameters": [ { "description": "Service name", "in": "path", "name": "service", "required": true, "type": "string" }, { "description": "Instance name", "in": "path", "name": "instance", "required": true, "type": "string" }, { "in": "body", "name": "json_body", "required": true, "schema": { "$ref": "#/definitions/AutoscalingOverride" } } ], "responses": { "202": { "description": "Successfully set autoscaling override", "schema": { "type": "object", "properties": { "service": { "type": "string", "description": "Service name" }, "instance": { "type": "string", "description": "Instance name" }, "min_instances": { "type": "integer", "x-nullable": true, "description": "Minimum number of instances to run" }, "max_instances": { "type": "integer", "x-nullable": true, "description": "Maximum number of instances to run" }, "expire_after": { "type": "number", "format": "float", "description": "Unix timestamp after which the override is no longer valid" }, "status": { "type": "string", "description": "Status of the operation" } } } }, "400": { "description": "Invalid request parameters" }, "501": { "description": "Autoscaling not supported for this instance type" }, "500": { "description": "Failed to set autoscaling override" } }, "summary": "Set a temporary autoscaling override for a service instance", "tags": [ "autoscaler" ] } }, "/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}/deployments/{deploy_group}": { "get": { "responses": { "200": { "description": "Deployment information for the service and deploy_group", "schema": { "$ref": "#/definitions/DeploymentInfo" } }, "404": { "description": "Service not deployed to deploy_group or deployments.json not found" }, "500": { "description": "Internal error - likely missing values in deployment configuration" } }, "summary": "Get deployment information for service and deploy_group", "operationId": "get_deployment_info", "tags": [ "service" ], "parameters": [ { "in": "path", "description": "Service name", "name": "service", "required": true, "type": "string" }, { "in": "path", "description": "Deploy group name", "name": "deploy_group", "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}/bounce_status": { "get": { "responses": { "200": { "description": "Bounce status of an instance", "schema": { "$ref": "#/definitions/InstanceBounceStatus" } }, "204": { "description": "Instance is not bounceable and therefore has no bounce status" }, "404": { "description": "Deployment key not found" }, "500": { "description": "Instance failure" } }, "summary": "Get bounce status of service_name.instance_name", "operationId": "bounce_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" } ] } }, "/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" }, { "in": "query", "description": "Use new version of paasta status for services", "name": "new", "required": false, "type": "boolean" }, { "in": "query", "description": "Search all namespaces for running copies", "name": "all_namespaces", "required": false, "type": "boolean" } ] } }, "/services/{service}/{instance}/mesh_status": { "get": { "responses": { "200": { "description": "Mesh status of an instance", "schema": { "$ref": "#/definitions/InstanceMeshStatus" } }, "404": { "description": "Deployment key not found" }, "405": { "description": "Instance type not supported" }, "500": { "description": "Instance failure" } }, "summary": "Get mesh status for service_name.instance_name", "operationId": "mesh_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 Smartstack information", "name": "include_smartstack", "required": false, "type": "boolean", "default": true }, { "in": "query", "description": "Include Envoy information", "name": "include_envoy", "required": false, "type": "boolean", "default": true } ] } }, "/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" } } ] } }, "/remote_run/{service}/{instance}/start": { "post": { "responses": { "200": { "description": "Successfully started remote-run sandbox", "schema": { "$ref": "#/definitions/RemoteRunOutcome" } }, "403": { "description": "Unauthorized to remote-run this service", "schema": { "type": "object", "properties": { "reason": { "type": "string" } } } }, "404": { "description": "Deployment key not found" }, "500": { "description": "Failure" } }, "summary": "Launch a remote-run pod", "operationId": "remote_run_start", "tags": [ "remote_run" ], "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", "description": "Job bootstrap settings", "name": "json_body", "required": true, "schema": { "$ref": "#/definitions/RemoteRunStart" } } ] } }, "/remote_run/{service}/{instance}/stop": { "post": { "responses": { "200": { "description": "Remote run pod stopped", "schema": { "$ref": "#/definitions/RemoteRunOutcome" } }, "403": { "description": "Unauthorized to remote-run this service", "schema": { "type": "object", "properties": { "reason": { "type": "string" } } } }, "404": { "description": "Service instance not found" }, "500": { "description": "Failure" } }, "summary": "Stop a remote run", "operationId": "remote_run_stop", "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": "body", "description": "Details about the job to be stopped", "name": "json_body", "required": true, "schema": { "$ref": "#/definitions/RemoteRunStop" } } ] } }, "/remote_run/{service}/{instance}/poll": { "get": { "responses": { "200": { "description": "Pod status information", "schema": { "$ref": "#/definitions/RemoteRunOutcome" } }, "403": { "description": "Unauthorized to remote-run this service" }, "404": { "description": "Service instance not found" }, "409": { "description": "A pod was found but is currently being terminated" }, "500": { "description": "Failure" } }, "summary": "Check if remote run pod is ready", "operationId": "remote_run_poll", "tags": [ "remote_run" ], "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": "Kubernetes job name (returned from the /start endpoint)", "name": "job_name", "required": true, "type": "string" }, { "in": "query", "description": "User requesting the job", "name": "user", "required": true, "type": "string" }, { "in": "query", "description": "Whether this is a toolbox job", "name": "toolbox", "type": "boolean" } ] } }, "/remote_run/{service}/{instance}/token": { "get": { "responses": { "200": { "description": "Token generated successfully", "schema": { "$ref": "#/definitions/RemoteRunToken" } }, "403": { "description": "Unauthorized to remote-run this service" }, "404": { "description": "Service instance not found" }, "500": { "description": "Failure" } }, "summary": "Get a remote run token", "operationId": "remote_run_token", "tags": [ "remote_run" ], "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": "User requesting the token", "name": "user", "required": true, "type": "string" } ] } }, "/services/{service}/{instance}/replicas/{replica_name}/restart": { "post": { "responses": { "200": { "description": "Replica restart initiated successfully", "schema": { "$ref": "#/definitions/InstanceReplicaRestartOutcome" } }, "404": { "description": "Replica not found or service/instance not found" }, "500": { "description": "Replica restart failed or instance type not supported" } }, "summary": "Restart a specific replica for service_name.instance_name", "operationId": "instance_replica_restart", "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": "Replica name to restart", "name": "replica_name", "required": true, "type": "string" }, { "in": "query", "description": "Force immediate deletion (grace_period_seconds=0) instead of graceful termination", "name": "force", "required": false, "type": "boolean", "default": false } ] } } }, "definitions": { "AutoscalerCountMsg": { "description": "Specification for autoscaler count endpoints.", "type": "object", "properties": { "calculated_instances": { "type": "integer" }, "desired_instances": { "type": "integer" }, "status": { "type": "string" } } }, "DeploymentInfo": { "description": "Deployment information for a service in a deploy group", "type": "object", "properties": { "docker_image": { "type": "string", "description": "Docker image name and tag (without registry)" }, "git_sha": { "type": "string", "description": "Git SHA of the deployment" }, "image_version": { "type": "string", "x-nullable": true, "description": "Additional image version identifier (optional)" }, "image_url": { "type": "string", "description": "Full container registry URL with image name and tag" } }, "required": [ "docker_image", "git_sha", "image_url" ] }, "InstanceMeshStatus": { "type": "object", "properties": { "service": { "type": "string", "description": "Service name" }, "instance": { "type": "string", "description": "Instance name" }, "smartstack": { "$ref": "#/definitions/SmartstackStatus", "description": "Status of the service in smartstack" }, "envoy": { "$ref": "#/definitions/EnvoyStatus", "description": "Status of the service in Envoy" } } }, "InstanceReplicaRestartOutcome": { "type": "object", "properties": { "message": { "type": "string" }, "service": { "type": "string" }, "instance": { "type": "string" }, "replica_name": { "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" }, "kubernetes": { "$ref": "#/definitions/InstanceStatusKubernetes", "description": "Kubernetes instance status" }, "kubernetes_v2": { "$ref": "#/definitions/InstanceStatusKubernetesV2", "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" }, "flinkeks": { "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" }, "cassandracluster": { "type": "object", "properties": { "status": { "$ref": "#/definitions/InstanceStatusCassandraCluster" } }, "description": "Nullable CassandraCluster instance status" }, "cassandraclustereks": { "type": "object", "properties": { "status": { "$ref": "#/definitions/InstanceStatusCassandraCluster" } }, "description": "Nullable CassandraCluster instance status" } } }, "InstanceDelay": { "type": "object" }, "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" } } }, "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" } } }, "InstanceBounceStatus": { "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)" }, "deploy_status": { "type": "string", "description": "Deploy status of a Kubernetes service", "enum": [ "Running", "Deploying", "Stopped", "Delayed", "Waiting", "NotRunning" ] }, "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" }, "active_shas": { "type": "array", "description": "List of git/config SHAs running.", "items": { "type": "array", "items": { "type": "string", "x-nullable": true } } }, "active_versions": { "type": "array", "description": "List of git SHA/image_version/config SHAs running.", "items": { "type": "array", "items": { "type": "string", "x-nullable": true } } } } }, "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" }, "active_shas": { "type": "array", "description": "List of git/config SHAs running.", "items": { "type": "array", "items": { "type": "string", "x-nullable": true }, "minItems": 2, "maxItems": 2 } }, "active_versions": { "type": "array", "description": "List of git SHA/image_version/config SHAs running.", "items": { "type": "array", "items": { "type": "string", "x-nullable": true }, "minItems": 3, "maxItems": 3 } } }, "required": [ "desired_state", "app_count", "bounce_method" ] }, "InstanceStatusKubernetesV2": { "type": "object", "properties": { "app_name": { "type": "string", "description": "Name of Kubernetes Deployment or Statefulset for instance" }, "desired_state": { "type": "string", "description": "Desired state of the app (start or stop)" }, "desired_instances": { "type": "integer", "format": "int32", "description": "Number of instances desired for this app" }, "error_message": { "type": "string", "description": "Error message if we cannot assemble status for the instance" }, "versions": { "type": "array", "items": { "$ref": "#/definitions/KubernetesVersion" }, "description": "Individual versions of the instance" } } }, "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" } } }, "AutoscalingOverride": { "type": "object", "properties": { "min_instances": { "type": "integer", "x-nullable": true, "description": "Minimum number of instances to run" }, "max_instances": { "type": "integer", "x-nullable": true, "description": "Maximum number of instances to run" }, "expire_after": { "type": "number", "format": "float", "description": "Unix timestamp when this override is no longer valid", "minimum": 1 } }, "required": [ "min_instances", "max_instances", "expire_after" ] }, "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" }, "git_sha": { "type": "string", "description": "Service git SHA that this replicaset runs", "x-nullable": true }, "config_sha": { "type": "string", "description": "Hash of the configuration of this replicaset", "x-nullable": true } } }, "KubernetesVersion": { "type": "object", "properties": { "container_port": { "description": "Port the container is expecting to receive traffic on", "type": "integer", "format": "int32" }, "type": { "description": "Type of version (ReplicaSet or ControllerRevision)", "type": "string" }, "create_timestamp": { "type": "number", "format": "float", "description": "Unix timestamp when version was created" }, "git_sha": { "type": "string", "description": "Git SHA of service code for this version of the instance" }, "config_sha": { "type": "string", "description": "SHA of configuration for this instance" }, "name": { "type": "string", "description": "Name of the version (only valid for ReplicaSets)" }, "pods": { "type": "array", "items": { "$ref": "#/definitions/KubernetesPodV2" }, "description": "Pods associated to this version" }, "replicas": { "type": "integer", "format": "int32", "description": "Desired number of replicas for this version" }, "ready_replicas": { "type": "integer", "format": "int32", "description": "Number of replicas currently ready" }, "namespace": { "type": "string", "description": "Kubernetes namespace this version is in" } } }, "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" }, "delete_timestamp": { "type": "number", "format": "float", "description": "Unix timestamp at which pod deletion was requested (indicates terminating state)", "x-nullable": true } } }, "KubernetesPodV2": { "type": "object", "properties": { "create_timestamp": { "type": "number", "format": "float", "description": "Unix timestamp at which pod was created" }, "delete_timestamp": { "type": "number", "format": "float", "description": "Unix timestamp at which pod should be deleted", "x-nullable": true }, "ip": { "type": "string", "description": "Pod IP", "x-nullable": true }, "host": { "type": "string", "description": "Host IP this pod was scheduled on", "x-nullable": true }, "name": { "type": "string", "description": "Pod name" }, "phase": { "type": "string", "description": "The lifecycle phase of the pod" }, "ready": { "type": "boolean", "description": "Whether or not the pod is ready" }, "scheduled": { "type": "boolean", "description": "Whether or not the pod is scheduled" }, "reason": { "type": "string", "description": "brief description of the pod's state", "x-nullable": true }, "message": { "type": "string", "description": "short message with details about the pod's state", "x-nullable": true }, "containers": { "type": "array", "items": { "$ref": "#/definitions/KubernetesContainerV2", "description": "List of containers in the pod" } } } }, "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" } } }, "KubernetesContainerV2": { "type": "object", "properties": { "name": { "type": "string", "description": "Name of the container" }, "state": { "type": "string", "description": "State of the container" }, "last_state": { "type": "string", "description": "State of the container", "x-nullable": true }, "restart_count": { "type": "integer", "description": "Number of restarts since container creation", "x-nullable": true }, "reason": { "type": "string", "description": "Short description of the state of the container", "x-nullable": true }, "message": { "type": "string", "description": "Details about the state of the container", "x-nullable": true }, "last_reason": { "type": "string", "description": "Short description of the previous state of the container", "x-nullable": true }, "last_message": { "type": "string", "description": "Details about the previous state of the container", "x-nullable": true }, "last_duration": { "type": "number", "format": "float", "description": "Duration in seconds of previous state", "x-nullable": true }, "max_healthcheck_period": { "type": "number", "format": "float", "description": "Time in seconds for maximum healthcheck failure", "x-nullable": true }, "timestamp": { "type": "number", "format": "float", "description": "Unix timestamp at which state transitioned", "x-nullable": true } } }, "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" }, "InstanceStatusCassandraCluster": { "type": "object", "description": "Cassandra instance status" }, "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" } } }, "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" } } } }, "FlinkConfig": { "type": "object", "properties": { "flink-version": { "type": "string" }, "flink-revision": { "type": "string" } } }, "FlinkJobs": { "type": "object", "properties": { "jobs": { "type": "array", "description": "Flink jobs", "items": { "$ref": "#/definitions/FlinkJob" } } } }, "FlinkJob": { "type": "object", "properties": { "id": { "type": "string", "description": "ID of the flink job" }, "status": { "type": "string", "enum": [ "INITIALIZING", "CREATED", "RUNNING", "FAILING", "FAILED", "CANCELLING", "CANCELED", "FINISHED", "RESTARTING", "SUSPENDED", "RECONCILING" ] } } }, "FlinkJobDetails": { "type": "object", "properties": { "jid": { "type": "string", "description": "ID of the flink job" }, "name": { "type": "string", "description": "name of the flink job" }, "state": { "type": "string", "description": "state of the flink job", "enum": [ "INITIALIZING", "CREATED", "RUNNING", "FAILING", "FAILED", "CANCELLING", "CANCELED", "FINISHED", "RESTARTING", "SUSPENDED", "RECONCILING" ] }, "start-time": { "description": "timestamp of job start time", "type": "number", "format": "float" }, "timestamps": { "description": "timestamps of job state transitions in epoch milliseconds", "type": "object", "additionalProperties": { "type": "number", "format": "float" } } } }, "FlinkClusterOverview": { "type": "object", "properties": { "taskmanagers": { "description": "Number of taskmanagers in the cluster", "type": "integer", "format": "int32" }, "slots-total": { "description": "Total task slots in the cluster", "type": "integer", "format": "int32" }, "slots-available": { "description": "Available task slots", "type": "integer", "format": "int32" }, "jobs-running": { "description": "Number of flink jobs in running state", "type": "integer", "format": "int32" }, "jobs-finished": { "description": "Number of flink jobs in finished state", "type": "integer", "format": "int32" }, "jobs-cancelled": { "description": "Number of flink jobs in cancelled state", "type": "integer", "format": "int32" }, "jobs-failed": { "description": "Number of flink jobs in failed state", "type": "integer", "format": "int32" } } }, "FlinkCheckpointStatus": { "type": "object", "properties": { "counts": { "type": "object", "description": "Checkpoint counts for a flink job", "properties": { "completed": { "type": "integer", "format": "int32", "description": "Number of completed checkpoints" }, "failed": { "type": "integer", "format": "int32", "description": "Number of failed checkpoints" }, "in_progress": { "type": "integer", "format": "int32", "description": "Number of in-progress checkpoints" }, "restored": { "type": "integer", "format": "int32", "description": "Number of restored checkpoints" }, "total": { "type": "integer", "format": "int32", "description": "Total number of checkpoints" } }, "required": [ "completed", "failed", "in_progress", "restored", "total" ] } } }, "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" } } }, "RemoteRunStart": { "type": "object", "properties": { "interactive": { "type": "boolean" }, "recreate": { "type": "boolean" }, "user": { "type": "string" }, "max_duration": { "type": "integer" }, "toolbox": { "type": "boolean" }, "command": { "type": "string" } }, "required": [ "user" ] }, "RemoteRunStop": { "type": "object", "properties": { "user": { "type": "string" }, "toolbox": { "type": "boolean" } }, "required": [ "user" ] }, "RemoteRunOutcome": { "type": "object", "properties": { "status": { "type": "integer" }, "message": { "type": "string" }, "pod_name": { "type": "string" }, "pod_address": { "type": "string" }, "job_name": { "type": "string" }, "namespace": { "type": "string" } }, "required": [ "status", "message" ] }, "RemoteRunToken": { "type": "object", "properties": { "token": { "type": "string" } }, "required": [ "token" ] }, "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" } } } } }