> ## Documentation Index
> Fetch the complete documentation index at: https://developer.upsun.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Activity reference

> A reference of the properties found in various activities.

export const MetaImageVersion = ({language, version}) => {
  const [selectedVersion, setSelectedVersion] = useState(null);
  const [loading, setLoading] = useState(true);
  const [error, setError] = useState(null);
  const isComposable = language === 'composable';
  const STORAGE_KEY = isComposable ? 'upsun_composable_cache' : 'upsun_versions_cache';
  const CACHE_TTL = 5 * 60 * 1000;
  const API_URL = isComposable ? 'https://meta.upsun.com/composable' : 'https://meta.upsun.com/images';
  const findHighestVersion = versionsMap => {
    if (!versionsMap || Object.keys(versionsMap).length === 0) return null;
    const entries = Object.entries(versionsMap);
    const active = entries.filter(([, v]) => v.upsun && v.upsun.status === 'supported' || v.upsun && v.upsun.status === 'deprecated');
    const candidates = active.length > 0 ? active : entries;
    let [highestName] = candidates[0];
    for (let i = 1; i < candidates.length; i++) {
      const [currentName] = candidates[i];
      const cp = currentName.split('.').map(Number);
      const hp = highestName.split('.').map(Number);
      for (let j = 0; j < Math.max(cp.length, hp.length); j++) {
        if ((cp[j] || 0) > (hp[j] || 0)) {
          highestName = currentName;
          break;
        } else if ((cp[j] || 0) < (hp[j] || 0)) {
          break;
        }
      }
    }
    return highestName;
  };
  useEffect(() => {
    if (!language) {
      setLoading(false);
      return;
    }
    setLoading(true);
    setError(null);
    const fetchData = async () => {
      let cachedData = null;
      let cachedEtag = null;
      if (typeof localStorage !== 'undefined') {
        try {
          const cached = localStorage.getItem(STORAGE_KEY);
          if (cached) {
            const parsed = JSON.parse(cached);
            cachedData = parsed?.data || null;
            cachedEtag = parsed?.etag || null;
            if (cachedData && Date.now() - parsed.timestamp < CACHE_TTL) return cachedData;
          }
        } catch (error_) {
          console.error('Failed to load from cache:', error_);
        }
      }
      const requestHeaders = cachedEtag ? {
        'If-None-Match': cachedEtag
      } : {};
      const response = await fetch(API_URL, {
        headers: requestHeaders
      });
      if (response.status === 304 && cachedData) {
        if (typeof localStorage !== 'undefined') {
          try {
            const etag = response.headers.get('etag') || cachedEtag;
            localStorage.setItem(STORAGE_KEY, JSON.stringify({
              data: cachedData,
              etag,
              timestamp: Date.now()
            }));
          } catch (error_) {
            console.error('Failed to refresh cache metadata:', error_);
          }
        }
        return cachedData;
      }
      if (!response.ok) throw new Error(`API request failed: ${response.statusText}`);
      const data = await response.json();
      const etag = response.headers.get('etag');
      if (typeof localStorage !== 'undefined') {
        try {
          localStorage.setItem(STORAGE_KEY, JSON.stringify({
            data,
            etag,
            timestamp: Date.now()
          }));
        } catch (error_) {
          console.error('Failed to cache data:', error_);
        }
      }
      return data;
    };
    fetchData().then(data => {
      if (!data) {
        setSelectedVersion(null);
        setLoading(false);
        return;
      }
      const imageData = isComposable ? data : data[language];
      if (!imageData || !imageData.versions || Object.keys(imageData.versions).length === 0) {
        setSelectedVersion(null);
        setLoading(false);
        return;
      }
      let versionName = null;
      if (version && version !== 'latest') {
        versionName = (version in imageData.versions) ? version : null;
      } else {
        versionName = findHighestVersion(imageData.versions);
      }
      setSelectedVersion(versionName);
      setLoading(false);
    }).catch(error_ => {
      console.error('MetaImageVersion error:', error_);
      setError(error_.message);
      setLoading(false);
    });
  }, [language, version]);
  if (loading) return <span>…</span>;
  if (error) return <span title={error}>⚠ unavailable</span>;
  if (!selectedVersion) return <span>No version found</span>;
  return <span>{selectedVersion}</span>;
};

