Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents
Status

Page Properties


Specification
Status
colourGreen
titledone
Apiary
Status
colourGreen
titledone
JSON Schema request
Status
colourGreen
titledone
JSON Schema response
Status
colourGreen
titledone


...

  1. Verify the validity of access token
  2. Check user scope (scope = 'substanse:write') in order to perform this action
    1. In case error - generate 401 response

...

Validate request using JSON schema (new_substance_schema.json)

Create new Substance

  1. Create new record in innms with status INACTIVE
  2. Fill data


Destination
Source
id
name$.name
name_original$.name_original
sctid$.sctid
is_active TRUE
inserted_at:timestamp
inserted_byuser_id
updated_at:timestamp
updated_byuser_id


Prepare & return response data structure

  1. Fill response WS data structure 
  2. Validate response using JSON schemas (create_substance_response.json)
    1. Return 422 with list of validation errors in case validation fails (422 EView)