Endpoint
Authentication
Requires a Personal API Access Token.Header
Request
Headers
| Header | Value | Required |
|---|---|---|
| Authorization | Bearer | Yes |
| Content-Type | application/json | Yes |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| projectName | string | Yes | Project name |
| apiProxyName | string | Yes | API Proxy name |
Request Body
Full JSON Body Example
Request Body Fields
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| jsonErrorResponseTemplateActive | boolean | No | false | Enable/disable JSON error template |
| jsonValue | string | No | - | JSON error response template |
| contentType | string | No | application/json;charset=UTF-8 | Content type for error response |
| permitSpecialChars | boolean | No | false | Permit special characters in template |
Template Variables
The JSON template can use the following variables (replaced at runtime):#CORRELATIONID#- Request correlation ID#FAULTCODE#- Error fault code#FAULTMESSAGE#- Error fault message#FAULTSTATUSCODE#- HTTP status code#RESPONSEFROMAPI#- Response from backend API (if available)
Default Template
Response
Success Response (200 OK)
Response Fields
| Field | Type | Description |
|---|---|---|
| success | boolean | Indicates if the request was successful |
Error Response (400 Bad Request)
Error Response (401 Unauthorized)
Error Response (404 Not Found)
cURL Example
Example 1: Enable JSON Error Template
Example 2: Custom JSON Error Template
Notes and Warnings
- Template Variables: Use
#VARIABLE#syntax for runtime replacement - JSON Format: Template must be valid JSON (use escaped quotes in string)
- Content Type: Default is
application/json;charset=UTF-8 - Special Characters: When
permitSpecialChars=true, special characters are not escaped - Active Flag: Set
jsonErrorResponseTemplateActive=trueto enable template - REST APIs: Primarily used for REST/JSON APIs
Permissions
User must haveAPI_MANAGEMENT + MANAGE permission in the project.
Related Documentation
- Update XML Error Template - Update XML error template
- Get API Proxy - Get API proxy details

