Get Entity Markers

Retrieves entity markers newer than a specified last marker ID, filtered by project, app, entity definition, and marker type.

Endpoint

GET /v1/domains/{domainKey}/projects/{projectId}/apps/{appName}/entitydefs/{entityDef}/markers/from/{lastMarker}

Path Parameters

Property Type Description
domainKey string Required. Key identifying the domain containing the project.
projectId integer Required. Project identifier, used to filter markers by their domain partition.
appName string Required. Application name used to qualify the entity definition.
entityDef string Required. Entity definition name without the application prefix. The endpoint searches for the qualified name appName.entityDef.
lastMarker integer Required. Exclusive lower bound for marker IDs: only markers with an ID greater than this value are returned. Use 0 to request all available matching markers. No default is declared.

Query Parameters

None.

Request Body

None.

Response Body

The response contains a single property named markers that is a JSON array of objects with the following properties:

Property Type Description
id integer Marker identifier. Every returned ID is greater than lastMarker. Use the highest returned ID as the cursor for a subsequent request.
markerTime string Date/time recorded for the marker. Kahua uses the ISO 8601 standard to represent date/time values as a JSON string.
entityDefName string Qualified entity definition name, including the application prefix.
entityId integer Identifier of the entity associated with the change.
entityInstanceId integer Entity instance identifier recorded on the marker.
entityPartitionId integer Entity partition identifier recorded on the marker.
domainPartitionId integer Domain partition identifier used for project filtering; matches the requested projectId.
type string Type of marker. Defined marker types are Add, Delete, Move, Invalidate, and Update.

All marker properties are populated from stored marker records. Numeric and date-time properties are non-nullable in the response model, and null string properties are omitted. The response contains change metadata, not entity contents.

The following table provides additional information about the marker type property.

Marker Type Description
Add An entity was added or made active again, including activation or restoration of a previously deleted entity.
Delete An entity was deleted or deactivated. This does not necessarily indicate permanent physical deletion.
Invalidate Previously retrieved entity data or its location is no longer current and should be refreshed. This type differs from an Update because it represents an indirect changes, for example changing a parent document or linked WBS item since their item totals are now stale.
Move An entity moved to another partition. The marker records the destination entity partition and domain partition.
Update An existing entity was modified. You should retrieve the current data for the entity to incorporate the change.

Markers are only stored for approximately the past 30 days. Sending zero as the last marker will only return changes made in the last 30 days.

 

Example

Request

This example shows a successful request that returns two matching markers.

GET /v1/domains/MagsevenBuilders/projects/62047326/apps/kahua_Issue/entitydefs/Issue/markers/from/6910000

Response

Copy
{
    "markers": [
        {
            "id": 6913914,
            "markerTime": "2020-12-15T00:53:55.573Z",
            "entityDefName": "kahua_Issue.Issue",
            "entityId": 6185478,
            "entityInstanceId": 6185516,
            "entityPartitionId": 1952888,
            "domainPartitionId": 1952888,
            "type": "Add"
        },
        {
            "id": 6913915,
            "markerTime": "2020-12-15T00:53:55.527Z",
            "entityDefName": "kahua_Issue.Issue",
            "entityId": 6185488,
            "entityInstanceId": 6185515,
            "entityPartitionId": 1952888,
            "domainPartitionId": 1952888,
            "type": "Update"
        }
    ]
}