Skip to content

data_associations_create

POST
/api/data/{data_pk}/associations
curl --request POST \
--url https://example.com/api/data/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/associations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Workspace: 2489E9AD-2EE2-8E00-8EC9-32D5F69181C0' \
--data '{ "data_objects": [ "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0" ] }'

Create a new Data Association object.

data_pk
required
string format: uuid

Data ID

X-Workspace
required
string format: uuid

Workspace ID

Serializer for Data associations.

object
id
required
string format: uuid
data_objects
required
Array<string>
data_obj
required

Return serialized data for the current data.

Parameters

obj : DataAssociation The object containing information about the current data.

Returns

list A list of serialized data objects.

Array
created_by
required

Return the interactor information of the object’s creator.

Parameters

obj : DataAssociation The object containing the creator information.

Returns

dict The interactor information of the creator.

object
key
additional properties
created_time
required
string format: date-time
last_edited_by
required

Return information about the last interactor who edited the object.

Parameters

obj : DataAssociation The object containing the last editor information.

Returns

dict The interactor information of the last editor.

object
key
additional properties
last_edited_time
required
string format: date-time

Example generated

{
"data_objects": [
"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
]
}
Media typeapplication/json

Serializer for Data associations.

object
id
required
string format: uuid
data_objects
required
Array<string>
data_obj
required

Return serialized data for the current data.

Parameters

obj : DataAssociation The object containing information about the current data.

Returns

list A list of serialized data objects.

Array
created_by
required

Return the interactor information of the object’s creator.

Parameters

obj : DataAssociation The object containing the creator information.

Returns

dict The interactor information of the creator.

object
key
additional properties
created_time
required
string format: date-time
last_edited_by
required

Return information about the last interactor who edited the object.

Parameters

obj : DataAssociation The object containing the last editor information.

Returns

dict The interactor information of the last editor.

object
key
additional properties
last_edited_time
required
string format: date-time

Example generated

{
"data_objects": [
"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
]
}
Media typeapplication/json

Serializer for Data associations.

object
id
required
string format: uuid
data_objects
required
Array<string>
data_obj
required

Return serialized data for the current data.

Parameters

obj : DataAssociation The object containing information about the current data.

Returns

list A list of serialized data objects.

Array
created_by
required

Return the interactor information of the object’s creator.

Parameters

obj : DataAssociation The object containing the creator information.

Returns

dict The interactor information of the creator.

object
key
additional properties
created_time
required
string format: date-time
last_edited_by
required

Return information about the last interactor who edited the object.

Parameters

obj : DataAssociation The object containing the last editor information.

Returns

dict The interactor information of the last editor.

object
key
additional properties
last_edited_time
required
string format: date-time

Example generated

{
"data_objects": [
"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0"
]
}
Media typeapplication/json
object
code
required
string
>= 1 characters
message
required
string
>= 1 characters
details
required
Array<object>
object
parameter
string
nullable
code
string
nullable
message
string

Example

{
"code": "body_validation_error",
"message": "The request body does not match the schema for the expected parameters. Check the `details` property for more details.",
"details": [
{
"field": "associated_datalink",
"code": "invalid",
"message": "Associated datalink is not linked with the associated Data"
}
]
}
Media typeapplication/json
object
code
required
string
>= 1 characters
message
required
string
>= 1 characters
details
required
Array<object>
object
parameter
string
nullable
code
string
nullable
message
string

Example

{
"code": "forbidden",
"message": "You do not have permission to perform this operation. Check the `details` property for more details.",
"details": [
{
"parameter": "associated_datalink",
"code": "not_allowed",
"message": "You do not have access to this datalink."
}
]
}
Media typeapplication/json
object
code
required
string
>= 1 characters
message
required
string
>= 1 characters
details
required
Array<object>
object
parameter
string
nullable
code
string
nullable
message
string

Example

{
"code": "object_not_found",
"message": "Object not found. Check the `details` property for more details.",
"details": [
{
"parameter": "<id>",
"code": "does_not_exist",
"message": "\"<id>\" does not exist."
}
]
}