Retrieve all values of a metadata_type

Anything concerning integration via the REST API
Post Reply
Posts: 2
Joined: Sun Sep 27, 2020 9:26 pm

Retrieve all values of a metadata_type

Post by nem »

I'd like to add autocompletion to my script that is going to bulk import my documents. I have browsed the OpenAPI spec via swagger but haven't really found the metadata_type values. I've checked /metadata_types/, /metadata_types/{metadata_type_pk}/ and a few other endpoints but have not been able to find what I'm looking for.

Could you show me how I can get all the values for a single (or per) metadata_type, please. Thank you :-)
User avatar
Posts: 658
Joined: Tue Aug 21, 2018 3:28 am
Location: Puerto Rico

Re: Retrieve all values of a metadata_type

Post by rosarior »

The metadata value is a property of the document and not of the metadata objects.

[Metadata type] -> [Document] <- [Metadata value]

I can see the benefit for auto completion but such an API would need to side step the access control layer, could be an expensive query, and will break the API layout of resource -> sub resource.

This one will require a consideration for a design decision.

Issue #892 created to track this:

Thanks for the request!
Post Reply