Saltar al contenido principal
POST
/
v1
/
management
/
connections
/
validate-schema
Validate schema
curl --request POST \
  --url https://reporter.sandbox.lerian.net/v1/management/connections/validate-schema \
  --header 'Content-Type: application/json' \
  --data '
{
  "mappedFields": {
    "midaz_onboarding": {
      "organization": [
        "id",
        "legal_name",
        "status",
        "created_at"
      ],
      "ledger": [
        "id",
        "organization_id",
        "name"
      ]
    },
    "midaz_transaction": {
      "transaction": [
        "id",
        "ledger_id",
        "amount",
        "status"
      ],
      "account": [
        "id",
        "name",
        "balance"
      ]
    }
  }
}
'
{
  "status": "success",
  "message": "All fields validated successfully",
  "errors": []
}

Encabezados

Authorization
string

The authorization token in the Bearer <token> format.

Important: This header is required if your environment has Access Manager enabled. For more information, refer to the Access Manager documentation.

Ejemplo:

"Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."

Cuerpo

application/json

Request body for validating schema mappings against configured data sources. Use configName (not the connection UUID) as the key in mappedFields.

mappedFields
object
requerido

Object containing the field mapping configuration. The structure is: { configName: { tableName: [field1, field2, ...] } }. Use the connection's configName as the top-level key.

Ejemplo:
{
"midaz_onboarding": {
"organization": ["id", "legal_name", "status"],
"ledger": ["id", "organization_id", "name"]
}
}

Respuesta

The result of the schema validation.

Response object containing the result of schema validation.

status
enum<string>
requerido

The validation result status. Returns success when all fields are valid, or failure when validation errors are found.

Opciones disponibles:
success,
failure
Ejemplo:

"success"

message
string
requerido

A human-readable summary of the validation result.

Ejemplo:

"All fields validated successfully"

errors
object[]
requerido

A list of validation errors found during schema validation. Empty when status is success.