Skip to content

Creates/Updates a SHARED schema in development status

Request

This endpoint allows user to a create schema with all possible states i.e. DEVELOPMENT,PUBLISHED or OBSOLETE but update can be used only on schemas that are in "DEVELOPMENT" state. A schema status can also be changed from DEVELOPMENT to PUBLISHED or OBSOLETE while updating schema content or by providing the same schema content.

Note: The schema may refer to other schema definitions in DEVELOPMENT state. If those schemas are updated, it is the schema owner's responsibility to PUT the dependent schemas again in order to refresh the schema definitions. By default scope for a schema created through this endpoint will be SHARED. Service principal authorization is required to call thi API. There is no need to provide a data-partition-id in the header.

Security
bearer
Bodyapplication/jsonrequired

SchemaRequest

schemaobjectrequired
Example:
{}
schemaInfoobject(Schema Info)required

Schema info including status, creation and schemaIdentity

Example:
{ "schemaIdentity": { "authority": "osdu", "source": "wks", "entityType": "wellbore", "schemaVersionMajor": 1, "schemaVersionMinor": 0, "schemaVersionPatch": 0 }, "status": "DEVELOPMENT" }
curl -i -X PUT \
  https://as5.api.enterprisedata.slb.com/api/schema-service/v1/schemas/system \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "schemaInfo": {
      "schemaIdentity": {
        "authority": "osdu",
        "source": "wks",
        "entityType": "wellbore",
        "schemaVersionMajor": 1,
        "schemaVersionMinor": 0,
        "schemaVersionPatch": 0
      },
      "status": "DEVELOPMENT"
    },
    "schema": {}
  }'

Responses

Schema updated

Bodyapplication/json
createdBystring

The user who created the schema. This value is taken from API caller token.

Example:"user@opendes.com"
dateCreatedstring, (date-time)

The UTC date time of the entity creation

Example:"2019-05-23 11:16:03+00:00"
schemaIdentityobject(SchemaIdentity)required

Schema authority source and type description

scopestring

Schema Scope - is it internal or shared. This is a system defined attribute based on partition-id passed.

Enum:"INTERNAL""SHARED"
Example:"INTERNAL"
statusstringrequired

Schema lifecycle status

Enum:"PUBLISHED""OBSOLETE""DEVELOPMENT"
supersededByobject(SchemaIdentity)

Schema authority source and type description

Response
{ "createdBy": "user@opendes.com", "dateCreated": "2019-05-23 11:16:03+00:00", "schemaIdentity": { "authority": "osdu", "entityType": "wellbore", "id": "osdu:wks:wellbore:1.0.0", "schemaVersionMajor": 1, "schemaVersionMinor": 1, "schemaVersionPatch": 0, "source": "wks" }, "scope": "INTERNAL", "status": "PUBLISHED", "supersededBy": { "authority": "osdu", "entityType": "wellbore", "id": "osdu:wks:wellbore:1.0.0", "schemaVersionMajor": 1, "schemaVersionMinor": 1, "schemaVersionPatch": 0, "source": "wks" } }