# Editors ## ListEditors `client.Editors.List(ctx, params) (*EditorsPage[Editor], error)` **post** `/gitpod.v1.EditorService/ListEditors` Lists all available code editors, optionally filtered to those allowed in an organization. Use this method to: - View supported editors - Get editor capabilities - Browse editor options - Check editor availability ### Examples - List editors: Shows all available editors with pagination. ```yaml pagination: pageSize: 20 ``` - List editors available to the organization: Shows all available editors that are allowed by the policies enforced in the organization with pagination. ```yaml pagination: pageSize: 20 filter: allowedByPolicy: true ``` ### Parameters - `params EditorListParams` - `Token param.Field[string]` Query param - `PageSize param.Field[int64]` Query param - `Filter param.Field[EditorListParamsFilter]` Body param: filter contains the filter options for listing editors - `AllowedByPolicy bool` allowed_by_policy filters the response to only editors that are allowed by the policies enforced in the organization - `Pagination param.Field[EditorListParamsPagination]` Body param: pagination contains the pagination options for listing environments - `Token string` Token for the next set of results that was returned as next_token of a PaginationResponse - `PageSize int64` Page size is the maximum number of results to retrieve per page. Defaults to 25. Maximum 100. ### Returns - `type Editor struct{…}` - `ID string` - `InstallationInstructions string` - `Name string` - `URLTemplate string` - `Alias string` - `IconURL string` - `ShortDescription string` - `Versions []EditorVersion` versions contains the list of available versions for this editor - `Version string` version is the version string of the editor Examples for JetBrains: 2025.2 ### Example ```go 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"), ) page, err := client.Editors.List(context.TODO(), gitpod.EditorListParams{ Pagination: gitpod.F(gitpod.EditorListParamsPagination{ PageSize: gitpod.F(int64(20)), }), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", page) } ``` #### Response ```json { "editors": [ { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "installationInstructions": "installationInstructions", "name": "name", "urlTemplate": "urlTemplate", "alias": "alias", "iconUrl": "iconUrl", "shortDescription": "shortDescription", "versions": [ { "version": "version" } ] } ], "pagination": { "nextToken": "nextToken" } } ``` ## ResolveEditorURL `client.Editors.ResolveURL(ctx, body) (*EditorResolveURLResponse, error)` **post** `/gitpod.v1.EditorService/ResolveEditorURL` Resolves the URL for accessing an editor in a specific environment. Use this method to: - Get editor access URLs - Launch editors for environments - Set up editor connections - Configure editor access ### Examples - Resolve editor URL: Gets the URL for accessing an editor in an environment. ```yaml editorId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" environmentId: "07e03a28-65a5-4d98-b532-8ea67b188048" organizationId: "b0e12f6c-4c67-429d-a4a6-d9838b5da047" ``` ### Parameters - `body EditorResolveURLParams` - `EditorID param.Field[string]` editorId is the ID of the editor to resolve the URL for - `EnvironmentID param.Field[string]` environmentId is the ID of the environment to resolve the URL for - `OrganizationID param.Field[string]` organizationId is the ID of the organization to resolve the URL for - `Version param.Field[string]` version is the editor version to use If not provided, the latest version will be installed Examples for JetBrains: 2025.2 ### Returns - `type EditorResolveURLResponse struct{…}` - `URL string` url is the resolved editor URL ### Example ```go 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"), ) response, err := client.Editors.ResolveURL(context.TODO(), gitpod.EditorResolveURLParams{ EditorID: gitpod.F("d2c94c27-3b76-4a42-b88c-95a85e392c68"), EnvironmentID: gitpod.F("07e03a28-65a5-4d98-b532-8ea67b188048"), OrganizationID: gitpod.F("b0e12f6c-4c67-429d-a4a6-d9838b5da047"), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", response.URL) } ``` #### Response ```json { "url": "url" } ``` ## GetEditor `client.Editors.Get(ctx, body) (*EditorGetResponse, error)` **post** `/gitpod.v1.EditorService/GetEditor` Gets details about a specific editor. Use this method to: - View editor information - Get editor configuration ### Examples - Get editor details: Retrieves information about a specific editor. ```yaml id: "d2c94c27-3b76-4a42-b88c-95a85e392c68" ``` ### Parameters - `body EditorGetParams` - `ID param.Field[string]` id is the ID of the editor to get ### Returns - `type EditorGetResponse struct{…}` - `Editor Editor` editor contains the editor - `ID string` - `InstallationInstructions string` - `Name string` - `URLTemplate string` - `Alias string` - `IconURL string` - `ShortDescription string` - `Versions []EditorVersion` versions contains the list of available versions for this editor - `Version string` version is the version string of the editor Examples for JetBrains: 2025.2 ### Example ```go 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"), ) editor, err := client.Editors.Get(context.TODO(), gitpod.EditorGetParams{ ID: gitpod.F("d2c94c27-3b76-4a42-b88c-95a85e392c68"), }) if err != nil { panic(err.Error()) } fmt.Printf("%+v\n", editor.Editor) } ``` #### Response ```json { "editor": { "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", "installationInstructions": "installationInstructions", "name": "name", "urlTemplate": "urlTemplate", "alias": "alias", "iconUrl": "iconUrl", "shortDescription": "shortDescription", "versions": [ { "version": "version" } ] } } ``` ## Domain Types ### Editor - `type Editor struct{…}` - `ID string` - `InstallationInstructions string` - `Name string` - `URLTemplate string` - `Alias string` - `IconURL string` - `ShortDescription string` - `Versions []EditorVersion` versions contains the list of available versions for this editor - `Version string` version is the version string of the editor Examples for JetBrains: 2025.2 ### Editor Version - `type EditorVersion struct{…}` - `Version string` version is the version string of the editor Examples for JetBrains: 2025.2