arrow-left

Only this pageAll pages
gitbookPowered by GitBook
1 of 29

Trovi

Loading...

API Reference

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Trovi

Practical Open Reproducibility

hashtag
What is Trovi?

Trovi is a public service and open API that provides storing, referencing, and reproducing research artifacts. Applications can integrate with the Trovi API to provide the following capabilities to their users:

  • Artifact upload and storage: users can upload files representing their experiment in whatever form appropriate (e.g., documentation, Jupyter notebooks, setup scripts, data sets, example output). Currently Trovi integrates with several storage backends, notably 's object store and , though future integrations are possible.

  • Artifact lifecycle management: artifact owners can publish new versions of their artifact and apply useful metadata (e.g., tags, short descriptions, author list).

  • Sharing artifacts, publicly or during embargo/development: generate private links that allow others to access the artifact's contents (e.g., for evaluation), or publish particular versions of the artifact for open access, including DOI assignment.

  • Instantiate artifacts within a variety of environments: users can "re-play" an artifact, opening it on their local machine or within an open testbed environment. Testbeds can leverage existing general-purpose integrations (e.g., ) or build their own.

  • Build upon a catalog of relevant research artifacts and examples: users can "fork" existing artifacts and create their own revision, or use existing work as a template or example for future research.

hashtag
What is an Artifact?

Currently, Trovi makes only a few assumptions about an Artifact:

  • It contains some tarball of contents representing the portable portion of the artifact. This means source code, instructions, notebooks, and examples.

  • External requirements, such as disk images hosted on a target infrastructure, datasets, etc., can be specified with link references (pointers.) These links are opaque from Trovi's point of view, enabling integrations specific to third-parties.

hashtag
Who can use Trovi?

Trovi's allows federation with select partners, enabling any user of a participating entity in the federation to utilize the API or any of its integrations. If you're interested in becoming part of the Trovi federation, please .

hashtag
Trovi API Reference

Dive a little deeper and start exploring our API reference to get an idea of everything that's possible with the API:

hashtag
Want to contribute, or just peek at the source code?

Take a look at our GitHub repository! There, you can read the source code, or open an issue, discussion, or pull request.

Artifacts

View, Modify, Create, and Delete Artifact metadata

Chameleonarrow-up-right
Zenodoarrow-up-right
JupyterLabarrow-up-right
authentication model
contact usenvelope
🕸️API Referencechevron-right

UpdateArtifact

Update metadata of an existing Artifact

circle-info

UpdateArtifact requests use the JSON Patcharrow-up-right syntax. All operations except test are supported.

circle-info

Both PATCH and PUT requests are supported, but PUT requests require the partial URL argument to be set.

hashtag
Required token scope

  • artifacts:read

  • artifacts:write

CreateArtifact

Create a brand new Artifact

hashtag
Required token scope

  • artifacts:read

artifacts:write

CreateArtifactVersion

Create a new version of an existing artifact

hashtag
Required token scope

  • artifacts:read

  • artifacts:write

IncrArtifactVersionMetric

circle-info

Metrics can only be incremented by registered service applications. To register your application for this privilege, please get in touch with the Trovi developers.

circle-info

The metrics endpoint is unique, in that callers must authenticate as the client application itself, and pass the user's token via the origin URL parameter. The reason for this is because we don't want users to be able to freely increment metrics as they please, so we only allow registered clients to do so, but we still require the user token in order to ensure that the user has permission to interact with the Artifact in the way that would increase the relevant metric.

hashtag
Required token scope (origin)

  • artifacts:read

hashtag
Required token scope (access_token)

  • artifacts:write_metrics

Version Metrics

Version metrics describe the history of user interaction with Artifact Versions. There is presently 1 type of action: access_count. This describes the number of times an experiment has been launched by a different user. Client applications are responsible for properly notifying Trovi when these events happen.

ListArtifacts

List all Artifacts visible to a user

circle-info

This endpoint does not require authentication

Artifact Versions

Create and Delete artifact versions

Artifacts have ordered versions to distinguish between changes over time. The version endpoints are how you can create a new version, or delete an existing one.

DeleteArtifactVersion

Delete an existing Artifact Version

circle-info

Artifacts associated with a DOI (i.e. contents stored on Zenodo) CANNOT be deleted.

hashtag
Required token scope

  • artifacts:read

  • artifacts:write

GetArtifact

Get metadata for a single Artifact

hashtag
Required token scope

  • artifacts:read

RetrieveArtifactVersionContents

A shortcut for retrieving contents.

Functions the same as , but requires the Artifact UUID and version slug for a faster lookup.

hashtag
Required token scope

  • artifacts:read

RetrieveContents

GetArtifactVersionMigrationStatus

Check on the status of your most-recently-queued Artifact Version migration.

hashtag
Required token scope

  • artifacts:read

Version Migration

Migrate the stored content of an Artifact version to a different storage platform

Sometimes, users may wish to move their stored contents to a different platform (backend). We offer endpoints to accomplish this. One way we use this endpoint is to allow users to upload contents to our object storage, and then later allow users to request a DOI. When this happens, we migrate their content from the object storage backend to Zenodo.

Contents

Upload content and view its metadata

Artifact versions must have contents (usually code or notebooks) attached to them. The Contents endpoints are used for uploading contents to supported data stores, and retrieving metadata about those contents, including download links.

AssignArtifactRole

Assign a new artifact role to a user

hashtag
Required token scope

  • artifacts:write

ListArtifactRoles

List roles available on an artifact

circle-info

Roles are also visible on the models returned by GetArtifact and ListArtifacts.

hashtag
Required token scope

  • artifacts:read

UnassignArtifactRole

Unassign a role from a user on an artifact

