Table: env0_organization - Query env0 Organizations using SQL
An env0 Organization is a primary entity in env0 which groups a set of users, projects, and templates. It provides a logical separation between different workspaces and is used to manage access control, billing, and settings at an organization level. Each organization has a unique id, a name, and a role associated with it.
Table Usage Guide
The env0_organization
table provides insights into Organizations within env0. As a DevOps engineer, explore organization-specific details through this table, including unique id, name, and role. Utilize it to manage and monitor the access control, billing, and settings at an organization level.
Examples
Basic info
Discover the segments that were created within your organization, including who created them and when. This can help you gain insights into the structure and activity of your organization.
select name, id, created_by, created_at, description, role, photo_urlfrom env0_organization;
select name, id, created_by, created_at, description, role, photo_urlfrom env0_organization;
List organizations created in the last 30 days
Explore which organizations have been established in the recent month. This is useful for keeping track of new additions and ensuring they are properly set up and managed.
select name, description, id, created_by, created_at, rolefrom env0_organizationwhere created_at >= now() - interval '30' day;
select name, description, id, created_by, created_at, rolefrom env0_organizationwhere created_at >= datetime('now', '-30 day');
List organizations that have not been updated in the last 30 days
Explore which organizations have remained unchanged in the past month. This is useful for identifying potential areas of stagnation or inactivity within your business.
select name, description, id, created_by, created_at, updated_at, rolefrom env0_organizationwhere updated_at <= now() - interval '30' day;
select name, description, id, created_by, created_at, updated_at, rolefrom env0_organizationwhere updated_at <= datetime('now', '-30 day');
List organizations with OIDC disabled
Discover the organizations that have not enabled OpenID Connect (OIDC) for identity authentication. This is useful for identifying potential security risks and ensuring that all organizations are using secure authentication methods.
select name, description, id, created_by, created_at, rolefrom env0_organizationwhere not enable_oidc;
select name, description, id, created_by, created_at, rolefrom env0_organizationwhere enable_oidc = 0;
Schema for env0_organization
Name | Type | Operators | Description |
---|---|---|---|
_ctx | jsonb | Steampipe context in JSON form. | |
created_at | timestamp with time zone | Date and time when the organziation was created. | |
created_by | text | Name of the authentication type used for creation of organization. | |
default_ttl | text | Default TTL policies on the organization level for environment. | |
description | text | Organization description. | |
do_not_consider_merge_commits_for_pr_plans | boolean | Specifies if the organization does not consider merge commits for PR plans. | |
do_not_report_skipped_status_checks | boolean | Check if the organization does not report skipped status checks. | |
enable_oidc | boolean | Check whether OIDC is enabled for the organziation. | |
enforce_pr_commenter_permissions | boolean | Check whether the organization has enforced PR commenter permissions. | |
id | text | The unique ID of the Organization. | |
is_self_hosted_k8s | boolean | Returns true if the orgization is a self hosted k8. | |
max_ttl | text | Max TTL policies on the organization level for environment. | |
name | text | The name of the organization. | |
organization_id | text | =, !=, ~~, ~~*, !~~, !~~* | Unique identifier for the organization. |
photo_url | text | The URL of the organization's display photo. | |
role | text | The role of the person who created the organziation. | |
sp_connection_name | text | =, !=, ~~, ~~*, !~~, !~~* | Steampipe connection name. |
sp_ctx | jsonb | Steampipe context in JSON form. | |
title | text | Title of the resource. | |
updated_at | timestamp with time zone | Date and time when the organziation was last updated. |
Export
This table is available as a standalone Exporter CLI. Steampipe exporters are stand-alone binaries that allow you to extract data using Steampipe plugins without a database.
You can download the tarball for your platform from the Releases page, but it is simplest to install them with the steampipe_export_installer.sh
script:
/bin/sh -c "$(curl -fsSL https://steampipe.io/install/export.sh)" -- env0
You can pass the configuration to the command with the --config
argument:
steampipe_export_env0 --config '<your_config>' env0_organization