Activity Types
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 API
The following table describes how provenance effects the current 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 type. |
/entity/{id} | GET | Get an entity using its type and id. For version-able entities this will return the current version of the entity. |
/entity/{id} | PUT | Update the entity identified by type and id. For a version-able entity this will update the current version of the entity. |
/entity/{id} | DELETE | Delete the entity identified by type and id. For a version-able entity this will delete the entity and all versions of the entity. |
/entity/{id}/annotations | GET | 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-able 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}/version | 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 version. |