diff --git a/clients/api/client.go b/clients/api/client.go index 7a25d1b..3e5ccf0 100644 --- a/clients/api/client.go +++ b/clients/api/client.go @@ -256,10 +256,12 @@ func (c *Client) CreateApplicationVersion(applicationID string) (*CreateApplicat // GetOrganizationApplications retrieves all applications for an organization func (c *Client) GetOrganizationApplications(organizationID string) (*GetOrganizationApplicationsResponse, error) { - path := fmt.Sprintf("/organizations/applications?organizationId=%s", organizationID) + req := GetOrganizationApplicationsRequest{ + OrganizationID: organizationID, + } var resp GetOrganizationApplicationsResponse - err := c.doRequest("GET", path, nil, &resp) + err := c.doRequest("POST", "/organizations/applications", req, &resp) if err != nil { return nil, err } diff --git a/clients/api/structs.go b/clients/api/structs.go index 916fd24..f7c19ce 100644 --- a/clients/api/structs.go +++ b/clients/api/structs.go @@ -117,7 +117,12 @@ type ApplicationItem struct { GithubRepositoryName string `json:"githubRepositoryName"` } -// GetOrganizationApplicationsResponse represents the response from GET /organizations/applications +// GetOrganizationApplicationsRequest represents the request body for POST /organizations/applications +type GetOrganizationApplicationsRequest struct { + OrganizationID string `json:"organizationId"` +} + +// GetOrganizationApplicationsResponse represents the response from POST /organizations/applications type GetOrganizationApplicationsResponse struct { Applications []ApplicationItem `json:"applications"` }