hashtag
Required token scope

  • artifacts:write

RetrieveContents

Retrieve content metadata, including download links

circle-info

If you have access to the Artifact UUID and the version slug at the time of the API call, consider using RetrieveArtifactVersionContents.

hashtag
Required token scope

  • artifacts:read

Token

Exchange subject tokens from a federated identity provider for a Trovi authentication token

circle-info

Currently, the only federated identity provider supported is Chameleon Keycloak. To have your application added to the list of approved identity providers, please fill out the Google Form attached to this page.

Supported identity providers must speak OpenID Connect.

Once a Trovi Token is exchanged, it is used to authenticate to any Trovi endpoint by attaching it to the URL via the access_token parameter.

TokenGrant

Submit a subject token and receive a Trovi authentication token

Users must obtain an authentication token from one of the supported Trovi identity providers, and then submit that subject token to the TokenGrant endpoint in order to obtain a Trovi token. All Trovi tokens adhere to the following properties:

  • Expire 5 minutes after they are issued

  • Are in the JWT format (JWS string)

Token requests adhere to the following properties:
  • RFC 8693 - OAuth 2.0 Token Exchangearrow-up-right

  • The only supported grant type is "token_exchange"

  • Subject tokens must be in the JWT format (JWS string)

The following scopes are available for all Trovi tokens. Currently, any requested scopes will be granted to any user. This is subject to change.

  • artifacts:read - Read all artifacts which are accessible to the user

  • artifacts:write - Edit all artifacts for which the user is an owner or author, and create new artifacts

  • artifacts:write_metrics - Update artifact access metrics

StoreContents

Upload new content to a supported storage backend

hashtag
Required token scope

  • None, but the user must be authenticated to Trovi

Artifact Roles

Trovi's permission model

Artifacts may have individual roles assigned to users which permit access control for those users. There are two types of role:

  • Administrator

  • Collaborator

hashtag
Administrator

Administrators have full control over the artifact, including assigning and unassigning roles. Administrators may upload, download, delete, and change content as they see fit.

circle-info

Artifact owners are automatically assigned the Administrator role. This role cannot be unassigned from owners. In order to accomplish this, the owner must first be changed to someone else via .

hashtag
Collaborator

Collaborators have permission to edit artifact metadata, upload new versions, and share private artifacts.

UpdateArtifact

Meta

These endpoints describe metadata about the Trovi API itself, as opposed to individual Artifacts.

ListTags

List all the tags available in Trovi

circle-info

This endpoint does not require authentication

URNs

A quick note on URNs

A URN (Uniform Resource Name)arrow-up-right is a standard format for identifying online resources. They are used throughout Trovi to represent various forms of data. A URN is a string in the format of urn:<nid>:<nss>. nid stands for "namespace identifier," and nss stands for "namespace-specific string." The NID is a single word which represents the entity which created the URN. NIDs are officially registered with IANA, but in theory, they can be anything.

Trovi has an unofficial NID of trovi. Anything not belonging to an official namespace will use the trovi NID. So, for example, a Chameleon Cloud user URN will be formatted urn:trovi:user:chameleon:<username>, because Chameleon Cloud does not have an official NID.

The only official NIDs we use are ietf, which are used in requests, and globus, which may appear in linked resources in .

CreateTag

Create a new Trovi tag which can be applied to Artifacts.

circle-info

Trovi does not allow users to create their own tags directly. Tags may only be created by registered service accounts. To register your application for this privilege, please get in touch with the Trovi developers

hashtag
Required token scope

  • trovi:admin

TokenGrant
Artifact Versions

MigrateArtifactVersion

Queue an artifact version's contents to be transferred to a different storage backend.

circle-info

Performing a migration submits a migration task onto a queue, and receiving a successful response only means that your migration has been submitted, not that it is finished. To check on the status of your migration, use GetArtifactVersionMigrationStatus

circle-info

Only one migration can be in progress at a time.

hashtag
Required token scope

  • artifacts:write

GitHub - ChameleonCloud/trovi: A collection of shared artifacts.GitHubchevron-right
Trovi APItrovi.chameleoncloud.orgchevron-right
View schema and examples
Trovi APItrovi.chameleoncloud.orgchevron-right
View schema and examples
Trovi APItrovi.chameleoncloud.orgchevron-right
View schema and examples
Trovi APItrovi.chameleoncloud.orgchevron-right
View schema and examples
Logo
Trovi APItrovi.chameleoncloud.orgchevron-right
View schema and examples
Trovi APItrovi.chameleoncloud.orgchevron-right
View schema and examples
Trovi APItrovi.chameleoncloud.orgchevron-right
View schema and examples
Logo
Logo
Trovi APItrovi.chameleoncloud.orgchevron-right
View schema and examples
Logo
Logo
Trovi APItrovi.chameleoncloud.orgchevron-right
View schema and examples
Logo
Trovi APItrovi.chameleoncloud.orgchevron-right
Write schema and examples
Trovi APItrovi.chameleoncloud.orgchevron-right
View schema and examples
Logo
Logo
Trovi APItrovi.chameleoncloud.orgchevron-right
View schema and examples
Trovi APItrovi-dev.chameleoncloud.orgchevron-right
View schema and examples
Logo
Logo
Logo
Logo
Trovi APItrovi.chameleoncloud.orgchevron-right
View schema and examples
Logo
Logo
Logo
Trovi APItrovi-dev.chameleoncloud.orgchevron-right
View schema and examples
Logo
Trovi APItrovi.chameleoncloud.orgchevron-right
View schema and examples
Logo
Trovi APItrovi.chameleoncloud.orgchevron-right
View schema and examples
Logo
Trovi APItrovi.chameleoncloud.orgchevron-right
View schema and examples
Logo