Skip to content

metadata_fields_list

GET
/api/metadata_fields
curl --request GET \
--url 'https://example.com/api/metadata_fields?view=default' \
--header 'Authorization: Bearer <token>'

List the information related to all the MetadataField objects.

data_type
string
hidden
boolean
ordering
string

Which field to use when ordering the results.

p
integer

A page number within the paginated result set.

page_size
integer

Number of results to return per page.

search
string

A search term.

source
string
view
string
Allowed values: default referential_and_unmapped

Filter results based on a specified view mode can either be referential_and_unmapped or default.

Media typeapplication/json
object
count
required
integer
next
string format: uri
nullable
previous
string format: uri
nullable
results
required
Array<object>

Serializer for MetadataField model.

object
id
required
string format: uuid
slug
required
string
/^[-a-zA-Z0-9_]+$/
name
required
string
description
required
string
data_types
required
Array<integer>
schema
required

Build and return the absolute URI for the specified schema.

Parameters

obj : object The object for which the schema URI is being generated.

Returns

str The absolute URI for the schema associated with the object’s metadata.

string
uischema
required

Build and return the absolute URI for the specified ui schema.

Parameters

obj : object The object for which the schema URI is being generated.

Returns

str The absolute URI for the ui schema associated with the object’s metadata.

string
metadata_mapping
required

Retrieve the filtered metadata mapping based on the type.

Array<object>
object
key
additional properties
rank
integer
default: 1
source
required
string
type
required

Dynamically return the correct metadata field type.

Parameters

obj : object The MetadataField instance.

Returns

str The name of the metadata field type (madbot_field or plugin_field).

string
level
required

Dynamically return the correct metadata field level.

Parameters

obj : object The MetadataField instance.

Returns

str The name of the metadata field type (madbot_field or plugin_field).

string
nullable

Example

{
"count": 123,
"next": "http://api.example.org/accounts/?p=4",
"previous": "http://api.example.org/accounts/?p=2",
"results": [
{
"rank": 1
}
]
}
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": "query_validation_error",
"message": "Invalid query parameters. Check the `details` property for more details.",
"details": [
{
"parameter_name": "<parameter_name>",
"code": "not_supported",
"message": "This field is not supported"
}
]
}