Skip to content
Judgment Labs
Esc
↑↓navigate↵open⌘Jpreview

Create attribute mapper

Create an attribute mapper config in a project. Requires the developer role.

POST/v1/projects/{projectId}/attribute-mappers
Authorization
AuthorizationPersonal API key · headerrequired

Your personal API key from Settings > Personal API Keys, sent as Bearer <key>.

X-Organization-IdOrganization ID · headerrequired

The organization to act in. Copy it with Copy organization ID in the organization menu or the settings sidebar.

Path parameters
projectIdstringrequired
Request body
requiredapplication/json
namestringrequired

A descriptive name for the mapper

rulesobject[]required

The source-to-target attribute mapping rules

Show properties
Array of object
source_keystringrequired

The incoming span attribute key to read

target_keystringrequired

The Judgment attribute key to write to (must be a valid judgment.* key unless you are a Judgment admin)

enabledboolean
overrideboolean
remove_sourceboolean
Responses
200

Response for status 200

mapperobjectrequired
Show properties
idstringrequired
organization_idstringrequired
project_idstring | nullrequired
namestringrequired
enabledbooleanrequired
overridebooleanrequired
remove_sourcebooleanrequired
rulesobject[]required
Show properties
Array of object
source_keystringrequired
target_keystringrequired
created_atstring | nullrequired
updated_atstring | nullrequired
Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X POST 'https://api.judgmentlabs.ai/v1/projects/YOUR_PROJECT_ID/attribute-mappers' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'X-Organization-Id: YOUR_ORGANIZATION_ID' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "string",
  "rules": [
    {
      "source_key": "string",
      "target_key": "string"
    }
  ],
  "enabled": true,
  "override": true,
  "remove_source": true
}'
Response
{
  "mapper": {
    "id": "string",
    "organization_id": "string",
    "project_id": "string",
    "name": "string",
    "enabled": true,
    "override": true,
    "remove_source": true,
    "rules": [
      {
        "source_key": "string",
        "target_key": "string"
      }
    ],
    "created_at": "string",
    "updated_at": "string"
  }
}

Was this page helpful?