metadata_fields_sources_retrieve
const url = 'https://example.com/api/metadata_fields/sources';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://example.com/api/metadata_fields/sources \ --header 'Authorization: Bearer <token>'Retrieve a list of unique sources from both MadbotMetadataField and PluginMetadataField models.
This endpoint aggregates distinct values from the ‘source’ field of two different models:
- MadbotMetadataField
- PluginMetadataField
Returns
Response A JSON response containing a list of unique sources.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”Serializer for MetadataField model.
object
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.
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.
Retrieve the filtered metadata mapping based on the type.
object
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).
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).
Example
{ "rank": 1}
