View a Tugboat Project's History

Returns the activity history of a Tugboat Project, or a set of Projects.

Arguments

  • project - Required
    The ID of the project for which to retrieve the history.

  • type - Optional
    The type of event to return. If not specified, all events are returned. This can be a single value, or an array of types.

  • children - Optional
    If true, the events of the project's children are also returned. Default: false

  • before - Optional
    Only return events that occurred before this date. A Date object is expected.

  • after - Optional
    Only return events that occurred after this date. A Date object is expected.

  • limit - Optional
    Only return the last N events.

Example

socket.emit('tugboat', 'projects', 'history', args, callback);

Output

single

[
    {
        "_id": "58f7cb33b6e1d9000158a9ac",
        "updatedAt": "2017-04-19T20:40:19.964Z",
        "createdAt": "2017-04-19T20:40:19.964Z",
        "project": "58f7cb33b6e1d9000158a9ab",
        "type": "activity",
        "data": {
            "event": "create",
            "args": { "name": "test1" },
            "authkey": "0"
        },
        "id": "58f7cb33b6e1d9000158a9ac"
    }
]

array

[
    [
        {
            "_id": "58f7cb33b6e1d9000158a9ac",
            "updatedAt": "2017-04-19T20:40:19.964Z",
            "createdAt": "2017-04-19T20:40:19.964Z",
            "project": "58f7cb33b6e1d9000158a9ab",
            "type": "activity",
            "data": {
                "event": "create",
                "args": { "name": "test1" },
                "authkey": "0"
            },
            "id": "58f7cb33b6e1d9000158a9ac"
        }
    ],
    [
        {
            "_id": "58f7cb35b6e1d9000158a9b0",
            "updatedAt": "2017-04-19T20:40:21.889Z",
            "createdAt": "2017-04-19T20:40:21.889Z",
            "project": "58f7cb35b6e1d9000158a9af",
            "type": "activity",
            "data": {
                "event": "create",
                "args": { "name": "test2" },
                "authkey": "0"
            },
            "id": "58f7cb35b6e1d9000158a9b0"
        }
    ]
]

Errors

  • 1003: No Projects Found
    Returned if the requested projects do not exist, or the requestor does not have permission to view their history.

  • 1004: No Project ID Provided
    The required project argument was not included in the request.

results matching ""

    No results matching ""