Unary · Organizations
Gets organization policy settings by organization ID.
Use this method to:
- Retrieve current policy settings for an organization
- View resource limits and restrictions
- Check allowed editors and other configurations
Examples
-
Get organization policies:
Retrieves policy settings for a specific organization.
organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"
Endpoint
POST /api/gitpod.v1.OrganizationService/GetOrganizationPolicies
https://app.ona.com with that domain.
Request example
export ONA_HOST=https://app.ona.com
export ONA_API_KEY=<your-token>
curl --request POST \
--url "$ONA_HOST/api/gitpod.v1.OrganizationService/GetOrganizationPolicies" \
--header "Authorization: Bearer $ONA_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"organizationId": "<organization-id>"
}'
import gitpod.v1.organization_pb2 as organization_pb2
from ona_sdk import create_client_from_env
ona = create_client_from_env()
request = organization_pb2.GetOrganizationPoliciesRequest(
organization_id="<organization-id>",
)
response = ona.services.organization.get_organization_policies(request)
print(response)
import { create } from "@bufbuild/protobuf";
import { createClientFromEnv } from "@gitpod/sdk";
import { GetOrganizationPoliciesRequestSchema } from "@gitpod/sdk/gitpod/v1/organization_pb";
async function main() {
const ona = createClientFromEnv();
const request = create(GetOrganizationPoliciesRequestSchema, {
organizationId: "<organization-id>",
});
const response = await ona.services.organization.getOrganizationPolicies(request);
console.log(response);
}
main().catch(console.error);
package main
import (
"context"
"fmt"
"log"
"connectrpc.com/connect"
"github.com/gitpod-io/gitpod-sdk-go/sdk"
gitpodpb "github.com/gitpod-io/gitpod-sdk-go/v1"
)
func main() {
ona, err := sdk.NewFromEnv()
if err != nil {
log.Fatal(err)
}
request := connect.NewRequest(&gitpodpb.GetOrganizationPoliciesRequest{
OrganizationId: "<organization-id>",
})
response, err := ona.Services.Organization.GetOrganizationPolicies(context.Background(), request)
if err != nil {
log.Fatal(err)
}
fmt.Println(response.Msg)
}
{
"organizationId": "<organization-id>"
}
Request
gitpod.v1.GetOrganizationPoliciesRequest
| Field | Type | Required | Description |
|---|---|---|---|
organizationId | string | Yes | organization_id is the ID of the organization to retrieve policies for Constraints: required=true, string.uuid=true. |
Response
gitpod.v1.GetOrganizationPoliciesResponse
| Field | Type | Required | Description |
|---|---|---|---|
policies | OrganizationPolicies | Yes | Constraints: required=true. |
Related types
AgentPolicy
AgentPolicy
AgentPolicy contains agent-specific policy settings for an organization
gitpod.v1.AgentPolicy| Field | Type | Required | Description |
|---|---|---|---|
mcpDisabled | boolean | Yes | mcp_disabled controls whether MCP (Model Context Protocol) is disabled for agents Constraints: required=true. |
commandDenyList | array of string | Yes | command_deny_list contains a list of commands that agents are not allowed to execute Constraints: required=true. |
scmToolsDisabled | boolean | Yes | scm_tools_disabled controls whether SCM (Source Control Management) tools are disabled for agents Constraints: required=true. |
scmToolsAllowedGroupId | string | No | scm_tools_allowed_group_id restricts SCM tools access to members of this group. Empty means no restriction (all users can use SCM tools if not disabled). |
conversationSharingPolicy | ConversationSharingPolicy | No | conversation_sharing_policy controls whether agent conversations can be shared |
maxSubagentsPerEnvironment | integer | No | max_subagents_per_environment limits the number of non-terminal sub-agents a parent can have running simultaneously in the same environment. Valid range: 0-10. Zero means use the default (5). Constraints: int32.gte=0, int32.lte=10. |
allowedAgentIds | array of string | No | allowed_agent_ids contains the agent IDs users may select when the codex_rollout feature flag is enabled. Empty means all agents are allowed. |
allowedCodexModels | array of CodexOpenAIModel | No | Deprecated. Deprecated: use codex_model_policy. This legacy allowlist cannot distinguish omitted from intentionally empty on update requests. Empty means all Codex models are allowed. |
allowedCodexReasoningEfforts | array of CodexReasoningEffort | No | allowed_codex_reasoning_efforts contains the Codex reasoning efforts users may select when the codex_rollout feature flag is enabled. Empty means all Codex reasoning efforts are allowed. |
allowedCodexServiceTiers | array of CodexServiceTier | No | allowed_codex_service_tiers contains the Codex service tiers users may select when the codex_rollout feature flag is enabled. Empty means all Codex service tiers are allowed. |
goalModeDisabled | boolean | No | goal_mode_disabled controls whether Codex goal mode is disabled for the organization. |
codexModelPolicy | CodexModelPolicy | No | codex_model_policy contains explicit per-model Codex availability states. Missing policy or missing model entries mean allowed. |
EditorVersionPolicy
EditorVersionPolicy
EditorVersionPolicy defines the version policy for a specific editor
gitpod.v1.EditorVersionPolicy| Field | Type | Required | Description |
|---|---|---|---|
allowedVersions | array of string | No | allowed_versions lists the versions that are allowed If empty, we will use the latest version of the editor Examples for JetBrains: ["2025.2", "2025.1", "2024.3"] |
OrganizationPolicies
OrganizationPolicies
gitpod.v1.OrganizationPolicies| Field | Type | Required | Description |
|---|---|---|---|
organizationId | string | Yes | organization_id is the ID of the organization Constraints: required=true, string.uuid=true. |
maximumEnvironmentTimeout | duration string | No | maximum_environment_timeout controls the maximum timeout allowed for environments in seconds. 0 means no limit (never). Minimum duration is 30 minutes (1800 seconds). Constraints: cel.expression=this == duration('0s') || this >= duration('1800s'), cel.id=maximum_environment_timeout, cel.message=value must be 0s (no limit) or at least 1800s (30 minutes). |
membersRequireProjects | boolean | Yes | members_require_projects controls whether environments can only be created from projects by non-admin users Constraints: required=true. |
membersCreateProjects | boolean | Yes | members_create_projects controls whether members can create projects Constraints: required=true. |
allowedEditorIds | array of string | Yes | allowed_editor_ids is the list of editor IDs that are allowed to be used in the organization Constraints: required=true. |
defaultEditorId | string | Yes | default_editor_id is the default editor ID to be used when a user doesn’t specify one Constraints: required=true. |
allowLocalRunners | boolean | Yes | allow_local_runners controls whether local runners are allowed to be used in the organization Constraints: required=true. |
maximumRunningEnvironmentsPerUser | 64-bit integer string | Yes | maximum_running_environments_per_user limits simultaneously running environments per user Constraints: required=true. |
maximumEnvironmentsPerUser | 64-bit integer string | Yes | maximum_environments_per_user limits total environments (running or stopped) per user Constraints: required=true. |
defaultEnvironmentImage | string | Yes | default_environment_image is the default container image when none is defined in repo Constraints: required=true. |
portSharingDisabled | boolean | Yes | port_sharing_disabled controls whether user-initiated port sharing is disabled in the organization. System ports (VS Code Browser, agents) are always exempt from this policy. Constraints: required=true. |
deleteArchivedEnvironmentsAfter | duration string | No | delete_archived_environments_after controls how long archived environments are kept before automatic deletion. 0 means no automatic deletion. Maximum duration is 4 weeks (2419200 seconds). Constraints: duration.lte.seconds=2419200. |
agentPolicy | AgentPolicy | Yes | agent_policy contains agent-specific policy settings Constraints: required=true. |
maximumEnvironmentLifetime | duration string | No | maximum_environment_lifetime controls for how long environments are allowed to be reused. 0 means no maximum lifetime. Maximum duration is 180 days (15552000 seconds). Constraints: duration.lte.seconds=15552000. |
requireCustomDomainAccess | boolean | Yes | require_custom_domain_access controls whether users must access via custom domain when one is configured. When true, access via app.gitpod.io is blocked. Constraints: required=true. |
editorVersionRestrictions | map of string to EditorVersionPolicy | No | editor_version_restrictions restricts which editor versions can be used. Maps editor ID to version policy, editor_version_restrictions not set means no restrictions. If empty or not set for an editor, we will use the latest version of the editor |
securityAgentPolicy | SecurityAgentPolicy | No | security_agent_policy contains security agent configuration for the organization. When configured, security agents are automatically deployed to all environments. |
restrictAccountCreationToScim | boolean | Yes | restrict_account_creation_to_scim controls whether account creation is restricted to SCIM-provisioned users only. When true and SCIM is configured for the organization, only users provisioned via SCIM can create accounts. Constraints: required=true. |
vetoExecPolicy | VetoExecPolicy | No | veto_exec_policy contains the veto exec policy for environments. |
maximumEnvironmentLifetimeStrict | boolean | No | maximum_environment_lifetime_strict controls whether environments past their lockdown_at timestamp are blocked from starting. |
maxPortAdmissionLevel | AdmissionLevel | No | max_port_admission_level caps the maximum admission level a user-opened port may use. UNSPECIFIED means no cap (any AdmissionLevel value is allowed). System ports (VS Code Browser, agents) are exempt. The legacy port_sharing_disabled field, when true, takes precedence and blocks all user-initiated port sharing. |
webBrowserDisabled | boolean | Yes | web_browser_disabled controls whether users can open the built-in web browser from environment pages. This does not affect VS Code Browser. Constraints: required=true. |
disableFromScratch | boolean | Yes | disable_from_scratch controls whether non-admin users can create blank environments without a Git or URL initializer. Constraints: required=true. |
vetoFilePolicy | VetoFilePolicy | No | veto_file_policy contains veto-file policy for environments. |
securityPolicyId | string | No | security_policy_id references the Veto Exec SecurityPolicy assigned to newly created environments. The public GA contract accepts policies that use only SecurityPolicy.Spec.executables. Assignment validates materializability and rejects unsupported executable selectors or effects. If empty, new environments have no SecurityPolicy by default. Constraints: ignore=1, string.uuid=true. |
archiveEnvironmentsAfter | duration string | No | archive_environments_after controls how long stopped environments remain inactive before archival. Enterprise only. Must be a whole number of days. Minimum duration is 1 day (86400 seconds). Maximum duration is 30 days (2592000 seconds). Constraints: cel.expression=int(this) % int(duration('86400s')) == 0, cel.id=archive_environments_after_whole_days, cel.message=value must be a whole number of days, duration.gte.seconds=86400, duration.lte.seconds=2592000. |
SecurityAgentPolicy
SecurityAgentPolicy
SecurityAgentPolicy contains security agent configuration for an organization.
When enabled, security agents are automatically deployed to all environments.
gitpod.v1.SecurityAgentPolicy| Field | Type | Required | Description |
|---|---|---|---|
crowdstrike | CrowdStrikeConfig | No | crowdstrike contains CrowdStrike Falcon configuration |
customAgents | array of CustomSecurityAgent | No | custom_agents contains custom security agent definitions |
VetoExecPolicy
VetoExecPolicy
VetoExecPolicy defines the policy for blocking or auditing executable execution in environments.
gitpod.v1.VetoExecPolicy| Field | Type | Required | Description |
|---|---|---|---|
enabled | boolean | No | enabled controls whether executable blocking is active |
executables | array of string | No | executables is the list of executable paths or names to block |
action | KernelControlsAction | No | action specifies what action kernel-level controls take on policy violations |
safelist | array of string | No | Output only. Executable paths that are protected by the safelist and cannot be blocked by the denylist. Populated by the server from the built-in default safelist. Ignored on update requests. |
VetoFilePolicy
VetoFilePolicy
VetoFilePolicy defines path and block-device file controls in environments.
gitpod.v1.VetoFilePolicy| Field | Type | Required | Description |
|---|---|---|---|
enabled | boolean | No | enabled controls whether file policy materialization is active. |
paths | VetoFilePathPolicy | No | paths controls path-based file-content access. |
blockDevices | VetoFileBlockDevicesPolicy | No | block_devices controls block-device open access. |
AdmissionLevel
AdmissionLevel
Admission level describes who can access an environment instance and its ports.
| Value | Number | Description |
|---|---|---|
ADMISSION_LEVEL_UNSPECIFIED | 0 | |
ADMISSION_LEVEL_OWNER_ONLY | 1 | Deprecated. ADMISSION_LEVEL_OWNER_ONLY means the environment can only be accessed by the creator. Deprecated: Use ADMISSION_LEVEL_CREATOR_ONLY instead. |
ADMISSION_LEVEL_EVERYONE | 2 | ADMISSION_LEVEL_EVERYONE means the environment (including ports) can be accessed by everyone. |
ADMISSION_LEVEL_ORGANIZATION | 3 | ADMISSION_LEVEL_ORGANIZATION means the environment (including ports) can be accessed by all members of the organization. |
ADMISSION_LEVEL_CREATOR_ONLY | 4 | ADMISSION_LEVEL_CREATOR_ONLY means the environment (including ports) can only be accessed by the user who created the environment. |
CodexOpenAIModel
CodexOpenAIModel
CodexOpenAIModel is the static allowlist of concrete OpenAI models that the
Codex app runtime can select through Ona’s Codex picker.
| Value | Number | Description |
|---|---|---|
CODEX_OPEN_AI_MODEL_UNSPECIFIED | 0 | |
CODEX_OPEN_AI_MODEL_GPT_5_5 | 1 | |
CODEX_OPEN_AI_MODEL_GPT_5_4 | 2 | |
CODEX_OPEN_AI_MODEL_GPT_5_4_MINI | 3 | Deprecated. |
CODEX_OPEN_AI_MODEL_GPT_5_3_CODEX | 4 | Deprecated. |
CODEX_OPEN_AI_MODEL_GPT_5_3_CODEX_SPARK | 5 | Deprecated. |
CODEX_OPEN_AI_MODEL_GPT_5_2 | 6 | Deprecated. |
CODEX_OPEN_AI_MODEL_GPT_5_6_SOL | 7 | |
CODEX_OPEN_AI_MODEL_GPT_5_6_TERRA | 8 | |
CODEX_OPEN_AI_MODEL_GPT_5_6_LUNA | 9 |
CodexReasoningEffort
CodexReasoningEffort
CodexReasoningEffort is the static allowlist of reasoning efforts supported
by the Codex app runtime.
| Value | Number | Description |
|---|---|---|
CODEX_REASONING_EFFORT_UNSPECIFIED | 0 | |
CODEX_REASONING_EFFORT_LOW | 1 | |
CODEX_REASONING_EFFORT_MEDIUM | 2 | |
CODEX_REASONING_EFFORT_HIGH | 3 | |
CODEX_REASONING_EFFORT_EXTRA_HIGH | 4 | |
CODEX_REASONING_EFFORT_MAX | 5 | |
CODEX_REASONING_EFFORT_ULTRA | 6 |
CodexServiceTier
CodexServiceTier
CodexServiceTier is the static allowlist of service tiers supported by the
Codex app runtime.
| Value | Number | Description |
|---|---|---|
CODEX_SERVICE_TIER_UNSPECIFIED | 0 | |
CODEX_SERVICE_TIER_FAST | 1 |
ConversationSharingPolicy
ConversationSharingPolicy
ConversationSharingPolicy controls how agent conversations can be shared.
| Value | Number | Description |
|---|---|---|
CONVERSATION_SHARING_POLICY_UNSPECIFIED | 0 | |
CONVERSATION_SHARING_POLICY_DISABLED | 1 | |
CONVERSATION_SHARING_POLICY_ORGANIZATION | 2 |
KernelControlsAction
KernelControlsAction
KernelControlsAction defines how a kernel-level policy violation is handled.
| Value | Number | Description |
|---|---|---|
KERNEL_CONTROLS_ACTION_UNSPECIFIED | 0 | KERNEL_CONTROLS_ACTION_UNSPECIFIED defaults to BLOCK. |
KERNEL_CONTROLS_ACTION_BLOCK | 1 | KERNEL_CONTROLS_ACTION_BLOCK denies the operation. |
KERNEL_CONTROLS_ACTION_AUDIT | 2 | KERNEL_CONTROLS_ACTION_AUDIT logs the operation without blocking it. |