Create a Type Definition

post/definitions
Internal-Use Only

Create a Type Definition with the given content.

Request Samples

1

Response Samples

1{
2 "creationTimeStamp": "2021-01-19T00:00:00Z",
3 "createdBy": "sasuser",
4 "modifiedTimeStamp": "2021-01-19T00:00:00Z",
5 "modifiedBy": "sasuser",
6 "id": "7f2d115f-6713-4c71-8fea-08beefb34dbb",
7 "links": [
8 {
9 "method": "GET",
10 "rel": "self",
11 "href": "/catalog/definitions/7f2d115f-6713-4c71-8fea-08beefb34dbb",
12 "uri": "/catalog/definitions/7f2d115f-6713-4c71-8fea-08beefb34dbb",
13 "type": "application/vnd.sas.metadata.definition.classification"
14 },
15 {
16 "method": "GET",
17 "rel": "alternate",
18 "href": "/catalog/definitions/7f2d115f-6713-4c71-8fea-08beefb34dbb",
19 "uri": "/catalog/definitions/7f2d115f-6713-4c71-8fea-08beefb34dbb",
20 "type": "application/vnd.sas.metadata.definition.summary"
21 },
22 {
23 "method": "GET",
24 "rel": "up",
25 "href": "/catalog/definitions",
26 "uri": "/catalog/definitions",
27 "type": "application/vnd.sas.collection",
28 "itemType": "application/vnd.sas.metadata.definition.summary"
29 },
30 {
31 "method": "PUT",
32 "rel": "update",
33 "href": "/catalog/definitions/7f2d115f-6713-4c71-8fea-08beefb34dbb",
34 "uri": "/catalog/definitions/7f2d115f-6713-4c71-8fea-08beefb34dbb",
35 "type": "application/vnd.sas.metadata.definition.classification",
36 "responseType": "application/vnd.sas.metadata.definition.classification"
37 },
38 {
39 "method": "DELETE",
40 "rel": "delete",
41 "href": "/catalog/definitions/7f2d115f-6713-4c71-8fea-08beefb34dbb",
42 "uri": "/catalog/definitions/7f2d115f-6713-4c71-8fea-08beefb34dbb"
43 }
44 ],
45 "version": 1,
46 "definitionType": "classification",
47 "name": "retention",
48 "label": "Retention",
49 "description": "Defines the retention requirements for related data items."
50}

Header Parameters

NameTypeRequiredDescription
Content-Type
string
true

The representation in the request body.

Allowed values:
application/vnd.sas.metadata.definition.attribute+jsonapplication/vnd.sas.metadata.definition.classification+jsonapplication/vnd.sas.metadata.definition.entity+jsonapplication/vnd.sas.metadata.definition.relationship+jsonapplication/json
Accept
string
false

The desired representation for the response.

Allowed values:
application/vnd.sas.metadata.definition.summary+jsonapplication/vnd.sas.metadata.definition.attribute+jsonapplication/vnd.sas.metadata.definition.classification+jsonapplication/vnd.sas.metadata.definition.entity+jsonapplication/vnd.sas.metadata.definition.relationship+jsonapplication/json
Default:
application/vnd.sas.metadata.definition.summary+json

Request Body

Attribute Type Definition is a representation of a property type maintained by a Type Definition.

NameTypeRequiredDescription
definitionType
string<enumeration>
true

The type of definition this represents. Immutable after creation.

Allowed value:
attribute
attributeKind
string<enumeration>
true

The classification of this attribute type.

Allowed values:
UNKNOWNPRIMITIVECOLLECTIONENUM
Default:
PRIMITIVE
elementDefinitions
array [Enumeration Type Element]
false

The set of elements allowed in the enumeration, if the attributeKind property is 'ENUM'. If the attributeKind property is 'ENUM', this property is required and must contain at least one enumerationTypeElement.

attributeDefinitions
object
false

A map of key/value pairs representing attribute definitions for the type definition; the keys are strings and the values are attribute definitions.

i18nSource
string
false

A message bundle ID that provides localization of various values within the type definition.

requiredCapability
object
false

A map of property names to capabilities that governs the ability to patch the property in an Instance. The principal performing the PATCH operation must have at least one of the listed capabilities in order to allow the operation to succeed on the property named by the key. If this value is not specified, it cannot be modified via a PATCH request. At this time, only Entity Instances support the PATCH endpoint; specifying this property on attribute definitions of other types has no effect. Furthermore, only the name, label, description, and attributes properties can be modified through patch; attributes must have the requiredCapability property set on the attribute definition while capabilities for name, label, and description must be set as values within this map. Values are listed as space-delimited names of the capability as defined in the Authorization service.

inheritedAttributeDefinitions
object
false

A map of key/value pairs representing inherited attribute definitions. The key is the name of the inherited attribute definition, and the value is an inherited attribute definition.

name
string
true

The identity of this type definition; the maximum length is 100. Whitespace characters are not allowed.

label
string
false

The user-presented text to represent this type definition; the maximum length is 100.

description
string
false

The descriptive text for this type definition; the maximum length is 1000.

id
string
false

the unique identity of this object. Immutable after creation.

version
integer
false

The version of the media type.

Responses

StatusMeaningDescription
201CreatedCreated. The type definition has been created.HeadersSchema
400Bad RequestBad request (the request is not well-formed).Schema
401UnauthorizedNot authenticated.Schema
403ForbiddenThe user does not have permission to complete this request.Schema
409ConflictA conflict has occurred; usually this means that the definition type name is already in use.Schema