deployment-openapi.json•7.17 kB
{
"openapi": "3.1.0",
"info": {
"title": "Convex Deployment API",
"description": "Admin API for interacting with deployments.",
"license": {
"name": "LicenseRef-FSL-1.1-Apache-2.0",
"identifier": "LicenseRef-FSL-1.1-Apache-2.0"
},
"version": "1.0.0"
},
"servers": [
{
"url": "{deployment-url}/api/v1",
"description": "Your Convex deployment",
"variables": {
"deployment-url": {
"default": "https://happy-animal-123.convex.cloud",
"description": "Your deployment URL"
}
}
}
],
"paths": {
"/update_environment_variables": {
"post": {
"summary": "Update environment variables",
"description": "Update one or many environment variables in a deployment.\nThis will invalidate all subscriptions, since environment variables\nare accessible in queries but are not part of the cache key of a query\nresult.",
"operationId": "update_environment_variables",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UpdateEnvVarsRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": ""
}
},
"security": [
{
"Deploy Key": []
},
{
"OAuth Team Token": []
},
{
"Team Token": []
},
{
"OAuth Project Token": []
}
]
}
},
"/list_environment_variables": {
"get": {
"summary": "List environment variables",
"description": "Get all environment variables in a deployment.\nIn the future this might not include \"secret\" environment\nvariables.",
"operationId": "list_environment_variables",
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ListEnvVarsResponse"
}
}
}
}
},
"security": [
{
"Deploy Key": []
},
{
"OAuth Team Token": []
},
{
"Team Token": []
},
{
"OAuth Project Token": []
}
]
}
},
"/update_canonical_url": {
"post": {
"summary": "Update canonical URL",
"description": "Set or unset the canonical URL for a deployment's convex.cloud or\nconvex.site domain. This allows you to customize the CONVEX_SITE_URL and\nCONVEX_CLOUD_URL environment variables in your deployment.",
"operationId": "update_canonical_url",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UpdateCanonicalUrlRequest"
}
}
},
"required": true
},
"responses": {
"200": {
"description": ""
}
}
}
},
"/get_canonical_urls": {
"get": {
"summary": "Get canonical URLs",
"description": "Get the canonical URLs for a deployment.",
"operationId": "get_canonical_urls",
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GetCanonicalUrlsResponse"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"GetCanonicalUrlsResponse": {
"type": "object",
"required": [
"convexCloudUrl",
"convexSiteUrl"
],
"properties": {
"convexCloudUrl": {
"type": "string"
},
"convexSiteUrl": {
"type": "string"
}
}
},
"ListEnvVarsResponse": {
"type": "object",
"required": [
"environmentVariables"
],
"properties": {
"environmentVariables": {
"type": "object",
"additionalProperties": {
"type": "string"
},
"propertyNames": {
"type": "string"
}
}
}
},
"RequestDestination": {
"type": "string",
"enum": [
"convexCloud",
"convexSite"
]
},
"UpdateCanonicalUrlRequest": {
"type": "object",
"required": [
"requestDestination"
],
"properties": {
"requestDestination": {
"$ref": "#/components/schemas/RequestDestination",
"description": "Whether to update the canonical URL for convex.cloud or convex.site"
},
"url": {
"type": [
"string",
"null"
],
"description": "The new canonical URL. Omit this to reset the canonical URl to the\ndefault value."
}
}
},
"UpdateEnvVarRequest": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string"
},
"value": {
"type": [
"string",
"null"
]
}
}
},
"UpdateEnvVarsRequest": {
"type": "object",
"required": [
"changes"
],
"properties": {
"changes": {
"type": "array",
"items": {
"$ref": "#/components/schemas/UpdateEnvVarRequest"
}
}
}
}
},
"securitySchemes": {
"Deploy Key": {
"type": "apiKey",
"in": "header",
"name": "Authorization",
"description": "Deploy keys are used for deployment operations. See [deploy key types](https://docs.convex.dev/cli/deploy-key-types) for more information. Use the `Convex ` prefix (e.g., `Convex <deploy_key>`)."
},
"OAuth Project Token": {
"type": "apiKey",
"in": "header",
"name": "Authorization",
"description": "Obtained through a [Convex OAuth application](https://docs.convex.dev/management-api) with project scope. Use the `Convex ` prefix (e.g., `Convex <oauth_project_token>`)."
},
"OAuth Team Token": {
"type": "apiKey",
"in": "header",
"name": "Authorization",
"description": "Obtained through a [Convex OAuth application](https://docs.convex.dev/management-api). Use the `Convex ` prefix (e.g., `Convex <oauth_token>`)."
},
"Team Token": {
"type": "apiKey",
"in": "header",
"name": "Authorization",
"description": "Created in the dashboard under team settings for any team you can manage. Use the `Convex ` prefix (e.g., `Convex <team_token>`)."
}
}
}
}