# Organizations ## CreateOrganization `organizations.create(OrganizationCreateParams**kwargs) -> OrganizationCreateResponse` **post** `/gitpod.v1.OrganizationService/CreateOrganization` Creates a new organization with the specified name and settings. Use this method to: - Create a new organization for team collaboration - Set up automatic domain-based invites for team members - Join the organization immediately upon creation ### Examples - Create a basic organization: Creates an organization with just a name. ```yaml name: "Acme Corp Engineering" joinOrganization: true ``` - Create with domain-based invites: Creates an organization that automatically invites users with matching email domains. ```yaml name: "Acme Corp" joinOrganization: true inviteAccountsWithMatchingDomain: true ``` ### Parameters - `name: str` name is the organization name - `invite_accounts_with_matching_domain: Optional[bool]` Should other Accounts with the same domain be automatically invited to the organization? - `join_organization: Optional[bool]` join_organization decides whether the Identity issuing this request joins the org on creation ### Returns - `class OrganizationCreateResponse: …` - `organization: Organization` organization is the created organization - `id: str` - `created_at: datetime` A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by "Z") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`](http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime\(\)) to obtain a formatter capable of generating timestamps in this format. - `name: str` - `tier: OrganizationTier` The tier of the organization - free, enterprise or core - `"ORGANIZATION_TIER_UNSPECIFIED"` - `"ORGANIZATION_TIER_FREE"` - `"ORGANIZATION_TIER_ENTERPRISE"` - `"ORGANIZATION_TIER_CORE"` - `"ORGANIZATION_TIER_FREE_ONA"` - `updated_at: datetime` A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by "Z") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`](http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime\(\)) to obtain a formatter capable of generating timestamps in this format. - `invite_domains: Optional[InviteDomains]` - `domains: Optional[List[str]]` domains is the list of domains that are allowed to join the organization - `member: Optional[OrganizationMember]` member is the member that joined the org on creation. Only set if specified "join_organization" is "true" in the request. - `email: str` - `full_name: str` - `login_provider: str` login_provider is the login provider the user uses to sign in - `member_since: datetime` A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by "Z") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`](http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime\(\)) to obtain a formatter capable of generating timestamps in this format. - `role: OrganizationRole` - `"ORGANIZATION_ROLE_UNSPECIFIED"` - `"ORGANIZATION_ROLE_ADMIN"` - `"ORGANIZATION_ROLE_MEMBER"` - `status: UserStatus` - `"USER_STATUS_UNSPECIFIED"` - `"USER_STATUS_ACTIVE"` - `"USER_STATUS_SUSPENDED"` - `"USER_STATUS_LEFT"` - `user_id: str` - `avatar_url: Optional[str]` ### Example ```python import os from gitpod import Gitpod client = Gitpod( bearer_token=os.environ.get("GITPOD_API_KEY"), # This is the default and can be omitted ) organization = client.organizations.create( name="Acme Corp Engineering", join_organization=True, ) print(organization.organization) ``` #### Response ```json { "organization": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "createdAt": "2019-12-27T18:11:19.117Z", "name": "name", "tier": "ORGANIZATION_TIER_UNSPECIFIED", "updatedAt": "2019-12-27T18:11:19.117Z", "inviteDomains": { "domains": [ "sfN2.l.iJR-BU.u9JV9.a.m.o2D-4b-Jd.0Z-kX.L.n.S.f.UKbxB" ] } }, "member": { "email": "email", "fullName": "fullName", "loginProvider": "loginProvider", "memberSince": "2019-12-27T18:11:19.117Z", "role": "ORGANIZATION_ROLE_UNSPECIFIED", "status": "USER_STATUS_UNSPECIFIED", "userId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "avatarUrl": "avatarUrl" } } ``` ## DeleteOrganization `organizations.delete(OrganizationDeleteParams**kwargs) -> object` **post** `/gitpod.v1.OrganizationService/DeleteOrganization` Permanently deletes an organization. Use this method to: - Remove unused organizations - Clean up test organizations - Complete organization migration ### Examples - Delete organization: Permanently removes an organization and all its data. ```yaml organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" ``` ### Parameters - `organization_id: str` organization_id is the ID of the organization to delete ### Returns - `object` ### Example ```python import os from gitpod import Gitpod client = Gitpod( bearer_token=os.environ.get("GITPOD_API_KEY"), # This is the default and can be omitted ) organization = client.organizations.delete( organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", ) print(organization) ``` #### Response ```json {} ``` ## JoinOrganization `organizations.join(OrganizationJoinParams**kwargs) -> OrganizationJoinResponse` **post** `/gitpod.v1.OrganizationService/JoinOrganization` Allows users to join an organization through direct ID, invite link, or domain-based auto-join. Use this method to: - Join an organization via direct ID or invite - Join automatically based on email domain - Accept organization invitations ### Examples - Join via organization ID: Joins an organization directly when you have the ID. ```yaml organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" ``` - Join via invite: Accepts an organization invitation link. ```yaml inviteId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" ``` ### Parameters - `invite_id: Optional[str]` invite_id is the unique identifier of the invite to join the organization. - `organization_id: Optional[str]` organization_id is the unique identifier of the Organization to join. ### Returns - `class OrganizationJoinResponse: …` - `member: OrganizationMember` member is the member that was created by joining the organization. - `email: str` - `full_name: str` - `login_provider: str` login_provider is the login provider the user uses to sign in - `member_since: datetime` A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by "Z") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`](http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime\(\)) to obtain a formatter capable of generating timestamps in this format. - `role: OrganizationRole` - `"ORGANIZATION_ROLE_UNSPECIFIED"` - `"ORGANIZATION_ROLE_ADMIN"` - `"ORGANIZATION_ROLE_MEMBER"` - `status: UserStatus` - `"USER_STATUS_UNSPECIFIED"` - `"USER_STATUS_ACTIVE"` - `"USER_STATUS_SUSPENDED"` - `"USER_STATUS_LEFT"` - `user_id: str` - `avatar_url: Optional[str]` ### Example ```python import os from gitpod import Gitpod client = Gitpod( bearer_token=os.environ.get("GITPOD_API_KEY"), # This is the default and can be omitted ) response = client.organizations.join( invite_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) print(response.member) ``` #### Response ```json { "member": { "email": "email", "fullName": "fullName", "loginProvider": "loginProvider", "memberSince": "2019-12-27T18:11:19.117Z", "role": "ORGANIZATION_ROLE_UNSPECIFIED", "status": "USER_STATUS_UNSPECIFIED", "userId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "avatarUrl": "avatarUrl" } } ``` ## LeaveOrganization `organizations.leave(OrganizationLeaveParams**kwargs) -> object` **post** `/gitpod.v1.OrganizationService/LeaveOrganization` Removes a user from an organization while preserving organization data. Use this method to: - Remove yourself from an organization - Clean up inactive memberships - Transfer project ownership before leaving - Manage team transitions ### Examples - Leave organization: Removes user from organization membership. ```yaml userId: "f53d2330-3795-4c5d-a1f3-453121af9c60" ``` Note: Ensure all projects and resources are transferred before leaving. ### Parameters - `user_id: str` ### Returns - `object` ### Example ```python import os from gitpod import Gitpod client = Gitpod( bearer_token=os.environ.get("GITPOD_API_KEY"), # This is the default and can be omitted ) response = client.organizations.leave( user_id="f53d2330-3795-4c5d-a1f3-453121af9c60", ) print(response) ``` #### Response ```json {} ``` ## ListMembers `organizations.list_members(OrganizationListMembersParams**kwargs) -> SyncMembersPage[OrganizationMember]` **post** `/gitpod.v1.OrganizationService/ListMembers` Lists and filters organization members with optional pagination. Use this method to: - View all organization members - Monitor member activity - Manage team membership ### Examples - List active members: Retrieves active members with pagination. ```yaml organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" pagination: pageSize: 20 ``` - List with pagination: Retrieves next page of members. ```yaml organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" pagination: pageSize: 50 token: "next-page-token-from-previous-response" ``` ### Parameters - `organization_id: str` organization_id is the ID of the organization to list members for - `token: Optional[str]` - `page_size: Optional[int]` - `filter: Optional[Filter]` - `exclude_group_ids: Optional[Sequence[str]]` exclude_group_ids excludes members who are already in any of the specified groups - `exclude_members_in_any_team: Optional[bool]` exclude_members_in_any_team excludes members who belong to any team in the organization - `roles: Optional[List[OrganizationRole]]` roles filters members by their organization role - `"ORGANIZATION_ROLE_UNSPECIFIED"` - `"ORGANIZATION_ROLE_ADMIN"` - `"ORGANIZATION_ROLE_MEMBER"` - `search: Optional[str]` search performs case-insensitive search across member name and email - `statuses: Optional[List[UserStatus]]` status filters members by their user status - `"USER_STATUS_UNSPECIFIED"` - `"USER_STATUS_ACTIVE"` - `"USER_STATUS_SUSPENDED"` - `"USER_STATUS_LEFT"` - `user_ids: Optional[Sequence[str]]` user_ids filters the response to only members with the specified user IDs - `pagination: Optional[Pagination]` pagination contains the pagination options for listing members - `token: Optional[str]` Token for the next set of results that was returned as next_token of a PaginationResponse - `page_size: Optional[int]` Page size is the maximum number of results to retrieve per page. Defaults to 25. Maximum 100. - `sort: Optional[Sort]` sort specifies the order of results. When unspecified, the authenticated user is returned first, followed by other members sorted by name ascending. When an explicit sort is specified, results are sorted purely by the requested field without any special handling for the authenticated user. - `field: Optional[Literal["SORT_FIELD_UNSPECIFIED", "SORT_FIELD_NAME", "SORT_FIELD_DATE_JOINED"]]` - `"SORT_FIELD_UNSPECIFIED"` - `"SORT_FIELD_NAME"` - `"SORT_FIELD_DATE_JOINED"` - `order: Optional[SortOrder]` - `"SORT_ORDER_UNSPECIFIED"` - `"SORT_ORDER_ASC"` - `"SORT_ORDER_DESC"` ### Returns - `class OrganizationMember: …` - `email: str` - `full_name: str` - `login_provider: str` login_provider is the login provider the user uses to sign in - `member_since: datetime` A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by "Z") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`](http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime\(\)) to obtain a formatter capable of generating timestamps in this format. - `role: OrganizationRole` - `"ORGANIZATION_ROLE_UNSPECIFIED"` - `"ORGANIZATION_ROLE_ADMIN"` - `"ORGANIZATION_ROLE_MEMBER"` - `status: UserStatus` - `"USER_STATUS_UNSPECIFIED"` - `"USER_STATUS_ACTIVE"` - `"USER_STATUS_SUSPENDED"` - `"USER_STATUS_LEFT"` - `user_id: str` - `avatar_url: Optional[str]` ### Example ```python import os from gitpod import Gitpod client = Gitpod( bearer_token=os.environ.get("GITPOD_API_KEY"), # This is the default and can be omitted ) page = client.organizations.list_members( organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", pagination={ "page_size": 20 }, ) page = page.members[0] print(page.login_provider) ``` #### Response ```json { "members": [ { "email": "email", "fullName": "fullName", "loginProvider": "loginProvider", "memberSince": "2019-12-27T18:11:19.117Z", "role": "ORGANIZATION_ROLE_UNSPECIFIED", "status": "USER_STATUS_UNSPECIFIED", "userId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "avatarUrl": "avatarUrl" } ], "pagination": { "nextToken": "nextToken" }, "count": { "relation": "COUNT_RESPONSE_RELATION_UNSPECIFIED", "value": 0 } } ``` ## GetOrganization `organizations.retrieve(OrganizationRetrieveParams**kwargs) -> OrganizationRetrieveResponse` **post** `/gitpod.v1.OrganizationService/GetOrganization` Gets details about a specific organization. Use this method to: - Retrieve organization settings and configuration - Check organization membership status - View domain verification settings ### Examples - Get organization details: Retrieves information about a specific organization. ```yaml organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" ``` ### Parameters - `organization_id: str` organization_id is the unique identifier of the Organization to retreive. ### Returns - `class OrganizationRetrieveResponse: …` - `organization: Organization` organization is the requested organization - `id: str` - `created_at: datetime` A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by "Z") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`](http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime\(\)) to obtain a formatter capable of generating timestamps in this format. - `name: str` - `tier: OrganizationTier` The tier of the organization - free, enterprise or core - `"ORGANIZATION_TIER_UNSPECIFIED"` - `"ORGANIZATION_TIER_FREE"` - `"ORGANIZATION_TIER_ENTERPRISE"` - `"ORGANIZATION_TIER_CORE"` - `"ORGANIZATION_TIER_FREE_ONA"` - `updated_at: datetime` A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by "Z") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`](http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime\(\)) to obtain a formatter capable of generating timestamps in this format. - `invite_domains: Optional[InviteDomains]` - `domains: Optional[List[str]]` domains is the list of domains that are allowed to join the organization ### Example ```python import os from gitpod import Gitpod client = Gitpod( bearer_token=os.environ.get("GITPOD_API_KEY"), # This is the default and can be omitted ) organization = client.organizations.retrieve( organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", ) print(organization.organization) ``` #### Response ```json { "organization": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "createdAt": "2019-12-27T18:11:19.117Z", "name": "name", "tier": "ORGANIZATION_TIER_UNSPECIFIED", "updatedAt": "2019-12-27T18:11:19.117Z", "inviteDomains": { "domains": [ "sfN2.l.iJR-BU.u9JV9.a.m.o2D-4b-Jd.0Z-kX.L.n.S.f.UKbxB" ] } } } ``` ## SetRole `organizations.set_role(OrganizationSetRoleParams**kwargs) -> object` **post** `/gitpod.v1.OrganizationService/SetRole` Manages organization membership and roles by setting a user's role within the organization. Use this method to: - Promote members to admin role - Change member permissions - Demote admins to regular members ### Examples - Promote to admin: Makes a user an organization administrator. ```yaml organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" userId: "f53d2330-3795-4c5d-a1f3-453121af9c60" role: ORGANIZATION_ROLE_ADMIN ``` - Change to member: Changes a user's role to regular member. ```yaml organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" userId: "f53d2330-3795-4c5d-a1f3-453121af9c60" role: ORGANIZATION_ROLE_MEMBER ``` ### Parameters - `organization_id: str` - `user_id: str` - `role: Optional[OrganizationRole]` - `"ORGANIZATION_ROLE_UNSPECIFIED"` - `"ORGANIZATION_ROLE_ADMIN"` - `"ORGANIZATION_ROLE_MEMBER"` ### Returns - `object` ### Example ```python import os from gitpod import Gitpod client = Gitpod( bearer_token=os.environ.get("GITPOD_API_KEY"), # This is the default and can be omitted ) response = client.organizations.set_role( organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", user_id="f53d2330-3795-4c5d-a1f3-453121af9c60", role="ORGANIZATION_ROLE_MEMBER", ) print(response) ``` #### Response ```json {} ``` ## UpdateOrganization `organizations.update(OrganizationUpdateParams**kwargs) -> OrganizationUpdateResponse` **post** `/gitpod.v1.OrganizationService/UpdateOrganization` Updates an organization's settings including name, invite domains, and member policies. Use this method to: - Modify organization display name - Configure email domain restrictions - Update organization-wide settings - Manage member access policies ### Examples - Update basic settings: Changes organization name and invite domains. ```yaml organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" name: "New Company Name" inviteDomains: domains: - "company.com" - "subsidiary.com" ``` - Remove domain restrictions: Clears all domain-based invite restrictions. ```yaml organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" inviteDomains: domains: [] ``` ### Parameters - `organization_id: str` organization_id is the ID of the organization to update the settings for. - `invite_domains: Optional[InviteDomainsParam]` invite_domains is the domain allowlist of the organization - `domains: Optional[List[str]]` domains is the list of domains that are allowed to join the organization - `name: Optional[str]` name is the new name of the organization ### Returns - `class OrganizationUpdateResponse: …` - `organization: Organization` organization is the updated organization - `id: str` - `created_at: datetime` A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by "Z") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`](http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime\(\)) to obtain a formatter capable of generating timestamps in this format. - `name: str` - `tier: OrganizationTier` The tier of the organization - free, enterprise or core - `"ORGANIZATION_TIER_UNSPECIFIED"` - `"ORGANIZATION_TIER_FREE"` - `"ORGANIZATION_TIER_ENTERPRISE"` - `"ORGANIZATION_TIER_CORE"` - `"ORGANIZATION_TIER_FREE_ONA"` - `updated_at: datetime` A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by "Z") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`](http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime\(\)) to obtain a formatter capable of generating timestamps in this format. - `invite_domains: Optional[InviteDomains]` - `domains: Optional[List[str]]` domains is the list of domains that are allowed to join the organization ### Example ```python import os from gitpod import Gitpod client = Gitpod( bearer_token=os.environ.get("GITPOD_API_KEY"), # This is the default and can be omitted ) organization = client.organizations.update( organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", invite_domains={ "domains": [] }, ) print(organization.organization) ``` #### Response ```json { "organization": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "createdAt": "2019-12-27T18:11:19.117Z", "name": "name", "tier": "ORGANIZATION_TIER_UNSPECIFIED", "updatedAt": "2019-12-27T18:11:19.117Z", "inviteDomains": { "domains": [ "sfN2.l.iJR-BU.u9JV9.a.m.o2D-4b-Jd.0Z-kX.L.n.S.f.UKbxB" ] } } } ``` ## Domain Types ### Invite Domains - `class InviteDomains: …` - `domains: Optional[List[str]]` domains is the list of domains that are allowed to join the organization ### Organization - `class Organization: …` - `id: str` - `created_at: datetime` A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by "Z") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`](http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime\(\)) to obtain a formatter capable of generating timestamps in this format. - `name: str` - `tier: OrganizationTier` The tier of the organization - free, enterprise or core - `"ORGANIZATION_TIER_UNSPECIFIED"` - `"ORGANIZATION_TIER_FREE"` - `"ORGANIZATION_TIER_ENTERPRISE"` - `"ORGANIZATION_TIER_CORE"` - `"ORGANIZATION_TIER_FREE_ONA"` - `updated_at: datetime` A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by "Z") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`](http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime\(\)) to obtain a formatter capable of generating timestamps in this format. - `invite_domains: Optional[InviteDomains]` - `domains: Optional[List[str]]` domains is the list of domains that are allowed to join the organization ### Organization Member - `class OrganizationMember: …` - `email: str` - `full_name: str` - `login_provider: str` login_provider is the login provider the user uses to sign in - `member_since: datetime` A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by "Z") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`](http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime\(\)) to obtain a formatter capable of generating timestamps in this format. - `role: OrganizationRole` - `"ORGANIZATION_ROLE_UNSPECIFIED"` - `"ORGANIZATION_ROLE_ADMIN"` - `"ORGANIZATION_ROLE_MEMBER"` - `status: UserStatus` - `"USER_STATUS_UNSPECIFIED"` - `"USER_STATUS_ACTIVE"` - `"USER_STATUS_SUSPENDED"` - `"USER_STATUS_LEFT"` - `user_id: str` - `avatar_url: Optional[str]` ### Organization Create Response - `class OrganizationCreateResponse: …` - `organization: Organization` organization is the created organization - `id: str` - `created_at: datetime` A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by "Z") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`](http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime\(\)) to obtain a formatter capable of generating timestamps in this format. - `name: str` - `tier: OrganizationTier` The tier of the organization - free, enterprise or core - `"ORGANIZATION_TIER_UNSPECIFIED"` - `"ORGANIZATION_TIER_FREE"` - `"ORGANIZATION_TIER_ENTERPRISE"` - `"ORGANIZATION_TIER_CORE"` - `"ORGANIZATION_TIER_FREE_ONA"` - `updated_at: datetime` A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by "Z") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`](http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime\(\)) to obtain a formatter capable of generating timestamps in this format. - `invite_domains: Optional[InviteDomains]` - `domains: Optional[List[str]]` domains is the list of domains that are allowed to join the organization - `member: Optional[OrganizationMember]` member is the member that joined the org on creation. Only set if specified "join_organization" is "true" in the request. - `email: str` - `full_name: str` - `login_provider: str` login_provider is the login provider the user uses to sign in - `member_since: datetime` A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by "Z") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`](http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime\(\)) to obtain a formatter capable of generating timestamps in this format. - `role: OrganizationRole` - `"ORGANIZATION_ROLE_UNSPECIFIED"` - `"ORGANIZATION_ROLE_ADMIN"` - `"ORGANIZATION_ROLE_MEMBER"` - `status: UserStatus` - `"USER_STATUS_UNSPECIFIED"` - `"USER_STATUS_ACTIVE"` - `"USER_STATUS_SUSPENDED"` - `"USER_STATUS_LEFT"` - `user_id: str` - `avatar_url: Optional[str]` ### Organization Join Response - `class OrganizationJoinResponse: …` - `member: OrganizationMember` member is the member that was created by joining the organization. - `email: str` - `full_name: str` - `login_provider: str` login_provider is the login provider the user uses to sign in - `member_since: datetime` A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by "Z") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`](http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime\(\)) to obtain a formatter capable of generating timestamps in this format. - `role: OrganizationRole` - `"ORGANIZATION_ROLE_UNSPECIFIED"` - `"ORGANIZATION_ROLE_ADMIN"` - `"ORGANIZATION_ROLE_MEMBER"` - `status: UserStatus` - `"USER_STATUS_UNSPECIFIED"` - `"USER_STATUS_ACTIVE"` - `"USER_STATUS_SUSPENDED"` - `"USER_STATUS_LEFT"` - `user_id: str` - `avatar_url: Optional[str]` ### Organization Retrieve Response - `class OrganizationRetrieveResponse: …` - `organization: Organization` organization is the requested organization - `id: str` - `created_at: datetime` A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by "Z") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`](http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime\(\)) to obtain a formatter capable of generating timestamps in this format. - `name: str` - `tier: OrganizationTier` The tier of the organization - free, enterprise or core - `"ORGANIZATION_TIER_UNSPECIFIED"` - `"ORGANIZATION_TIER_FREE"` - `"ORGANIZATION_TIER_ENTERPRISE"` - `"ORGANIZATION_TIER_CORE"` - `"ORGANIZATION_TIER_FREE_ONA"` - `updated_at: datetime` A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by "Z") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`](http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime\(\)) to obtain a formatter capable of generating timestamps in this format. - `invite_domains: Optional[InviteDomains]` - `domains: Optional[List[str]]` domains is the list of domains that are allowed to join the organization ### Organization Update Response - `class OrganizationUpdateResponse: …` - `organization: Organization` organization is the updated organization - `id: str` - `created_at: datetime` A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by "Z") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`](http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime\(\)) to obtain a formatter capable of generating timestamps in this format. - `name: str` - `tier: OrganizationTier` The tier of the organization - free, enterprise or core - `"ORGANIZATION_TIER_UNSPECIFIED"` - `"ORGANIZATION_TIER_FREE"` - `"ORGANIZATION_TIER_ENTERPRISE"` - `"ORGANIZATION_TIER_CORE"` - `"ORGANIZATION_TIER_FREE_ONA"` - `updated_at: datetime` A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by "Z") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`](http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime\(\)) to obtain a formatter capable of generating timestamps in this format. - `invite_domains: Optional[InviteDomains]` - `domains: Optional[List[str]]` domains is the list of domains that are allowed to join the organization # Announcement Banner ## GetAnnouncementBanner `organizations.announcement_banner.get(AnnouncementBannerGetParams**kwargs) -> AnnouncementBannerGetResponse` **post** `/gitpod.v1.OrganizationService/GetAnnouncementBanner` Retrieves the announcement banner configuration for an organization. Use this method to fetch the current announcement banner settings. All organization members can read the banner configuration. ### Examples - Get announcement banner: ```yaml organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" ``` ### Parameters - `organization_id: str` organization_id is the ID of the organization ### Returns - `class AnnouncementBannerGetResponse: …` - `banner: AnnouncementBanner` banner is the announcement banner configuration - `organization_id: str` organization_id is the ID of the organization - `enabled: Optional[bool]` enabled controls whether the banner is displayed - `message: Optional[str]` message is the banner message displayed to users. Supports basic Markdown. ### Example ```python import os from gitpod import Gitpod client = Gitpod( bearer_token=os.environ.get("GITPOD_API_KEY"), # This is the default and can be omitted ) announcement_banner = client.organizations.announcement_banner.get( organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", ) print(announcement_banner.banner) ``` #### Response ```json { "banner": { "organizationId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "enabled": true, "message": "message" } } ``` ## UpdateAnnouncementBanner `organizations.announcement_banner.update(AnnouncementBannerUpdateParams**kwargs) -> AnnouncementBannerUpdateResponse` **post** `/gitpod.v1.OrganizationService/UpdateAnnouncementBanner` Updates the announcement banner configuration for an organization. Use this method to configure the announcement banner displayed to all users. Only organization admins can update the banner. Requires Enterprise tier. ### Examples - Enable announcement banner: ```yaml organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" message: "Scheduled maintenance on Saturday 10pm-2am UTC" enabled: true ``` - Disable announcement banner: ```yaml organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" enabled: false ``` ### Parameters - `organization_id: str` organization_id is the ID of the organization - `enabled: Optional[bool]` enabled controls whether the banner is displayed - `message: Optional[str]` message is the banner message. Supports basic Markdown. Maximum 1000 characters. ### Returns - `class AnnouncementBannerUpdateResponse: …` - `banner: AnnouncementBanner` banner is the updated announcement banner configuration - `organization_id: str` organization_id is the ID of the organization - `enabled: Optional[bool]` enabled controls whether the banner is displayed - `message: Optional[str]` message is the banner message displayed to users. Supports basic Markdown. ### Example ```python import os from gitpod import Gitpod client = Gitpod( bearer_token=os.environ.get("GITPOD_API_KEY"), # This is the default and can be omitted ) announcement_banner = client.organizations.announcement_banner.update( organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", enabled=False, ) print(announcement_banner.banner) ``` #### Response ```json { "banner": { "organizationId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "enabled": true, "message": "message" } } ``` ## Domain Types ### Announcement Banner - `class AnnouncementBanner: …` - `organization_id: str` organization_id is the ID of the organization - `enabled: Optional[bool]` enabled controls whether the banner is displayed - `message: Optional[str]` message is the banner message displayed to users. Supports basic Markdown. ### Announcement Banner Get Response - `class AnnouncementBannerGetResponse: …` - `banner: AnnouncementBanner` banner is the announcement banner configuration - `organization_id: str` organization_id is the ID of the organization - `enabled: Optional[bool]` enabled controls whether the banner is displayed - `message: Optional[str]` message is the banner message displayed to users. Supports basic Markdown. ### Announcement Banner Update Response - `class AnnouncementBannerUpdateResponse: …` - `banner: AnnouncementBanner` banner is the updated announcement banner configuration - `organization_id: str` organization_id is the ID of the organization - `enabled: Optional[bool]` enabled controls whether the banner is displayed - `message: Optional[str]` message is the banner message displayed to users. Supports basic Markdown. # Custom Domains ## CreateCustomDomain `organizations.custom_domains.create(CustomDomainCreateParams**kwargs) -> CustomDomainCreateResponse` **post** `/gitpod.v1.OrganizationService/CreateCustomDomain` Creates a custom domain configuration for an organization. Use this method to configure custom domains for organization workspaces ### Examples - Configure AWS custom domain: Sets up a custom domain with AWS provider. ```yaml organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" domainName: "workspaces.acme-corp.com" provider: CUSTOM_DOMAIN_PROVIDER_AWS awsAccountId: "123456789012" ``` ### Parameters - `domain_name: str` domain_name is the custom domain name - `organization_id: str` organization_id is the ID of the organization to create the custom domain for - `aws_account_id: Optional[str]` aws_account_id is the AWS account ID (deprecated: use cloud_account_id) - `cloud_account_id: Optional[str]` cloud_account_id is the unified cloud account identifier (AWS Account ID or GCP Project ID) - `provider: Optional[CustomDomainProvider]` provider is the cloud provider for this custom domain - `"CUSTOM_DOMAIN_PROVIDER_UNSPECIFIED"` - `"CUSTOM_DOMAIN_PROVIDER_AWS"` - `"CUSTOM_DOMAIN_PROVIDER_GCP"` ### Returns - `class CustomDomainCreateResponse: …` CreateCustomDomainResponse is the response message for creating a custom domain - `custom_domain: CustomDomain` custom_domain is the created custom domain - `id: str` id is the unique identifier of the custom domain - `created_at: datetime` created_at is when the custom domain was created - `domain_name: str` domain_name is the custom domain name - `organization_id: str` organization_id is the ID of the organization this custom domain belongs to - `updated_at: datetime` updated_at is when the custom domain was last updated - `aws_account_id: Optional[str]` aws_account_id is the AWS account ID (deprecated: use cloud_account_id) - `cloud_account_id: Optional[str]` cloud_account_id is the unified cloud account identifier (AWS Account ID or GCP Project ID) - `provider: Optional[CustomDomainProvider]` provider is the cloud provider for this custom domain - `"CUSTOM_DOMAIN_PROVIDER_UNSPECIFIED"` - `"CUSTOM_DOMAIN_PROVIDER_AWS"` - `"CUSTOM_DOMAIN_PROVIDER_GCP"` ### Example ```python import os from gitpod import Gitpod client = Gitpod( bearer_token=os.environ.get("GITPOD_API_KEY"), # This is the default and can be omitted ) custom_domain = client.organizations.custom_domains.create( domain_name="workspaces.acme-corp.com", organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", aws_account_id="123456789012", provider="CUSTOM_DOMAIN_PROVIDER_AWS", ) print(custom_domain.custom_domain) ``` #### Response ```json { "customDomain": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "createdAt": "2019-12-27T18:11:19.117Z", "domainName": "xxxx", "organizationId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "updatedAt": "2019-12-27T18:11:19.117Z", "awsAccountId": "awsAccountId", "cloudAccountId": "cloudAccountId", "provider": "CUSTOM_DOMAIN_PROVIDER_UNSPECIFIED" } } ``` ## DeleteCustomDomain `organizations.custom_domains.delete(CustomDomainDeleteParams**kwargs) -> object` **post** `/gitpod.v1.OrganizationService/DeleteCustomDomain` Removes a custom domain configuration from an organization. Use this method to: - Disable custom domain functionality - Remove outdated configurations - Clean up unused domains ### Examples - Delete custom domain configuration: Removes a specific custom domain configuration. ```yaml organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" ``` ### Parameters - `organization_id: str` organization_id is the ID of the organization to delete custom domain for ### Returns - `object` ### Example ```python import os from gitpod import Gitpod client = Gitpod( bearer_token=os.environ.get("GITPOD_API_KEY"), # This is the default and can be omitted ) custom_domain = client.organizations.custom_domains.delete( organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", ) print(custom_domain) ``` #### Response ```json {} ``` ## GetCustomDomain `organizations.custom_domains.retrieve(CustomDomainRetrieveParams**kwargs) -> CustomDomainRetrieveResponse` **post** `/gitpod.v1.OrganizationService/GetCustomDomain` Retrieves a specific custom domain configuration. Use this method to view custom domain details ### Examples - Get custom domain configuration: Retrieves details of a specific custom domain. ```yaml organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" ``` ### Parameters - `organization_id: str` organization_id is the ID of the organization to retrieve custom domain for ### Returns - `class CustomDomainRetrieveResponse: …` - `custom_domain: CustomDomain` CustomDomain represents a custom domain configuration for an organization - `id: str` id is the unique identifier of the custom domain - `created_at: datetime` created_at is when the custom domain was created - `domain_name: str` domain_name is the custom domain name - `organization_id: str` organization_id is the ID of the organization this custom domain belongs to - `updated_at: datetime` updated_at is when the custom domain was last updated - `aws_account_id: Optional[str]` aws_account_id is the AWS account ID (deprecated: use cloud_account_id) - `cloud_account_id: Optional[str]` cloud_account_id is the unified cloud account identifier (AWS Account ID or GCP Project ID) - `provider: Optional[CustomDomainProvider]` provider is the cloud provider for this custom domain - `"CUSTOM_DOMAIN_PROVIDER_UNSPECIFIED"` - `"CUSTOM_DOMAIN_PROVIDER_AWS"` - `"CUSTOM_DOMAIN_PROVIDER_GCP"` ### Example ```python import os from gitpod import Gitpod client = Gitpod( bearer_token=os.environ.get("GITPOD_API_KEY"), # This is the default and can be omitted ) custom_domain = client.organizations.custom_domains.retrieve( organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", ) print(custom_domain.custom_domain) ``` #### Response ```json { "customDomain": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "createdAt": "2019-12-27T18:11:19.117Z", "domainName": "xxxx", "organizationId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "updatedAt": "2019-12-27T18:11:19.117Z", "awsAccountId": "awsAccountId", "cloudAccountId": "cloudAccountId", "provider": "CUSTOM_DOMAIN_PROVIDER_UNSPECIFIED" } } ``` ## UpdateCustomDomain `organizations.custom_domains.update(CustomDomainUpdateParams**kwargs) -> CustomDomainUpdateResponse` **post** `/gitpod.v1.OrganizationService/UpdateCustomDomain` Updates custom domain configuration settings. Use this method to: - Update cloud provider settings - Change AWS account ID - Modify domain configuration ### Examples - Update AWS account ID: Changes the AWS account ID for the custom domain. ```yaml organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" domainName: "workspaces.acme-corp.com" awsAccountId: "987654321098" ``` ### Parameters - `domain_name: str` domain_name is the custom domain name - `organization_id: str` organization_id is the ID of the organization to update custom domain for - `aws_account_id: Optional[str]` aws_account_id is the AWS account ID (deprecated: use cloud_account_id) - `cloud_account_id: Optional[str]` cloud_account_id is the unified cloud account identifier (AWS Account ID or GCP Project ID) - `provider: Optional[CustomDomainProvider]` provider is the cloud provider for this custom domain - `"CUSTOM_DOMAIN_PROVIDER_UNSPECIFIED"` - `"CUSTOM_DOMAIN_PROVIDER_AWS"` - `"CUSTOM_DOMAIN_PROVIDER_GCP"` ### Returns - `class CustomDomainUpdateResponse: …` UpdateCustomDomainResponse is the response message for updating a custom domain - `custom_domain: CustomDomain` custom_domain is the updated custom domain - `id: str` id is the unique identifier of the custom domain - `created_at: datetime` created_at is when the custom domain was created - `domain_name: str` domain_name is the custom domain name - `organization_id: str` organization_id is the ID of the organization this custom domain belongs to - `updated_at: datetime` updated_at is when the custom domain was last updated - `aws_account_id: Optional[str]` aws_account_id is the AWS account ID (deprecated: use cloud_account_id) - `cloud_account_id: Optional[str]` cloud_account_id is the unified cloud account identifier (AWS Account ID or GCP Project ID) - `provider: Optional[CustomDomainProvider]` provider is the cloud provider for this custom domain - `"CUSTOM_DOMAIN_PROVIDER_UNSPECIFIED"` - `"CUSTOM_DOMAIN_PROVIDER_AWS"` - `"CUSTOM_DOMAIN_PROVIDER_GCP"` ### Example ```python import os from gitpod import Gitpod client = Gitpod( bearer_token=os.environ.get("GITPOD_API_KEY"), # This is the default and can be omitted ) custom_domain = client.organizations.custom_domains.update( domain_name="workspaces.acme-corp.com", organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", aws_account_id="987654321098", ) print(custom_domain.custom_domain) ``` #### Response ```json { "customDomain": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "createdAt": "2019-12-27T18:11:19.117Z", "domainName": "xxxx", "organizationId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "updatedAt": "2019-12-27T18:11:19.117Z", "awsAccountId": "awsAccountId", "cloudAccountId": "cloudAccountId", "provider": "CUSTOM_DOMAIN_PROVIDER_UNSPECIFIED" } } ``` ## Domain Types ### Custom Domain - `class CustomDomain: …` CustomDomain represents a custom domain configuration for an organization - `id: str` id is the unique identifier of the custom domain - `created_at: datetime` created_at is when the custom domain was created - `domain_name: str` domain_name is the custom domain name - `organization_id: str` organization_id is the ID of the organization this custom domain belongs to - `updated_at: datetime` updated_at is when the custom domain was last updated - `aws_account_id: Optional[str]` aws_account_id is the AWS account ID (deprecated: use cloud_account_id) - `cloud_account_id: Optional[str]` cloud_account_id is the unified cloud account identifier (AWS Account ID or GCP Project ID) - `provider: Optional[CustomDomainProvider]` provider is the cloud provider for this custom domain - `"CUSTOM_DOMAIN_PROVIDER_UNSPECIFIED"` - `"CUSTOM_DOMAIN_PROVIDER_AWS"` - `"CUSTOM_DOMAIN_PROVIDER_GCP"` ### Custom Domain Provider - `Literal["CUSTOM_DOMAIN_PROVIDER_UNSPECIFIED", "CUSTOM_DOMAIN_PROVIDER_AWS", "CUSTOM_DOMAIN_PROVIDER_GCP"]` CustomDomainProvider represents the cloud provider for custom domain configuration - `"CUSTOM_DOMAIN_PROVIDER_UNSPECIFIED"` - `"CUSTOM_DOMAIN_PROVIDER_AWS"` - `"CUSTOM_DOMAIN_PROVIDER_GCP"` ### Custom Domain Create Response - `class CustomDomainCreateResponse: …` CreateCustomDomainResponse is the response message for creating a custom domain - `custom_domain: CustomDomain` custom_domain is the created custom domain - `id: str` id is the unique identifier of the custom domain - `created_at: datetime` created_at is when the custom domain was created - `domain_name: str` domain_name is the custom domain name - `organization_id: str` organization_id is the ID of the organization this custom domain belongs to - `updated_at: datetime` updated_at is when the custom domain was last updated - `aws_account_id: Optional[str]` aws_account_id is the AWS account ID (deprecated: use cloud_account_id) - `cloud_account_id: Optional[str]` cloud_account_id is the unified cloud account identifier (AWS Account ID or GCP Project ID) - `provider: Optional[CustomDomainProvider]` provider is the cloud provider for this custom domain - `"CUSTOM_DOMAIN_PROVIDER_UNSPECIFIED"` - `"CUSTOM_DOMAIN_PROVIDER_AWS"` - `"CUSTOM_DOMAIN_PROVIDER_GCP"` ### Custom Domain Retrieve Response - `class CustomDomainRetrieveResponse: …` - `custom_domain: CustomDomain` CustomDomain represents a custom domain configuration for an organization - `id: str` id is the unique identifier of the custom domain - `created_at: datetime` created_at is when the custom domain was created - `domain_name: str` domain_name is the custom domain name - `organization_id: str` organization_id is the ID of the organization this custom domain belongs to - `updated_at: datetime` updated_at is when the custom domain was last updated - `aws_account_id: Optional[str]` aws_account_id is the AWS account ID (deprecated: use cloud_account_id) - `cloud_account_id: Optional[str]` cloud_account_id is the unified cloud account identifier (AWS Account ID or GCP Project ID) - `provider: Optional[CustomDomainProvider]` provider is the cloud provider for this custom domain - `"CUSTOM_DOMAIN_PROVIDER_UNSPECIFIED"` - `"CUSTOM_DOMAIN_PROVIDER_AWS"` - `"CUSTOM_DOMAIN_PROVIDER_GCP"` ### Custom Domain Update Response - `class CustomDomainUpdateResponse: …` UpdateCustomDomainResponse is the response message for updating a custom domain - `custom_domain: CustomDomain` custom_domain is the updated custom domain - `id: str` id is the unique identifier of the custom domain - `created_at: datetime` created_at is when the custom domain was created - `domain_name: str` domain_name is the custom domain name - `organization_id: str` organization_id is the ID of the organization this custom domain belongs to - `updated_at: datetime` updated_at is when the custom domain was last updated - `aws_account_id: Optional[str]` aws_account_id is the AWS account ID (deprecated: use cloud_account_id) - `cloud_account_id: Optional[str]` cloud_account_id is the unified cloud account identifier (AWS Account ID or GCP Project ID) - `provider: Optional[CustomDomainProvider]` provider is the cloud provider for this custom domain - `"CUSTOM_DOMAIN_PROVIDER_UNSPECIFIED"` - `"CUSTOM_DOMAIN_PROVIDER_AWS"` - `"CUSTOM_DOMAIN_PROVIDER_GCP"` # Domain Verifications ## CreateDomainVerification `organizations.domain_verifications.create(DomainVerificationCreateParams**kwargs) -> DomainVerificationCreateResponse` **post** `/gitpod.v1.OrganizationService/CreateDomainVerification` Initiates domain verification process to enable organization features. Use this method to: - Start domain ownership verification - Enable automatic team joining - Set up SSO restrictions - Configure email-based policies ### Examples - Verify primary domain: Starts verification for main company domain. ```yaml organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" domain: "acme-corp.com" ``` - Verify subsidiary domain: Adds verification for additional company domain. ```yaml organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" domain: "acme-subsidiary.com" ``` ### Parameters - `domain: str` - `organization_id: str` ### Returns - `class DomainVerificationCreateResponse: …` - `domain_verification: DomainVerification` - `id: str` - `domain: str` - `organization_id: str` - `state: DomainVerificationState` - `"DOMAIN_VERIFICATION_STATE_UNSPECIFIED"` - `"DOMAIN_VERIFICATION_STATE_PENDING"` - `"DOMAIN_VERIFICATION_STATE_VERIFIED"` - `created_at: Optional[datetime]` A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by "Z") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`](http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime\(\)) to obtain a formatter capable of generating timestamps in this format. - `verification_token: Optional[str]` - `verified_at: Optional[datetime]` A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by "Z") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`](http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime\(\)) to obtain a formatter capable of generating timestamps in this format. ### Example ```python import os from gitpod import Gitpod client = Gitpod( bearer_token=os.environ.get("GITPOD_API_KEY"), # This is the default and can be omitted ) domain_verification = client.organizations.domain_verifications.create( domain="acme-corp.com", organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", ) print(domain_verification.domain_verification) ``` #### Response ```json { "domainVerification": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "domain": "xxxx", "organizationId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "state": "DOMAIN_VERIFICATION_STATE_UNSPECIFIED", "createdAt": "2019-12-27T18:11:19.117Z", "verificationToken": "verificationToken", "verifiedAt": "2019-12-27T18:11:19.117Z" } } ``` ## DeleteDomainVerification `organizations.domain_verifications.delete(DomainVerificationDeleteParams**kwargs) -> object` **post** `/gitpod.v1.OrganizationService/DeleteDomainVerification` Removes a domain verification request. Use this method to: - Cancel pending verifications - Remove verified domains - Clean up unused domain records ### Examples - Delete verification: Removes a domain verification request. ```yaml domainVerificationId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" ``` ### Parameters - `domain_verification_id: str` ### Returns - `object` ### Example ```python import os from gitpod import Gitpod client = Gitpod( bearer_token=os.environ.get("GITPOD_API_KEY"), # This is the default and can be omitted ) domain_verification = client.organizations.domain_verifications.delete( domain_verification_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) print(domain_verification) ``` #### Response ```json {} ``` ## ListDomainVerifications `organizations.domain_verifications.list(DomainVerificationListParams**kwargs) -> SyncDomainVerificationsPage[DomainVerification]` **post** `/gitpod.v1.OrganizationService/ListDomainVerifications` Lists and monitors domain verification status across an organization. Use this method to: - Track verification progress - View all verified domains - Monitor pending verifications - Audit domain settings ### Examples - List all verifications: Shows all domain verifications regardless of status. ```yaml organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" pagination: pageSize: 20 ``` - List with pagination: Retrieves next page of verifications. ```yaml organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" pagination: pageSize: 20 token: "next-page-token-from-previous-response" ``` ### Parameters - `organization_id: str` - `token: Optional[str]` - `page_size: Optional[int]` - `pagination: Optional[Pagination]` - `token: Optional[str]` Token for the next set of results that was returned as next_token of a PaginationResponse - `page_size: Optional[int]` Page size is the maximum number of results to retrieve per page. Defaults to 25. Maximum 100. ### Returns - `class DomainVerification: …` - `id: str` - `domain: str` - `organization_id: str` - `state: DomainVerificationState` - `"DOMAIN_VERIFICATION_STATE_UNSPECIFIED"` - `"DOMAIN_VERIFICATION_STATE_PENDING"` - `"DOMAIN_VERIFICATION_STATE_VERIFIED"` - `created_at: Optional[datetime]` A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by "Z") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`](http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime\(\)) to obtain a formatter capable of generating timestamps in this format. - `verification_token: Optional[str]` - `verified_at: Optional[datetime]` A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by "Z") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`](http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime\(\)) to obtain a formatter capable of generating timestamps in this format. ### Example ```python import os from gitpod import Gitpod client = Gitpod( bearer_token=os.environ.get("GITPOD_API_KEY"), # This is the default and can be omitted ) page = client.organizations.domain_verifications.list( organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", pagination={ "page_size": 20 }, ) page = page.domain_verifications[0] print(page.id) ``` #### Response ```json { "pagination": { "nextToken": "nextToken" }, "domainVerifications": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "domain": "xxxx", "organizationId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "state": "DOMAIN_VERIFICATION_STATE_UNSPECIFIED", "createdAt": "2019-12-27T18:11:19.117Z", "verificationToken": "verificationToken", "verifiedAt": "2019-12-27T18:11:19.117Z" } ] } ``` ## GetDomainVerification `organizations.domain_verifications.retrieve(DomainVerificationRetrieveParams**kwargs) -> DomainVerificationRetrieveResponse` **post** `/gitpod.v1.OrganizationService/GetDomainVerification` Retrieves the status of a domain verification request. Use this method to: - Check verification progress - View verification requirements - Monitor domain status ### Examples - Get verification status: Checks the current state of a domain verification. ```yaml domainVerificationId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" ``` ### Parameters - `domain_verification_id: str` ### Returns - `class DomainVerificationRetrieveResponse: …` - `domain_verification: DomainVerification` - `id: str` - `domain: str` - `organization_id: str` - `state: DomainVerificationState` - `"DOMAIN_VERIFICATION_STATE_UNSPECIFIED"` - `"DOMAIN_VERIFICATION_STATE_PENDING"` - `"DOMAIN_VERIFICATION_STATE_VERIFIED"` - `created_at: Optional[datetime]` A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by "Z") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`](http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime\(\)) to obtain a formatter capable of generating timestamps in this format. - `verification_token: Optional[str]` - `verified_at: Optional[datetime]` A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by "Z") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`](http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime\(\)) to obtain a formatter capable of generating timestamps in this format. ### Example ```python import os from gitpod import Gitpod client = Gitpod( bearer_token=os.environ.get("GITPOD_API_KEY"), # This is the default and can be omitted ) domain_verification = client.organizations.domain_verifications.retrieve( domain_verification_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) print(domain_verification.domain_verification) ``` #### Response ```json { "domainVerification": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "domain": "xxxx", "organizationId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "state": "DOMAIN_VERIFICATION_STATE_UNSPECIFIED", "createdAt": "2019-12-27T18:11:19.117Z", "verificationToken": "verificationToken", "verifiedAt": "2019-12-27T18:11:19.117Z" } } ``` ## VerifyDomain `organizations.domain_verifications.verify(DomainVerificationVerifyParams**kwargs) -> DomainVerificationVerifyResponse` **post** `/gitpod.v1.OrganizationService/VerifyDomain` Verifies domain ownership for an organization. Use this method to: - Complete domain verification process - Enable domain-based features - Validate DNS configuration ### Examples - Verify domain ownership: Verifies ownership after DNS records are configured. ```yaml domainVerificationId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" ``` ### Parameters - `domain_verification_id: str` ### Returns - `class DomainVerificationVerifyResponse: …` - `domain_verification: DomainVerification` - `id: str` - `domain: str` - `organization_id: str` - `state: DomainVerificationState` - `"DOMAIN_VERIFICATION_STATE_UNSPECIFIED"` - `"DOMAIN_VERIFICATION_STATE_PENDING"` - `"DOMAIN_VERIFICATION_STATE_VERIFIED"` - `created_at: Optional[datetime]` A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by "Z") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`](http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime\(\)) to obtain a formatter capable of generating timestamps in this format. - `verification_token: Optional[str]` - `verified_at: Optional[datetime]` A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by "Z") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`](http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime\(\)) to obtain a formatter capable of generating timestamps in this format. ### Example ```python import os from gitpod import Gitpod client = Gitpod( bearer_token=os.environ.get("GITPOD_API_KEY"), # This is the default and can be omitted ) response = client.organizations.domain_verifications.verify( domain_verification_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) print(response.domain_verification) ``` #### Response ```json { "domainVerification": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "domain": "xxxx", "organizationId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "state": "DOMAIN_VERIFICATION_STATE_UNSPECIFIED", "createdAt": "2019-12-27T18:11:19.117Z", "verificationToken": "verificationToken", "verifiedAt": "2019-12-27T18:11:19.117Z" } } ``` ## Domain Types ### Domain Verification - `class DomainVerification: …` - `id: str` - `domain: str` - `organization_id: str` - `state: DomainVerificationState` - `"DOMAIN_VERIFICATION_STATE_UNSPECIFIED"` - `"DOMAIN_VERIFICATION_STATE_PENDING"` - `"DOMAIN_VERIFICATION_STATE_VERIFIED"` - `created_at: Optional[datetime]` A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by "Z") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`](http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime\(\)) to obtain a formatter capable of generating timestamps in this format. - `verification_token: Optional[str]` - `verified_at: Optional[datetime]` A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by "Z") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`](http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime\(\)) to obtain a formatter capable of generating timestamps in this format. ### Domain Verification State - `Literal["DOMAIN_VERIFICATION_STATE_UNSPECIFIED", "DOMAIN_VERIFICATION_STATE_PENDING", "DOMAIN_VERIFICATION_STATE_VERIFIED"]` - `"DOMAIN_VERIFICATION_STATE_UNSPECIFIED"` - `"DOMAIN_VERIFICATION_STATE_PENDING"` - `"DOMAIN_VERIFICATION_STATE_VERIFIED"` ### Domain Verification Create Response - `class DomainVerificationCreateResponse: …` - `domain_verification: DomainVerification` - `id: str` - `domain: str` - `organization_id: str` - `state: DomainVerificationState` - `"DOMAIN_VERIFICATION_STATE_UNSPECIFIED"` - `"DOMAIN_VERIFICATION_STATE_PENDING"` - `"DOMAIN_VERIFICATION_STATE_VERIFIED"` - `created_at: Optional[datetime]` A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by "Z") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`](http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime\(\)) to obtain a formatter capable of generating timestamps in this format. - `verification_token: Optional[str]` - `verified_at: Optional[datetime]` A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by "Z") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`](http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime\(\)) to obtain a formatter capable of generating timestamps in this format. ### Domain Verification Retrieve Response - `class DomainVerificationRetrieveResponse: …` - `domain_verification: DomainVerification` - `id: str` - `domain: str` - `organization_id: str` - `state: DomainVerificationState` - `"DOMAIN_VERIFICATION_STATE_UNSPECIFIED"` - `"DOMAIN_VERIFICATION_STATE_PENDING"` - `"DOMAIN_VERIFICATION_STATE_VERIFIED"` - `created_at: Optional[datetime]` A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by "Z") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`](http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime\(\)) to obtain a formatter capable of generating timestamps in this format. - `verification_token: Optional[str]` - `verified_at: Optional[datetime]` A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by "Z") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`](http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime\(\)) to obtain a formatter capable of generating timestamps in this format. ### Domain Verification Verify Response - `class DomainVerificationVerifyResponse: …` - `domain_verification: DomainVerification` - `id: str` - `domain: str` - `organization_id: str` - `state: DomainVerificationState` - `"DOMAIN_VERIFICATION_STATE_UNSPECIFIED"` - `"DOMAIN_VERIFICATION_STATE_PENDING"` - `"DOMAIN_VERIFICATION_STATE_VERIFIED"` - `created_at: Optional[datetime]` A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by "Z") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`](http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime\(\)) to obtain a formatter capable of generating timestamps in this format. - `verification_token: Optional[str]` - `verified_at: Optional[datetime]` A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one. All minutes are 60 seconds long. Leap seconds are "smeared" so that no leap second table is needed for interpretation, using a [24-hour linear smear](https://developers.google.com/time/smear). The range is from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z. By restricting to that range, we ensure that we can convert to and from [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) date strings. # Examples Example 1: Compute Timestamp from POSIX `time()`. Timestamp timestamp; timestamp.set_seconds(time(NULL)); timestamp.set_nanos(0); Example 2: Compute Timestamp from POSIX `gettimeofday()`. struct timeval tv; gettimeofday(&tv, NULL); Timestamp timestamp; timestamp.set_seconds(tv.tv_sec); timestamp.set_nanos(tv.tv_usec * 1000); Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`. FILETIME ft; GetSystemTimeAsFileTime(&ft); UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime; // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z. Timestamp timestamp; timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL)); timestamp.set_nanos((INT32) ((ticks % 10000000) * 100)); Example 4: Compute Timestamp from Java `System.currentTimeMillis()`. long millis = System.currentTimeMillis(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000) .setNanos((int) ((millis % 1000) * 1000000)).build(); Example 5: Compute Timestamp from Java `Instant.now()`. Instant now = Instant.now(); Timestamp timestamp = Timestamp.newBuilder().setSeconds(now.getEpochSecond()) .setNanos(now.getNano()).build(); Example 6: Compute Timestamp from current time in Python. timestamp = Timestamp() timestamp.GetCurrentTime() # JSON Mapping In JSON format, the Timestamp type is encoded as a string in the [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) format. That is, the format is "{year}-{month}-{day}T{hour}:{min}:{sec}[.{frac_sec}]Z" where {year} is always expressed using four digits while {month}, {day}, {hour}, {min}, and {sec} are zero-padded to two digits each. The fractional seconds, which can go up to 9 digits (i.e. up to 1 nanosecond resolution), are optional. The "Z" suffix indicates the timezone ("UTC"); the timezone is required. A proto3 JSON serializer should always use UTC (as indicated by "Z") when printing the Timestamp type and a proto3 JSON parser should be able to accept both UTC and other timezones (as indicated by an offset). For example, "2017-01-15T01:30:15.01Z" encodes 15.01 seconds past 01:30 UTC on January 15, 2017. In JavaScript, one can convert a Date object to this format using the standard [toISOString()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toISOString) method. In Python, a standard `datetime.datetime` object can be converted to this format using [`strftime`](https://docs.python.org/2/library/time.html#time.strftime) with the time format spec '%Y-%m-%dT%H:%M:%S.%fZ'. Likewise, in Java, one can use the Joda Time's [`ISODateTimeFormat.dateTime()`](http://joda-time.sourceforge.net/apidocs/org/joda/time/format/ISODateTimeFormat.html#dateTime\(\)) to obtain a formatter capable of generating timestamps in this format. # Invites ## CreateOrganizationInvite `organizations.invites.create(InviteCreateParams**kwargs) -> InviteCreateResponse` **post** `/gitpod.v1.OrganizationService/CreateOrganizationInvite` Creates an invite link for joining an organization. Any existing OrganizationInvites are invalidated and can no longer be used. Use this method to: - Generate shareable invite links - Manage team growth - Control organization access ### Examples - Create organization invite: Generates a new invite link for the organization. ```yaml organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" ``` ### Parameters - `organization_id: str` ### Returns - `class InviteCreateResponse: …` - `invite: OrganizationInvite` - `invite_id: str` invite_id is the unique identifier of the invite to join the organization. Use JoinOrganization with this ID to join the organization. ### Example ```python import os from gitpod import Gitpod client = Gitpod( bearer_token=os.environ.get("GITPOD_API_KEY"), # This is the default and can be omitted ) invite = client.organizations.invites.create( organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", ) print(invite.invite) ``` #### Response ```json { "invite": { "inviteId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } } ``` ## GetOrganizationInviteSummary `organizations.invites.get_summary(InviteGetSummaryParams**kwargs) -> InviteGetSummaryResponse` **post** `/gitpod.v1.OrganizationService/GetOrganizationInviteSummary` Retrieves organization details and membership info based on an invite link. Use this method to: - Preview organization details before joining - Validate invite link authenticity - Check organization size and activity - View team information before accepting ### Examples - Get invite summary: Retrieves organization information from an invite. ```yaml inviteId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" ``` ### Parameters - `invite_id: str` ### Returns - `class InviteGetSummaryResponse: …` - `organization_id: str` - `organization_member_count: Optional[int]` - `organization_name: Optional[str]` ### Example ```python import os from gitpod import Gitpod client = Gitpod( bearer_token=os.environ.get("GITPOD_API_KEY"), # This is the default and can be omitted ) response = client.organizations.invites.get_summary( invite_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) print(response.organization_id) ``` #### Response ```json { "organizationId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "organizationMemberCount": 0, "organizationName": "organizationName" } ``` ## GetOrganizationInvite `organizations.invites.retrieve(InviteRetrieveParams**kwargs) -> InviteRetrieveResponse` **post** `/gitpod.v1.OrganizationService/GetOrganizationInvite` GetOrganizationInvite ### Parameters - `organization_id: str` ### Returns - `class InviteRetrieveResponse: …` - `invite: OrganizationInvite` - `invite_id: str` invite_id is the unique identifier of the invite to join the organization. Use JoinOrganization with this ID to join the organization. ### Example ```python import os from gitpod import Gitpod client = Gitpod( bearer_token=os.environ.get("GITPOD_API_KEY"), # This is the default and can be omitted ) invite = client.organizations.invites.retrieve( organization_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", ) print(invite.invite) ``` #### Response ```json { "invite": { "inviteId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } } ``` ## Domain Types ### Organization Invite - `class OrganizationInvite: …` - `invite_id: str` invite_id is the unique identifier of the invite to join the organization. Use JoinOrganization with this ID to join the organization. ### Invite Create Response - `class InviteCreateResponse: …` - `invite: OrganizationInvite` - `invite_id: str` invite_id is the unique identifier of the invite to join the organization. Use JoinOrganization with this ID to join the organization. ### Invite Get Summary Response - `class InviteGetSummaryResponse: …` - `organization_id: str` - `organization_member_count: Optional[int]` - `organization_name: Optional[str]` ### Invite Retrieve Response - `class InviteRetrieveResponse: …` - `invite: OrganizationInvite` - `invite_id: str` invite_id is the unique identifier of the invite to join the organization. Use JoinOrganization with this ID to join the organization. # Policies ## GetOrganizationPolicies `organizations.policies.retrieve(PolicyRetrieveParams**kwargs) -> PolicyRetrieveResponse` **post** `/gitpod.v1.OrganizationService/GetOrganizationPolicies` 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. ```yaml organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" ``` ### Parameters - `organization_id: str` organization_id is the ID of the organization to retrieve policies for ### Returns - `class PolicyRetrieveResponse: …` - `policies: OrganizationPolicies` - `agent_policy: AgentPolicy` agent_policy contains agent-specific policy settings - `command_deny_list: List[str]` command_deny_list contains a list of commands that agents are not allowed to execute - `mcp_disabled: bool` mcp_disabled controls whether MCP (Model Context Protocol) is disabled for agents - `scm_tools_disabled: bool` scm_tools_disabled controls whether SCM (Source Control Management) tools are disabled for agents - `conversation_sharing_policy: Optional[ConversationSharingPolicy]` conversation_sharing_policy controls whether agent conversations can be shared - `"CONVERSATION_SHARING_POLICY_UNSPECIFIED"` - `"CONVERSATION_SHARING_POLICY_DISABLED"` - `"CONVERSATION_SHARING_POLICY_ORGANIZATION"` - `max_subagents_per_environment: Optional[int]` 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). - `scm_tools_allowed_group_id: Optional[str]` 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). - `allowed_editor_ids: List[str]` allowed_editor_ids is the list of editor IDs that are allowed to be used in the organization - `allow_local_runners: bool` allow_local_runners controls whether local runners are allowed to be used in the organization - `default_editor_id: str` default_editor_id is the default editor ID to be used when a user doesn't specify one - `default_environment_image: str` default_environment_image is the default container image when none is defined in repo - `maximum_environments_per_user: str` maximum_environments_per_user limits total environments (running or stopped) per user - `maximum_running_environments_per_user: str` maximum_running_environments_per_user limits simultaneously running environments per user - `members_create_projects: bool` members_create_projects controls whether members can create projects - `members_require_projects: bool` members_require_projects controls whether environments can only be created from projects by non-admin users - `organization_id: str` organization_id is the ID of the organization - `port_sharing_disabled: bool` 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. - `require_custom_domain_access: bool` 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. - `restrict_account_creation_to_scim: bool` 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. - `delete_archived_environments_after: Optional[str]` 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). - `editor_version_restrictions: Optional[Dict[str, EditorVersionRestrictions]]` 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 - `allowed_versions: Optional[List[str]]` 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"]` - `maximum_environment_lifetime: Optional[str]` 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). - `maximum_environment_timeout: Optional[str]` maximum_environment_timeout controls the maximum timeout allowed for environments in seconds. 0 means no limit (never). Minimum duration is 30 minutes (1800 seconds). value must be 0s (no limit) or at least 1800s (30 minutes): ``` this == duration('0s') || this >= duration('1800s') ``` - `security_agent_policy: Optional[SecurityAgentPolicy]` security_agent_policy contains security agent configuration for the organization. When configured, security agents are automatically deployed to all environments. - `crowdstrike: Optional[CrowdStrikeConfig]` crowdstrike contains CrowdStrike Falcon configuration - `additional_options: Optional[Dict[str, str]]` additional_options contains additional FALCONCTL_OPT_* options as key-value pairs. Keys should NOT include the FALCONCTL_OPT_ prefix. - `cid_secret_id: Optional[str]` cid_secret_id references an organization secret containing the Customer ID (CID). - `enabled: Optional[bool]` enabled controls whether CrowdStrike Falcon is deployed to environments - `image: Optional[str]` image is the CrowdStrike Falcon sensor container image reference - `tags: Optional[str]` tags are optional tags to apply to the Falcon sensor (comma-separated) - `veto_exec_policy: Optional[VetoExecPolicy]` veto_exec_policy contains the veto exec policy for environments. - `action: Optional[KernelControlsAction]` action specifies what action kernel-level controls take on policy violations - `"KERNEL_CONTROLS_ACTION_UNSPECIFIED"` - `"KERNEL_CONTROLS_ACTION_BLOCK"` - `"KERNEL_CONTROLS_ACTION_AUDIT"` - `enabled: Optional[bool]` enabled controls whether executable blocking is active - `executables: Optional[List[str]]` executables is the list of executable paths or names to block ### Example ```python import os from gitpod import Gitpod client = Gitpod( bearer_token=os.environ.get("GITPOD_API_KEY"), # This is the default and can be omitted ) policy = client.organizations.policies.retrieve( organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", ) print(policy.policies) ``` #### Response ```json { "policies": { "agentPolicy": { "commandDenyList": [ "string" ], "mcpDisabled": true, "scmToolsDisabled": true, "conversationSharingPolicy": "CONVERSATION_SHARING_POLICY_UNSPECIFIED", "maxSubagentsPerEnvironment": 10, "scmToolsAllowedGroupId": "scmToolsAllowedGroupId" }, "allowedEditorIds": [ "string" ], "allowLocalRunners": true, "defaultEditorId": "defaultEditorId", "defaultEnvironmentImage": "defaultEnvironmentImage", "maximumEnvironmentsPerUser": "maximumEnvironmentsPerUser", "maximumRunningEnvironmentsPerUser": "maximumRunningEnvironmentsPerUser", "membersCreateProjects": true, "membersRequireProjects": true, "organizationId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "portSharingDisabled": true, "requireCustomDomainAccess": true, "restrictAccountCreationToScim": true, "deleteArchivedEnvironmentsAfter": "+9125115.360s", "editorVersionRestrictions": { "foo": { "allowedVersions": [ "string" ] } }, "maximumEnvironmentLifetime": "+9125115.360s", "maximumEnvironmentLifetimeStrict": true, "maximumEnvironmentTimeout": "+9125115.360s", "securityAgentPolicy": { "crowdstrike": { "additionalOptions": { "foo": "string" }, "cidSecretId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "enabled": true, "image": "image", "tags": "tags" }, "customAgents": [ { "id": "id", "description": "description", "enabled": true, "envMappings": [ { "name": "name", "secretName": "secretName" } ], "name": "name", "startCommand": "startCommand" } ] }, "vetoExecPolicy": { "action": "KERNEL_CONTROLS_ACTION_UNSPECIFIED", "enabled": true, "executables": [ "string" ], "safelist": [ "string" ] } } } ``` ## UpdateOrganizationPolicies `organizations.policies.update(PolicyUpdateParams**kwargs) -> object` **post** `/gitpod.v1.OrganizationService/UpdateOrganizationPolicies` Updates organization policy settings. Use this method to: - Configure editor restrictions - Set environment resource limits - Define project creation permissions - Customize default configurations ### Examples - Update editor policies: Restricts available editors and sets a default. ```yaml organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" allowedEditorIds: - "vscode" - "jetbrains" defaultEditorId: "vscode" ``` - Set environment limits: Configures limits for environment usage. ```yaml organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" maximumEnvironmentTimeout: "3600s" maximumRunningEnvironmentsPerUser: "5" maximumEnvironmentsPerUser: "20" ``` ### Parameters - `organization_id: str` organization_id is the ID of the organization to update policies for - `agent_policy: Optional[AgentPolicy]` agent_policy contains agent-specific policy settings - `command_deny_list: Optional[Sequence[str]]` command_deny_list contains a list of commands that agents are not allowed to execute - `conversation_sharing_policy: Optional[ConversationSharingPolicy]` conversation_sharing_policy controls whether agent conversations can be shared - `"CONVERSATION_SHARING_POLICY_UNSPECIFIED"` - `"CONVERSATION_SHARING_POLICY_DISABLED"` - `"CONVERSATION_SHARING_POLICY_ORGANIZATION"` - `max_subagents_per_environment: Optional[int]` 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). - `mcp_disabled: Optional[bool]` mcp_disabled controls whether MCP (Model Context Protocol) is disabled for agents - `scm_tools_allowed_group_id: Optional[str]` 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). - `scm_tools_disabled: Optional[bool]` scm_tools_disabled controls whether SCM (Source Control Management) tools are disabled for agents - `allowed_editor_ids: Optional[Sequence[str]]` allowed_editor_ids is the list of editor IDs that are allowed to be used in the organization - `allow_local_runners: Optional[bool]` allow_local_runners controls whether local runners are allowed to be used in the organization - `default_editor_id: Optional[str]` default_editor_id is the default editor ID to be used when a user doesn't specify one - `default_environment_image: Optional[str]` default_environment_image is the default container image when none is defined in repo - `delete_archived_environments_after: Optional[str]` 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). - `editor_version_restrictions: Optional[Dict[str, EditorVersionRestrictions]]` editor_version_restrictions restricts which editor versions can be used. Maps editor ID to version policy with allowed major versions. - `allowed_versions: Optional[Sequence[str]]` 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"]` - `maximum_environment_lifetime: Optional[str]` 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). - `maximum_environments_per_user: Optional[str]` maximum_environments_per_user limits total environments (running or stopped) per user - `maximum_environment_timeout: Optional[str]` maximum_environment_timeout controls the maximum timeout allowed for environments in seconds. 0 means no limit (never). Minimum duration is 30 minutes (1800 seconds). value must be 0s (no limit) or at least 1800s (30 minutes): ``` this == duration('0s') || this >= duration('1800s') ``` - `maximum_running_environments_per_user: Optional[str]` maximum_running_environments_per_user limits simultaneously running environments per user - `members_create_projects: Optional[bool]` members_create_projects controls whether members can create projects - `members_require_projects: Optional[bool]` members_require_projects controls whether environments can only be created from projects by non-admin users - `port_sharing_disabled: Optional[bool]` 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. - `require_custom_domain_access: Optional[bool]` 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. - `restrict_account_creation_to_scim: Optional[bool]` 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. - `security_agent_policy: Optional[SecurityAgentPolicy]` security_agent_policy contains security agent configuration updates - `crowdstrike: Optional[SecurityAgentPolicyCrowdstrike]` crowdstrike contains CrowdStrike Falcon configuration updates - `additional_options: Optional[Dict[str, str]]` additional_options contains additional FALCONCTL_OPT_* options as key-value pairs - `cid_secret_id: Optional[str]` cid_secret_id references an organization secret containing the Customer ID (CID) - `enabled: Optional[bool]` enabled controls whether CrowdStrike Falcon is deployed to environments - `image: Optional[str]` image is the CrowdStrike Falcon sensor container image reference - `tags: Optional[str]` tags are optional tags to apply to the Falcon sensor - `veto_exec_policy: Optional[VetoExecPolicyParam]` veto_exec_policy contains the veto exec policy for environments. - `action: Optional[KernelControlsAction]` action specifies what action kernel-level controls take on policy violations - `"KERNEL_CONTROLS_ACTION_UNSPECIFIED"` - `"KERNEL_CONTROLS_ACTION_BLOCK"` - `"KERNEL_CONTROLS_ACTION_AUDIT"` - `enabled: Optional[bool]` enabled controls whether executable blocking is active - `executables: Optional[List[str]]` executables is the list of executable paths or names to block ### Returns - `object` ### Example ```python import os from gitpod import Gitpod client = Gitpod( bearer_token=os.environ.get("GITPOD_API_KEY"), # This is the default and can be omitted ) policy = client.organizations.policies.update( organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", maximum_environments_per_user="20", maximum_environment_timeout="3600s", maximum_running_environments_per_user="5", ) print(policy) ``` #### Response ```json {} ``` ## Domain Types ### Agent Policy - `class AgentPolicy: …` AgentPolicy contains agent-specific policy settings for an organization - `command_deny_list: List[str]` command_deny_list contains a list of commands that agents are not allowed to execute - `mcp_disabled: bool` mcp_disabled controls whether MCP (Model Context Protocol) is disabled for agents - `scm_tools_disabled: bool` scm_tools_disabled controls whether SCM (Source Control Management) tools are disabled for agents - `conversation_sharing_policy: Optional[ConversationSharingPolicy]` conversation_sharing_policy controls whether agent conversations can be shared - `"CONVERSATION_SHARING_POLICY_UNSPECIFIED"` - `"CONVERSATION_SHARING_POLICY_DISABLED"` - `"CONVERSATION_SHARING_POLICY_ORGANIZATION"` - `max_subagents_per_environment: Optional[int]` 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). - `scm_tools_allowed_group_id: Optional[str]` 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). ### Conversation Sharing Policy - `Literal["CONVERSATION_SHARING_POLICY_UNSPECIFIED", "CONVERSATION_SHARING_POLICY_DISABLED", "CONVERSATION_SHARING_POLICY_ORGANIZATION"]` ConversationSharingPolicy controls how agent conversations can be shared. - `"CONVERSATION_SHARING_POLICY_UNSPECIFIED"` - `"CONVERSATION_SHARING_POLICY_DISABLED"` - `"CONVERSATION_SHARING_POLICY_ORGANIZATION"` ### Crowd Strike Config - `class CrowdStrikeConfig: …` CrowdStrikeConfig configures CrowdStrike Falcon sensor deployment - `additional_options: Optional[Dict[str, str]]` additional_options contains additional FALCONCTL_OPT_* options as key-value pairs. Keys should NOT include the FALCONCTL_OPT_ prefix. - `cid_secret_id: Optional[str]` cid_secret_id references an organization secret containing the Customer ID (CID). - `enabled: Optional[bool]` enabled controls whether CrowdStrike Falcon is deployed to environments - `image: Optional[str]` image is the CrowdStrike Falcon sensor container image reference - `tags: Optional[str]` tags are optional tags to apply to the Falcon sensor (comma-separated) ### Custom Agent Env Mapping - `class CustomAgentEnvMapping: …` CustomAgentEnvMapping maps a script placeholder to an organization secret. The backend resolves the secret name to a UUID at runtime. - `name: Optional[str]` name is the environment variable name used as a placeholder in the start command. - `secret_name: Optional[str]` secret_name is the name of the organization secret whose value populates this placeholder. ### Custom Security Agent - `class CustomSecurityAgent: …` CustomSecurityAgent defines a custom security agent configured by an organization admin. - `id: Optional[str]` id is a unique identifier for this custom agent within the organization. Server-generated at save time if empty. - `description: Optional[str]` description is a human-readable description of what this agent does - `enabled: Optional[bool]` enabled controls whether this custom agent is deployed to environments - `env_mappings: Optional[List[CustomAgentEnvMapping]]` env_mappings maps script placeholders to organization secret names, resolved to secret values at runtime. - `name: Optional[str]` name is the environment variable name used as a placeholder in the start command. - `secret_name: Optional[str]` secret_name is the name of the organization secret whose value populates this placeholder. - `name: Optional[str]` name is the display name for this custom agent - `start_command: Optional[str]` start_command is the shell script that starts the agent ### Kernel Controls Action - `Literal["KERNEL_CONTROLS_ACTION_UNSPECIFIED", "KERNEL_CONTROLS_ACTION_BLOCK", "KERNEL_CONTROLS_ACTION_AUDIT"]` KernelControlsAction defines how a kernel-level policy violation is handled. - `"KERNEL_CONTROLS_ACTION_UNSPECIFIED"` - `"KERNEL_CONTROLS_ACTION_BLOCK"` - `"KERNEL_CONTROLS_ACTION_AUDIT"` ### Organization Policies - `class OrganizationPolicies: …` - `agent_policy: AgentPolicy` agent_policy contains agent-specific policy settings - `command_deny_list: List[str]` command_deny_list contains a list of commands that agents are not allowed to execute - `mcp_disabled: bool` mcp_disabled controls whether MCP (Model Context Protocol) is disabled for agents - `scm_tools_disabled: bool` scm_tools_disabled controls whether SCM (Source Control Management) tools are disabled for agents - `conversation_sharing_policy: Optional[ConversationSharingPolicy]` conversation_sharing_policy controls whether agent conversations can be shared - `"CONVERSATION_SHARING_POLICY_UNSPECIFIED"` - `"CONVERSATION_SHARING_POLICY_DISABLED"` - `"CONVERSATION_SHARING_POLICY_ORGANIZATION"` - `max_subagents_per_environment: Optional[int]` 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). - `scm_tools_allowed_group_id: Optional[str]` 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). - `allowed_editor_ids: List[str]` allowed_editor_ids is the list of editor IDs that are allowed to be used in the organization - `allow_local_runners: bool` allow_local_runners controls whether local runners are allowed to be used in the organization - `default_editor_id: str` default_editor_id is the default editor ID to be used when a user doesn't specify one - `default_environment_image: str` default_environment_image is the default container image when none is defined in repo - `maximum_environments_per_user: str` maximum_environments_per_user limits total environments (running or stopped) per user - `maximum_running_environments_per_user: str` maximum_running_environments_per_user limits simultaneously running environments per user - `members_create_projects: bool` members_create_projects controls whether members can create projects - `members_require_projects: bool` members_require_projects controls whether environments can only be created from projects by non-admin users - `organization_id: str` organization_id is the ID of the organization - `port_sharing_disabled: bool` 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. - `require_custom_domain_access: bool` 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. - `restrict_account_creation_to_scim: bool` 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. - `delete_archived_environments_after: Optional[str]` 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). - `editor_version_restrictions: Optional[Dict[str, EditorVersionRestrictions]]` 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 - `allowed_versions: Optional[List[str]]` 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"]` - `maximum_environment_lifetime: Optional[str]` 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). - `maximum_environment_timeout: Optional[str]` maximum_environment_timeout controls the maximum timeout allowed for environments in seconds. 0 means no limit (never). Minimum duration is 30 minutes (1800 seconds). value must be 0s (no limit) or at least 1800s (30 minutes): ``` this == duration('0s') || this >= duration('1800s') ``` - `security_agent_policy: Optional[SecurityAgentPolicy]` security_agent_policy contains security agent configuration for the organization. When configured, security agents are automatically deployed to all environments. - `crowdstrike: Optional[CrowdStrikeConfig]` crowdstrike contains CrowdStrike Falcon configuration - `additional_options: Optional[Dict[str, str]]` additional_options contains additional FALCONCTL_OPT_* options as key-value pairs. Keys should NOT include the FALCONCTL_OPT_ prefix. - `cid_secret_id: Optional[str]` cid_secret_id references an organization secret containing the Customer ID (CID). - `enabled: Optional[bool]` enabled controls whether CrowdStrike Falcon is deployed to environments - `image: Optional[str]` image is the CrowdStrike Falcon sensor container image reference - `tags: Optional[str]` tags are optional tags to apply to the Falcon sensor (comma-separated) - `veto_exec_policy: Optional[VetoExecPolicy]` veto_exec_policy contains the veto exec policy for environments. - `action: Optional[KernelControlsAction]` action specifies what action kernel-level controls take on policy violations - `"KERNEL_CONTROLS_ACTION_UNSPECIFIED"` - `"KERNEL_CONTROLS_ACTION_BLOCK"` - `"KERNEL_CONTROLS_ACTION_AUDIT"` - `enabled: Optional[bool]` enabled controls whether executable blocking is active - `executables: Optional[List[str]]` executables is the list of executable paths or names to block ### Security Agent Policy - `class SecurityAgentPolicy: …` SecurityAgentPolicy contains security agent configuration for an organization. When enabled, security agents are automatically deployed to all environments. - `crowdstrike: Optional[CrowdStrikeConfig]` crowdstrike contains CrowdStrike Falcon configuration - `additional_options: Optional[Dict[str, str]]` additional_options contains additional FALCONCTL_OPT_* options as key-value pairs. Keys should NOT include the FALCONCTL_OPT_ prefix. - `cid_secret_id: Optional[str]` cid_secret_id references an organization secret containing the Customer ID (CID). - `enabled: Optional[bool]` enabled controls whether CrowdStrike Falcon is deployed to environments - `image: Optional[str]` image is the CrowdStrike Falcon sensor container image reference - `tags: Optional[str]` tags are optional tags to apply to the Falcon sensor (comma-separated) ### Veto Exec Policy - `class VetoExecPolicy: …` VetoExecPolicy defines the policy for blocking or auditing executable execution in environments. - `action: Optional[KernelControlsAction]` action specifies what action kernel-level controls take on policy violations - `"KERNEL_CONTROLS_ACTION_UNSPECIFIED"` - `"KERNEL_CONTROLS_ACTION_BLOCK"` - `"KERNEL_CONTROLS_ACTION_AUDIT"` - `enabled: Optional[bool]` enabled controls whether executable blocking is active - `executables: Optional[List[str]]` executables is the list of executable paths or names to block ### Policy Retrieve Response - `class PolicyRetrieveResponse: …` - `policies: OrganizationPolicies` - `agent_policy: AgentPolicy` agent_policy contains agent-specific policy settings - `command_deny_list: List[str]` command_deny_list contains a list of commands that agents are not allowed to execute - `mcp_disabled: bool` mcp_disabled controls whether MCP (Model Context Protocol) is disabled for agents - `scm_tools_disabled: bool` scm_tools_disabled controls whether SCM (Source Control Management) tools are disabled for agents - `conversation_sharing_policy: Optional[ConversationSharingPolicy]` conversation_sharing_policy controls whether agent conversations can be shared - `"CONVERSATION_SHARING_POLICY_UNSPECIFIED"` - `"CONVERSATION_SHARING_POLICY_DISABLED"` - `"CONVERSATION_SHARING_POLICY_ORGANIZATION"` - `max_subagents_per_environment: Optional[int]` 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). - `scm_tools_allowed_group_id: Optional[str]` 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). - `allowed_editor_ids: List[str]` allowed_editor_ids is the list of editor IDs that are allowed to be used in the organization - `allow_local_runners: bool` allow_local_runners controls whether local runners are allowed to be used in the organization - `default_editor_id: str` default_editor_id is the default editor ID to be used when a user doesn't specify one - `default_environment_image: str` default_environment_image is the default container image when none is defined in repo - `maximum_environments_per_user: str` maximum_environments_per_user limits total environments (running or stopped) per user - `maximum_running_environments_per_user: str` maximum_running_environments_per_user limits simultaneously running environments per user - `members_create_projects: bool` members_create_projects controls whether members can create projects - `members_require_projects: bool` members_require_projects controls whether environments can only be created from projects by non-admin users - `organization_id: str` organization_id is the ID of the organization - `port_sharing_disabled: bool` 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. - `require_custom_domain_access: bool` 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. - `restrict_account_creation_to_scim: bool` 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. - `delete_archived_environments_after: Optional[str]` 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). - `editor_version_restrictions: Optional[Dict[str, EditorVersionRestrictions]]` 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 - `allowed_versions: Optional[List[str]]` 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"]` - `maximum_environment_lifetime: Optional[str]` 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). - `maximum_environment_timeout: Optional[str]` maximum_environment_timeout controls the maximum timeout allowed for environments in seconds. 0 means no limit (never). Minimum duration is 30 minutes (1800 seconds). value must be 0s (no limit) or at least 1800s (30 minutes): ``` this == duration('0s') || this >= duration('1800s') ``` - `security_agent_policy: Optional[SecurityAgentPolicy]` security_agent_policy contains security agent configuration for the organization. When configured, security agents are automatically deployed to all environments. - `crowdstrike: Optional[CrowdStrikeConfig]` crowdstrike contains CrowdStrike Falcon configuration - `additional_options: Optional[Dict[str, str]]` additional_options contains additional FALCONCTL_OPT_* options as key-value pairs. Keys should NOT include the FALCONCTL_OPT_ prefix. - `cid_secret_id: Optional[str]` cid_secret_id references an organization secret containing the Customer ID (CID). - `enabled: Optional[bool]` enabled controls whether CrowdStrike Falcon is deployed to environments - `image: Optional[str]` image is the CrowdStrike Falcon sensor container image reference - `tags: Optional[str]` tags are optional tags to apply to the Falcon sensor (comma-separated) - `veto_exec_policy: Optional[VetoExecPolicy]` veto_exec_policy contains the veto exec policy for environments. - `action: Optional[KernelControlsAction]` action specifies what action kernel-level controls take on policy violations - `"KERNEL_CONTROLS_ACTION_UNSPECIFIED"` - `"KERNEL_CONTROLS_ACTION_BLOCK"` - `"KERNEL_CONTROLS_ACTION_AUDIT"` - `enabled: Optional[bool]` enabled controls whether executable blocking is active - `executables: Optional[List[str]]` executables is the list of executable paths or names to block # Scim Configurations ## CreateSCIMConfiguration `organizations.scim_configurations.create(ScimConfigurationCreateParams**kwargs) -> ScimConfigurationCreateResponse` **post** `/gitpod.v1.OrganizationService/CreateSCIMConfiguration` Creates a new SCIM configuration for automated user provisioning. Use this method to: - Set up SCIM 2.0 provisioning from an identity provider - Generate a bearer token for SCIM API authentication - Link SCIM provisioning to an existing SSO configuration ### Examples - Create basic SCIM configuration: Creates a SCIM configuration linked to an SSO provider with default 1 year token expiration. ```yaml organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" ssoConfigurationId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" ``` - Create SCIM configuration with custom token expiration: Creates a SCIM configuration with a 90-day token expiration. ```yaml organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" ssoConfigurationId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" tokenExpiresIn: "7776000s" ``` ### Parameters - `organization_id: str` organization_id is the ID of the organization to create the SCIM configuration for - `sso_configuration_id: str` sso_configuration_id is the SSO configuration to link (required for user provisioning) - `name: Optional[str]` name is a human-readable name for the SCIM configuration - `token_expires_in: Optional[str]` token_expires_in is the duration until the token expires. Defaults to 1 year. Minimum 1 day, maximum 2 years. ### Returns - `class ScimConfigurationCreateResponse: …` - `token: str` token is the bearer token for SCIM API authentication. This is only returned once during creation - store it securely. - `scim_configuration: ScimConfiguration` scim_configuration is the created SCIM configuration - `id: str` id is the unique identifier of the SCIM configuration - `created_at: datetime` created_at is when the SCIM configuration was created - `organization_id: str` organization_id is the ID of the organization this SCIM configuration belongs to - `token_expires_at: datetime` token_expires_at is when the current SCIM token expires - `updated_at: datetime` updated_at is when the SCIM configuration was last updated - `enabled: Optional[bool]` enabled indicates if SCIM provisioning is active - `name: Optional[str]` name is a human-readable name for the SCIM configuration - `sso_configuration_id: Optional[str]` sso_configuration_id is the linked SSO configuration (optional) - `token_expires_at: datetime` token_expires_at is when the token will expire ### Example ```python import os from gitpod import Gitpod client = Gitpod( bearer_token=os.environ.get("GITPOD_API_KEY"), # This is the default and can be omitted ) scim_configuration = client.organizations.scim_configurations.create( organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", sso_configuration_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) print(scim_configuration.token) ``` #### Response ```json { "token": "token", "scimConfiguration": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "createdAt": "2019-12-27T18:11:19.117Z", "organizationId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "tokenExpiresAt": "2019-12-27T18:11:19.117Z", "updatedAt": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "ssoConfigurationId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" }, "tokenExpiresAt": "2019-12-27T18:11:19.117Z" } ``` ## DeleteSCIMConfiguration `organizations.scim_configurations.delete(ScimConfigurationDeleteParams**kwargs) -> object` **post** `/gitpod.v1.OrganizationService/DeleteSCIMConfiguration` Removes a SCIM configuration from an organization. Use this method to: - Disable SCIM provisioning completely - Remove unused configurations - Clean up after migration ### Examples - Delete SCIM configuration: Removes a specific SCIM configuration. ```yaml scimConfigurationId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" ``` ### Parameters - `scim_configuration_id: str` scim_configuration_id is the ID of the SCIM configuration to delete ### Returns - `object` ### Example ```python import os from gitpod import Gitpod client = Gitpod( bearer_token=os.environ.get("GITPOD_API_KEY"), # This is the default and can be omitted ) scim_configuration = client.organizations.scim_configurations.delete( scim_configuration_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) print(scim_configuration) ``` #### Response ```json {} ``` ## ListSCIMConfigurations `organizations.scim_configurations.list(ScimConfigurationListParams**kwargs) -> SyncScimConfigurationsPage[ScimConfiguration]` **post** `/gitpod.v1.OrganizationService/ListSCIMConfigurations` Lists SCIM configurations for an organization. Use this method to: - View all SCIM configurations - Monitor provisioning status - Audit SCIM settings ### Examples - List SCIM configurations: Shows all SCIM configurations for an organization. ```yaml pagination: pageSize: 20 ``` ### Parameters - `token: Optional[str]` - `page_size: Optional[int]` - `pagination: Optional[Pagination]` - `token: Optional[str]` Token for the next set of results that was returned as next_token of a PaginationResponse - `page_size: Optional[int]` Page size is the maximum number of results to retrieve per page. Defaults to 25. Maximum 100. ### Returns - `class ScimConfiguration: …` SCIMConfiguration represents a SCIM 2.0 provisioning configuration - `id: str` id is the unique identifier of the SCIM configuration - `created_at: datetime` created_at is when the SCIM configuration was created - `organization_id: str` organization_id is the ID of the organization this SCIM configuration belongs to - `token_expires_at: datetime` token_expires_at is when the current SCIM token expires - `updated_at: datetime` updated_at is when the SCIM configuration was last updated - `enabled: Optional[bool]` enabled indicates if SCIM provisioning is active - `name: Optional[str]` name is a human-readable name for the SCIM configuration - `sso_configuration_id: Optional[str]` sso_configuration_id is the linked SSO configuration (optional) ### Example ```python import os from gitpod import Gitpod client = Gitpod( bearer_token=os.environ.get("GITPOD_API_KEY"), # This is the default and can be omitted ) page = client.organizations.scim_configurations.list( pagination={ "page_size": 20 }, ) page = page.scim_configurations[0] print(page.id) ``` #### Response ```json { "pagination": { "nextToken": "nextToken" }, "scimConfigurations": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "createdAt": "2019-12-27T18:11:19.117Z", "organizationId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "tokenExpiresAt": "2019-12-27T18:11:19.117Z", "updatedAt": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "ssoConfigurationId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } ] } ``` ## RegenerateSCIMToken `organizations.scim_configurations.regenerate_token(ScimConfigurationRegenerateTokenParams**kwargs) -> ScimConfigurationRegenerateTokenResponse` **post** `/gitpod.v1.OrganizationService/RegenerateSCIMToken` Regenerates the bearer token for a SCIM configuration. Use this method to: - Rotate SCIM credentials - Recover from token compromise - Update IdP configuration ### Examples - Regenerate token: Creates a new bearer token with the same expiration duration as the previous token. ```yaml scimConfigurationId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" ``` - Regenerate token with new expiration: Creates a new bearer token with a custom 180-day expiration. ```yaml scimConfigurationId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" tokenExpiresIn: "15552000s" ``` ### Parameters - `scim_configuration_id: str` scim_configuration_id is the ID of the SCIM configuration to regenerate token for - `token_expires_in: Optional[str]` token_expires_in is the duration until the new token expires. If not specified, uses the same duration as the previous token. ### Returns - `class ScimConfigurationRegenerateTokenResponse: …` - `token: str` token is the new bearer token for SCIM API authentication. This invalidates the previous token - store it securely. - `token_expires_at: datetime` token_expires_at is when the new token will expire ### Example ```python import os from gitpod import Gitpod client = Gitpod( bearer_token=os.environ.get("GITPOD_API_KEY"), # This is the default and can be omitted ) response = client.organizations.scim_configurations.regenerate_token( scim_configuration_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) print(response.token) ``` #### Response ```json { "token": "token", "tokenExpiresAt": "2019-12-27T18:11:19.117Z" } ``` ## GetSCIMConfiguration `organizations.scim_configurations.retrieve(ScimConfigurationRetrieveParams**kwargs) -> ScimConfigurationRetrieveResponse` **post** `/gitpod.v1.OrganizationService/GetSCIMConfiguration` Retrieves a specific SCIM configuration. Use this method to: - View SCIM configuration details - Check if SCIM is enabled - Verify SSO linkage ### Examples - Get SCIM configuration: Retrieves details of a specific SCIM configuration. ```yaml scimConfigurationId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" ``` ### Parameters - `scim_configuration_id: str` scim_configuration_id is the ID of the SCIM configuration to get ### Returns - `class ScimConfigurationRetrieveResponse: …` - `scim_configuration: ScimConfiguration` scim_configuration is the SCIM configuration identified by the ID - `id: str` id is the unique identifier of the SCIM configuration - `created_at: datetime` created_at is when the SCIM configuration was created - `organization_id: str` organization_id is the ID of the organization this SCIM configuration belongs to - `token_expires_at: datetime` token_expires_at is when the current SCIM token expires - `updated_at: datetime` updated_at is when the SCIM configuration was last updated - `enabled: Optional[bool]` enabled indicates if SCIM provisioning is active - `name: Optional[str]` name is a human-readable name for the SCIM configuration - `sso_configuration_id: Optional[str]` sso_configuration_id is the linked SSO configuration (optional) ### Example ```python import os from gitpod import Gitpod client = Gitpod( bearer_token=os.environ.get("GITPOD_API_KEY"), # This is the default and can be omitted ) scim_configuration = client.organizations.scim_configurations.retrieve( scim_configuration_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) print(scim_configuration.scim_configuration) ``` #### Response ```json { "scimConfiguration": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "createdAt": "2019-12-27T18:11:19.117Z", "organizationId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "tokenExpiresAt": "2019-12-27T18:11:19.117Z", "updatedAt": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "ssoConfigurationId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } } ``` ## UpdateSCIMConfiguration `organizations.scim_configurations.update(ScimConfigurationUpdateParams**kwargs) -> ScimConfigurationUpdateResponse` **post** `/gitpod.v1.OrganizationService/UpdateSCIMConfiguration` Updates a SCIM configuration. Use this method to: - Enable or disable SCIM provisioning - Link or unlink SSO configuration - Update configuration name ### Examples - Disable SCIM: Disables SCIM provisioning. ```yaml scimConfigurationId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" enabled: false ``` - Link to SSO: Links SCIM configuration to an SSO provider. ```yaml scimConfigurationId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" ssoConfigurationId: "f53d2330-3795-4c5d-a1f3-453121af9c60" ``` ### Parameters - `scim_configuration_id: str` scim_configuration_id is the ID of the SCIM configuration to update - `enabled: Optional[bool]` enabled controls whether SCIM provisioning is active - `name: Optional[str]` name is a human-readable name for the SCIM configuration - `sso_configuration_id: Optional[str]` sso_configuration_id is the SSO configuration to link ### Returns - `class ScimConfigurationUpdateResponse: …` - `scim_configuration: ScimConfiguration` scim_configuration is the updated SCIM configuration - `id: str` id is the unique identifier of the SCIM configuration - `created_at: datetime` created_at is when the SCIM configuration was created - `organization_id: str` organization_id is the ID of the organization this SCIM configuration belongs to - `token_expires_at: datetime` token_expires_at is when the current SCIM token expires - `updated_at: datetime` updated_at is when the SCIM configuration was last updated - `enabled: Optional[bool]` enabled indicates if SCIM provisioning is active - `name: Optional[str]` name is a human-readable name for the SCIM configuration - `sso_configuration_id: Optional[str]` sso_configuration_id is the linked SSO configuration (optional) ### Example ```python import os from gitpod import Gitpod client = Gitpod( bearer_token=os.environ.get("GITPOD_API_KEY"), # This is the default and can be omitted ) scim_configuration = client.organizations.scim_configurations.update( scim_configuration_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", enabled=False, ) print(scim_configuration.scim_configuration) ``` #### Response ```json { "scimConfiguration": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "createdAt": "2019-12-27T18:11:19.117Z", "organizationId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "tokenExpiresAt": "2019-12-27T18:11:19.117Z", "updatedAt": "2019-12-27T18:11:19.117Z", "enabled": true, "name": "name", "ssoConfigurationId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e" } } ``` ## Domain Types ### Scim Configuration - `class ScimConfiguration: …` SCIMConfiguration represents a SCIM 2.0 provisioning configuration - `id: str` id is the unique identifier of the SCIM configuration - `created_at: datetime` created_at is when the SCIM configuration was created - `organization_id: str` organization_id is the ID of the organization this SCIM configuration belongs to - `token_expires_at: datetime` token_expires_at is when the current SCIM token expires - `updated_at: datetime` updated_at is when the SCIM configuration was last updated - `enabled: Optional[bool]` enabled indicates if SCIM provisioning is active - `name: Optional[str]` name is a human-readable name for the SCIM configuration - `sso_configuration_id: Optional[str]` sso_configuration_id is the linked SSO configuration (optional) ### Scim Configuration Create Response - `class ScimConfigurationCreateResponse: …` - `token: str` token is the bearer token for SCIM API authentication. This is only returned once during creation - store it securely. - `scim_configuration: ScimConfiguration` scim_configuration is the created SCIM configuration - `id: str` id is the unique identifier of the SCIM configuration - `created_at: datetime` created_at is when the SCIM configuration was created - `organization_id: str` organization_id is the ID of the organization this SCIM configuration belongs to - `token_expires_at: datetime` token_expires_at is when the current SCIM token expires - `updated_at: datetime` updated_at is when the SCIM configuration was last updated - `enabled: Optional[bool]` enabled indicates if SCIM provisioning is active - `name: Optional[str]` name is a human-readable name for the SCIM configuration - `sso_configuration_id: Optional[str]` sso_configuration_id is the linked SSO configuration (optional) - `token_expires_at: datetime` token_expires_at is when the token will expire ### Scim Configuration Regenerate Token Response - `class ScimConfigurationRegenerateTokenResponse: …` - `token: str` token is the new bearer token for SCIM API authentication. This invalidates the previous token - store it securely. - `token_expires_at: datetime` token_expires_at is when the new token will expire ### Scim Configuration Retrieve Response - `class ScimConfigurationRetrieveResponse: …` - `scim_configuration: ScimConfiguration` scim_configuration is the SCIM configuration identified by the ID - `id: str` id is the unique identifier of the SCIM configuration - `created_at: datetime` created_at is when the SCIM configuration was created - `organization_id: str` organization_id is the ID of the organization this SCIM configuration belongs to - `token_expires_at: datetime` token_expires_at is when the current SCIM token expires - `updated_at: datetime` updated_at is when the SCIM configuration was last updated - `enabled: Optional[bool]` enabled indicates if SCIM provisioning is active - `name: Optional[str]` name is a human-readable name for the SCIM configuration - `sso_configuration_id: Optional[str]` sso_configuration_id is the linked SSO configuration (optional) ### Scim Configuration Update Response - `class ScimConfigurationUpdateResponse: …` - `scim_configuration: ScimConfiguration` scim_configuration is the updated SCIM configuration - `id: str` id is the unique identifier of the SCIM configuration - `created_at: datetime` created_at is when the SCIM configuration was created - `organization_id: str` organization_id is the ID of the organization this SCIM configuration belongs to - `token_expires_at: datetime` token_expires_at is when the current SCIM token expires - `updated_at: datetime` updated_at is when the SCIM configuration was last updated - `enabled: Optional[bool]` enabled indicates if SCIM provisioning is active - `name: Optional[str]` name is a human-readable name for the SCIM configuration - `sso_configuration_id: Optional[str]` sso_configuration_id is the linked SSO configuration (optional) # SSO Configurations ## CreateSSOConfiguration `organizations.sso_configurations.create(SSOConfigurationCreateParams**kwargs) -> SSOConfigurationCreateResponse` **post** `/gitpod.v1.OrganizationService/CreateSSOConfiguration` Creates or updates SSO configuration for organizational authentication. Use this method to: - Configure OIDC-based SSO providers - Set up built-in providers (Google, GitHub, etc.) - Define custom identity providers - Manage authentication policies ### Examples - Configure built-in Google SSO: Sets up SSO using Google Workspace. ```yaml organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" clientId: "012345678-abcdefghijklmnopqrstuvwxyz.apps.googleusercontent.com" clientSecret: "GOCSPX-abcdefghijklmnopqrstuvwxyz123456" issuerUrl: "https://accounts.google.com" emailDomain: "acme-corp.com" ``` - Configure custom OIDC provider: Sets up SSO with a custom identity provider. ```yaml organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" clientId: "acme-corp-gitpod" clientSecret: "secret-token-value" issuerUrl: "https://sso.acme-corp.com" emailDomain: "acme-corp.com" ``` ### Parameters - `client_id: str` client_id is the client ID of the OIDC application set on the IdP - `client_secret: str` client_secret is the client secret of the OIDC application set on the IdP - `issuer_url: str` issuer_url is the URL of the IdP issuer - `organization_id: str` - `additional_scopes: Optional[Sequence[str]]` additional_scopes are extra OIDC scopes to request from the identity provider during sign-in. These are appended to the default scopes (openid, email, profile). - `claims_expression: Optional[str]` claims_expression is an optional CEL expression evaluated against OIDC token claims during login. When set, the expression must evaluate to true for the login to succeed. Example: `claims.email_verified && claims.email.endsWith("@example.com")` - `display_name: Optional[str]` - `email_domain: Optional[str]` email_domain is the domain that is allowed to sign in to the organization - `email_domains: Optional[Sequence[str]]` ### Returns - `class SSOConfigurationCreateResponse: …` - `sso_configuration: SSOConfiguration` sso_configuration is the created SSO configuration - `id: str` id is the unique identifier of the SSO configuration - `issuer_url: str` issuer_url is the URL of the IdP issuer - `organization_id: str` - `provider_type: ProviderType` provider_type defines the type of the SSO configuration - `"PROVIDER_TYPE_UNSPECIFIED"` - `"PROVIDER_TYPE_BUILTIN"` - `"PROVIDER_TYPE_CUSTOM"` - `state: SSOConfigurationState` state is the state of the SSO configuration - `"SSO_CONFIGURATION_STATE_UNSPECIFIED"` - `"SSO_CONFIGURATION_STATE_INACTIVE"` - `"SSO_CONFIGURATION_STATE_ACTIVE"` - `additional_scopes: Optional[List[str]]` additional_scopes are extra OIDC scopes requested from the identity provider during sign-in. - `claims: Optional[Dict[str, str]]` claims are key/value pairs that defines a mapping of claims issued by the IdP. - `claims_expression: Optional[str]` claims_expression is a CEL (Common Expression Language) expression evaluated against the OIDC token claims during login. When set, the expression must evaluate to true for the login to succeed. The expression has access to a `claims` variable containing all token claims as a map. Example: `claims.email_verified && claims.email.endsWith("@example.com")` - `client_id: Optional[str]` client_id is the client ID of the OIDC application set on the IdP - `display_name: Optional[str]` - `email_domain: Optional[str]` - `email_domains: Optional[List[str]]` ### Example ```python import os from gitpod import Gitpod client = Gitpod( bearer_token=os.environ.get("GITPOD_API_KEY"), # This is the default and can be omitted ) sso_configuration = client.organizations.sso_configurations.create( client_id="012345678-abcdefghijklmnopqrstuvwxyz.apps.googleusercontent.com", client_secret="GOCSPX-abcdefghijklmnopqrstuvwxyz123456", issuer_url="https://accounts.google.com", organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", email_domain="acme-corp.com", ) print(sso_configuration.sso_configuration) ``` #### Response ```json { "ssoConfiguration": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "issuerUrl": "issuerUrl", "organizationId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "providerType": "PROVIDER_TYPE_UNSPECIFIED", "state": "SSO_CONFIGURATION_STATE_UNSPECIFIED", "additionalScopes": [ "string" ], "claims": { "foo": "string" }, "claimsExpression": "claimsExpression", "clientId": "clientId", "displayName": "displayName", "emailDomain": "emailDomain", "emailDomains": [ "sfN2.l.iJR-BU.u9JV9.a.m.o2D-4b-Jd.0Z-kX.L.n.S.f.UKbxB" ] } } ``` ## DeleteSSOConfiguration `organizations.sso_configurations.delete(SSOConfigurationDeleteParams**kwargs) -> object` **post** `/gitpod.v1.OrganizationService/DeleteSSOConfiguration` Removes an SSO configuration from an organization. Use this method to: - Disable SSO authentication - Remove outdated providers - Clean up unused configurations ### Examples - Delete SSO configuration: Removes a specific SSO configuration. ```yaml ssoConfigurationId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" ``` ### Parameters - `sso_configuration_id: str` ### Returns - `object` ### Example ```python import os from gitpod import Gitpod client = Gitpod( bearer_token=os.environ.get("GITPOD_API_KEY"), # This is the default and can be omitted ) sso_configuration = client.organizations.sso_configurations.delete( sso_configuration_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) print(sso_configuration) ``` #### Response ```json {} ``` ## ListSSOConfigurations `organizations.sso_configurations.list(SSOConfigurationListParams**kwargs) -> SyncSSOConfigurationsPage[SSOConfiguration]` **post** `/gitpod.v1.OrganizationService/ListSSOConfigurations` Lists and filters SSO configurations for an organization. Use this method to: - View all SSO providers - Monitor authentication status - Audit security settings - Manage provider configurations ### Examples - List active configurations: Shows all active SSO providers. ```yaml organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" pagination: pageSize: 20 ``` - List by provider type: Shows custom SSO configurations. ```yaml organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" pagination: pageSize: 20 token: "next-page-token-from-previous-response" ``` ### Parameters - `organization_id: str` organization_id is the ID of the organization to list SSO configurations for. - `token: Optional[str]` - `page_size: Optional[int]` - `pagination: Optional[Pagination]` - `token: Optional[str]` Token for the next set of results that was returned as next_token of a PaginationResponse - `page_size: Optional[int]` Page size is the maximum number of results to retrieve per page. Defaults to 25. Maximum 100. ### Returns - `class SSOConfiguration: …` - `id: str` id is the unique identifier of the SSO configuration - `issuer_url: str` issuer_url is the URL of the IdP issuer - `organization_id: str` - `provider_type: ProviderType` provider_type defines the type of the SSO configuration - `"PROVIDER_TYPE_UNSPECIFIED"` - `"PROVIDER_TYPE_BUILTIN"` - `"PROVIDER_TYPE_CUSTOM"` - `state: SSOConfigurationState` state is the state of the SSO configuration - `"SSO_CONFIGURATION_STATE_UNSPECIFIED"` - `"SSO_CONFIGURATION_STATE_INACTIVE"` - `"SSO_CONFIGURATION_STATE_ACTIVE"` - `additional_scopes: Optional[List[str]]` additional_scopes are extra OIDC scopes requested from the identity provider during sign-in. - `claims: Optional[Dict[str, str]]` claims are key/value pairs that defines a mapping of claims issued by the IdP. - `claims_expression: Optional[str]` claims_expression is a CEL (Common Expression Language) expression evaluated against the OIDC token claims during login. When set, the expression must evaluate to true for the login to succeed. The expression has access to a `claims` variable containing all token claims as a map. Example: `claims.email_verified && claims.email.endsWith("@example.com")` - `client_id: Optional[str]` client_id is the client ID of the OIDC application set on the IdP - `display_name: Optional[str]` - `email_domain: Optional[str]` - `email_domains: Optional[List[str]]` ### Example ```python import os from gitpod import Gitpod client = Gitpod( bearer_token=os.environ.get("GITPOD_API_KEY"), # This is the default and can be omitted ) page = client.organizations.sso_configurations.list( organization_id="b0e12f6c-4c67-429d-a4a6-d9838b5da047", pagination={ "page_size": 20 }, ) page = page.sso_configurations[0] print(page.id) ``` #### Response ```json { "pagination": { "nextToken": "nextToken" }, "ssoConfigurations": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "issuerUrl": "issuerUrl", "organizationId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "providerType": "PROVIDER_TYPE_UNSPECIFIED", "state": "SSO_CONFIGURATION_STATE_UNSPECIFIED", "additionalScopes": [ "string" ], "claims": { "foo": "string" }, "claimsExpression": "claimsExpression", "clientId": "clientId", "displayName": "displayName", "emailDomain": "emailDomain", "emailDomains": [ "sfN2.l.iJR-BU.u9JV9.a.m.o2D-4b-Jd.0Z-kX.L.n.S.f.UKbxB" ] } ] } ``` ## GetSSOConfiguration `organizations.sso_configurations.retrieve(SSOConfigurationRetrieveParams**kwargs) -> SSOConfigurationRetrieveResponse` **post** `/gitpod.v1.OrganizationService/GetSSOConfiguration` Retrieves a specific SSO configuration. Use this method to: - View SSO provider details - Check configuration status - Verify SSO settings ### Examples - Get SSO configuration: Retrieves details of a specific SSO configuration. ```yaml ssoConfigurationId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" ``` ### Parameters - `sso_configuration_id: str` sso_configuration_id is the ID of the SSO configuration to get ### Returns - `class SSOConfigurationRetrieveResponse: …` - `sso_configuration: SSOConfiguration` sso_configuration is the SSO configuration identified by the ID - `id: str` id is the unique identifier of the SSO configuration - `issuer_url: str` issuer_url is the URL of the IdP issuer - `organization_id: str` - `provider_type: ProviderType` provider_type defines the type of the SSO configuration - `"PROVIDER_TYPE_UNSPECIFIED"` - `"PROVIDER_TYPE_BUILTIN"` - `"PROVIDER_TYPE_CUSTOM"` - `state: SSOConfigurationState` state is the state of the SSO configuration - `"SSO_CONFIGURATION_STATE_UNSPECIFIED"` - `"SSO_CONFIGURATION_STATE_INACTIVE"` - `"SSO_CONFIGURATION_STATE_ACTIVE"` - `additional_scopes: Optional[List[str]]` additional_scopes are extra OIDC scopes requested from the identity provider during sign-in. - `claims: Optional[Dict[str, str]]` claims are key/value pairs that defines a mapping of claims issued by the IdP. - `claims_expression: Optional[str]` claims_expression is a CEL (Common Expression Language) expression evaluated against the OIDC token claims during login. When set, the expression must evaluate to true for the login to succeed. The expression has access to a `claims` variable containing all token claims as a map. Example: `claims.email_verified && claims.email.endsWith("@example.com")` - `client_id: Optional[str]` client_id is the client ID of the OIDC application set on the IdP - `display_name: Optional[str]` - `email_domain: Optional[str]` - `email_domains: Optional[List[str]]` ### Example ```python import os from gitpod import Gitpod client = Gitpod( bearer_token=os.environ.get("GITPOD_API_KEY"), # This is the default and can be omitted ) sso_configuration = client.organizations.sso_configurations.retrieve( sso_configuration_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", ) print(sso_configuration.sso_configuration) ``` #### Response ```json { "ssoConfiguration": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "issuerUrl": "issuerUrl", "organizationId": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "providerType": "PROVIDER_TYPE_UNSPECIFIED", "state": "SSO_CONFIGURATION_STATE_UNSPECIFIED", "additionalScopes": [ "string" ], "claims": { "foo": "string" }, "claimsExpression": "claimsExpression", "clientId": "clientId", "displayName": "displayName", "emailDomain": "emailDomain", "emailDomains": [ "sfN2.l.iJR-BU.u9JV9.a.m.o2D-4b-Jd.0Z-kX.L.n.S.f.UKbxB" ] } } ``` ## UpdateSSOConfiguration `organizations.sso_configurations.update(SSOConfigurationUpdateParams**kwargs) -> object` **post** `/gitpod.v1.OrganizationService/UpdateSSOConfiguration` Updates SSO provider settings and authentication rules. Use this method to: - Rotate client credentials - Update provider endpoints - Modify claim mappings - Change authentication policies - Toggle SSO enforcement ### Examples - Update credentials: Rotates client ID and secret. ```yaml ssoConfigurationId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" clientId: "new-client-id" clientSecret: "new-client-secret" ``` - Update provider status: Activates or deactivates SSO provider. ```yaml ssoConfigurationId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" state: SSO_CONFIGURATION_STATE_ACTIVE ``` ### Parameters - `sso_configuration_id: str` sso_configuration_id is the ID of the SSO configuration to update - `additional_scopes: Optional[AdditionalScopesUpdateParam]` additional_scopes replaces the configured OIDC scopes when present. When absent (nil), scopes are left unchanged. When present with an empty scopes list, all additional scopes are cleared. - `scopes: Optional[List[str]]` - `claims: Optional[Dict[str, str]]` claims are key/value pairs that defines a mapping of claims issued by the IdP. - `claims_expression: Optional[str]` claims_expression is a CEL expression evaluated against OIDC token claims during login. When set, the expression must evaluate to true for the login to succeed. When present with an empty string, the expression is cleared. - `client_id: Optional[str]` client_id is the client ID of the SSO provider - `client_secret: Optional[str]` client_secret is the client secret of the SSO provider - `display_name: Optional[str]` - `email_domain: Optional[str]` - `email_domains: Optional[Sequence[str]]` - `issuer_url: Optional[str]` issuer_url is the URL of the IdP issuer - `state: Optional[SSOConfigurationState]` state is the state of the SSO configuration - `"SSO_CONFIGURATION_STATE_UNSPECIFIED"` - `"SSO_CONFIGURATION_STATE_INACTIVE"` - `"SSO_CONFIGURATION_STATE_ACTIVE"` ### Returns - `object` ### Example ```python import os from gitpod import Gitpod client = Gitpod( bearer_token=os.environ.get("GITPOD_API_KEY"), # This is the default and can be omitted ) sso_configuration = client.organizations.sso_configurations.update( sso_configuration_id="d2c94c27-3b76-4a42-b88c-95a85e392c68", client_id="new-client-id", client_secret="new-client-secret", ) print(sso_configuration) ``` #### Response ```json {} ``` ## Domain Types ### Additional Scopes Update - `class AdditionalScopesUpdate: …` AdditionalScopesUpdate wraps a list of OIDC scopes so that the update request can distinguish "not changing scopes" (field absent) from "clearing all scopes" (field present, empty list). - `scopes: Optional[List[str]]` ### Provider Type - `Literal["PROVIDER_TYPE_UNSPECIFIED", "PROVIDER_TYPE_BUILTIN", "PROVIDER_TYPE_CUSTOM"]` - `"PROVIDER_TYPE_UNSPECIFIED"` - `"PROVIDER_TYPE_BUILTIN"` - `"PROVIDER_TYPE_CUSTOM"` ### SSO Configuration - `class SSOConfiguration: …` - `id: str` id is the unique identifier of the SSO configuration - `issuer_url: str` issuer_url is the URL of the IdP issuer - `organization_id: str` - `provider_type: ProviderType` provider_type defines the type of the SSO configuration - `"PROVIDER_TYPE_UNSPECIFIED"` - `"PROVIDER_TYPE_BUILTIN"` - `"PROVIDER_TYPE_CUSTOM"` - `state: SSOConfigurationState` state is the state of the SSO configuration - `"SSO_CONFIGURATION_STATE_UNSPECIFIED"` - `"SSO_CONFIGURATION_STATE_INACTIVE"` - `"SSO_CONFIGURATION_STATE_ACTIVE"` - `additional_scopes: Optional[List[str]]` additional_scopes are extra OIDC scopes requested from the identity provider during sign-in. - `claims: Optional[Dict[str, str]]` claims are key/value pairs that defines a mapping of claims issued by the IdP. - `claims_expression: Optional[str]` claims_expression is a CEL (Common Expression Language) expression evaluated against the OIDC token claims during login. When set, the expression must evaluate to true for the login to succeed. The expression has access to a `claims` variable containing all token claims as a map. Example: `claims.email_verified && claims.email.endsWith("@example.com")` - `client_id: Optional[str]` client_id is the client ID of the OIDC application set on the IdP - `display_name: Optional[str]` - `email_domain: Optional[str]` - `email_domains: Optional[List[str]]` ### SSO Configuration State - `Literal["SSO_CONFIGURATION_STATE_UNSPECIFIED", "SSO_CONFIGURATION_STATE_INACTIVE", "SSO_CONFIGURATION_STATE_ACTIVE"]` - `"SSO_CONFIGURATION_STATE_UNSPECIFIED"` - `"SSO_CONFIGURATION_STATE_INACTIVE"` - `"SSO_CONFIGURATION_STATE_ACTIVE"` ### SSO Configuration Create Response - `class SSOConfigurationCreateResponse: …` - `sso_configuration: SSOConfiguration` sso_configuration is the created SSO configuration - `id: str` id is the unique identifier of the SSO configuration - `issuer_url: str` issuer_url is the URL of the IdP issuer - `organization_id: str` - `provider_type: ProviderType` provider_type defines the type of the SSO configuration - `"PROVIDER_TYPE_UNSPECIFIED"` - `"PROVIDER_TYPE_BUILTIN"` - `"PROVIDER_TYPE_CUSTOM"` - `state: SSOConfigurationState` state is the state of the SSO configuration - `"SSO_CONFIGURATION_STATE_UNSPECIFIED"` - `"SSO_CONFIGURATION_STATE_INACTIVE"` - `"SSO_CONFIGURATION_STATE_ACTIVE"` - `additional_scopes: Optional[List[str]]` additional_scopes are extra OIDC scopes requested from the identity provider during sign-in. - `claims: Optional[Dict[str, str]]` claims are key/value pairs that defines a mapping of claims issued by the IdP. - `claims_expression: Optional[str]` claims_expression is a CEL (Common Expression Language) expression evaluated against the OIDC token claims during login. When set, the expression must evaluate to true for the login to succeed. The expression has access to a `claims` variable containing all token claims as a map. Example: `claims.email_verified && claims.email.endsWith("@example.com")` - `client_id: Optional[str]` client_id is the client ID of the OIDC application set on the IdP - `display_name: Optional[str]` - `email_domain: Optional[str]` - `email_domains: Optional[List[str]]` ### SSO Configuration Retrieve Response - `class SSOConfigurationRetrieveResponse: …` - `sso_configuration: SSOConfiguration` sso_configuration is the SSO configuration identified by the ID - `id: str` id is the unique identifier of the SSO configuration - `issuer_url: str` issuer_url is the URL of the IdP issuer - `organization_id: str` - `provider_type: ProviderType` provider_type defines the type of the SSO configuration - `"PROVIDER_TYPE_UNSPECIFIED"` - `"PROVIDER_TYPE_BUILTIN"` - `"PROVIDER_TYPE_CUSTOM"` - `state: SSOConfigurationState` state is the state of the SSO configuration - `"SSO_CONFIGURATION_STATE_UNSPECIFIED"` - `"SSO_CONFIGURATION_STATE_INACTIVE"` - `"SSO_CONFIGURATION_STATE_ACTIVE"` - `additional_scopes: Optional[List[str]]` additional_scopes are extra OIDC scopes requested from the identity provider during sign-in. - `claims: Optional[Dict[str, str]]` claims are key/value pairs that defines a mapping of claims issued by the IdP. - `claims_expression: Optional[str]` claims_expression is a CEL (Common Expression Language) expression evaluated against the OIDC token claims during login. When set, the expression must evaluate to true for the login to succeed. The expression has access to a `claims` variable containing all token claims as a map. Example: `claims.email_verified && claims.email.endsWith("@example.com")` - `client_id: Optional[str]` client_id is the client ID of the OIDC application set on the IdP - `display_name: Optional[str]` - `email_domain: Optional[str]` - `email_domains: Optional[List[str]]`