submissions_metadata_objects_metadata_create
const url = 'https://example.com/api/submissions/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/metadata_objects/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/metadata';const options = { method: 'POST', headers: { 'X-Workspace': '2489E9AD-2EE2-8E00-8EC9-32D5F69181C0', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"metadata":[{"field":"slug_field","value":"field_value"},{"field":"another_slug_field","value":"another_field_value"}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/submissions/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/metadata_objects/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/metadata \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'X-Workspace: 2489E9AD-2EE2-8E00-8EC9-32D5F69181C0' \ --data '{ "metadata": [ { "field": "slug_field", "value": "field_value" }, { "field": "another_slug_field", "value": "another_field_value" } ] }'Fill fields of a metadata object, replacing the value of those already filled.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Submission metadata object ID
Submission ID
Header Parameters
Section titled “Header Parameters”Workspace ID
Request Bodyrequired
Section titled “Request Bodyrequired”Serializer for creating submission metadata.
object
List of metadata objects with ‘field’ and ‘value’.
object
Examples
Default request body
{ "metadata": [ { "field": "slug_field", "value": "field_value" }, { "field": "another_slug_field", "value": "another_field_value" } ]}Serializer for creating submission metadata.
object
List of metadata objects with ‘field’ and ‘value’.
object
Example generated
metadata=%7B%22additionalProperty%22%3A%22example%22%7DSerializer for creating submission metadata.
object
List of metadata objects with ‘field’ and ‘value’.
object
Responses
Section titled “Responses”Serializer for the submission metadata.
object
Get the field information for the submission metadata.
Parameters
obj : SubmissionMetadata The submission metadata object.
Returns
dict The field information.
object
object
Get source information from the source_metadata if it exists.
Parameters
obj : SubmissionMetadataValue SubmissionMetadataValue instance
Returns
dict or None Source information including object type, id, and name if available None if no source_metadata exists
object
Serializer for the SubmissionMetadataValue model.
object
Get source information from the source_metadata if it exists.
Parameters
obj : SubmissionMetadataValue SubmissionMetadataValue instance
Returns
dict or None Source information including object type, id, and name if available None if no source_metadata exists
object
Return the interactor information of the object’s creator.
Parameters
obj : SubmissionMetadata The object containing the creator information.
Returns
dict The interactor information of the creator.
object
Return information about the last interactor who edited the object.
Parameters
obj : SubmissionMetadata The object containing the last editor information.
Returns
dict The interactor information of the last editor.
object
Example generated
{}Serializer for the submission metadata.
object
Get the field information for the submission metadata.
Parameters
obj : SubmissionMetadata The submission metadata object.
Returns
dict The field information.
object
object
Get source information from the source_metadata if it exists.
Parameters
obj : SubmissionMetadataValue SubmissionMetadataValue instance
Returns
dict or None Source information including object type, id, and name if available None if no source_metadata exists
object
Serializer for the SubmissionMetadataValue model.
object
Get source information from the source_metadata if it exists.
Parameters
obj : SubmissionMetadataValue SubmissionMetadataValue instance
Returns
dict or None Source information including object type, id, and name if available None if no source_metadata exists
object
Return the interactor information of the object’s creator.
Parameters
obj : SubmissionMetadata The object containing the creator information.
Returns
dict The interactor information of the creator.
object
Return information about the last interactor who edited the object.
Parameters
obj : SubmissionMetadata The object containing the last editor information.
Returns
dict The interactor information of the last editor.
object
Example generated
{}object
object
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": [ { "parameter": "metadata", "code": "does_not_exist", "message": "Could not find data: <metadata_id>." } ]}object
object
Example
{ "code": "forbidden", "message": "You do not have permission to perform this operation. Check the `details` property for more details.", "details": [ { "parameter": "submission", "code": "not_allowed", "message": "You are not a member of this submission." } ]}object
object
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." } ]}
