Ana içeriğe atla

Endpoint

Authentication

Requires a Personal API Access Token.

Request

Headers

Path Parameters

Request Body

Full JSON Body Example

Request Body Fields

corsSettings Fields

EnumHttpRequestMethod

  • GET - GET method
  • POST - POST method
  • PUT - PUT method
  • DELETE - DELETE method
  • PATCH - PATCH method
  • OPTIONS - OPTIONS method
  • HEAD - HEAD method
  • TRACE - TRACE method
  • ALL - All methods

Note

  • allowOriginList can contain "*" to allow all origins, but this cannot be used with allowCredentials: "true"
  • allowHeaderList can contain "*" to allow all headers
  • allowCredentials must be a string ("true" or "false"), not a boolean

Response

Success Response (200 OK)

When deploy=true is specified:

Response Fields

Error Response (400 Bad Request)

Error Response (401 Unauthorized)

Error Response (404 Not Found)

cURL Example

Example 1: Enable CORS for All Origins

Example 2: Enable CORS for Specific Origins

Example 3: Save and Deploy

Notes and Warnings

  • Wildcard Origin: Using "*" in allowOriginList allows all origins but cannot be used with allowCredentials: "true"
  • Credentials: When allowCredentials is "true", you must specify exact origins (no wildcard)
  • Preflight Requests: The maxAge value determines how long browsers cache preflight OPTIONS requests
  • Headers: Use ["*"] in allowHeaderList to allow all headers, or specify exact header names
  • Exposed Headers: Headers in exposeHeaderList are accessible to client-side JavaScript
  • Deploy: When deploy=true, the API proxy is automatically deployed to the specified environments after saving

Permissions

User must have API_MANAGEMENT + MANAGE permission in the project.