Last updated on 1st April 2026

Getting recent activity via API

This method returns a list of recent events across all your projects for the current week. Optionally include deployment statistics.

Tip: You can explore and test this endpoint interactively using our OpenAPI documentation.

URL

/activity

HTTP Method

GET

Supported Parameters

  • include (optional) - Set to stats to include deployment statistics alongside the events

Example cURL Request

curl -H "Content-type: application/json" \
-H "Accept: application/json" \
--user your-email@example.com:your-api-key \
https://test.deployhq.com/activity

Example Response

[
    {
        "event": "deploy_completed",
        "properties": {
            "end_ref": "abc123def456",
            "servers": ["production"]
        },
        "project": {
            "name": "My App",
            "permalink": "my-app",
            "identifier": "a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d"
        },
        "user": "Jane Doe",
        "created_at": "2026-03-30T14:22:00Z"
    }
]

Including Deployment Statistics

Add ?include=stats to also receive deployment statistics for the current week:

curl -H "Content-type: application/json" \
-H "Accept: application/json" \
--user your-email@example.com:your-api-key \
https://test.deployhq.com/activity?include=stats

When stats are included, the response wraps events in an object:

{
    "events": [
        {
            "event": "deploy_completed",
            "properties": {
                "end_ref": "abc123def456",
                "servers": ["production"]
            },
            "project": {
                "name": "My App",
                "permalink": "my-app",
                "identifier": "a1b2c3d4-5e6f-7a8b-9c0d-1e2f3a4b5c6d"
            },
            "user": "Jane Doe",
            "created_at": "2026-03-30T14:22:00Z"
        }
    ],
    "stats": {
        "total_deployments": 12,
        "total_deployments_delta": 3,
        "success_rate": 91.7,
        "success_rate_delta": -2.1,
        "avg_duration": "2m 34s",
        "active_servers": 8
    }
}

Response Fields

Event fields

  • event - The event type (e.g. deploy_completed, deploy_failed)
  • properties - Event-specific metadata (e.g. end_ref, servers)
  • project - The associated project with name, permalink, and identifier
  • user - Name of the user who triggered the event
  • created_at - ISO 8601 timestamp of when the event occurred

Stats fields (when ?include=stats is used)

  • total_deployments - Number of deployments this week
  • totaldeploymentsdelta - Change compared to last week
  • success_rate - Percentage of successful deployments (null if no deployments)
  • successratedelta - Change in success rate compared to last week
  • avg_duration - Average deployment duration as a human-readable string
  • active_servers - Number of currently enabled servers

Events are ordered by most recent first, limited to 100 events from the current week.