Attributes for relation types
Learn more about how to retrieve, create, update, and delete attributes for a relation type using the Configuration API.
Use the Configuration to retrieve attributes for a relation type, retrieve a specific attribute, create a new attribute, update an attribute, and delete an attribute. By default, GET responses include inherited configuration. To exclude inherited configuration, set the inheritance query parameter to false.
HTTP methods and endpoints
Use one of the following HTTP methods and endpoint paths to submit the request:
GET retrieves all attributes for the specified relation type or retrieves a specific attribute definition.
GET {TenantURL}/configuration/relationTypes/{relationshipTypeName}/attributes?inheritance=true|false
GET {TenantURL}/configuration/relationTypes/{relationshipTypeName}/attributes/{attributeUri}?inheritance=true|false
POST creates a new attribute definition for the specified relation type.
POST {TenantURL}/configuration/relationTypes/{relationshipTypeName}/attributes/{attributeUri}
PUT updates the specified attribute definition for the relation type.
PUT {TenantURL}/configuration/relationTypes/{relationshipTypeName}/attributes/{attributeUri}
DELETE deletes the specified attribute definition for the relation type.
DELETE {TenantURL}/configuration/relationTypes/{relationshipTypeName}/attributes/{attributeUri}
The following table describes the endpoint path parameters.
| Name | Required | Description |
|---|---|---|
| TenantURL | Yes | The base URL for your tenant. |
| relationshipTypeName | Yes | The name of the relation type whose attributes sub-resource you want to retrieve or modify. |
| attributeUri | Yes, for attribute-specific GET, POST, PUT, and DELETE | The URI of the attribute to retrieve, create, update, or delete. |
Request headers
Include the following headers in the request.
| Name | Required | Description |
|---|---|---|
| Authorization | Yes | Access token used to authenticate the tenant request. |
| Content-Type | Yes, for POST and PUT | application/json |
Query parameters
The following table describes the query parameters.
| Name | Required | Description |
|---|---|---|
| inheritance | No, for GET | Determines whether inherited configuration from base types is included in the response. Accepted values are true and false. Default: true. |
Example requests
The following example retrieves all attributes for the HasAddress relation type and includes inherited configuration.
GET {TenantURL}/configuration/relationTypes/HasAddress/attributes?inheritance=true
Authorization: <access_token>
The following example retrieves the AddressType attribute for the HasAddress relation type.
GET {TenantURL}/configuration/relationTypes/HasAddress/attributes/AddressType?inheritance=true
Authorization: <access_token>
The following example creates the AddressType attribute for the HasAddress relation type.
POST {TenantURL}/configuration/relationTypes/HasAddress/attributes/AddressType
Authorization: <access_token>
Content-Type: application/json
<new attribute definition>
The following example updates the AddressType attribute for the HasAddress relation type.
PUT {TenantURL}/configuration/relationTypes/HasAddress/attributes/AddressType
Authorization: <access_token>
Content-Type: application/json
<updated attribute definition>
The following example deletes the AddressType attribute for the HasAddress relation type.
DELETE {TenantURL}/configuration/relationTypes/HasAddress/attributes/AddressType
Authorization: <access_token>
Example responses
The following examples show the response pattern for successful and error outcomes.
Successful GET response
HTTP/1.1 200 OK
Content-Type: application/json
<attribute definition or list of attributes>
Successful POST response
HTTP/1.1 201 Created
Content-Type: application/json
<created attribute definition>
Successful PUT response
HTTP/1.1 200 OK
Content-Type: application/json
<updated attribute definition>
Successful DELETE response
HTTP/1.1 204 No Content
Error response
HTTP/1.1 400 Bad Request
Content-Type: application/json
<TYPE_IS_NOT_FOUND, BAD_REQUEST, or VALIDATION_ERROR>