GetOrganization
client.Organizations.Get(ctx, body) (*OrganizationGetResponse, error)
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.
organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047"
GetOrganization
package main
import (
"context"
"fmt"
"github.com/gitpod-io/gitpod-sdk-go"
"github.com/gitpod-io/gitpod-sdk-go/option"
)
func main() {
client := gitpod.NewClient(
option.WithBearerToken("My Bearer Token"),
)
organization, err := client.Organizations.Get(context.TODO(), gitpod.OrganizationGetParams{
OrganizationID: gitpod.F("b0e12f6c-4c67-429d-a4a6-d9838b5da047"),
})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", organization.Organization)
}
{
"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"
]
}
}
}Returns Examples
{
"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"
]
}
}
}