Import REST Datasource metadata into a Vocabulary
- Last Updated: March 30, 2020
- 2 minute read
- Corticon
- Documentation
Where relational databases have formal schemas, keys, and datatypes, REST datasources have many variations. In a REST data source, JSON-formatted data might have a JSON map that describes the structure of the data, but often mapping the columns in a REST datasources requires manual intervention to define primary keys and relationships of nested objects and arrays. Those variations are discussed in the topic Mapping REST Service metadata.
https://bj36i9ki66.execute-api.us-east-2.amazonaws.com/prod/ReimbursementRate?procedureCode=B5120ZZThat
returns: 
procedureCode. You have to
consider then that there could be many rates for one code, differentiated by applicable
dates. The transformation to a relational way of thinking looks like this: 
procedureCode. To ensure uniqueness for
the primary key an incrementing integer value is added to key. Now it will be easier to
define the REST Datasource in a Corticon Vocabulary. For more information, see Advanced REST Datasource Topics.When a REST Service exposes a schema, its metadata can be imported into Corticon Studio to refine and complete the mappings between the Vocabulary and the metadata. The REST Service connection will make best-efforts to discover the REST schema. You can edit the schema definitions and tune the mapping of the REST data structure to the Vocabulary.
In the Vocabulary editor with a REST Service connection established, select the Vocabulary root, and then select the tab of the Datasource connection metadata you want to import.
As REST data sources are not as strictly defined as relational databases, the mapping of REST Datasources will likely require manual intervention to establish the primary keys and associations in the REST metadata. For more information, see the advanced topics Mapping REST Service metadata and How to define associations in REST Service metadata