Within Enigma Public, collections, datasets, and snapshots are referenced using universally unique identifiers (UUIDs), generally referred to as “IDs.” These are strings of 8-4-4-4-12 characters (for example, d1ce71cb-5f90-4e0f-9cd1-d9edd79d9cf7).

Many of the API endpoints take a UUID as a path or query parameter. For example, GET /collections/{id} takes the collection UUID as a path parameter.

Getting a UUID from the web client

If you’re using the Enigma Public web client, you can get the relevant UUID as follows:

  • Collections: When browsing the collection hierarchy, the UUID for the selected collection is displayed in the collection inspector (the panel on the right of the screen). It is also displayed in the browser address bar, for example:

    https://public.enigma.com/browse/d582dfbd-4329-4b5e-b0c9-39149f5dd546

  • Datasets: When viewing a dataset, the UUID for the selected dataset is displayed in the dataset inspector (the panel on the left of the screen). It is also displayed in the browser address bar, for example:

    https://public.enigma.com/datasets/h-1-b-visa-applications-2016/62daf463-8094-4e88-8d46-b1715065dcf1

  • Snapshots: When viewing a dataset, click the API button to open the data in a new tab. The snapshot UUID is listed in the address bar, for example:

    https://public.enigma.com/api/snapshots/d1ce71cb-5f90-4e0f-9cd1-d9edd79d9cf7?&row_limit=25

Getting a UUID using the API

If you’re using the Enigma Public API, you can get the relevant UUID as follows:

  • Collections: If you know the name of the collection, use GET /collections/ with the query parameter and the collection name, for example:

    GET /collections/?query="H-1B Visa Applications"

    The JSON that’s returned includes an id field with the collection ID.

  • Datasets: If you know the name of the dataset, use GET /datasets/ with the query parameter and the dataset name, for example:

    GET /datasets/?query="H-1B Visa Applications 2016"

    The JSON that’s returned includes an id field with the dataset ID.

    If you don’t know the dataset name but you know the ID of the parent collection, use GET /datasets/ with the parent_collection_id parameter, for example:

    GET /datasets/?parent_collection_id=d582dfbd-4329-4b5e-b0c9-39149f5dd546

    The JSON that’s returned includes information about the child datasets, including the id of each.

  • Snapshots: To get the ID of the current snapshot for a given dataset, use GET /datasets/id with the ID of the dataset. The JSON that’s returned includes information about the current_snapshot, including the id.

    To get the current snapshot IDs for all datasets within a given collection, use GET /datasets/ with the parent_collection_id parameter, for example:

    GET /datasets/?parent_collection_id=d582dfbd-4329-4b5e-b0c9-39149f5dd546

    The JSON that’s returned includes information about the current_snapshot for each child dataset, including its id.