export const DynamicCodeBlock = ({language = 'yaml', filename, icon, lines, wrap, expandable, highlight, focus, children}) => {
  const STORAGE_KEY = 'upsun_versions_cache';
  const COMPOSABLE_STORAGE_KEY = 'upsun_composable_cache';
  const CACHE_TTL = 5 * 60 * 1000;
  const API_URL = 'https://meta.upsun.com/images';
  const COMPOSABLE_API_URL = 'https://meta.upsun.com/composable';
  const DEBUG_PREFIX = '[DynamicCodeBlock cache]';
  const [versionData, setVersionData] = useState(null);
  const [versionError, setVersionError] = useState(false);
  const [composableData, setComposableData] = useState(null);
  const [composableError, setComposableError] = useState(false);
  useEffect(() => {
    const fetchData = async () => {
      let cachedData = null;
      let cachedEtag = null;
      if (typeof localStorage !== 'undefined') {
        try {
          const cached = localStorage.getItem(STORAGE_KEY);
          if (cached) {
            const parsed = JSON.parse(cached);
            cachedData = parsed?.data || null;
            cachedEtag = parsed?.etag || null;
            if (cachedData && Date.now() - parsed.timestamp < CACHE_TTL) {
              return cachedData;
            }
          }
        } catch (err) {
          console.error('Failed to load from cache:', err);
        }
      }
      const requestHeaders = cachedEtag ? {
        'If-None-Match': cachedEtag
      } : {};
      console.debug(`${DEBUG_PREFIX} revalidating`, {
        storageKey: STORAGE_KEY,
        hasCachedData: Boolean(cachedData),
        hasCachedEtag: Boolean(cachedEtag)
      });
      const response = await fetch(API_URL, {
        headers: requestHeaders
      });
      if (response.status === 304 && cachedData) {
        console.debug(`${DEBUG_PREFIX} revalidated (304)`, {
          storageKey: STORAGE_KEY
        });
        if (typeof localStorage !== 'undefined') {
          try {
            const etag = response.headers.get('etag') || cachedEtag;
            localStorage.setItem(STORAGE_KEY, JSON.stringify({
              data: cachedData,
              etag,
              timestamp: Date.now()
            }));
          } catch (err) {
            console.error('Failed to refresh cache metadata:', err);
          }
        }
        return cachedData;
      }
      if (!response.ok) throw new Error(`API request failed: ${response.statusText}`);
      const data = await response.json();
      const etag = response.headers.get('etag');
      console.debug(`${DEBUG_PREFIX} refreshed (200)`, {
        storageKey: STORAGE_KEY,
        etag
      });
      if (typeof localStorage !== 'undefined') {
        try {
          localStorage.setItem(STORAGE_KEY, JSON.stringify({
            data,
            etag,
            timestamp: Date.now()
          }));
        } catch (err) {
          console.error('Failed to cache data:', err);
        }
      }
      return data;
    };
    fetchData().then(data => setVersionData(data)).catch(err => console.error('Failed to fetch version data:', err));
  }, []);
  const findHighestVersion = versionsMap => {
    if (!versionsMap || Object.keys(versionsMap).length === 0) return null;
    const entries = Object.entries(versionsMap);
    const active = entries.filter(([, v]) => v.upsun && v.upsun.status === 'supported' || v.upsun && v.upsun.status === 'deprecated');
    const candidates = active.length > 0 ? active : entries;
    let [highestName] = candidates[0];
    for (let i = 1; i < candidates.length; i++) {
      const [currentName] = candidates[i];
      const cp = currentName.split('.').map(Number);
      const hp = highestName.split('.').map(Number);
      for (let j = 0; j < Math.max(cp.length, hp.length); j++) {
        if ((cp[j] || 0) > (hp[j] || 0)) {
          highestName = currentName;
          break;
        } else if ((cp[j] || 0) < (hp[j] || 0)) {
          break;
        }
      }
    }
    return highestName;
  };
  const getVersion = (lang, requestedVersion = 'latest') => {
    if (lang === 'composable') {
      if (!composableData || !composableData.versions || Object.keys(composableData.versions).length === 0) return null;
      if (requestedVersion && requestedVersion !== 'latest') {
        return (requestedVersion in composableData.versions) ? requestedVersion : null;
      }
      return findHighestVersion(composableData.versions);
    }
    if (!versionData) return null;
    const imageData = versionData[lang];
    if (!imageData || !imageData.versions || Object.keys(imageData.versions).length === 0) {
      return null;
    }
    if (requestedVersion && requestedVersion !== 'latest') {
      return (requestedVersion in imageData.versions) ? requestedVersion : null;
    }
    return findHighestVersion(imageData.versions);
  };
  let code = typeof children === 'string' ? children : String(children || '');
  const codeLines = code.split('\n');
  while (codeLines.length > 0 && codeLines[0].trim() === '') codeLines.shift();
  while (codeLines.length > 0 && codeLines[codeLines.length - 1].trim() === '') codeLines.pop();
  if (codeLines.length > 0) {
    const indents = codeLines.filter(line => line.trim().length > 0).map(line => line.match(/^[ \t]*/)[0].length);
    const minIndent = Math.min(...indents);
    code = codeLines.map(line => line.slice(minIndent)).join('\n');
  }
  code = code.replace(/\{\{version:(.*?)\}\}/g, (match, params) => {
    const parts = params.split(':');
    const lang = parts[0];
    const ver = parts[1] || 'latest';
    const isComposable = lang === 'composable';
    const hasError = isComposable ? composableError : versionError;
    const dataReady = isComposable ? composableData !== null : versionData !== null;
    if (hasError) return '(unavailable)';
    if (dataReady) {
      const resolvedVersion = getVersion(lang, ver);
      return resolvedVersion || match;
    }
    return '...';
  });
  const codeBlockProps = {
    language,
    ...filename && ({
      filename
    }),
    ...icon && ({
      icon
    }),
    ...lines !== undefined && ({
      lines
    }),
    ...wrap !== undefined && ({
      wrap
    }),
    ...expandable !== undefined && ({
      expandable
    }),
    ...highlight && ({
      highlight
    }),
    ...focus && ({
      focus
    })
  };
  return <CodeBlock {...codeBlockProps}>{code}</CodeBlock>;
};

