Loading…
Loading…
Manage system-wide default settings for data type conversions, validation, and format transformations. Configure policies for strings, numbers, booleans
The Conversion Defaults API provides administrative endpoints to configure system-wide default policies for data type conversions and transformations. These settings govern the platform's behavior when converting between SOAP and REST formats, ensuring consistency across all integrated APIs.
API publishers with administrative privileges use these endpoints to define policies for a wide range of behaviors, including:
Changes made via this API are stored in the system settings repository and are audit-logged. The configured defaults are applied globally but can be overridden by more specific configurations at the individual service level.
The API also includes diagnostic endpoints to help identify service definitions that may be affected by these policies, such as finding string fields that lack validation patterns.
IMPORTANT
Access to mutate settings via these endpoints requires an ADMIN role. Read-only operations may have different requirements, but all endpoints under /admin/v1/settings/* are subject to role-based access control.
The ConversionDefaultsController manages settings through a set of RESTful endpoints. Administrators can retrieve the current settings, update them, and run diagnostics.
GET /admin/v1/settings/conversion-defaults: Fetches the current effective settings. If a particular setting has not been explicitly configured, the system returns the built-in default value for that policy.PUT /admin/v1/settings/conversion-defaults: Updates one or more settings. The request body can contain any combination of the available configuration sections. This allows for partial updates; you only need to provide the sections you wish to change. The system validates each submitted value. Upon successful validation, the new settings are persisted, and an audit event is created containing the state of the settings before and after the change.The following diagram illustrates the process of updating a conversion default setting.
sequenceDiagram
participant Admin as API Publisher
participant API as Conversion Defaults API
participant DB as System Settings
participant Log as Audit Log
Admin->>API: PUT /admin/v1/settings/conversion-defaults (payload)
activate API
API->>API: Validate payload (modes, regex, etc.)
alt Invalid Payload
API-->>Admin: 400 Bad Request (error details)
else Valid Payload
API->>DB: Read current settings (for 'before' state)
activate DB
DB-->>API: Current settings
deactivate DB
API->>DB: Write updated settings
activate DB
DB-->>API: Write confirmation
deactivate DB
API->>Log: Record audit event (before/after)
activate Log
Log-->>API: Log confirmation
deactivate Log
API-->>Admin: 200 OK (new effective settings)
end
deactivate APITwo read-only endpoints are available for diagnosing the impact of string validation policies:
:preview: Provides a system-wide summary of how many string fields in draft service versions are "unconstrained" (i.e., lack a validation regex).unconstrained-string-fields: Lists the specific unconstrained string fields for a given service version, providing details like operation ID and field path. This is useful for identifying which fields need attention based on the configured string policy.Retrieves the complete set of effective conversion default settings.
GET/admin/v1/settings/conversion-defaults200 OK
Creates or updates one or more conversion default policies.
PUT/admin/v1/settings/conversion-defaultsConversionDefaultsRequest, containing the policies to update. See Configuration Reference for all available fields.200 OK
GET response.400 Bad Request: The request body is invalid. See the Troubleshooting section for detailed error codes.NOTE
The PUT operation supports partial updates. You only need to include the top-level keys for the policies you want to change. For example, to update only the boolean handling policy, your request body can contain just the booleanHandling object. All other policies will retain their existing values.
Returns a summary of unconstrained string fields across all draft service versions. An unconstrained string field is one that does not have a validation regex pattern applied.
GET/admin/v1/settings/conversion-defaults:preview200 OK
totalDraftServiceVersions (Integer): Total number of service versions in a draft state.totalStringFields (Integer): Total number of string fields across all draft versions.unconstrainedFieldsCount (Integer): Total number of unconstrained string fields across all draft versions.perVersionSummary (Array of Objects): A list of summaries for each draft version with unconstrained fields. Each object contains:
serviceVersionId (UUID)serviceKey (String)environment (String)versionNo (Integer)totalStringFields (Integer)unconstrainedCount (Integer)computedAt (String): The ISO 8601 timestamp when the summary was generated.Returns a detailed list of all unconstrained string fields for a specific service version.
GET/admin/v1/services/{serviceId}/versions/{versionId}/unconstrained-string-fieldsserviceId (UUID): The unique identifier of the service.versionId (UUID): The unique identifier of the service version.200 OK
serviceId (UUID): The service ID from the request.serviceVersionId (UUID): The service version ID from the request.totalStringFields (Integer): Total number of string fields in this version.unconstrainedCount (Integer): Number of unconstrained string fields in this version.fields (Array of Objects): A list of unconstrained fields. Each object contains:
operationId (String)operationKey (String)jsonPath (String)soapXPath (String)direction (String)fieldName (String)xsdType (String)computedAt (String): The ISO 8601 timestamp when the list was generated.The PUT /admin/v1/settings/conversion-defaults endpoint accepts a ConversionDefaultsRequest JSON object. The following tables describe all possible fields in this object.
These fields are at the root of the request body.
| Field | Type | Description |
|---|---|---|
mode | String | Deprecated. Use the mode field within the stringWithoutRegex object instead. |
genericRegex | String | Deprecated. Use the genericRegex field within the stringWithoutRegex object instead. |
patternStrategy | String | The strategy for applying the genericRegex. The source does not specify the list of valid modes. Defaults to one-of if not provided. |
stringWithoutRegex | Object | Policy for handling string fields that lack a pattern. See String Handling. |
booleanHandling | Object | Policy for converting boolean values. See Boolean Handling. |
upstreamFailureStatus | Object | Policy for handling upstream failure statuses. See Upstream Failure Status Handling. |
nullHandling | Object | Policy for representing null values. See Null Handling. |
datetimeHandling | Object | Policy for formatting dates and times. See Date/Time Handling. |
arrayCollapse | Object | Policy for handling single-element arrays. See Array Collapse Handling. |
numericHandling | Object | Policy for handling numeric types. See Numeric Handling. |
whitespaceHandling | Object | Policy for handling whitespace in strings. See Whitespace Handling. |
binaryHandling | Object | Policy for encoding binary data. See Binary Data Handling. |
durationHandling | Object | Policy for formatting xsd:duration values. See Duration Handling. |
requiredHandling | Object | Policy for handling fields that are required but empty. See Required Field Handling. |
headerPropagation | Object | Policy for propagating SOAP headers. See Header Propagation. |
fieldCasing | Object | Policy for JSON field name casing. See Field Casing. |
envelopeWrap | Object | Policy for wrapping responses in an envelope. See Response Envelope Wrapping. |
errorShape | Object | Policy for the structure of error responses. See Error Shape. |
xsiTypeHandling | Object | Policy for handling xsi:type attributes. See xsi:type Handling. |
fieldOrdering | Object | Policy for ordering fields in JSON objects. See Field Ordering. |
integerRangeBounds | Object | Policy for emitting int32 and int64 range bounds. See Integer Range Bounds. |
Defines the policy for string fields without a validation pattern. Corresponds to the stringWithoutRegex object.
| Field | Type | Description |
|---|---|---|
mode | String | The enforcement mode. The source does not specify the list of valid modes. |
genericRegex | String | A regular expression to apply to strings that do not have a specific pattern. Must be a valid and safe regex. |
patternStrategy | String | The strategy for applying the genericRegex. The source does not specify the list of valid modes. |
Defines the policy for boolean value conversion. Corresponds to the booleanHandling object.
| Field | Type | Description |
|---|---|---|
mode | String | The conversion mode for booleans. The source does not specify the list of valid modes. |
Defines how upstream failure status codes are handled. Corresponds to the upstreamFailureStatus object.
| Field | Type | Description |
|---|---|---|
mode | String | The handling mode for upstream failures. The source does not specify the list of valid modes. |
Defines how null values are represented in requests and responses. Corresponds to the nullHandling object. Fields are optional; if a direction is omitted, its current setting is preserved.
| Field | Type | Description |
|---|---|---|
request | String | The null representation mode for requests. The source does not specify the list of valid modes. |
response | String | The null representation mode for responses. The source does not specify the list of valid modes. |
Defines formatting for date and time values. Corresponds to the datetimeHandling object. Fields are optional; if omitted, current settings are preserved.
| Field | Type | Description |
|---|---|---|
format | String | The date-time format. Valid values are defined in DateTimeHandling.VALID_FORMATS; the source does not list them. If format is custom, customPattern is required. |
customPattern | String | A DateTimeFormatter-compatible pattern string. Required if format is custom. Max length is defined by DateTimeHandling.MAX_PATTERN_LENGTH. |
timezone | String | The timezone handling strategy. Valid values are defined in DateTimeHandling.VALID_TIMEZONES; the source does not list them. If timezone is local, localTimezone is required. |
localTimezone | String | A valid IANA Time Zone ID (e.g., "America/New_York"). Required if timezone is local. |
nullMode | String | How to represent null date/time values. Valid values are omit or null. Defaults to omit. |
Defines how to handle arrays that contain a single element. Corresponds to the arrayCollapse object.
| Field | Type | Description |
|---|---|---|
mode | String | The handling mode for single-element arrays. The source does not specify the list of valid modes. |
Defines the policy for numeric type conversion. Corresponds to the numericHandling object.
| Field | Type | Description |
|---|---|---|
mode | String | The conversion mode for numeric types. The source does not specify the list of valid modes. |
Defines the policy for handling whitespace in string values. Corresponds to the whitespaceHandling object.
| Field | Type | Description |
|---|---|---|
mode | String | The handling mode for whitespace. The source does not specify the list of valid modes. |
Defines the encoding for binary data (xsd:base64Binary). Corresponds to the binaryHandling object.
| Field | Type | Default | Description |
|---|---|---|---|
mode | String | — | The encoding mode for binary data. The source does not specify the list of valid modes. |
dataUrlMimeType | String | application/octet-stream | The MIME type to use when mode is data-url. Must be a valid RFC 6838 MIME type token. |
Defines the formatting for xsd:duration values. Corresponds to the durationHandling object.
| Field | Type | Description |
|---|---|---|
mode | String | The formatting mode for durations. The source does not specify the list of valid modes. |
Defines how to handle fields marked as required but are empty. Corresponds to the requiredHandling object.
| Field | Type | Description |
|---|---|---|
mode | String | The handling mode for required-but-empty fields. The source does not specify the list of valid modes. |
Defines the policy for propagating SOAP headers. Corresponds to the headerPropagation object.
| Field | Type | Default | Description |
|---|---|---|---|
mode | String | — | The propagation mode. The source does not specify the list of valid modes. |
headerAllowlist | Array of Strings | [] | A list of header names to propagate. Entries must be ASCII alphanumeric with -_:. and no longer than HeaderPropagation.MAX_ENTRY_LENGTH. |
headerDenylist | Array of Strings | A predefined system list. | A list of header names to block. Follows the same entry validation rules as headerAllowlist. |
Defines the casing for JSON field names. Corresponds to the fieldCasing object. Input is case-insensitive, but stored and returned in a canonical format.
| Field | Type | Description |
|---|---|---|
mode | String | The casing style (e.g., camelCase). The source does not specify the list of valid modes. |
Defines if and how JSON responses are wrapped in an envelope. Corresponds to the envelopeWrap object.
| Field | Type | Description |
|---|---|---|
mode | String | The envelope wrapping mode. The source does not specify the list of valid modes. |
Defines the structure of JSON error responses. Corresponds to the errorShape object.
| Field | Type | Description |
|---|---|---|
mode | String | The error response structure. The source does not specify the list of valid modes. |
Defines how to handle xsi:type attributes from SOAP, which are used for polymorphism. Corresponds to the xsiTypeHandling object.
| Field | Type | Default | Description |
|---|---|---|---|
mode | String | — | The handling mode for xsi:type. The source does not specify the list of valid modes. |
discriminatorFieldName | String | _type | The name of the JSON field to store the type information. Must be ≤64 chars, start with a letter or _, and contain only letters, numbers, _, or -. |
Defines the order of fields in JSON response objects. Corresponds to the fieldOrdering object.
| Field | Type | Description |
|---|---|---|
mode | String | The field ordering mode. The source does not specify the list of valid modes. |
Defines whether to emit minimum/maximum bounds for int32 and int64 types in the generated OpenAPI Specification. Corresponds to the integerRangeBounds object.
| Field | Type | Description |
|---|---|---|
mode | String | The emission mode for integer bounds. The source does not specify the list of valid modes. |
The response body for GET /admin/v1/settings/conversion-defaults and a successful PUT contains all the fields listed in the Configuration Reference, reflecting the current effective settings. It also includes the following field:
| Field | Type | Description |
|---|---|---|
updatedAt | String | An ISO 8601 timestamp indicating when the settings were last computed for the response. |
Additionally, for backward compatibility, the response includes mode, genericRegex, and patternStrategy at the top level, which are duplicates of the fields within the stringWithoutRegex object.
When a PUT request is invalid, the API returns a 400 Bad Request status with a JSON body containing an error code and message.
| Error Code | Message Fragment | Cause |
|---|---|---|
S2R-ADM-0431 | no-section-supplied | The request body was empty or did not contain any recognized configuration sections. |
S2R-ADM-0431 | invalid-conversion-defaults-mode | The mode in the stringWithoutRegex section is not a valid value. |
S2R-ADM-0432 | invalid-conversion-defaults-regex | The genericRegex is invalid (e.g., fails to compile, is too long, or is deemed unsafe). |
S2R-ADM-0458 | invalid-conversion-defaults-pattern-strategy | The patternStrategy is not a valid value. |
S2R-ADM-0433 | invalid-boolean-handling-mode | The mode in the booleanHandling section is not a valid value. |
S2R-ADM-0434 | invalid-upstream-failure-status-mode | The mode in the upstreamFailureStatus section is not a valid value. |
S2R-ADM-0435 | invalid-null-handling-mode | The request or response mode in nullHandling is not a valid value. |
S2R-ADM-0436 | invalid-datetime-format | The format in datetimeHandling is invalid, or customPattern is missing/invalid when format is custom. |
S2R-ADM-0437 | invalid-datetime-timezone | The timezone in datetimeHandling is invalid, or localTimezone is missing/invalid when timezone is local. |
S2R-VAL-0494 | invalid-datetime-null-mode | The nullMode in datetimeHandling is not one of the valid values (omit, null). |
S2R-ADM-0438 | invalid-array-collapse-mode | The mode in the arrayCollapse section is not a valid value. |
S2R-ADM-0439 | invalid-numeric-handling-mode | The mode in the numericHandling section is not a valid value. |
S2R-ADM-0440 | invalid-whitespace-handling-mode | The mode in the whitespaceHandling section is not a valid value. |
S2R-ADM-0441 | invalid-binary-handling-mode or invalid-binary-handling-dataUrlMime | The mode or dataUrlMimeType in binaryHandling is invalid. |
S2R-ADM-0442 | invalid-duration-handling-mode | The mode in the durationHandling section is not a valid value. |
S2R-ADM-0443 | invalid-required-handling-mode | The mode in the requiredHandling section is not a valid value. |
S2R-ADM-0445 | invalid-header-propagation-mode or ...-allowlist or ...-denylist | The mode in headerPropagation is invalid, or an entry in headerAllowlist or headerDenylist is invalid. |
S2R-ADM-0446 | invalid-field-casing-mode | The mode in the fieldCasing section is not a valid value. |
S2R-ADM-0447 | invalid-envelope-wrap-mode | The mode in the envelopeWrap section is not a valid value. |
S2R-ADM-0448 | invalid-error-shape-mode | The mode in the errorShape section is not a valid value. |
S2R-ADM-0449 | invalid-xsi-type-handling-mode or ...-discriminator-field-name | The mode or discriminatorFieldName in xsiTypeHandling is invalid. |
S2R-ADM-0450 | invalid-field-ordering-mode | The mode in the fieldOrdering section is not a valid value. |
S2R-ADM-0451 | invalid-integer-range-bounds-mode | The mode in the integerRangeBounds section is not a valid value. |