Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
1905 lines (1905 sloc) 52.7 KB
{
"openapi": "3.0.0",
"info": {
"title": "Runscope API",
"description": "Manage Runscope programmatically.",
"version": "1.0.0"
},
"servers": [
{
"url": "https://api.runscope.com/"
}
],
"security": [
{
"runscope_auth": [
"api:read"
]
}
],
"paths": {
"/account": {
"get": {
"summary": "Account Resource",
"description": "Information about the authorized account.",
"tags": [
"Account"
],
"responses": {
"200": {
"description": "Account owner and team information.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"data": {
"$ref": "#/components/schemas/Account"
},
"meta": {
"$ref": "#/components/schemas/Meta"
}
}
}
}
}
},
"default": {
"$ref": "#/components/responses/UnexpectedError"
}
},
"security": [
{
"runscope_auth": [
"api:read",
"account:email"
]
}
]
}
},
"/teams/{teamId}/people": {
"get": {
"summary": "Teams Resource",
"description": "List people and integrations associated with a given team.",
"parameters": [
{
"$ref": "#/components/parameters/teamId"
}
],
"tags": [
"Account"
],
"responses": {
"200": {
"description": "List of people associated with the team.",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Account"
}
}
}
}
},
"default": {
"$ref": "#/components/responses/UnexpectedError"
}
},
"security": [
{
"runscope_auth": [
"api:read",
"account:email",
"team:read"
]
}
]
}
},
"/teams/{teamId}/integrations": {
"get": {
"summary": "Team integrations list",
"description": "Returns a list of integrations configured for the team.",
"parameters": [
{
"$ref": "#/components/parameters/teamId"
}
],
"tags": [
"Account"
],
"responses": {
"200": {
"description": "List of integrations associated with the team.",
"content": {
"application/json": {
"schema": {
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Integration"
}
},
"meta": {
"$ref": "#/components/schemas/Meta"
}
},
"type": "object"
}
}
}
},
"default": {
"$ref": "#/components/responses/UnexpectedError"
}
},
"security": [
{
"runscope_auth": [
"api:read",
"team:read"
]
}
]
}
},
"/teams/{teamId}/agents": {
"get": {
"summary": "Team agents list",
"description": "List currently connected agents associated with a given team.",
"parameters": [
{
"$ref": "#/components/parameters/teamId"
}
],
"tags": [
"Account"
],
"responses": {
"200": {
"description": "List of the team’s currently connected agents.",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Agent"
}
}
}
}
},
"default": {
"$ref": "#/components/responses/UnexpectedError"
}
},
"security": [
{
"runscope_auth": [
"api:read",
"team:read"
]
}
]
}
},
"/buckets": {
"get": {
"summary": "Returns a list of buckets.",
"tags": [
"Buckets"
],
"responses": {
"200": {
"description": "List of buckets associated with this authenticated account.",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Bucket"
}
},
"meta": {
"$ref": "#/components/schemas/Meta"
}
}
}
}
}
},
"default": {
"$ref": "#/components/responses/UnexpectedError"
}
},
"security": [
{
"runscope_auth": [
"api:read"
]
},
{
"runscope_auth": [
"api:read",
"bucket:auth_token"
]
}
]
},
"post": {
"summary": "Create a new bucket",
"tags": [
"Buckets"
],
"responses": {
"200": {
"description": "Bucket details.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Bucket"
}
}
}
},
"default": {
"$ref": "#/components/responses/UnexpectedError"
}
},
"security": [
{
"runscope_auth": [
"api:read",
"bucket:write"
]
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NewBucket"
}
}
},
"required": true
}
}
},
"/buckets/{bucketKey}": {
"get": {
"summary": "Returns a single bucket resource.",
"tags": [
"Buckets"
],
"parameters": [
{
"$ref": "#/components/parameters/bucketKey"
}
],
"responses": {
"200": {
"description": "Bucket details.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Bucket"
}
}
}
},
"default": {
"$ref": "#/components/responses/UnexpectedError"
}
}
},
"delete": {
"summary": "Delete a single bucket resource.",
"tags": [
"Buckets"
],
"parameters": [
{
"$ref": "#/components/parameters/bucketKey"
}
],
"responses": {
"204": {
"description": "No content with no body."
},
"default": {
"$ref": "#/components/responses/UnexpectedError"
}
},
"security": [
{
"runscope_auth": [
"api:read",
"bucket:write"
]
}
]
}
},
"/buckets/{bucketKey}/messages": {
"get": {
"summary": "Retrieve a list of messages in a bucket",
"tags": [
"Messages"
],
"parameters": [
{
"$ref": "#/components/parameters/bucketKey"
},
{
"name": "count",
"in": "query",
"description": "Maxiumum number of messages to return. Default 50, max 1000.",
"schema": {
"type": "integer"
}
},
{
"name": "since",
"in": "query",
"description": "Only return messages after the given Unix timestamp",
"schema": {
"type": "integer"
}
},
{
"name": "before",
"in": "query",
"description": "Only return messages before the given Unix timestamp",
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "List of messages in a bucket"
},
"default": {
"$ref": "#/components/responses/UnexpectedError"
}
}
},
"delete": {
"summary": "Clear a bucket (remove all messages).",
"tags": [
"Messages"
],
"parameters": [
{
"$ref": "#/components/parameters/bucketKey"
}
],
"responses": {
"204": {
"description": "No content with no body."
},
"default": {
"$ref": "#/components/responses/UnexpectedError"
}
},
"security": [
{
"runscope_auth": [
"api:read",
"message:write"
]
}
]
},
"post": {
"summary": "Create a message",
"tags": [
"Messages"
],
"parameters": [
{
"$ref": "#/components/parameters/bucketKey"
}
],
"responses": {
"200": {
"description": "The response includes a list of result objects for the message(s) submitted. It will always return an array, even if only one message was created. The order of the result objects corresponds to the order of messages submitted.",
"content": {
"application/json": {
"schema": {
"properties": {
"data": {
"type": "array",
"items": {
"properties": {
"status": {
"description": "One of the following: success, error, or warning.",
"type": "string"
},
"unique_identifier": {
"description": "If the message had a unique_identifier, it will be returned in this field, to help match the responses to the messages that were submitted.",
"type": "string"
},
"uuid": {
"description": "This message's Runscope-generated ID.",
"type": "string"
},
"warning": {
"description": "An object representing warnings (non-fatal warnings) for this item. Only present if status is warning, otherwise this will be null.",
"type": "object",
"properties": {
"code": {
"type": "integer",
"description": "A numeric error code for the specific problem we encountered with this message. (warning status only)"
},
"message": {
"type": "string",
"description": "A description of the problem we encountered with this message. (warning status only)"
},
"more_info": {
"type": "string",
"description": "A link to more help about the warning. (warning status only)"
}
}
},
"error": {
"description": "An object representing errors for this item. Only present if status is error, otherwise this will be null.",
"type": "object",
"properties": {
"code": {
"type": "integer",
"description": "A numeric error code for the specific problem we encountered with this message. (error status only)"
},
"message": {
"type": "string",
"description": "A description of the problem we encountered with this message. (error status only)"
},
"more_info": {
"type": "string",
"description": "A link to more help about the warning. (error status only)"
}
}
}
},
"type": "object"
}
},
"meta": {
"type": "object",
"properties": {
"succcess_count": {
"type": "integer"
},
"warning_count": {
"type": "integer"
},
"error_count": {
"type": "integer"
}
}
}
},
"type": "object"
}
}
}
},
"default": {
"$ref": "#/components/responses/UnexpectedError"
}
},
"security": [
{
"runscope_auth": [
"api:read",
"message:write"
]
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NewMessage"
}
}
},
"required": true
}
}
},
"/buckets/{bucketKey}/errors": {
"get": {
"summary": "Retrieve a list of error messages in a bucket",
"tags": [
"Messages"
],
"parameters": [
{
"$ref": "#/components/parameters/bucketKey"
},
{
"name": "count",
"in": "query",
"description": "Maxiumum number of messages to return. Default 50, max 1000.",
"schema": {
"type": "integer"
}
},
{
"name": "since",
"in": "query",
"description": "Only return messages after the given Unix timestamp",
"schema": {
"type": "integer"
}
},
{
"name": "before",
"in": "query",
"description": "Only return messages before the given Unix timestamp",
"schema": {
"type": "integer"
}
}
],
"responses": {
"200": {
"description": "List of error messages in a bucket"
},
"default": {
"$ref": "#/components/responses/UnexpectedError"
}
}
}
},
"/buckets/{bucketKey}/messages/{messageId}": {
"get": {
"summary": "Retrieve the details for a single message.",
"tags": [
"Messages"
],
"parameters": [
{
"$ref": "#/components/parameters/bucketKey"
},
{
"name": "messageId",
"in": "path",
"description": "The unique identifier for this message",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "List of messages in a bucket"
},
"default": {
"$ref": "#/components/responses/UnexpectedError"
}
}
}
},
"/buckets/{bucketKey}/tests": {
"get": {
"summary": "Returns a list of tests.",
"tags": [
"Tests"
],
"parameters": [
{
"$ref": "#/components/parameters/bucketKey"
}
],
"responses": {
"200": {
"description": "List of tests for this bucket",
"content": {
"application/json": {
"schema": {
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Test"
}
},
"meta": {
"$ref": "#/components/schemas/Meta"
}
},
"type": "object"
}
}
}
}
},
"security": [
{
"runscope_auth": [
"api:read",
"test:read"
]
}
]
},
"post": {
"summary": "Create a test.",
"tags": [
"Tests"
],
"parameters": [
{
"$ref": "#/components/parameters/bucketKey"
}
],
"responses": {
"200": {
"description": "List of tests for this bucket",
"content": {
"application/json": {
"schema": {
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Test"
}
},
"meta": {
"$ref": "#/components/schemas/Meta"
}
},
"type": "object"
}
}
}
}
},
"security": [
{
"runscope_auth": [
"api:read",
"test:write"
]
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Test"
}
}
},
"required": true
}
}
},
"/buckets/{bucketKey}/tests/{testId}": {
"get": {
"summary": "Retrieve the details of a given test by ID.",
"tags": [
"Tests"
],
"parameters": [
{
"$ref": "#/components/parameters/bucketKey"
},
{
"$ref": "#/components/parameters/testId"
}
],
"responses": {
"200": {
"description": "Returns an object with the details of the given test.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TestDetail"
}
}
}
},
"default": {
"$ref": "#/components/responses/UnexpectedError"
}
},
"security": [
{
"runscope_auth": [
"api:read",
"test:read"
]
}
]
},
"put": {
"summary": "Modify a test's name, description, default environment and its steps. To modify other individual properties of a test, make requests to the steps, environments, and schedules subresources of the test.",
"tags": [
"Tests"
],
"parameters": [
{
"$ref": "#/components/parameters/bucketKey"
},
{
"$ref": "#/components/parameters/testId"
}
],
"responses": {
"201": {
"description": "Returns 201 and the updated test's JSON description if the test is successfully updated.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TestDetail"
}
}
}
},
"default": {
"$ref": "#/components/responses/UnexpectedError"
}
},
"security": [
{
"runscope_auth": [
"api:read",
"test:write"
]
}
]
},
"delete": {
"summary": "Delete a test, including all steps, schedules, test-specific environments and results.",
"tags": [
"Tests"
],
"parameters": [
{
"$ref": "#/components/parameters/bucketKey"
},
{
"$ref": "#/components/parameters/testId"
}
],
"responses": {
"204": {
"description": "No content with no body."
}
},
"security": [
{
"runscope_auth": [
"api:read",
"test:write"
]
}
]
}
},
"/buckets/{bucketKey}/tests/{testId}/steps": {
"get": {
"summary": "List test steps for a test.",
"tags": [
"Test Steps"
],
"parameters": [
{
"$ref": "#/components/parameters/bucketKey"
},
{
"$ref": "#/components/parameters/testId"
}
],
"responses": {
"200": {
"description": "List of test steps for a test"
}
},
"security": [
{
"runscope_auth": [
"api:read",
"test:read"
]
}
]
},
"post": {
"summary": "Add new test step.",
"tags": [
"Test Steps"
],
"parameters": [
{
"$ref": "#/components/parameters/bucketKey"
},
{
"$ref": "#/components/parameters/testId"
}
],
"responses": {
"201": {
"description": "Details of the new test step."
},
"400": {
"description": "Must send valid JSON object to create a new test step",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/StandardError"
}
}
}
}
},
"security": [
{
"runscope_auth": [
"api:read",
"test:write"
]
}
],
"requestBody": {
"$ref": "#/components/requestBodies/TestStep"
}
}
},
"/buckets/{bucketKey}/tests/{testId}/steps/{stepId}": {
"put": {
"summary": "Update the details of a single test step.",
"tags": [
"Test Steps"
],
"parameters": [
{
"$ref": "#/components/parameters/bucketKey"
},
{
"$ref": "#/components/parameters/testId"
},
{
"$ref": "#/components/parameters/stepId"
}
],
"responses": {
"200": {
"description": "List of test steps for a test"
},
"400": {
"description": "Unable to update template '{stepId}' for test '{testId}'",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/StandardError"
}
}
}
}
},
"security": [
{
"runscope_auth": [
"api:read",
"test:write"
]
}
],
"requestBody": {
"$ref": "#/components/requestBodies/TestStep"
}
},
"delete": {
"summary": "Delete a step from a test.",
"tags": [
"Test Steps"
],
"parameters": [
{
"$ref": "#/components/parameters/bucketKey"
},
{
"$ref": "#/components/parameters/testId"
},
{
"$ref": "#/components/parameters/stepId"
}
],
"responses": {
"204": {
"description": "No content with no body."
}
},
"security": [
{
"runscope_auth": [
"api:read",
"test:write"
]
}
]
}
},
"/buckets/{bucketKey}/tests/{testId}/environments": {
"get": {
"summary": "Return details of the test's environments (only those that belong to the specified test)",
"tags": [
"Test Environments"
],
"parameters": [
{
"$ref": "#/components/parameters/bucketKey"
},
{
"$ref": "#/components/parameters/testId"
}
],
"responses": {
"200": {
"description": "List of environments belonging to this test.",
"content": {
"application/json": {
"schema": {
"properties": {
"data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Environment"
}
},
"meta": {
"$ref": "#/components/schemas/Meta"
}
},
"type": "object"
}
}
}
}
},
"security": [
{
"runscope_auth": [
"api:read",
"test:read"
]
}
]
},
"post": {
"summary": "Create new test environment.",
"tags": [
"Test Environments"
],
"parameters": [
{
"$ref": "#/components/parameters/bucketKey"
},
{
"$ref": "#/components/parameters/testId"
}
],
"responses": {
"201": {
"description": "Details of the new test environment."
}
},
"security": [
{
"runscope_auth": [
"api:read",
"test:write"
]
}
],
"requestBody": {
"$ref": "#/components/requestBodies/Environment"
}
}
},
"/buckets/{bucketKey}/tests/{testId}/environments/{environmentId}": {
"put": {
"summary": "Update the details of a test environment.",
"tags": [
"Test Environments"
],
"parameters": [
{
"$ref": "#/components/parameters/bucketKey"
},
{
"$ref": "#/components/parameters/testId"
},
{
"$ref": "#/components/parameters/environmentId"
}
],
"responses": {
"201": {
"description": "Details of the modified test environment."
}
},
"security": [
{
"runscope_auth": [
"api:read",
"test:write"
]
}
],
"requestBody": {
"$ref": "#/components/requestBodies/Environment"
}
}
},
"/buckets/{bucketKey}/tests/{testId}/metrics": {
"get": {
"summary": "Return details of the test metrics for the specified timeframe.",
"tags": [
"Tests"
],
"parameters": [
{
"$ref": "#/components/parameters/bucketKey"
},
{
"$ref": "#/components/parameters/testId"
}
],
"responses": {
"200": {
"description": "List of average response times and additional performance metrics belonging to this test.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Metrics"
}
}
}
}
},
"security": [
{
"runscope_auth": [
"api:read",
"test:read"
]
}
]
}
},
"/buckets/{bucketKey}/environments": {
"get": {
"summary": "Returns list of shared environments for a specified bucket.",
"tags": [
"Shared Environments"
],
"parameters": [
{
"$ref": "#/components/parameters/bucketKey"
}
],
"responses": {
"200": {
"description": "List of shared environments belonging to this bucket."
}
},
"security": [
{
"runscope_auth": [
"api:read",
"test:read"
]
}
]
},
"post": {
"summary": "Create new shared environment.",
"tags": [
"Shared Environments"
],
"parameters": [
{
"$ref": "#/components/parameters/bucketKey"
}
],
"responses": {
"201": {
"description": "Details of the new test environment."
}
},
"security": [
{
"runscope_auth": [
"api:read",
"test:write"
]
}
],
"requestBody": {
"$ref": "#/components/requestBodies/Environment"
}
}
},
"/buckets/{bucketKey}/environments/{environmentId}": {
"put": {
"summary": "Update the details of a shared environment.",
"tags": [
"Shared Environments"
],
"parameters": [
{
"$ref": "#/components/parameters/bucketKey"
},
{
"$ref": "#/components/parameters/environmentId"
}
],
"responses": {
"201": {
"description": "Details of the modified test environment."
}
},
"security": [
{
"runscope_auth": [
"api:read",
"test:write"
]
}
],
"requestBody": {
"$ref": "#/components/requestBodies/Environment"
}
}
}
},
"components": {
"schemas": {
"Meta": {
"properties": {
"status": {
"type": "string",
"description": "Success or failure status of call."
}
},
"type": "object"
},
"Account": {
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "The name of the person for this account."
},
"id": {
"type": "string",
"description": "The unique identifier for this account."
},
"email": {
"type": "string",
"description": "The email address for this account. Only present if authorized with the account:email scope."
},
"teams": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Team"
}
}
}
},
"Team": {
"properties": {
"id": {
"type": "string",
"description": "The unique identifier for this team."
},
"name": {
"type": "string",
"description": "The name of this team."
}
},
"type": "object"
},
"Bucket": {
"properties": {
"auth_token": {
"description": "Bucket auth token if set, otherwise this value is null.",
"type": "string"
},
"default": {
"description": "True if this bucket is the 'default' for a team. Default buckets cannot be deleted.",
"type": "boolean"
},
"key": {
"description": "The unique identifier used to address a bucket.",
"type": "string"
},
"name": {
"description": "The name of this bucket as displayed in your dashboard.",
"type": "string"
},
"team": {
"$ref": "#/components/schemas/Team"
},
"trigger_url": {
"type": "string"
},
"verify_ssl": {
"description": "True if this bucket is configured to verify ssl for requests made to it.",
"type": "boolean"
},
"tests_url": {
"type": "string"
},
"collections_url": {
"type": "string"
},
"messages_url": {
"type": "string"
}
},
"type": "object"
},
"NewBucket": {
"required": [
"name",
"team_id"
],
"properties": {
"name": {
"description": "Name of this bucket",
"type": "string"
},
"team_id": {
"description": "Unique identifier for the team to create this bucket for.",
"type": "string"
}
},
"type": "object"
},
"NewMessage": {
"properties": {
"request": {
"type": "object",
"properties": {
"method": {
"type": "string",
"description": "HTTP method name (GET, POST, PUT, HEAD, OPTIONS, PATCH, DELETE, etc.)"
},
"url": {
"type": "string",
"description": "Full URL of the request, including URL querystring parameters."
},
"headers": {
"type": "string",
"description": "JSON object of header keys and values -- with values as a string or an array of strings."
},
"form": {
"type": "string",
"description": "JSON object of set of form fields included in a POST request. \nValues can either be represented as a string or as an array of strings.\n"
},
"body": {
"type": "string",
"description": "HTTP request body (most commonly used for POST and PUT requests). If the\nrequest body contains binary data that cannot be included directly in the \nJSON, encode the content with Base64 and include the body_encoding attribute accordingly.\n"
},
"body_encoding": {
"type": "string",
"description": "If the request body was encoded with Base64, this field should be present and set to \n\"base64\". If not specified, defaults to \"plaintext\"\n"
},
"timestamp": {
"type": "number",
"format": "float",
"description": "Unix timestamp indicating when the request was made."
}
}
},
"response": {
"type": "object",
"properties": {
"status": {
"type": "integer",
"description": "HTTP status code returned in the response."
},
"reason": {
"type": "string",
"description": "Textual description of HTTP status code. This will be set automatically if not \nprovided in the API call. For example, if the status code is 404, this will be \nset to \"Not Found\" unless you explicitly specify a different reason.\n"
},
"headers": {
"type": "string",
"description": "JSON object of header keys and values -- with values as a string or an array of strings."
},
"body": {
"type": "string",
"description": "HTTP response body. If the response body contains binary data that cannot be\nincluded directly in the JSON, you should encode the content with Base64.\n"
},
"body_encoding": {
"type": "string",
"description": "If the request body was encoded with Base64, this field should be present and set to \n\"base64\". If not specified, defaults to \"plaintext\"\n"
},
"response_time": {
"type": "number",
"format": "float",
"description": "Length of time it took to receive the response, in seconds."
},
"timestamp": {
"type": "number",
"format": "float",
"description": "Unix timestamp indicating when the request was made."
}
}
}
},
"type": "object"
},
"TestStep": {
"properties": {
"step_type": {
"type": "string",
"description": "Type of test step -- request, pause, condition, ghost-inspector, or subtest."
}
},
"type": "object"
},
"TestStepRequest": {
"allOf": [
{
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "The URL to make a request to for this step. This may contain both query string parameters and variables."
},
"method": {
"type": "string",
"description": "The HTTP method for this request step. E.g. GET, POST, PUT, DELETE, etc."
},
"note": {
"type": "string",
"description": "A description or note for this request step."
},
"auth": {
"type": "object",
"description": "An authentication object with either basic, oauth1, or client_certificate credentials for authenticating this request."
},
"headers": {
"type": "object",
"description": "An object with keys as header names matched to their values. Values can either be a single string or an array of strings."
},
"form": {
"type": "object",
"description": "An object with keys as form post parameter names matched to their values. Values can either be a single string or an array of strings."
},
"body": {
"type": "string",
"description": "A string to use as the body of the request."
},
"assertions": {
"type": "array",
"description": "A list of assertions to apply to the HTTP response from this request.",
"items": {
"$ref": "#/components/schemas/Assertion"
}
},
"variables": {
"type": "array",
"description": "A list of variables to extract out of the HTTP response from this request.",
"items": {
"$ref": "#/components/schemas/Variable"
}
},
"scripts": {
"type": "array",
"description": "A list of post-response scripts to run after this request.",
"items": {
"type": "string"
}
},
"before_scripts": {
"type": "array",
"description": "A list of pre-request scripts to run before this request.",
"items": {
"type": "string"
}
}
}
},
{
"$ref": "#/components/schemas/TestStep"
}
]
},
"Environment": {
"type": "object",
"properties": {
"integrations": {
"type": "array",
"description": "The list of integrations for this environment.",
"items": {
"$ref": "#/components/schemas/Integration"
}
},
"verify_ssl": {
"type": "boolean",
"description": "Validate all SSL certificates on any HTTPS connections."
},
"script_library": {
"type": "array",
"description": "The list of ids for scripts, part of the script libraries, being used for this environment.",
"items": {
"type": "string"
}
},
"id": {
"type": "string",
"description": "The unique identifier for this environment."
},
"script": {
"type": "string",
"description": ""
},
"regions": {
"type": "array",
"description": "An array of the region codes that this environment is using.",
"items": {
"type": "string"
}
},
"version": {
"type": "string"
},
"stop_on_failure": {
"type": "boolean",
"description": "Stop executing the test after the first failed step."
},
"initial_script_hash": {
"type": "string"
},
"auth": {
"type": "string"
},
"exported_at": {
"type": "integer"
},
"retry_on_failure": {
"type": "boolean"
},
"remote_agents": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Agent"
}
},
"webhooks": {
"type": "string"
},
"test_id": {
"type": "string",
"description": "The unique identifier for this test."
},
"emails": {
"type": "object"
},
"name": {
"type": "string",
"description": "Name of this environment."
},
"initial_variables": {
"type": "object"
},
"headers": {
"type": "object"
},
"parent_environment_id": {
"type": "string"
},
"preserve_cookies": {
"type": "boolean"
},
"client_certificate": {
"type": "string"
}
},
"required": [
"name"
]
},
"Test": {
"required": [
"name"
],
"properties": {
"created_at": {
"type": "integer",
"description": "The date the test was created in seconds (Unix time stamp format)."
},
"created_by": {
"type": "object",
"properties": {
"email": {
"type": "string"
},
"name": {
"type": "string"
},
"id": {
"type": "string"
}
}
},
"default_environment_id": {
"type": "string"
},
"description": {
"type": "string",
"description": "The description for the test."
},
"name": {
"type": "string",
"description": "The name for the test."
},
"id": {
"type": "string"
},
"trigger_url": {
"type": "string"
},
"last_run": {
"type": "object"
}
},
"type": "object"
},
"TestDetail": {
"allOf": [
{
"type": "object",
"properties": {
"version": {
"type": "string"
},
"exported_at": {
"type": "integer"
},
"environments": {
"$ref": "#/components/schemas/Environment"
},
"schedules": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Schedule"
}
},
"steps": {
"type": "array",
"items": {
"type": "object"
}
},
"last_run": {
"type": "object"
}
}
},
{
"$ref": "#/components/schemas/Test"
}
]
},
"Integration": {
"properties": {
"description": {
"type": "string"
},
"type": {
"type": "string"
},
"id": {
"type": "string"
},
"uuid": {
"type": "string"
}
},
"type": "object"
},
"Agent": {
"properties": {
"version": {
"type": "string",
"description": "The version for this agent."
},
"agent_id": {
"type": "string",
"description": "The unique identifier for this agent."
},
"name": {
"type": "string",
"description": "The name of the agent set in the configuration file or with the command line flag."
}
},
"type": "object"
},
"Metrics": {
"properties": {
"response_times": {
"type": "array",
"description": "The list of response times based on the timeframe of the request.",
"items": {
"properties": {
"success_ratio": {
"type": "integer",
"description": "1 if there's a successful request in this time interval, or 0 if there isn't."
},
"timestamp": {
"type": "integer",
"description": "The timestamp in Unix format for the specified timeframe."
},
"avg_response_time_ms": {
"type": "integer",
"description": "The average response time in miliseconds for all the requests for this test in this time interval."
}
},
"type": "object"
}
},
"this_time_period": {
"type": "object",
"description": "The average response time for different percentiles for the request in the requested timeframe."
},
"changes_from_last_period": {
"type": "object",
"description": "The changes in average response time compared to the last period."
},
"environment_uuid": {
"type": "string",
"description": "The environment_uuid that filters this request."
},
"region": {
"type": "string",
"description": "The region that filters this request."
},
"timeframe": {
"type": "string",
"description": "The timeframe that filters this request."
}
},
"type": "object"
},
"Error": {
"properties": {
"code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
},
"fields": {
"type": "string"
}
},
"type": "object"
},
"Error400": {
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
},
"more_info": {
"type": "string"
},
"error": {
"type": "string"
}
},
"type": "object"
},
"StandardError": {
"properties": {
"meta": {
"$ref": "#/components/schemas/Meta"
},
"data": {
"type": "object"
},
"error": {
"$ref": "#/components/schemas/Error400"
}
},
"type": "object"
},
"Assertion": {
"type": "object",
"properties": {
"source": {
"type": "string"
},
"comparison": {
"type": "string"
},
"value": {
"type": "string"
}
}
},
"Variable": {
"type": "object",
"properties": {
"source": {
"type": "string"
},
"property": {
"type": "string"
},
"name": {
"type": "string"
}
}
},
"Schedule": {
"type": "object",
"properties": {
"environment_id": {
"type": "string"
},
"interval": {
"type": "string"
},
"note": {
"type": "string"
},
"version": {
"type": "string"
},
"exported_at": {
"type": "integer"
},
"id": {
"type": "string"
}
}
}
},
"responses": {
"Standard400Response": {
"description": "Invalid request.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/StandardError"
}
}
}
},
"Standard403Response": {
"description": "Invalid or missing Authorization header",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/StandardError"
}
}
}
},
"UnexpectedError": {
"description": "Unexpected error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Error"
}
}
}
}
},
"parameters": {
"teamId": {
"name": "teamId",
"in": "path",
"description": "Unique identifier for team",
"required": true,
"schema": {
"type": "string"
}
},
"bucketKey": {
"name": "bucketKey",
"in": "path",
"description": "Unique identifier for a bucket",
"required": true,
"schema": {
"type": "string"
}
},
"testId": {
"name": "testId",
"in": "path",
"required": true,
"description": "Unique identifier for a test",
"schema": {
"type": "string"
}
},
"stepId": {
"name": "stepId",
"in": "path",
"required": true,
"description": "Unique identifier for a test step",
"schema": {
"type": "string"
}
},
"environmentId": {
"name": "environmentId",
"in": "path",
"required": true,
"description": "Unique identifier for a test environment",
"schema": {
"type": "string"
}
}
},
"requestBodies": {
"TestStep": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TestStep"
}
}
},
"required": true
},
"Environment": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Environment"
}
}
},
"required": true
}
},
"securitySchemes": {
"runscope_auth": {
"type": "oauth2",
"flows": {
"authorizationCode": {
"authorizationUrl": "https://www.runscope.com/signin/oauth/authorize",
"tokenUrl": "https://www.runscope.com/signin/oauth/access_token",
"scopes": {
"api:read": "Default read access.",
"bucket:auth_token": "Allows you to read all bucket information, including Authenticated Buckets.",
"bucket:write": "Allows you to create new buckets on behalf of the user (up to their plan limit).",
"message:write": "Allows you to create new messages on behalf of the user (up to their plan limit).",
"account:email": "Allows you to read the email addresses of user accounts.",
"team:read": "Allows you to read team details such as lists of team members and external service integrations.",
"test:read": "Allows you to read the details of API tests.",
"test:write": "Allows you to create, update and delete details of API tests."
}
}
}
}
}
}
}