Loading…
Loading…
Manage backend profiles for API services, including connection settings, authentication, and testing. Create, update,delete, and test backend
The Backend Profile Management API provides endpoints for configuring and managing BackendProfile resources. A backend profile defines how the API platform connects to a backend service, including its endpoint URL, authentication method, timeouts, and retry logic.
API publishers use this API to perform the following operations:
All operations are scoped to a service and require appropriate authentication. The API provides detailed error responses and logs audit events for all state-changing operations.
The controller exposes a set of RESTful endpoints that operate on backend profile resources stored in a repository.
Backend profiles are managed on a per-service basis.
POST request to /admin/v1/services/{serviceId}/backend-profiles. The request body contains all configuration parameters for the new profile.PATCH request to /admin/v1/backend-profiles/{profileId}. The request body includes only the fields to be changed. Unspecified fields retain their current values.credentials field in create and update requests accepts a map containing plaintext secrets. The server only processes fields relevant to the selected authType and mtlsEnabled settings, strips any others, and encrypts the relevant values before persistence. The API never returns plaintext credentials; it only provides metadata indicating if credentials are set and when they were last updated.To ensure that the runtime gateway always uses fresh credentials, the API automatically invalidates the runtime's in-memory OAuth2 token cache when a profile's OAuth2 configuration is updated.
This invalidation is triggered under the following conditions for a profile with authType set to oauth2_client_credentials:
credentials field is updated.oauth2_* fields are modified.authType is changed to or from oauth2_client_credentials.The flush operation is asynchronous and non-blocking. This mechanism prevents the use of stale tokens, which might otherwise remain active for their full lifetime even after credentials have been rotated.
The following diagram illustrates the update flow with cache invalidation:
flowchart TD
subgraph Update Backend Profile
A[API Publisher] -- PATCH /admin/v1/backend-profiles/{profileId} --> B{Admin API};
B -- Finds & updates profile --> C[Database];
B -- Checks for OAuth2 changes --> D{OAuth2 Config Changed?};
D -- Yes --> E[Async Flush Runtime Token Cache];
D -- No --> F[Return 200 OK];
E --> F;
B -- Returns updated profile --> A;
endThe API provides several endpoints to test and validate a backend profile's configuration before and after deployment:
endpointUrl and can optionally attempt to fetch a WSDL from the wsdlUrl.These test endpoints support "preview" configurations. An API publisher can provide temporary, unsaved overrides for the backend profile, operation settings, validation rules, and transforms directly in the test request. This allows for testing changes without modifying the active configuration.
Most operations can be performed by authenticated users with standard permissions. However, configuring certain sensitive authentication methods requires elevated privileges.
IMPORTANT
Creating or updating a backend profile to use workload_identity_federation as the oauth2ClientAuthMethod requires the ADMIN role. This also applies to modifying the oauth2TokenEndpoint or oauth2FederatedTokenAudience of an existing profile that uses this method.
Lists all backend profiles for a given service.
GET /admin/v1/services/{serviceId}/backend-profiles
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
serviceId | UUID | Yes | The unique ID of the service. |
Responses
200 OK: Returns a JSON array of backend profile objects.404 Not Found: If the service does not exist.Creates a new backend profile for a service.
POST /admin/v1/services/{serviceId}/backend-profiles
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
serviceId | UUID | Yes | The unique ID of the service. |
Request Body
A JSON object with the structure of CreateBackendProfileRequest. See the Request Body Payloads section for details.
Responses
200 OK: Returns the created backend profile object.400 Bad Request: If the request payload is invalid (e.g., S2R-VAL-0401) or the OAuth2 configuration is invalid (S2R-VAL-0405).403 Forbidden: If attempting to use workload_identity_federation without ADMIN role (S2R-ADM-0403).Updates an existing backend profile. Only the fields provided in the request body are modified.
PATCH /admin/v1/backend-profiles/{profileId}
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
profileId | UUID | Yes | The unique ID of the backend profile. |
Request Body
A JSON object with the structure of PatchBackendProfileRequest. See the Request Body Payloads section for details.
Responses
200 OK: Returns the updated backend profile object.400 Bad Request: If the request payload is invalid (S2R-VAL-0401) or the OAuth2 configuration is invalid (S2R-VAL-0405).403 Forbidden: If attempting to modify a profile to use workload_identity_federation without ADMIN role (S2R-ADM-0403).404 Not Found: If no backend profile with the given profileId exists (S2R-ADM-0404).Deletes a backend profile.
DELETE /admin/v1/backend-profiles/{profileId}
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
profileId | UUID | Yes | The unique ID of the backend profile. |
Responses
200 OK: Returns a DeleteBackendProfileResponse object confirming the deletion.400 Bad Request: If the profile cannot be deleted (e.g., it is in use) (S2R-VAL-0401).404 Not Found: If no backend profile with the given profileId exists (S2R-ADM-0404).Performs a connectivity test against the backend profile's endpoint.
POST /admin/v1/backend-profiles/{profileId}:test-connection
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
profileId | UUID | Yes | The unique ID of the backend profile. |
Request Body
An optional JSON object with the following structure:
| Field | Type | Required | Description |
|---|---|---|---|
fetchWsdl | Boolean | No | If true, the test will also attempt to fetch the WSDL from wsdlUrl. |
Responses
200 OK: Returns a JSON object with the test results.404 Not Found: If no backend profile with the given profileId exists (S2R-ADM-0404).Executes a full application-level test against the backend using a provided request.
POST /admin/v1/backend-profiles/{profileId}:test-application
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
profileId | UUID | Yes | The unique ID of the backend profile. |
Request Body
A JSON object with the structure of ApplicationTestRequest. The operationId field is required. See the Request Body Payloads section for details.
Responses
200 OK: Returns a JSON object with the test results, including the backend's response.400 Bad Request: If the request is invalid, such as a missing operationId (S2R-VAL-0401).404 Not Found: If no backend profile with the given profileId exists (S2R-ADM-0404).A variant of the application test. If requestFormat is not provided, it defaults to json.
POST /admin/v1/backend-profiles/{profileId}:test-rest
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
profileId | UUID | Yes | The unique ID of the backend profile. |
Request Body
A JSON object with the structure of ApplicationTestRequest. The operationId field is required. See the Request Body Payloads section for details.
Responses
200 OK: Returns a JSON object with the test results.400 Bad Request: If the request is invalid (S2R-VAL-0401).404 Not Found: If no backend profile with the given profileId exists (S2R-ADM-0404).Executes tests against the backend using generated sample requests.
POST /admin/v1/backend-profiles/{profileId}:test-generated-samples
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
profileId | UUID | Yes | The unique ID of the backend profile. |
Request Body
An optional JSON object with the structure of GeneratedSampleTestRequest. See the Request Body Payloads section for details.
Responses
200 OK: Returns a JSON object with the results of the sample tests.400 Bad Request: If the request is invalid (S2R-VAL-0401).404 Not Found: If no backend profile with the given profileId exists (S2R-ADM-0404).Retrieves recent test previews for a backend profile.
GET /admin/v1/backend-profiles/{profileId}/test-previews
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
profileId | UUID | Yes | The unique ID of the backend profile. |
Query Parameters
| Name | Type | Default | Description |
|---|---|---|---|
limit | Integer | 20 | The maximum number of test previews to return. |
Responses
200 OK: Returns a JSON array of test preview objects.404 Not Found: If no backend profile with the given profileId exists (S2R-ADM-0404).Retrieves the synthetic monitor configuration for a service.
GET /admin/v1/services/{serviceId}/synthetic-monitor
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
serviceId | UUID | Yes | The unique ID of the service. |
Responses
200 OK: Returns the synthetic monitor configuration object, or null if not configured.Creates or updates the synthetic monitor configuration for a service.
POST /admin/v1/services/{serviceId}/synthetic-monitor
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
serviceId | UUID | Yes | The unique ID of the service. |
Request Body
A JSON object with the structure of SaveSyntheticMonitorRequest. The backendProfileId and operationId fields are required. See the Request Body Payloads section for details.
Responses
200 OK: Returns the saved synthetic monitor configuration object.400 Bad Request: If the request is invalid, such as missing backendProfileId or operationId (S2R-VAL-0401).Lists all test datasets for a service.
GET /admin/v1/services/{serviceId}/test-datasets
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
serviceId | UUID | Yes | The unique ID of the service. |
Responses
200 OK: Returns a JSON array of test dataset objects.400 Bad Request: If the serviceId is invalid (S2R-VAL-0401).Creates or updates a test dataset for a service.
POST /admin/v1/services/{serviceId}/test-datasets
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
serviceId | UUID | Yes | The unique ID of the service. |
Request Body
A JSON object with the structure of SaveTestDatasetRequest. The datasetName field is required. See the Request Body Payloads section for details.
NOTE
If a callbackSecretRef is provided in the previewOperation object, it will be automatically removed before saving the dataset to prevent secrets from being stored.
Responses
200 OK: Returns the saved test dataset object.400 Bad Request: If the request is invalid, such as a missing datasetName (S2R-VAL-0401).Deletes a test dataset.
DELETE /admin/v1/test-datasets/{datasetId}
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
datasetId | UUID | Yes | The unique ID of the test dataset. |
Responses
200 OK: Returns the deleted test dataset object.400 Bad Request: If the datasetId is invalid or not found (S2R-VAL-0401).CreateBackendProfileRequest & PatchBackendProfileRequestThese objects define the configuration of a backend profile. For PATCH requests, only include the fields you wish to change.
| Field | Type | Required (Create) | Description |
|---|---|---|---|
profileName | String | Yes | A human-readable name for the profile. |
endpointUrl | String | Yes | The base URL of the backend service. |
wsdlUrl | String | No | The URL to the WSDL file for SOAP-based backends. |
healthcheckUrl | String | No | A specific URL for health checks. If not provided, endpointUrl is used. |
healthCheckMode | String | No | The mode for health checks. The source does not specify possible values. |
hostHeader | String | No | A custom Host header to be sent to the backend. |
authType | String | Yes | The authentication method to use (e.g., oauth2_client_credentials). |
mtlsEnabled | Boolean | Yes | Whether mTLS is enabled for the connection. |
soapNamespace | String | No | The SOAP namespace for SOAP-based backends. |
soapVersion | String | No | The SOAP version (e.g., "1.1", "1.2").
| --- | --- | --- |
| connectionTimeoutMs | Integer | No | Connection timeout in milliseconds.
| readTimeoutMs | Integer | No | Read timeout in milliseconds.
| retryCount | Integer | No | Number of times to retry a failed request.| retryBackoffMs | Integer | No | The delay in milliseconds between retries.
| --- | --- | --- |
| routingPriority | Integer | No | Priority for routing when multiple active profiles exist. The source does not specify the range or behavior.
| routingWeight | Integer | No | Weight for routing when multiple active profiles exist. The source does not specify the range or behavior.
| active | Boolean | No | Whether this profile is active for routing.
| extraHeaders | Array<ExtraHeader> | No | A list of custom HTTP headers to add to requests to the backend. See ExtraHeader structure below.