Upload custom code system

POST/construe/upload
RequiresBearerauthentication

Body parameters

namestringrequired
versionstringrequired
revisionnumberoptional
formatstringrequired
csvjson
filestring (byte)optional
code_colstringoptional
desc_colstringoptional
defn_colstringoptional
codesobject[]optional
codestringrequired
descriptionstringrequired
definitionstringoptional
replacebooleanoptionaldefault false
Returns  

Response fields

statusstringoptional
namestringoptional
versionstringoptional
POSTRequest
# 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 POST "https://experiment.app.pheno.ml/construe/upload" \
  -H "Authorization: Bearer $PHENOML_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "CUSTOM_CODES",
  "version": "1.0",
  "format": "json",
  "codes": [
    {
      "code": "X001",
      "description": "Example custom code 1"
    },
    {
      "code": "X002",
      "description": "Example custom code 2"
    }
  ]
}'
202 AcceptedExample Response
{
  "status": "processing",
  "name": "CUSTOM_CODES",
  "version": "1.0"
}