Export custom code system

GET/construe/codes/systems/{codesystem}/export

Exports a custom (non-builtin) code system as a JSON file compatible with the upload format. The exported file can be re-uploaded directly via POST /construe/upload with format "json". Only available on dedicated instances. Builtin systems cannot be exported.

RequiresBearerauthentication

Path parameters

codesystemstringrequired

Code system name

Query parameters

versionstringoptional

Specific version of the custom code system.

Returns  

Exported code system as JSON file

Response fields

namestringrequired

Code system name

versionstringrequired

Code system version

formatstringrequired

Upload format (always "json")

json
codesobject[]required

All codes in the system

codestringrequired

The code identifier

descriptionstringrequired

Short description of the code

definitionstringoptional

Extended definition of the code (if available)

GETRequest
# Get authentication token
PHENOML_TOKEN=$(curl -X POST "https://experiment.app.pheno.ml/v2/auth/token" \
  -u "$PHENOML_CLIENT_ID:$PHENOML_CLIENT_SECRET" \
  | jq -r '.access_token')

curl -X GET "https://experiment.app.pheno.ml/construe/codes/systems/CUSTOM_CODES/export" \
  -H "Authorization: Bearer $PHENOML_TOKEN"
200 OKExample Response
{
  "name": "CUSTOM_CODES",
  "version": "1.0",
  "format": "json",
  "codes": [
    {
      "code": "X001",
      "description": "Example custom code 1"
    },
    {
      "code": "X002",
      "description": "Example custom code 2"
    }
  ]
}