API description for schemas/system API
What are system schemas
System schemas are schemas which are available to all the data partitions within an OSDU deployment out of the box.
How do you identify a system schema
The scope field is set to SHARED
for system schemas in the schemaInfo section. Sample schemaInfo for system schemas:
{
"schemaInfo": {
"schemaIdentity": {
"authority": "osdu",
"source": "wks",
"entityType": "work-product-component--WellLog",
"schemaVersionMajor": 1,
"schemaVersionMinor": 0,
"schemaVersionPatch": 0,
"id": "osdu:wks:work-product-component--WellLog:1.0.0"
},
"createdBy": "OSDU Data Definition Group",
"scope": "SHARED",
"status": "DEVELOPMENT"
},
"schema": {
}
}
How to create system schema
You can create system schemas by (to be introduced) schemas/system
endpoint in your schema service. Find more details in the ADR: #51
The schemas/system
endpoint differs from the regular /schema
endpoint in two ways:
- It does not accept the
data-partition-id
header. Since the schemas being created belong to no data-partition in particular, the API does not allow users to pass data-partition-id header. If you do pass the header, the request would fail with error indicatingdata-partition-id
header should not be supplied. - The API works on service principal auth only. The authorization mechanism is similar to what we have in partition service related APIs. Refer example https://community.opengroup.org/osdu/platform/system/partition/-/blob/master/partition-core/src/main/java/org/opengroup/osdu/partition/api/PartitionApi.java#L49
Edited by Aman Verma