Activities log changes to your project,
including when you deploy your app,
when you [push code](#push), and when a [cron job is run](#cron).

To automate your workflows, you can parse and react to the activity's JSON object
through [activity scripts](/docs/integrations/activity).

## Activity schema

Every activity has a corresponding JSON object containing all information for that activity,
including timestamps, configuration, and sometimes logs.
In practice, you can ignore much of the JSON object's content.
The most commonly used values are documented in this reference.

The response differs depending on the activity and doesn't always include all fields.

### Example response

The following is a shortened example of a response for an [environment sync activity](/docs/glossary#sync).
You can also see [complete examples of responses](#examples).

<DynamicCodeBlock language="json" filename="activity_response.json">
  {`
      {
        "id": "abcdefg123456",
        ...
        "created_at": "2026-12-16T14:28:17.890467+00:00",
        "updated_at": null,
        "type": "environment.synchronize",
        "parameters": {
          ...
        },
        "project": "abcdefgh1234567",
        "environments": [
          "feature"
        ],
        "state": "complete",
        "result": "success",
        "started_at": "2026-12-16T14:28:18.188888+00:00",
        "completed_at": "2026-12-16T14:31:48.809068+00:00",
        "completion_percent": 100,
        "cancelled_at": null,
        "timings": {
          "wait": 0,
          "build": 0.349,
          "deploy": 209.986,
          "execute": 210.508
        },
        "log": "Building application 'app' (runtime type: php:{{version:php:latest}}, tree: 9851a01)\n  Reusing existing build for this tree ID\n\n...\nRedeploying environment test, as a clone of main\n  ...\n  Closing all services\n  Opening application app and its relationships\n  Executing deploy hook for application app\n ... Environment configuration\n    app (type: php:{{version:php:latest}}, size: S, disk: 2048)\n\n  ...",
        "payload": {
          ...
        },
        "description": "<user data-id=\"abcdefghijk123456789\">Cloé Weber</user> synchronized <environment data-id=\"test\">test</environment>'s <strong>data</strong> from <environment data-id=\"main\">Main</environment>",
        "text": "Cloé Weber synchronized test's **data** from Main",
        "expires_at": "2026-12-16T14:28:17.890467+00:00"
      }
    `
  }
</DynamicCodeBlock>

### `id`

A unique `id` value to identify the activity itself.

### `*_at`

`created_at`, `started_at`, `updated_at`, `cancelled_at`, `completed_at`, and `expires_at` are all timestamps in UTC.
For when a given activity occurred, use `completed_at`.
You can use these properties to calculate the duration of the activity.
To calculate the timing for steps in the activity, see the [`timings` property](#timings).

### `parameters`

The `parameters` property includes detailed information about what triggered the activity,
such as the user, the impacted environment, the git commits, or the cron commands.
The response changes based on the activity.

### `project`

The ID of the project in which the activity took place.
Use this value to distinguish multiple projects sent the same URL.

Different from [`project` activities](#type).

### `type`

The type of the activity in one of the following categories:

* [Project](#project-activity-types)
* [Environment](#environment-activity-types)
* [Integration](#integration-activity-types)
* [Maintenance](#maintenance-activity-types)

#### `project` activity types

Activities that happened on a given project.
The following table presents the possible activity types:

| Name                        | Description                                                                                                                                                                                                                       |
| --------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `project.clear_build_cache` | The build cache is cleared.                                                                                                                                                                                                       |
| `project.create`            | A new project is created.                                                                                                                                                                                                         |
| `project.metrics.enable`    | A metric from the [continuous profiling](/docs/observability) has been enabled.                                                                                                                                                   |
| `project.metrics.update`    | A metric from the [continuous profiling](/docs/observability) has been updated.                                                                                                                                                   |
| `project.metrics.disable`   | A metric from the [continuous profiling](/docs/observability) has been disabled.                                                                                                                                                  |
| `project.modify.title`      | The project title has changed.                                                                                                                                                                                                    |
| `project.variable.create`   | A new [project variable](/docs/administration/web/configure-project#variables) has been created. The value is visible only if the variable is not [set as sensitive](/docs/development/variables/set-variables#variable-options). |
| `project.variable.delete`   | A [project variable](/docs/administration/web/configure-project#variables) has been deleted.                                                                                                                                      |
| `project.variable.update`   | A [project variable](/docs/administration/web/configure-project#variables) has been modified.                                                                                                                                     |

#### `environment` activity types

Activities that happened on an environment.
The following table presents the possible activity types:

| Name                                 | Description                                                                                                                                                                                                                     |
| ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `environment.activate`               | The environment has been made [active](/docs/glossary#active-environment).                                                                                                                                                      |
| `environment.backup`                 | A user triggered a [backup](/docs/environments/backup).                                                                                                                                                                         |
| `environment.backup.delete`          | A user deleted a [backup](/docs/environments/backup).                                                                                                                                                                           |
| `environment.branch`                 | A [new branch](/docs/environments#create-environments) has been created via the CLI, Console, or API. A branch created via Git shows up as `environment.push`.                                                                  |
| `environment.certificate.renewal`    | An environment's SSL certificate has been [renewed](/docs/routes/https#certificate-renewals).                                                                                                                                   |
| `environment.cron`                   | A [cron job](/docs/configure-apps/image-properties/crons) has completed.                                                                                                                                                        |
| `environment.deactivate`             | An environment has been made [inactive](/docs/glossary#inactive-environment).                                                                                                                                                   |
| `environment.delete`                 | An environment's code was deleted through Git.                                                                                                                                                                                  |
| `environment.domain.create`          | A new [domain](/docs/administration/web/configure-project#domains) has been associated with the environment.                                                                                                                    |
| `environment.domain.delete`          | A [domain](/docs/administration/web/configure-project#domains) associated with the environment has been removed.                                                                                                                |
| `environment.domain.update`          | A [domain](/docs/administration/web/configure-project#domains) associated with the environment has been updated, such as having its SSL certificate modified.                                                                   |
| `environment.initialize`             | The [default branch](/docs/environments#default-environment) of the project has just been initialized with its first commit.                                                                                                    |
| `environment.merge`                  | An environment was [merged](/docs/glossary#merge) through the CLI, Console, or API. A basic Git merge doesn't trigger this activity.                                                                                            |
| `environment.merge-pr`               | A Pull Request/Merge Request was merged through the CLI, Console, or API. A basic Git merge doesn't trigger this activity.                                                                                                      |
| `environment.operation`              | A [source operation](/docs/configure-apps/runtime-operations) has been triggered                                                                                                                                                |
| `environment.pause`                  | An environment has been [paused](/docs/environments#pause-an-environment).                                                                                                                                                      |
| `environment.push`                   | A user [pushed](/cli/reference#environmentpush) code to a branch, either existing or new.                                                                                                                                       |
| `environment.redeploy`               | An environment was [redeployed](/cli/reference#environmentredeploy).                                                                                                                                                            |
| `environment.restore`                | A user restored a [backup](/docs/environments/backup).                                                                                                                                                                          |
| `environment.resume`                 | An inactive environment was [resumed](/docs/environments#resume-a-paused-environment)                                                                                                                                           |
| `environment.resources.update`       | The resources allocated to the environment [have been updated](/docs/manage-resources/adjust-resources).                                                                                                                        |
| `environment.route.create`           | A new [route](/docs/administration/web/configure-environment#routes) has been created through the API. Edits made using Git to the `.upsun/config.yaml` file don't trigger this activity.                                       |
| `environment.route.delete`           | A [route](/docs/administration/web/configure-environment#routes) has been deleted through the API. Edits made using Git to the `.upsun/config.yaml` file don't trigger this activity.                                           |
| `environment.route.update`           | A [route](/docs/administration/web/configure-environment#routes) has been modified through the API. Edits made using Git to the `.upsun/config.yaml` file don't trigger this activity.                                          |
| `environment.source-operation`       | A [source operation](/docs/configure-apps/source-operations) has been triggered.                                                                                                                                                |
| `environment.synchronize`            | An environment has had its data and/or code replaced with the data and/or code from its parent environment.                                                                                                                     |
| `environment.update.http_access`     | [HTTP access rules](/docs/administration/web/configure-environment#http-access-control) for an environment have been modified.                                                                                                  |
| `environment.update.restrict_robots` | The option to [hide from search engines](/docs/environments/search-engine-visibility) has been enabled or disabled for an environment.                                                                                          |
| `environment.update.smtp`            | Email sending has been enabled or disabled for an environment.                                                                                                                                                                  |
| `environment.variable.create`        | A [new variable](/docs/development/variables/set-variables#variable-options) has been created. The value is visible only if the variable is not [set as sensitive](/docs/development/variables/set-variables#variable-options). |
| `environment.variable.delete`        | A [variable](/docs/development/variables/set-variables#variable-options) has been deleted.                                                                                                                                      |
| `environment.variable.update`        | A [variable](/docs/development/variables/set-variables#variable-options) has been modified.                                                                                                                                     |
| `environment_type.access.create`     | A [new access](/docs/administration/users#manage-project-access) has been added to the environment                                                                                                                              |
| `environment_type.access.delete`     | An [existing access](/docs/administration/users#manage-project-access) to the environment has been deleted                                                                                                                      |
| `environment_type.access.update`     | An [existing access](/docs/administration/users#manage-project-access) to the environment has been updated                                                                                                                      |

#### `integration` activity types

Activities that relate to an integration.
The following table presents the possible activity types:

| Name                                          | Description                                                                                                             |
| --------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------- |
| `integration.bitbucket.fetch`                 | A fetch has been triggered on your [Bitbucket Cloud](/docs/integrations/source/bitbucket#bitbucket-cloud) repository.   |
| `integration.bitbucket.register_hooks`        | An integration hook has been registered with [Bitbucket Cloud](/docs/integrations/source/bitbucket#bitbucket-cloud).    |
| `integration.bitbucket_server.fetch`          | A fetch has been triggered on your [Bitbucket Server](/docs/integrations/source/bitbucket#bitbucket-server) repository. |
| `integration.bitbucket_server.register_hooks` | An integration hook has been registered with [Bitbucket Server](/docs/integrations/source/bitbucket#bitbucket-server).  |
| `integration.github.fetch`                    | A fetch has been triggered on your [GitHub](/docs/integrations/source/github) repository.                               |
| `integration.gitlab.fetch`                    | A fetch has been triggered on your [GitLab](/docs/integrations/source/gitlab) repository.                               |
| `integration.health.email`                    | A [health notification](/docs/integrations/notifications) was sent by email.                                            |
| `integration.health.pagerduty`                | A [health notification](/docs/integrations/notifications) was sent to PagerDuty.                                        |
| `integration.health.slack`                    | A [health notification](/docs/integrations/notifications) was sent to Slack.                                            |
| `integration.health.webhook`                  | A [health notification](/docs/integrations/notifications) was sent to a webhook.                                        |
| `integration.script`                          | An [activity script](/docs/integrations/activity) has been triggered.                                                   |
| `integration.webhook`                         | A [webhook](/docs/integrations/activity/webhooks) was triggered.                                                        |

#### `maintenance` activity types

Activities that relate to a maintenance.
The following table presents the possible types:

| Name                  | Description                                               |
| --------------------- | --------------------------------------------------------- |
| `maintenance.upgrade` | An upgrade is triggered for API Server and Metrics Server |

### `environments`

An array listing the environments that were involved in the activity.
It's usually only a single value representing one environment.

### `state`

The current state of the activity.
Its value can be `pending`, `in_progress`, `complete`, `cancelled`, or `scheduled`.

### `completion_percent`

What percentage of the activity is complete.

### `result`

Whether or not the activity completed successfully.
If it did, the value is `success`.
Note that certain activities, such as deploy hooks,
can be marked as successful activities even if some commands failed.

### `timings`

The amount of time required by the activity.

It can include the following properties:

| Name      | Description                                                  |
| --------- | ------------------------------------------------------------ |
| `wait`    | The delay if a command is set to wait before being executed. |
| `build`   | The execution time for the build hook.                       |
| `deploy`  | The execution time for the deploy hook.                      |
| `execute` | The execution time for your script or cron job.              |

### `log`

A human-friendly record of what happened in the activity.
The log shouldn't be parsed for data as its structure isn't guaranteed.

### `description`

A short machine-readable description of the activity.

### `text`

A short human-readable description of the activity.

### `payload`

Contains settings and details related to the completed activity.
Its content varies based on the activity type.

| Name                    | Description                                                                                                                     |
| ----------------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| `payload.user`          | The user that triggered the activity. For details on its properties, see the [`user` payload](#user-payload).                   |
| `payload.environment`   | The environment affected by the activity. For details on its properties, see the [`environment` payload](#environment-payload). |
| `payload.commits`       | A list of changes with their Git metadata.                                                                                      |
| `payload.commits_count` | The number of Git commits.                                                                                                      |
| `payload.deployment`    | Information about the deployed environment. For details on its properties, see the [`deployment` payload](#deployment-payload). |
| `payload.project`       | Information about the project. For details on its properties, see the [`project` payload](#project-payload).                    |

#### `user` payload

Contains information about the Upsun user that triggered the activity.

| Name                        | Description                                 |
| --------------------------- | ------------------------------------------- |
| `payload.user.created_at`   | The date the user was created.              |
| `payload.user.display_name` | The user's name in a human-friendly format. |
| `payload.user.id`           | The user's ID.                              |
| `payload.user.updated_at`   | The date the user was last updated.         |

#### `environment` payload

Contains information about the environment associated with the activity,
including its settings, state, and deployment.
The following table presents the most notable properties of the environment:

| Name                                | Description                                                                       |
| ----------------------------------- | --------------------------------------------------------------------------------- |
| `payload.environment.name`          | The environment name.                                                             |
| `payload.environment.type`          | The [environment type](/docs/administration/users#environment-type-roles).        |
| `payload.environment.head_commit`   | The ID of the environment's latest Git commit.                                    |
| `payload.environment.edge_hostname` | The URL you should target when setting up a [custom domain](/docs/domains/steps). |

Different from [`environment` activities](#type).

#### `project` payload

Contains information about the project associated with the activity,
including plan details, timezone, and region.
The following table presents the most notable properties of the project:

| Name                           | Description                                                                   |
| ------------------------------ | ----------------------------------------------------------------------------- |
| `payload.project.timezone`     | Your project's [timezone](/docs/projects/change-project-timezone).            |
| `payload.project.region`       | Your project's [region](/docs/development/regions#regions).                   |
| `payload.project.title`        | Your project's name.                                                          |
| `payload.project.subscription` | All of the details about your project's [plan](/docs/administration/pricing). |

Different from [`project` activities](#type).

#### `deployment` payload

Contains information about the deployed environment, if one is associated with the activity.
The following table presents the most notable properties of the deployment:

| Name                           | Description                                                                                                                            |
| ------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------- |
| `payload.deployment.routes`    | All the URLs connected to the environment. The list includes redirects. To exclude redirects, find objects whose `type` is `upstream`. |
| `payload.deployment.services`  | All the services on your environment.                                                                                                  |
| `payload.deployment.variables` | All the [variables for the environment](/docs/development/variables).                                                                  |

The `payload.deployment` property includes the configuration extracted from the following sources:

* Your [app configuration](/docs/configure-apps)
* Your [routes](/docs/routes)
* Your [services](/docs/add-services)

## Maximum activities and parallelism

Project activities are distributed across separate queues,
which enables *two* simultaneous activities to occur in parallel across your environments.
For a given environment, only one activity can run at a time.
Those queues include the following types of activities:

| Name           | Description                                                                                          |
| -------------- | ---------------------------------------------------------------------------------------------------- |
| `default`      | The most common activities on repositories (pushes, merges) and environments (syncs, redeployments). |
| `integrations` | Source and webhook integration activities.                                                           |
| `backup`       | Backup activities.                                                                                   |
| `cron`         | Cron activities.                                                                                     |

Production activities are prioritized across all queues.
When an activity for the production environment is triggered, it's placed at the top of the queue.
This makes it unlikely that activities on preview environments block activities for the production environment for long,
though there may be a temporary wait.

## Examples

The response is often usually long, so the following examples are shortened using ellipses.
Remember that the response differs depending on the activity and not all fields are always available.

To test responses, [set up a webhook](/docs/integrations/activity/webhooks#setup).

### Cron

When a cron job is triggered, the activity contains all the [job's information](/docs/configure-apps/image-properties/crons).
The following example response was triggered by a setting
where the cron is scheduled to run every five minutes (`5 * * * *`)
with the command `sleep 60 && echo sleep-60-finished && date` and times out after 86,400 seconds.

To get details about the configured cron job, see the `parameters` property:

```json {no-copy="true"} theme={null}
...
  "parameters": {
    "user": "admin",
    "cluster": "abcdefgh1234567-main-abcd123",
    "environment": "main",
    "application": "app",
    "cron": "saybye",
    "spec": {
      "spec": "5 * * * *",
      "commands": {
        "start": "sleep 60 && echo sleep-60-finished && date",
        "stop": null
      },
      "shutdown_timeout": null,
      "timeout": 86400
    }
...
```

The following example shows the full activity response to a cron job:

```json {no-copy="true"} theme={null}
{
  "id": "ypalrypnezbye",
  "_links": {
    "self": {
      "href": "https://eu-3.upsun.com/api/projects/abcdefgh1234567/activities/ypalrypnezbye"
    },
    "log": {
      "href": "/api/projects/abcdefgh1234567/activities/ypalrypnezbye/log"
    }
  },
  "created_at": "2026-12-13T16:06:08.081312+00:00",
  "updated_at": null,
  "type": "environment.cron",
  "parameters": {
    "user": "admin",
    "cluster": "abcdefgh1234567-main-abcd123",
    "environment": "main",
    "application": "app",
    "cron": "saybye",
    "spec": {
      "spec": "5 * * * *",
      "commands": {
        "start": "sleep 60 && echo sleep-60-finished && date",
        "stop": null
      },
      "shutdown_timeout": null,
      "timeout": 86400
    }
  },
  "project": "abcdefgh1234567",
  "environments": [
    "main"
  ],
  "state": "complete",
  "result": "success",
  "started_at": "2026-12-13T16:06:08.258090+00:00",
  "completed_at": "2026-12-13T16:07:09.658339+00:00",
  "completion_percent": 100,
  "cancelled_at": null,
  "timings": {
    "wait": 0,
    "execute": 61.244
  },
  "log": "hello world\nTue Jan 01 16:07:09 UTC 2026",
  "payload": {
    "user": {
      "id": "admin",
      "created_at": "2026-12-13T16:06:08.066085+00:00",
      "updated_at": null,
      "display_name": "Upsun Bot"
    },
    "project": {
      "id": "abcdefgh1234567",
      "created_at": "2026-03-22T15:47:28.739099+00:00",
      "updated_at": "2026-12-01T09:42:19.860188+00:00",
      "attributes": {},
      "title": "php-test",
      "description": "",
      "owner": "c9926428-44dc-4b10-be03-a26dd43b44c1",
      "namespace": "upsun",
      "organization": "01FF4NBNVMMDWP1NVK0G4EGJW0",
      "default_branch": "main",
      "status": {
        "code": "provisioned",
        "message": "ok"
      },
      "timezone": "Europe/Dublin",
      "region": "eu-3.upsun.com",
      "repository": {
        "url": "abcdefgh1234567@git.eu-3.upsun.com:abcdefgh1234567.git",
        "client_ssh_key": "ssh-rsa aaaaaaabbbbbbbcccccccddddddd abcdefgh1234567@upsun"
      },
      "default_domain": null,
      "subscription": {
        "license_uri": "https://accounts.upsun.com/api/v1/licenses/2291467",
        "plan": "development",
        "environments": 3,
        "storage": 5120,
        "included_users": 1,
        "subscription_management_uri": "https://console.upsun.com-/users/abcd12345/billing/plan/12345678",
        "restricted": false,
        "suspended": false,
        "user_licenses": 1
      }
    },
    "environment": {
      "id": "main",
      "created_at": "2026-03-22T15:47:43.750880+00:00",
      "updated_at": "2026-11-29T16:16:37.085719+00:00",
      "name": "main",
      "machine_name": "main-abcd123",
      "title": "Main",
      "attributes": {},
      "type": "production",
      "parent": null,
      "default_domain": null,
      "clone_parent_on_create": true,
      "deployment_target": "local",
      "is_pr": false,
      "status": "active",
      "enable_smtp": true,
      "restrict_robots": true,
      "edge_hostname": "main-abcd123-abcdefgh1234567.eu-3.platformsh.site",
      "deployment_state": {
        "last_deployment_successful": true,
        "last_deployment_at": "2026-11-29T16:16:37.085609+00:00",
        "crons": {
          "enabled": true,
          "status": "running"
        }
      },
      "resources_overrides": {},
      "last_active_at": "2026-12-13T15:07:10.862854+00:00",
      "last_backup_at": null,
      "project": "abcdefgh1234567",
      "is_main": true,
      "is_dirty": false,
      "has_code": true,
      "head_commit": "6aac318907b50252976c47e4e62ed95d438af0ea",
      "merge_info": {
        "commits_ahead": 0,
        "commits_behind": 0,
        "parent_ref": null
      },
      "has_deployment": true
    },
    "cron": "saybye"
  },
  "description": "<user data-id=\"admin\">Upsun Bot</user> ran cron <strong>saybye</strong>",
  "text": "Upsun Bot ran cron **saybye**",
  "expires_at": "2026-01-12T16:06:08.081293+00:00"
}
```

### Push

A push activity contains several properties.
The `commits` property contains everything related to the Git push that triggered the activity:

```json {no-copy="true"} theme={null}
...
    "commits": [
      {
        "sha": "2bab04e050279ac078d5d34016f5dd9c466e948d",
        "author": {
          "email": "cloeweber@example.com",
          "name": "Cloé Weber",
          "date": 1671032461
        },
        "parents": [
          "6aac318907b50252976c47e4e62ed95d438af0ea"
        ],
        "message": "Add cron"
      }
    ],
...
```

The `environment` property contains the settings for the environment that was pushed to:

```json {no-copy="true"} theme={null}
...
    "environment": {
      "id": "main",
      "created_at": "2026-03-22T15:47:43.750880+00:00",
      "updated_at": "2026-11-29T16:16:37.085719+00:00",
      "name": "main",
      "machine_name": "main-abcd123",
      "title": "Main",
      "attributes": {},
      "type": "production",
      "parent": null,
      "default_domain": null,
      "clone_parent_on_create": true,
      "deployment_target": "local",
      "is_pr": false,
      "status": "active",
      "enable_smtp": true,
      "restrict_robots": true,
      "edge_hostname": "main-abcd123-abcdefgh1234567.eu-3.platformsh.site",
      "deployment_state": {
        "last_deployment_successful": true,
        "last_deployment_at": "2026-11-29T16:16:37.085609+00:00",
        "crons": {
          "enabled": true,
          "status": "sleeping"
        }
      },
      "resources_overrides": {},
      "last_active_at": "2026-12-13T16:07:09.788910+00:00",
      "last_backup_at": null,
      "project": "abcdefgh1234567",
      "is_main": true,
      "is_dirty": false,
      "has_code": true,
      "head_commit": "6aac318907b50252976c47e4e62ed95d438af0ea",
      "merge_info": {
        "commits_ahead": 0,
        "commits_behind": 0,
        "parent_ref": null
      },
      "has_deployment": true
    },
...
```

The `deployment` property contains the settings for the deployment,
including the [image type](/docs/configure-apps/app-reference/single-runtime-image#type) and
[resource allocation](/docs/manage-resources/adjust-resources).

The following example shows a shortened excerpt of the `deployment` property:

```json {no-copy="true"} theme={null}
...
 "deployment": {
      "id": "current",
      "created_at": "2026-03-22T15:48:05.396979+00:00",
      "updated_at": "2026-12-14T15:41:57.264813+00:00",
      "cluster_name": "abcdefgh1234567-main-abcd123",
      "project_info": {
          "deployment": {
      "id": "current",
      "created_at": "2026-03-22T15:48:05.396979+00:00",
      "updated_at": "2026-12-14T15:41:57.264813+00:00",
      "cluster_name": "abcdefgh1234567-main-abcd123",
      "project_info": {
        "name": "abcdefgh1234567",
        "settings": {
          "initialize": {
            "values": {
              "initialize": true,
              "start": false,
              "base": {
                "files": [],
                "profile": "PHP",
                "config": null,
                "repository": "https://github.com/platformsh-templates/php.git@master",
                "title": "PHP"
              }
            }
          },
          ...
          "application_config_file": ".upsun/config.yaml",
          "project_config_dir": ".upsun/",
          ...
          "development_service_size": "S",
          "development_application_size": "S",
          "enable_certificate_provisioning": true,
          "certificate_style": "ecdsa",
          "certificate_renewal_activity": true,
          ...
          "cron_minimum_interval": 5,
          "cron_maximum_jitter": 20,
          "concurrency_limits": {
            "internal": null,
            "integration": 4,
            "backup": 2,
            "cron": 10,
            "default": 2
          },
          ...
          "build_resources": {
            "cpu": 1,
            "memory": 2048
          },
          ...
          "max_allowed_routes": 50000,
          "max_allowed_redirects_paths": 50000,
          "enable_incremental_backups": true,
          ...
        }
      },
...
```

The following example shows the full activity response to a Git push:

<DynamicCodeBlock language="json" filename="push-activity-response.json">
  {`
      {
        "id": "a1kz6ffxui7em",
        "_links": {
          "self": {
            "href": "https://eu-3.upsun.com/api/projects/abcdefgh1234567/activities/a1kz6ffxui7em"
          },
          "log": {
            "href": "/api/projects/abcdefgh1234567/activities/a1kz6ffxui7em/log"
          }
        },
        "created_at": "2026-12-14T15:41:05.821145+00:00",
        "updated_at": null,
        "type": "environment.push",
        "parameters": {
          "user": "c9926428-44dc-4b10-be03-a26dd43b44c1",
          "environment": "main",
          "old_commit": "6aac318907b50252976c47e4e62ed95d438af0ea",
          "new_commit": "2bab04e050279ac078d5d34016f5dd9c466e948d"
        },
        "project": "abcdefgh1234567",
        "environments": [
          "main"
        ],
        "state": "complete",
        "result": "success",
        "started_at": "2026-12-14T15:41:05.969872+00:00",
        "completed_at": "2026-12-14T15:41:57.635442+00:00",
        "completion_percent": 100,
        "cancelled_at": null,
        "timings": {
          "wait": 0,
          "parse_commits": 0.63,
          "build": 0.506,
          "deploy": 49.954,
          "execute": 51.516
        },
        "log": "Found 1 new commit\n\nBuilding application 'myapp' (runtime type: php:{{version:php:latest}}, tree: 9851a01)\n  Reusing existing build for this tree ID\n\nProvisioning certificates\n  Certificates\n  - certificate 5093946: expiring on 2026-02-23 11:09:20+00:00, covering {,www}.main-abcd123-abcdefgh1234567.eu-3.platformsh.site\n\n\nRedeploying environment main\n  Preparing deployment\n  Closing service myapp\n  Opening application myapp and its relationships\n  Executing deploy hook for application myapp\n    hello world\n\n  Opening environment\n  Environment configuration\n    myapp (type: php:{{version:php:latest}}, size: S, disk: 2048)\n\n  Environment routes\n    http://main-abcd123-abcdefgh1234567.eu-3.platformsh.site/ redirects to https://main-abcd123-abcdefgh1234567.eu-3.platformsh.site/\n    http://www.main-abcd123-abcdefgh1234567.eu-3.platformsh.site/ redirects to https://www.main-abcd123-abcdefgh1234567.eu-3.platformsh.site/\n    https://main-abcd123-abcdefgh1234567.eu-3.platformsh.site/ is served by application \`myapp\`\n    https://www.main-abcd123-abcdefgh1234567.eu-3.platformsh.site/ redirects to https://main-abcd123-abcdefgh1234567.eu-3.platformsh.site/\n",
        "payload": {
          "user": {
            "id": "c9926428-44dc-4b10-be03-a26dd43b44c1",
            "created_at": "2026-12-14T15:40:16.891889+00:00",
            "updated_at": null,
            "display_name": "Cloé Weber"
          },
          "environment": {
            "id": "main",
            "created_at": "2026-03-22T15:47:43.750880+00:00",
            "updated_at": "2026-11-29T16:16:37.085719+00:00",
            "name": "main",
            "machine_name": "main-abcd123",
            "title": "Main",
            "attributes": {},
            "type": "production",
            "parent": null,
            "default_domain": null,
            "clone_parent_on_create": true,
            "deployment_target": "local",
            "is_pr": false,
            "status": "active",
            "enable_smtp": true,
            "restrict_robots": true,
            "edge_hostname": "main-abcd123-abcdefgh1234567.eu-3.platformsh.site",
            "deployment_state": {
              "last_deployment_successful": true,
              "last_deployment_at": "2026-11-29T16:16:37.085609+00:00",
              "crons": {
                "enabled": true,
                "status": "sleeping"
              }
            },
            "resources_overrides": {},
            "last_active_at": "2026-12-13T16:07:09.788910+00:00",
            "last_backup_at": null,
            "project": "abcdefgh1234567",
            "is_main": true,
            "is_dirty": false,
            "has_code": true,
            "head_commit": "6aac318907b50252976c47e4e62ed95d438af0ea",
            "merge_info": {
              "commits_ahead": 0,
              "commits_behind": 0,
              "parent_ref": null
            },
            "has_deployment": true
          },
          "commits": [
            {
              "sha": "2bab04e050279ac078d5d34016f5dd9c466e948d",
              "author": {
                "email": "cloeweber@example.com",
                "name": "Cloé Weber",
                "date": 1671032461
              },
              "parents": [
                "6aac318907b50252976c47e4e62ed95d438af0ea"
              ],
              "message": "Add cron"
            }
          ],
          "commits_count": 1,
          "deployment": {
            "id": "current",
            "created_at": "2026-03-22T15:48:05.396979+00:00",
            "updated_at": "2026-12-14T15:41:57.264813+00:00",
            "cluster_name": "abcdefgh1234567-main-abcd123",
            "project_info": {
              "name": "abcdefgh1234567",
              "settings": {
                "initialize": {
                  "values": {
                    "initialize": true,
                    "start": false,
                    "base": {
                      "files": [],
                      "profile": "PHP",
                      "config": null,
                      "repository": "https://github.com/platformsh-templates/php.git@master",
                      "title": "PHP"
                    }
                  }
                },
                "product_name": "Upsun",
                "product_code": "upsun",
                "variables_prefix": "PLATFORM_",
                "bot_email": "bot@upsun.com",
                "application_config_file": ".upsun/config.yaml",
                "project_config_dir": ".upsun/",
                "use_drupal_defaults": false,
                "use_legacy_subdomains": false,
                "development_service_size": "S",
                "development_application_size": "S",
                "enable_certificate_provisioning": true,
                "certificate_style": "ecdsa",
                "certificate_renewal_activity": true,
                "development_domain_template": null,
                "enable_state_api_deployments": true,
                "temporary_disk_size": null,
                "cron_minimum_interval": 5,
                "cron_maximum_jitter": 20,
                "concurrency_limits": {
                  "internal": null,
                  "integration": 4,
                  "backup": 2,
                  "cron": 10,
                  "default": 2
                },
                "flexible_build_cache": false,
                "strict_configuration": true,
                "has_sleepy_crons": true,
                "crons_in_git": true,
                "custom_error_template": null,
                "app_error_page_template": null,
                "environment_name_strategy": "name-and-hash",
                "data_retention": null,
                "enable_codesource_integration_push": true,
                "enforce_mfa": false,
                "systemd": true,
                "router_gen2": false,
                "chorus": {
                  "enabled": true,
                  "exposed": true
                },
                "build_resources": {
                  "cpu": 1,
                  "memory": 2048
                },
                "outbound_restrictions_default_policy": "allow",
                "self_upgrade": true,
                "additional_hosts": {},
                "max_allowed_routes": 50000,
                "max_allowed_redirects_paths": 50000,
                "enable_incremental_backups": true,
                "sizing_api_enabled": false,
                "enable_cache_grace_period": true,
                "enable_zero_downtime_deployments": false,
                "enable_admin_agent": true,
                "certifier_url": "https://api.upsun.com",
                "centralized_permissions": false,
                "glue_server_max_request_size": 10
              }
            },
            "environment_info": {
              "name": "main",
              "is_main": true,
              "is_production": false,
              "reference": "refs/heads/main",
              "machine_name": "main-abcd123",
              "environment_type": "production"
            },
            "deployment_target": "local",
            "vpn": null,
            "http_access": {
              "is_enabled": true,
              "addresses": [],
              "basic_auth": {}
            },
            "enable_smtp": true,
            "restrict_robots": true,
            "variables": [
              {
                "name": "php:memory_limit",
                "value": "512M",
                "is_sensitive": false
              }
            ],
            "access": [
              {
                "entity_id": "c9926428-44dc-4b10-be03-a26dd43b44c1",
                "role": "admin"
              }
            ],
            "subscription": {
              "license_uri": "https://accounts.upsun.com/api/v1/licenses/12345678",
              "plan": "development",
              "environments": 3,
              "storage": 5120,
              "included_users": 1,
              "subscription_management_uri": "https://console.upsun.com/-/users/abcd12345/billing/plan/12345678",
              "restricted": false,
              "suspended": false,
              "user_licenses": 1
            },
            "services": {},
            "routes": {
              "https://main-abcd123-abcdefgh1234567.eu-3.platformsh.site/": {
                "primary": true,
                "id": null,
                "production_url": "https://main-abcd123-abcdefgh1234567.eu-3.platformsh.site/",
                "attributes": {},
                "type": "upstream",
                "tls": {
                  "strict_transport_security": {
                    "enabled": null,
                    "include_subdomains": null,
                    "preload": null
                  },
                  "min_version": null,
                  "client_authentication": null,
                  "client_certificate_authorities": []
                },
                "original_url": "https://{default}/",
                "restrict_robots": true,
                "cache": {
                  "enabled": true,
                  "default_ttl": 0,
                  "cookies": [
                    "*"
                  ],
                  "headers": [
                    "Accept",
                    "Accept-Language"
                  ]
                },
                "ssi": {
                  "enabled": false
                },
                "upstream": "myapp:http",
                "redirects": {
                  "expires": "-1s",
                  "paths": {}
                }
              },
              "https://www.main-abcd123-abcdefgh1234567.eu-3.platformsh.site/": {
                "primary": false,
                "id": null,
                "production_url": "https://www.main-abcd123-abcdefgh1234567.eu-3.platformsh.site/",
                "attributes": {},
                "type": "redirect",
                "tls": {
                  "strict_transport_security": {
                    "enabled": null,
                    "include_subdomains": null,
                    "preload": null
                  },
                  "min_version": null,
                  "client_authentication": null,
                  "client_certificate_authorities": []
                },
                "original_url": "https://www.{default}/",
                "restrict_robots": true,
                "to": "https://main-abcd123-abcdefgh1234567.eu-3.platformsh.site/",
                "redirects": {
                  "expires": "-1s",
                  "paths": {}
                }
              },
              "http://main-abcd123-abcdefgh1234567.eu-3.platformsh.site/": {
                "primary": false,
                "id": null,
                "production_url": "http://main-abcd123-abcdefgh1234567.eu-3.platformsh.site/",
                "attributes": {},
                "type": "redirect",
                "tls": {
                  "strict_transport_security": {
                    "enabled": null,
                    "include_subdomains": null,
                    "preload": null
                  },
                  "min_version": null,
                  "client_authentication": null,
                  "client_certificate_authorities": []
                },
                "original_url": "http://{default}/",
                "restrict_robots": true,
                "to": "https://main-abcd123-abcdefgh1234567.eu-3.platformsh.site/",
                "redirects": {
                  "expires": "-1s",
                  "paths": {}
                }
              },
              "http://www.main-abcd123-abcdefgh1234567.eu-3.platformsh.site/": {
                "primary": false,
                "id": null,
                "production_url": "http://www.main-abcd123-abcdefgh1234567.eu-3.platformsh.site/",
                "attributes": {},
                "type": "redirect",
                "tls": {
                  "strict_transport_security": {
                    "enabled": null,
                    "include_subdomains": null,
                    "preload": null
                  },
                  "min_version": null,
                  "client_authentication": null,
                  "client_certificate_authorities": []
                },
                "original_url": "http://www.{default}/",
                "restrict_robots": true,
                "to": "https://www.main-abcd123-abcdefgh1234567.eu-3.platformsh.site/",
                "redirects": {
                  "expires": "-1s",
                  "paths": {}
                }
              }
            },
            "webapps": {
              "app": {
                "resources": null,
                "size": "AUTO",
                "disk": 2048,
                "access": {
                  "ssh": "contributor"
                },
                "relationships": {},
                "additional_hosts": {},
                "mounts": {
                  "/web/uploads": {
                    "source": "local",
                    "source_path": "uploads"
                  },
                  "/private": {
                    "source": "local",
                    "source_path": "private"
                  }
                },
                "timezone": null,
                "variables": {},
                "firewall": null,
                "initial_size": null,
                "container_profile": null,
                "instance_count": null,
                "name": "app",
                "type": "php:{{version:php:latest}}",
                "runtime": {},
                "preflight": {
                  "enabled": true,
                  "ignored_rules": []
                },
                "tree_id": "9851a01081f3c2f943f75f62c38b67f8bc0ec15c",
                "slug_id": "abcdefgh1234567-app-9851a01081f3c2f943f75f62c38b67f8bc0ec15c-73985064e66fd2299f4b83931cff46891249a964",
                "app_dir": "/app",
                "web": {
                  "locations": {
                    "/": {
                      "root": "web",
                      "expires": "-1s",
                      "passthru": "/index.php",
                      "scripts": true,
                      "allow": true,
                      "headers": {},
                      "rules": {}
                    }
                  },
                  "move_to_root": false
                },
                "hooks": {
                  "build": "set -e\n",
                  "deploy": "set -e\n",
                  "post_deploy": null
                },
                "crons": {
                  "saybye": {
                    "spec": "5 * * * *",
                    "commands": {
                      "start": "sleep 60 && echo sleep-60-finished && date",
                      "stop": null
                    },
                    "shutdown_timeout": null,
                    "timeout": 86400
                  }
                }
              }
            },
            "workers": {},
            }
          }
        },
        "description": "<user data-id=\"c9926428-44dc-4b10-be03-a26dd43b44c1\">Cloé Weber</user> pushed to <environment data-id=\"main\">Main</environment>",
        "text": "Cloé Weber pushed to Main",
        "expires_at": "2026-12-14T15:41:05.821145+00:00"
      }
    `
  }
</DynamicCodeBlock>
