Current Entity API

The following table describes how provenance effects the current Entity CRUD API:

URL

HTTP Type

Description

/entity?generatedBy={activity id}POST

Creates a new entity and creates a generatedBy connection to the provided activity.

  • Error Codes
    • 403 - Unauthorized assignment of activity. You must be the creator of the activity to connect it to an entity
    • 404 - If activityId is not found.
/entity/{id}?generatedBy={activity id}PUT

Updates the entity and creates a generatedBy connection from the current version of the entity to the provided activity.

  • Error Codes
    • 403 - Unauthorized assignment of activity. You must be the creator of the activity to connect it to an entity
    • 404 - If activityId is not found.
/entity/{id}/version?generatedBy={activityId}PUT

Creates a new version of a given version-able entity and creates a generatedBy connection to the provided activity.

  • Error Codes
    • 403 - Unauthorized assignment of activity. You must be the creator of the activity to connect it to an entity
    • 404 - If activityId is not found.
/entity/bundle?generatedBy={activityId}POST

Creates a new EntityBundle and creates a generatedBy connection to the provided activity.

  • Error Codes
    • 403 - Unauthorized assignment of activity. You must be the creator of the activity to connect it to an entity
    • 404 - If activityId is not found.
/entity/bundle?generatedBy={activityId}PUT

Updates an EntityBundle and creates a generatedBy connection to the provided activity.

  • Error Codes
    • 403 - Unauthorized assignment of activity. You must be the creator of the activity to connect it to an entity
    • 404 - If activityId is not found.

 

Provenance Additions to the API

Additions to Entity API

The following are new suffixes on the Entity services for Provenance

URL

HTTP Type

Description

/entity/{id}/generatedByGET

Returns the activity that generated the current version of the entity.

  • Error Codes
    • 404 - If the entity is not connected to an activity.
/entity/{id}/version/{versionNumber}/generatedByGET

Returns the activity that generated the specific version of the entity.

  • Error Codes
    • 404 - If that version of the entity is not connected to an activity.
/entity/{id}/generatedBy?generatedBy={activityId}PUT

Updates the activity that generated the current version of the entity. Outside the transaction of entity CRUD.

  • Error Codes
    • 403 - Unauthorized assignment of activity. You must be the creator of the activity to connect it to an entity
    • 404 - If activityId is not found.
/entity/{id}/generatedByDELETE

Removes the generatedBy connection from the current version of the entity.

 

Activity API

The following table describes the new methods for manipulating the versions of a version-able entity.

URL

HTTP Type

Description

/activityGETPaginated service to get all Activities (that you can see)
/activityPOST

Creates a new activity object.

/activity/{activityId}GET

Returns the specified activity.

  • Error Codes
    • 403 - Unauthorized access of activity. READ access is permitted if you can see a single entity that was generated by this activity.
    • 404 - If activityId is not found.
/activity/{activityId}PUT

Updates the specified activity.

  • Error Codes
    • 403 - Unauthorized update of activity. You must be the creator of the activity to modify it.
    • 404 - If activityId is not found.
/activity/{activityId}DELETE
  • Error Codes
    • 403 - Unauthorized delete of activity. You must be the creator of the activity to modify it.
    • 404 - If activityId is not found.