Set connector field mapping
Say what Corma writes into one field of the connector when it creates an account. This replaces whatever filled the field before, Corma's own default included. To restore that default, delete the mapping.
curl -X PUT "https://api.corma.io/v1/connectors/{id}/field-mappings/{targetFieldId}" \
-H "x-corma-api-key: $CORMA_OPEN_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"mode": "expression",
"expression": "string"
}'Autorisation
x-corma-api-keystringheaderobligatoireColon-separated API key ID and secret:
API_KEY_ID:API_KEY_SECRET
Paramètres
idstringpathobligatoireThe identifier of the connector, as
GET /connectorsreturned it. The legacykind.methodform stays accepted while the workspace holds one connection of that integration; with several, it answers 409.targetFieldIdstringpathobligatoireThe field of the connector, as
GET /connectors/{id}/field-mappingsreturned its identifier.x-corma-idempotency-keystringheaderOptional client-generated key. Reusing the same key with an identical request replays the original response instead of enqueueing a duplicate task.
Corps
Réponse
OK
targetFieldIdstringobligatoireThe field of the connector this mapping fills, as
GET /connectors/{id}/fieldsreturned its identifier.targetLabelstringobligatoireThe name of the field, as Corma displays it.
typeenum<string>obligatoireThe type of value the field holds.
Une des valeurs:stringnumberbooleandatestring[]object[]useroriginenum<string>obligatoireWhether the connector documents the field or the workspace defined it.
Une des valeurs:standardcustomrequiredbooleanobligatoireTrue when the connector needs this field to create an account. A required field cannot be switched off.
notestring | nullobligatoireOne sentence about the field, to show beside it. Null when the label is sufficient.
expressionstring | nullobligatoireThe expression that computes the value, as it was written. Its variables are rooted on
user. Null when Corma writes nothing into the field.skipEmptybooleanobligatoireWhen true, an expression that resolves to nothing leaves the field out of the request Corma sends instead of writing an empty value.
sourceenum<string>obligatoireWhere the expression comes from.
Une des valeurs:defaultcustomoffnone
{
"targetFieldId": "string",
"targetLabel": "string",
"type": "string",
"origin": "standard",
"required": true,
"note": "string",
"expression": "string",
"skipEmpty": true,
"source": "default"
}