Skip to content
Ona Docs

MarkEnvironmentActive

client.environments.markActive(EnvironmentMarkActiveParams { activitySignal, environmentId } body, RequestOptionsoptions?): EnvironmentMarkActiveResponse
POST/gitpod.v1.EnvironmentService/MarkEnvironmentActive

Records environment activity to prevent automatic shutdown.

Activity signals should be sent every 5 minutes while the environment is actively being used. The source must be between 3-80 characters.

Examples

  • Signal VS Code activity:

    Records VS Code editor activity to prevent environment shutdown.

    environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048"
    activitySignal:
      source: "VS Code"
      timestamp: "2025-02-12T14:30:00Z"
ParametersExpand Collapse
body: EnvironmentMarkActiveParams { activitySignal, environmentId }
activitySignal?: EnvironmentActivitySignal { source, timestamp }

activity_signal specifies the activity.

source?: string

source of the activity signal, such as “VS Code”, “SSH”, or “Automations”. It should be a human-readable string that describes the source of the activity signal.

maxLength80
minLength3
timestamp?: string

timestamp of when the activity was observed by the source. Only reported every 5 minutes. Zero value means no activity was observed.

formatdate-time
environmentId?: string

The ID of the environment to update activity for.

formatuuid
ReturnsExpand Collapse
EnvironmentMarkActiveResponse = unknown

MarkEnvironmentActive

import Gitpod from '@gitpod/sdk';

const client = new Gitpod({
  bearerToken: process.env['GITPOD_API_KEY'], // This is the default and can be omitted
});

const response = await client.environments.markActive({
  activitySignal: { source: 'VS Code', timestamp: '2025-02-12T14:30:00Z' },
  environmentId: '07e03a28-65a5-4d98-b532-8ea67b188048',
});

console.log(response);
{}
Returns Examples
{}