Distribution UUID calls on Aristotle API - need Data Element UUID

I am looking at implementing a use case where we I can refresh another systems metadata using Aristotle as a source of truth.

The user will pass a list of distribution UUID’s, and through a series of API calls my code will find out all the useful information about each distribution, gather a list of the linked data elements (with name, definition), then attach value domain/permissible value information if available.

When I make a call to /metadata/distribution/{item_uuid} I am almost home, within the response is a distributiondataelementpath_set array is just what I’m after to get the Data Element information. However, for some reason the data element id given is an Aristotle ID:

“distributiondataelementpath_set”: [
{
“id”: “a uuid for the distributiondataelementpath_etc goes here, which can’t be used in any other API call that I can see”,
“data_element”: 12345,
“specialisation_classes”: []
},

I can’t use data_element in any other API call. For example, I’d love to call /metadata/dataelement/{item_uuid} but this wants a UUID, not Aristotle ID.

It would be great if I also had available something like “data_element_uuid”: ab-number-you-need-to-go-further-cd

What are my options? Given a case where I only know a distribution UUID, I want to be able to find everything I need right to value domain data. Data Element ID is the bottleneck.

Hey,

That is definitely a problem, we are currently using just the aristotle id for referencing metadata from component items for performance reasons, although that may change in the future.

So our resolution for now is to make the metadata endpoints accept either a uuid or an id, that way you can fetch further data through /metadata/dataelement . Let us know if that will work for your use case

We are planning to have that change pushed out by next Tuesday.

Harry

1 Like

Unless the API can accommodate inputs other than UUID, what I definitely need is the UUID.

In the meantime I got around this problem using graphQL instead. With a distribution UUID, I can grab all the relevant Data Elements, Value Domains and Permissible Values using something like this:

So this change would make the API accept the ID as an input, so you could just go to /metadata/dataelement/123 . That should give you the option of using the API for this kind of query.

Although for the query you posted using graphQL is definitely going to be much nicer. Glad you were able to get that going.

1 Like