Table of contents

Register model run records by API

Directly registering model run records by using the Provenance Store API is an efficient and scalable approach.

Provena APIs can be integrated in an automated way into any internet connected computing environment.

See the sections below for information about how to use the API.

Endpoints and documentation

The Provena APIs are RESTful Python ASGI compliant services. All APIs exposes two documentation endpoints. The Provenance API documentation is linked below:

Authentication and authorisation

All Provena APIs use the same authorisation workflow.

You can learn about using the Provena APIs here. You can learn about authorising here.

Example payloads

All Provena APIs use JSON to communicate. This object notation is easy to read for computers and humans.

All endpoints are automatically documented, including structurally valid example payloads, see documentation above.

Below, we will provide some examples of structurally valid payloads for provenance API endpoints.

The IDs and values used in these records are not real.

Model Run Record

{
    "workflow_template_id": "1234",
    "model_version": "1.2",
    "inputs": [
        {
            "dataset_template_id": "1234",
            "dataset_id": "1234",
            "dataset_type": "DATA_STORE",
            "resources": {
                "configuration_file": "data/configuration/config1234.csv"
            }
        }
    ],
    "outputs": [
        {
            "dataset_template_id": "1234",
            "dataset_id": "1234",
            "dataset_type": "DATA_STORE"
        }
    ],
    "annotations": {
        "RCP": "45",
        "species": "speciesA"
    },
    "study_id" : "1234",
    "description": "This model run is not real but is used to demonstrate the model run record payload structure.",
    "associations": {
        "modeller_id": "1234",
        "requesting_organisation_id": "1234"
    },
    "start_time": 1669355820,
    "end_time": 1669442219
}