...
Type | Description |
---|---|
UNDEFINED | (Default) The user has not specified details for the Activity |
MANUAL | The user manually generated the wasGeneratedBy entities of this Activity |
CODE EXECUTION | The user executed code that generated the wasGeneratedBy entities of this Activity |
Current Entity API
The following table describes how provenance effects the current entity Entity CRUD API:
URL | HTTP Type | Description | |||
---|---|---|---|---|---|
/entity | POST | Creates a new entity of the given entity. This will create a new "Undefined" activity | /entity | GET | Get a list of all entities of the given type: entity. For version-able entity types, this will list the current version of each entity of that typeand links it to a new UNDEFINED activity. |
/entity?activityId={activity id} | POST | Create a new entity and links it to the provided activity*. | |||
/entity/{id} | GETPUT | Get an entity using its type and id. For Updates the entity. If the entity is version-able entities this will return the current version of the entityand the update results in a new version then a new UNDEFINED activity is created and linked with the new version. | |||
/entity/{id}?activityId={activity id} | PUT | UpdateUpdates the entity | identified by type and id. For a version-able entity this will updateand links the current version of the entity to the provided activity. | ||
/entity/{id}/version | DELETE | Delete the entity identified by type and id. For a POST | Creates a new version of a given version-able | entity this will delete the entity and all versions of the entityentity and links it to a new UNDEFINED activity. | |
/entity/{id}/ | annotationsGET | Get the annotations for the entity identified by type and id. For a version-able entity this will return the annotations of the current entity. | |||
/entity/{id}/annotations | PUT | Update the annotations for the entity identified by type and id. For a version-able entity this will update the annotations of the current entity. |
...
version?activityId={activityId} | POST | Creates a new version of a given version-able entity and links it to the provided activity. |
*- see Permission and Access to Activites below
Provenance Additions to the API
The following table describes the new methods for manipulating the versions of a version-able entity.
URL | HTTP Type | Description | |
---|---|---|---|
/ | {versionable-entityType}/{entityId}/versionactivity | POST | Create a new version of a given version-able entity. The user should provide a versionLabel and Synapse will auto-generate a new versionNumber. When this called on a version-able entity, the annotations of the current entity will be copied and applied to the newly created version. |
/{versionable-entityType}/{entityId}/version | GET | Returns a list of all versions of this entity. This will be a paginated list with a default sort on versionNumber descending | |
/{versionable-entityType}/{entityId}/version/{versionNumber} | GET | Get a particular version of a version-able entity using the given id and version number. | |
/{versionable-entityType}/{entityId}/version/{versionNumber} | PUT | Not supported! Only the current version of an entity can be updated using the existing API. | |
/{versionable-entityType}/{entityId}/version/{versionNumber} | DELETE | Delete a particular version of a version-able entity using the given id and version number. | |
/{versionable-entityType}/{entityId}/version/{versionNumber}/annotations | GET | Get the annotations of a particular version of a version-able entity using the given id and version number. | |
/{versionable-entityType}/{entityId}/version/{versionNumber}/annotations | PUT | Not Supported! You can only change the annotations of the current versionCreates a new activity object. | |
/activity/{activityId} | PUT | Updates the specified activity. Only the creator of an activity may update it. | |
/activity/{activityId} | GET | Returns the specified activity. READ access is permitted if you can see a single wasGeneratedBy entity that links to this activity. | |
/activity/{activityId} | DELETE | Delete the specified activity. Only the creator of an activity may delete it. |