A continuation of netlify_openapi_swagger.json. The complete source identity, every recorded occurrence, and linked equations are on its first page.
Source transcript · continued
Download complete source text ↓24,715 lines · 705.9 KB
"properties": {
"algorithm": {
"type": "string",
"enum": [
"sliding_window"
]
},
"window_size": {
"type": "integer"
},
"window_limit": {
"type": "integer"
}
}
},
"aggregate": {
"type": "object",
"properties": {
"keys": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"ip",
"domain"
]
}
}
}
}
}
}
}
}
}
}
}
},
"vcpu": {
"type": "number",
"format": "float",
"description": "Number of vCPUs to provision for the function. Allowed range is\n0.5–2.\n"
},
"event_subscriptions": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
},
"branch": {
"type": "string"
},
"framework": {
"type": "string"
},
"framework_version": {
"type": "string"
},
"environment": {
"description": "A list of deploy-specific environment variable data. Data specified this way applies only\nto this specific deploy and is merged into any existing environment variables set on the\naccount and site.\n\nDeploy-specific environment variable data takes precedence over account and site\nenvironment variable data: For example, a deploy-specific variable with the key `NODE_ENV`\nwill take priority over any existing site- and account-level environment variable data\nwith the key `NODE_ENV`.\n\nEnvironment variable data may be provided at one of two times:\n\n- When creating a new Deploy with deploy files (most common)\n- When finalizing an existing Deploy with deploy files\n\nOnce set, environment variables for a specific deploy cannot be modified. Subsequent\nattempts to modify environment variable data for a deploy will be ignored.\n",
"type": "array",
"items": {
"type": "object",
"required": [
"key",
"value",
"scopes",
"is_secret"
],
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
},
"is_secret": {
"type": "boolean"
},
"scopes": {
"type": "array",
"items": {
"type": "string",
"enum": [
"builds",
"functions",
"runtime",
"post-processing"
]
}
}
}
}
}
}
},
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"site_id": {
"type": "string"
},
"user_id": {
"type": "string"
},
"build_id": {
"type": "string"
},
"state": {
"type": "string"
},
"name": {
"type": "string"
},
"url": {
"type": "string"
},
"ssl_url": {
"type": "string"
},
"admin_url": {
"type": "string"
},
"deploy_url": {
"type": "string"
},
"deploy_ssl_url": {
"type": "string"
},
"screenshot_url": {
"type": "string"
},
"review_id": {
"type": "number"
},
"draft": {
"type": "boolean"
},
"required": {
"type": "array",
"items": {
"type": "string"
}
},
"required_functions": {
"type": "array",
"items": {
"type": "string"
}
},
"required_edge_functions": {
"type": "array",
"items": {
"type": "string"
},
"description": "An array of code_shas for the edge-function bundles that need to be uploaded to\ncomplete the deploy.\n"
},
"required_server": {
"type": "array",
"items": {
"type": "string"
},
"description": "The SHA256 digest of the deploy's Netlify Server bundle, when it still needs to\nbe uploaded to complete the deploy. A deploy has at most one server, so this\nholds either nothing or a single digest.\n"
},
"error_message": {
"type": "string"
},
"branch": {
"type": "string"
},
"commit_ref": {
"type": "string"
},
"commit_url": {
"type": "string"
},
"skipped": {
"type": "boolean"
},
"created_at": {
"type": "string",
"format": "dateTime"
},
"updated_at": {
"type": "string",
"format": "dateTime"
},
"published_at": {
"type": "string",
"format": "dateTime"
},
"title": {
"type": "string"
},
"context": {
"type": "string"
},
"locked": {
"type": "boolean"
},
"review_url": {
"type": "string"
},
"framework": {
"type": "string"
},
"skew_protection_token": {
"type": "string"
},
"function_schedules": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"cron": {
"type": "string"
}
}
}
},
"functions_region": {
"type": "string",
"description": "The functions region for this deploy as an airport code.\n"
},
"functions_region_overrides": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"region": {
"type": "string"
}
}
},
"description": "Functions in the deploy that explicitly specify their own region\n(airport code).\n"
}
}
}
},
"default": {
"description": "error",
"schema": {
"type": "object",
"required": [
"message"
],
"properties": {
"code": {
"type": "integer",
"format": "int64"
},
"message": {
"type": "string",
"x-nullable": false
}
}
}
}
}
}
},
"/sites/{site_id}/deploys/{deploy_id}": {
"get": {
"operationId": "getSiteDeploy",
"tags": [
"deploy"
],
"parameters": [
{
"name": "site_id",
"type": "string",
"in": "path",
"required": true
},
{
"name": "deploy_id",
"type": "string",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"site_id": {
"type": "string"
},
"user_id": {
"type": "string"
},
"build_id": {
"type": "string"
},
"state": {
"type": "string"
},
"name": {
"type": "string"
},
"url": {
"type": "string"
},
"ssl_url": {
"type": "string"
},
"admin_url": {
"type": "string"
},
"deploy_url": {
"type": "string"
},
"deploy_ssl_url": {
"type": "string"
},
"screenshot_url": {
"type": "string"
},
"review_id": {
"type": "number"
},
"draft": {
"type": "boolean"
},
"required": {
"type": "array",
"items": {
"type": "string"
}
},
"required_functions": {
"type": "array",
"items": {
"type": "string"
}
},
"required_edge_functions": {
"type": "array",
"items": {
"type": "string"
},
"description": "An array of code_shas for the edge-function bundles that need to be uploaded to\ncomplete the deploy.\n"
},
"required_server": {
"type": "array",
"items": {
"type": "string"
},
"description": "The SHA256 digest of the deploy's Netlify Server bundle, when it still needs to\nbe uploaded to complete the deploy. A deploy has at most one server, so this\nholds either nothing or a single digest.\n"
},
"error_message": {
"type": "string"
},
"branch": {
"type": "string"
},
"commit_ref": {
"type": "string"
},
"commit_url": {
"type": "string"
},
"skipped": {
"type": "boolean"
},
"created_at": {
"type": "string",
"format": "dateTime"
},
"updated_at": {
"type": "string",
"format": "dateTime"
},
"published_at": {
"type": "string",
"format": "dateTime"
},
"title": {
"type": "string"
},
"context": {
"type": "string"
},
"locked": {
"type": "boolean"
},
"review_url": {
"type": "string"
},
"framework": {
"type": "string"
},
"skew_protection_token": {
"type": "string"
},
"function_schedules": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"cron": {
"type": "string"
}
}
}
},
"functions_region": {
"type": "string",
"description": "The functions region for this deploy as an airport code.\n"
},
"functions_region_overrides": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"region": {
"type": "string"
}
}
},
"description": "Functions in the deploy that explicitly specify their own region\n(airport code).\n"
}
}
}
},
"default": {
"description": "error",
"schema": {
"type": "object",
"required": [
"message"
],
"properties": {
"code": {
"type": "integer",
"format": "int64"
},
"message": {
"type": "string",
"x-nullable": false
}
}
}
}
}
},
"put": {
"operationId": "updateSiteDeploy",
"tags": [
"deploy"
],
"parameters": [
{
"name": "site_id",
"type": "string",
"in": "path",
"required": true
},
{
"name": "deploy_id",
"type": "string",
"in": "path",
"required": true
},
{
"name": "commit_ref",
"type": "string",
"in": "query"
},
{
"name": "deploy",
"in": "body",
"schema": {
"type": "object",
"description": "Deploy files can be provided in two ways:\n1. As a JSON object using 'files' (a hash mapping file paths to SHA1 digests), OR\n2. As a zip file using one of these methods:\n - Set Content-Type to 'application/zip' and send the zip file as the raw request body\n - Include the zip file content in the 'zip' field of this JSON object with Content-Type 'application/json'\n",
"properties": {
"files": {
"type": "object",
"description": "A hash mapping file paths to SHA1 digests of the file contents."
},
"zip": {
"type": "string",
"format": "binary",
"description": "A zip file containing the site files to deploy. Alternative to 'files'.\nTo use this field, set Content-Type to 'application/json' and include the zip content here.\nAlternatively, you can set Content-Type to 'application/zip' and send the zip as the raw request body (not as JSON).\n"
},
"draft": {
"type": "boolean"
},
"async": {
"type": "boolean"
},
"functions": {
"type": "object"
},
"edge_functions": {
"type": "object",
"description": "A hash mapping edge-function bundle formats to the code_sha of each bundle. The\nresponse's required_edge_functions lists which of these still need to be uploaded.\n"
},
"server": {
"type": "object",
"description": "The deploy's Netlify Server. A deploy has at most one. The response's\nrequired_server says whether it still needs to be uploaded.\n",
"required": [
"sha"
],
"properties": {
"sha": {
"type": "string",
"description": "The SHA256 digest of the server bundle."
},
"region": {
"type": "string",
"description": "Where the server runs. Defaults to the region configured at the site level\nwhen absent.\n"
}
}
},
"function_schedules": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"cron": {
"type": "string"
}
}
}
},
"functions_config": {
"type": "object",
"additionalProperties": {
"type": "object",
"properties": {
"display_name": {
"type": "string"
},
"generator": {
"type": "string"
},
"build_data": {
"type": "object"
},
"memory": {
"type": "integer",
"description": "The function's memory allocation in MB. Mutually exclusive with `vcpu`.\n"
},
"routes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"pattern": {
"type": "string"
},
"literal": {
"type": "string"
},
"expression": {
"type": "string"
},
"methods": {
"type": "array",
"items": {
"type": "string",
"enum": [
"GET",
"POST",
"PUT",
"PATCH",
"DELETE",
"OPTIONS"
]
}
},
"prefer_static": {
"type": "boolean"
}
}
}
},
"excluded_routes": {
"type": "array",
"items": {
"type": "object",
"properties": {
"pattern": {
"type": "string"
},
"literal": {
"type": "string"
},
"expression": {
"type": "string"
}
}
}
},
"priority": {
"type": "integer"
},
"region": {
"type": "string"
},
"traffic_rules": {
"type": "object",
"properties": {
"action": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"config": {
"type": "object",
"properties": {
"to": {
"type": "string"
},
"rate_limit_config": {
"type": "object",
"properties": {
"algorithm": {
"type": "string",
"enum": [
"sliding_window"
]
},
"window_size": {
"type": "integer"
},
"window_limit": {
"type": "integer"
}
}
},
"aggregate": {
"type": "object",
"properties": {
"keys": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"ip",
"domain"
]
}
}
}
}
}
}
}
}
}
}
}
},
"vcpu": {
"type": "number",
"format": "float",
"description": "Number of vCPUs to provision for the function. Allowed range is\n0.5–2.\n"
},
"event_subscriptions": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
},
"branch": {
"type": "string"
},
"framework": {
"type": "string"
},
"framework_version": {
"type": "string"
},
"environment": {
"description": "A list of deploy-specific environment variable data. Data specified this way applies only\nto this specific deploy and is merged into any existing environment variables set on the\naccount and site.\n\nDeploy-specific environment variable data takes precedence over account and site\nenvironment variable data: For example, a deploy-specific variable with the key `NODE_ENV`\nwill take priority over any existing site- and account-level environment variable data\nwith the key `NODE_ENV`.\n\nEnvironment variable data may be provided at one of two times:\n\n- When creating a new Deploy with deploy files (most common)\n- When finalizing an existing Deploy with deploy files\n\nOnce set, environment variables for a specific deploy cannot be modified. Subsequent\nattempts to modify environment variable data for a deploy will be ignored.\n",
"type": "array",
"items": {
"type": "object",
"required": [
"key",
"value",
"scopes",
"is_secret"
],
"properties": {
"key": {
"type": "string"
},
"value": {
"type": "string"
},
"is_secret": {
"type": "boolean"
},
"scopes": {
"type": "array",
"items": {
"type": "string",
"enum": [
"builds",
"functions",
"runtime",
"post-processing"
]
}
}
}
}
}
}
},
"required": true
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"site_id": {
"type": "string"
},
"user_id": {
"type": "string"
},
"build_id": {
"type": "string"
},
"state": {
"type": "string"
},
"name": {
"type": "string"
},
"url": {
"type": "string"
},
"ssl_url": {
"type": "string"
},
"admin_url": {
"type": "string"
},
"deploy_url": {
"type": "string"
},
"deploy_ssl_url": {
"type": "string"
},
"screenshot_url": {
"type": "string"
},
"review_id": {
"type": "number"
},
"draft": {
"type": "boolean"
},
"required": {
"type": "array",
"items": {
"type": "string"
}
},
"required_functions": {
"type": "array",
"items": {
"type": "string"
}
},
"required_edge_functions": {
"type": "array",
"items": {
"type": "string"
},
"description": "An array of code_shas for the edge-function bundles that need to be uploaded to\ncomplete the deploy.\n"
},
"required_server": {
"type": "array",
"items": {
"type": "string"
},
"description": "The SHA256 digest of the deploy's Netlify Server bundle, when it still needs to\nbe uploaded to complete the deploy. A deploy has at most one server, so this\nholds either nothing or a single digest.\n"
},
"error_message": {
"type": "string"
},
"branch": {
"type": "string"
},
"commit_ref": {
"type": "string"
},
"commit_url": {
"type": "string"
},
"skipped": {
"type": "boolean"
},
"created_at": {
"type": "string",
"format": "dateTime"
},
"updated_at": {
"type": "string",
"format": "dateTime"
},
"published_at": {
"type": "string",
"format": "dateTime"
},
"title": {
"type": "string"
},
"context": {
"type": "string"
},
"locked": {
"type": "boolean"
},
"review_url": {
"type": "string"
},
"framework": {
"type": "string"
},
"skew_protection_token": {
"type": "string"
},
"function_schedules": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"cron": {
"type": "string"
}
}
}
},
"functions_region": {
"type": "string",
"description": "The functions region for this deploy as an airport code.\n"
},
"functions_region_overrides": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"region": {
"type": "string"
}
}
},
"description": "Functions in the deploy that explicitly specify their own region\n(airport code).\n"
}
}
}
},
"default": {
"description": "error",
"schema": {
"type": "object",
"required": [
"message"
],
"properties": {
"code": {
"type": "integer",
"format": "int64"
},
"message": {
"type": "string",
"x-nullable": false
}
}
}
}
}
},
"delete": {
"operationId": "deleteSiteDeploy",
"tags": [
"deploy"
],
"parameters": [
{
"name": "deploy_id",
"type": "string",
"in": "path",
"required": true
},
{
"name": "site_id",
"type": "string",
"in": "path",
"required": true
}
],
"responses": {
"204": {
"description": "No content"
},
"default": {
"description": "error",
"schema": {
"type": "object",
"required": [
"message"
],
"properties": {
"code": {
"type": "integer",
"format": "int64"
},
"message": {
"type": "string",
"x-nullable": false
}
}
}
}
}
}
},
"/deploys/{deploy_id}/cancel": {
"post": {
"operationId": "cancelSiteDeploy",
"tags": [
"deploy"
],
"parameters": [
{
"name": "deploy_id",
"type": "string",
"in": "path",
"required": true
}
],
"responses": {
"201": {
"description": "Cancelled",
"schema": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"site_id": {
"type": "string"
},
"user_id": {
"type": "string"
},
"build_id": {
"type": "string"
},
"state": {
"type": "string"
},
"name": {
"type": "string"
},
"url": {
"type": "string"
},
"ssl_url": {
"type": "string"
},
"admin_url": {
"type": "string"
},
"deploy_url": {
"type": "string"
},
"deploy_ssl_url": {
"type": "string"
},
"screenshot_url": {
"type": "string"
},
"review_id": {
"type": "number"
},
"draft": {
"type": "boolean"
},
"required": {
"type": "array",
"items": {
"type": "string"
}
},
"required_functions": {
"type": "array",
"items": {
"type": "string"
}
},
"required_edge_functions": {
"type": "array",
"items": {
"type": "string"
},
"description": "An array of code_shas for the edge-function bundles that need to be uploaded to\ncomplete the deploy.\n"
},
"required_server": {
"type": "array",
"items": {
"type": "string"
},
"description": "The SHA256 digest of the deploy's Netlify Server bundle, when it still needs to\nbe uploaded to complete the deploy. A deploy has at most one server, so this\nholds either nothing or a single digest.\n"
},
"error_message": {
"type": "string"
},
"branch": {
"type": "string"
},
"commit_ref": {
"type": "string"
},
"commit_url": {
"type": "string"
},
"skipped": {
"type": "boolean"
},
"created_at": {
"type": "string",
"format": "dateTime"
},
"updated_at": {
"type": "string",
"format": "dateTime"
},
"published_at": {
"type": "string",
"format": "dateTime"
},
"title": {
"type": "string"
},
"context": {
"type": "string"
},
"locked": {
"type": "boolean"
},
"review_url": {
"type": "string"
},
"framework": {
"type": "string"
},
"skew_protection_token": {
"type": "string"
},
"function_schedules": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"cron": {
"type": "string"
}
}
}
},
"functions_region": {
"type": "string",
"description": "The functions region for this deploy as an airport code.\n"
},
"functions_region_overrides": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"region": {
"type": "string"
}
}
},
"description": "Functions in the deploy that explicitly specify their own region\n(airport code).\n"
}
}
}
},
"default": {
"description": "error",
"schema": {
"type": "object",
"required": [
"message"
],
"properties": {
"code": {
"type": "integer",
"format": "int64"
},
"message": {
"type": "string",
"x-nullable": false
}
}
}
}
}
}
},
"/sites/{site_id}/deploys/{deploy_id}/restore": {
"post": {
"operationId": "restoreSiteDeploy",
"tags": [
"deploy"
],
"parameters": [
{
"name": "site_id",
"type": "string",
"in": "path",
"required": true
},
{
"name": "deploy_id",
"type": "string",
"in": "path",
"required": true
}
],
"responses": {
"201": {
"description": "Created",
"schema": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"site_id": {
"type": "string"
},
"user_id": {
"type": "string"
},
"build_id": {
"type": "string"
},
"state": {
"type": "string"
},
"name": {
"type": "string"
},
"url": {
"type": "string"
},
"ssl_url": {
"type": "string"
},
"admin_url": {
"type": "string"
},
"deploy_url": {
"type": "string"
},
"deploy_ssl_url": {
"type": "string"
},
"screenshot_url": {
"type": "string"
},
"review_id": {
"type": "number"
},
"draft": {
"type": "boolean"
},
"required": {
"type": "array",
"items": {
"type": "string"
}
},
"required_functions": {
"type": "array",
"items": {
"type": "string"
}
},
"required_edge_functions": {
"type": "array",
"items": {
"type": "string"
},
"description": "An array of code_shas for the edge-function bundles that need to be uploaded to\ncomplete the deploy.\n"
},
"required_server": {
"type": "array",
"items": {
"type": "string"
},
"description": "The SHA256 digest of the deploy's Netlify Server bundle, when it still needs to\nbe uploaded to complete the deploy. A deploy has at most one server, so this\nholds either nothing or a single digest.\n"
},
"error_message": {
"type": "string"
},
"branch": {
"type": "string"
},
"commit_ref": {
"type": "string"
},
"commit_url": {
"type": "string"
},
"skipped": {
"type": "boolean"
},
"created_at": {
"type": "string",
"format": "dateTime"
},
"updated_at": {
"type": "string",
"format": "dateTime"
},
"published_at": {
"type": "string",
"format": "dateTime"
},
"title": {
"type": "string"
},
"context": {
"type": "string"
},
"locked": {
"type": "boolean"
},
"review_url": {
"type": "string"
},
"framework": {
"type": "string"
},
"skew_protection_token": {
"type": "string"
},
"function_schedules": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"cron": {
"type": "string"
}
}
}
},
"functions_region": {
"type": "string",
"description": "The functions region for this deploy as an airport code.\n"
},
"functions_region_overrides": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"region": {
"type": "string"
}
}
},
"description": "Functions in the deploy that explicitly specify their own region\n(airport code).\n"
}
}
}
},
"default": {
"description": "error",
"schema": {
"type": "object",
"required": [
"message"
],
"properties": {
"code": {
"type": "integer",
"format": "int64"
},
"message": {
"type": "string",
"x-nullable": false
}
}
}
}
}
}
},
"/sites/{site_id}/builds": {
"parameters": [
{
"name": "site_id",
"type": "string",
"in": "path",
"required": true
}
],
"get": {
"operationId": "listSiteBuilds",
"tags": [
"build"
],
"parameters": [
{
"type": "integer",
"format": "int32",
"name": "page",
"required": false,
"in": "query"
},
{
"type": "integer",
"format": "int32",
"name": "per_page",
"required": false,
"in": "query"
}
],
"responses": {
"200": {
"description": "OK",
"schema": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"deploy_id": {
"type": "string"
},
"sha": {
"type": "string"
},
"done": {
"type": "boolean"
},
"error": {
"type": "string"
},
"created_at": {
"type": "string",
"format": "dateTime"
}
}
}
}
},
"default": {
"description": "error",
"schema": {
"type": "object",
"required": [
"message"
],
"properties": {
"code": {
"type": "integer",
"format": "int64"
},
"message": {
"type": "string",
"x-nullable": false
}
}
}
}
}
},
"post": {
"operationId": "createSiteBuild",
"tags": [
"build"
],
"description": "Runs a build for a site. The build will be scheduled to run at the first opportunity, but it might not start immediately if insufficient account build capacity is available.\n\nFiles for build can be uploaded as a zipped site using one of these methods:\n1. Set Content-Type to 'application/zip' and send the zip file as the raw request body\n2. Set Content-Type to 'multipart/form-data' and include the zip file in the 'zip' field\n",
"consumes": [
"multipart/form-data"
],
"parameters": [
{
"name": "branch",
"description": "If no branch is specified, it is treated as a production deploy If a branch IS specified and matches the main branch, it is also production If a branch is specified and doesn't match the main branch, it is a branch deploy",
"required": false,
"in": "query",
"type": "string"
},
{
"name": "clear_cache",
"description": "Whether to clear the build cache before building",
"required": false,
"in": "query",
"type": "boolean"
},
{
"name": "image",
"description": "The build image tag to use for the build",
"required": false,
"in": "query",
"type": "string"
},
{
"name": "template_id",
"description": "The build template to use for the build",
"required": false,
"in": "query",
"type": "string"
},
{
"name": "title",
"description": "The title of the build",
"required": false,
"in": "query",
"type": "string"
},
{
"name": "zip",
"description": "A zip file containing the site files to build.\nOnly used with Content-Type 'multipart/form-data'.\nAlternatively, set Content-Type to 'application/zip' and send the zip as the raw request body (no 'zip' parameter needed).\n",
"required": false,
"in": "formData",
"type": "file"