Skip to content

cloudfoundry-community/capi-openapi-go-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go API client for capiclient

OpenAPI specification for the Cloud Foundry API.

Overview

This API client was generated by the OpenAPI Generator project. By using the OpenAPI-spec from a remote server, you can easily generate an API client.

  • API version: 3.195.0
  • Package version: 1.0.0
  • Generator version: 7.13.0
  • Build package: org.openapitools.codegen.languages.GoClientCodegen

Installation

Install the following dependencies:

go get github.com/stretchr/testify/assert
go get golang.org/x/oauth2
go get golang.org/x/net/context

Put the package under your project folder and add the following in import:

import capiclient "github.com/cloudfoundry-community/capi-openapi-go-client/capiclient"

To use a proxy, set the environment variable HTTP_PROXY:

os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port")

Configuration of Server URL

Default configuration comes with Servers field that contains server objects as defined in the OpenAPI specification.

Select Server Configuration

For using other server than the one defined on index 0 set context value capiclient.ContextServerIndex of type int.

ctx := context.WithValue(context.Background(), capiclient.ContextServerIndex, 1)

Templated Server URL

Templated server URL is formatted using default variables from configuration or from context value capiclient.ContextServerVariables of type map[string]string.

ctx := context.WithValue(context.Background(), capiclient.ContextServerVariables, map[string]string{
	"basePath": "v2",
})

Note, enum values are always validated and all unused variables are silently ignored.

URLs Configuration per Operation

Each operation can use different server URL defined using OperationServers map in the Configuration. An operation is uniquely identified by "{classname}Service.{nickname}" string. Similar rules for overriding default operation server index and variables applies by using capiclient.ContextOperationServerIndices and capiclient.ContextOperationServerVariables context maps.

ctx := context.WithValue(context.Background(), capiclient.ContextOperationServerIndices, map[string]int{
	"{classname}Service.{nickname}": 2,
})
ctx = context.WithValue(context.Background(), capiclient.ContextOperationServerVariables, map[string]map[string]string{
	"{classname}Service.{nickname}": {
		"port": "8443",
	},
})

Documentation for API Endpoints

All URIs are relative to http://localhost

Class Method HTTP request Description
AdminAPI V3AdminActionsClearBuildpackCachePost Post /v3/admin/actions/clear_buildpack_cache Clear buildpack cache
AppFeaturesAPI V3AppsGuidFeaturesGet Get /v3/apps/{guid}/features List app features
AppFeaturesAPI V3AppsGuidFeaturesNameGet Get /v3/apps/{guid}/features/{name} Get an app feature
AppFeaturesAPI V3AppsGuidFeaturesNamePatch Patch /v3/apps/{guid}/features/{name} Update an app feature
AppLifecycleAPI V3AppsGuidActionsRestartPost Post /v3/apps/{guid}/actions/restart Restart an app
AppLifecycleAPI V3AppsGuidActionsStartPost Post /v3/apps/{guid}/actions/start Start an app
AppLifecycleAPI V3AppsGuidActionsStopPost Post /v3/apps/{guid}/actions/stop Stop an app
AppUsageEventsAPI V3AppUsageEventsActionsDestructivelyPurgeAllAndReseedPost Post /v3/app_usage_events/actions/destructively_purge_all_and_reseed Purge and seed app usage events
AppUsageEventsAPI V3AppUsageEventsGet Get /v3/app_usage_events List app usage events
AppUsageEventsAPI V3AppUsageEventsGuidGet Get /v3/app_usage_events/{guid} Retrieve an app usage event
AppsAPI V3AppsGet Get /v3/apps List apps
AppsAPI V3AppsGuidActionsApplyManifestPost Post /v3/apps/{guid}/actions/apply_manifest Apply manifest to an app
AppsAPI V3AppsGuidActionsClearBuildpackCachePost Post /v3/apps/{guid}/actions/clear_buildpack_cache Clear buildpack cache
AppsAPI V3AppsGuidActionsRestartPost Post /v3/apps/{guid}/actions/restart Restart an app
AppsAPI V3AppsGuidActionsStartPost Post /v3/apps/{guid}/actions/start Start an app
AppsAPI V3AppsGuidActionsStopPost Post /v3/apps/{guid}/actions/stop Stop an app
AppsAPI V3AppsGuidBuildsGet Get /v3/apps/{guid}/builds List builds for an app
AppsAPI V3AppsGuidDelete Delete /v3/apps/{guid} Delete an app
AppsAPI V3AppsGuidEnvironmentVariablesGet Get /v3/apps/{guid}/environment_variables Get app environment variables
AppsAPI V3AppsGuidEnvironmentVariablesPatch Patch /v3/apps/{guid}/environment_variables Update app environment variables
AppsAPI V3AppsGuidFeaturesGet Get /v3/apps/{guid}/features List app features
AppsAPI V3AppsGuidFeaturesNameGet Get /v3/apps/{guid}/features/{name} Get an app feature
AppsAPI V3AppsGuidFeaturesNamePatch Patch /v3/apps/{guid}/features/{name} Update an app feature
AppsAPI V3AppsGuidGet Get /v3/apps/{guid} Get an app
AppsAPI V3AppsGuidManifestDiffPost Post /v3/apps/{guid}/manifest_diff Generate manifest diff (experimental)
AppsAPI V3AppsGuidManifestGet Get /v3/apps/{guid}/manifest Get app manifest
AppsAPI V3AppsGuidPackagesGet Get /v3/apps/{guid}/packages List packages for an app
AppsAPI V3AppsGuidPatch Patch /v3/apps/{guid} Update an app
AppsAPI V3AppsGuidPermissionsGet Get /v3/apps/{guid}/permissions Get app permissions
AppsAPI V3AppsGuidProcessesGet Get /v3/apps/{guid}/processes List processes for an app
AppsAPI V3AppsGuidProcessesTypeGet Get /v3/apps/{guid}/processes/{type} Get a process by type for an app
AppsAPI V3AppsGuidRelationshipsCurrentDropletGet Get /v3/apps/{guid}/relationships/current_droplet Get current droplet relationship
AppsAPI V3AppsGuidRelationshipsCurrentDropletPatch Patch /v3/apps/{guid}/relationships/current_droplet Update current droplet relationship
AppsAPI V3AppsGuidSshEnabledGet Get /v3/apps/{guid}/ssh_enabled Get SSH enabled
AppsAPI V3AppsPost Post /v3/apps Create an app
AuditEventsAPI V3AuditEventsGet Get /v3/audit_events List audit events
AuditEventsAPI V3AuditEventsGuidGet Get /v3/audit_events/{guid} Retrieve an audit event
BuildpacksAPI V3BuildpacksGet Get /v3/buildpacks List buildpacks
BuildpacksAPI V3BuildpacksGuidDelete Delete /v3/buildpacks/{guid} Delete a buildpack
BuildpacksAPI V3BuildpacksGuidGet Get /v3/buildpacks/{guid} Get a buildpack
BuildpacksAPI V3BuildpacksGuidPatch Patch /v3/buildpacks/{guid} Update a buildpack
BuildpacksAPI V3BuildpacksGuidUploadPost Post /v3/buildpacks/{guid}/upload Upload buildpack bits
BuildpacksAPI V3BuildpacksPost Post /v3/buildpacks Create a buildpack
BuildsAPI V3AppsGuidBuildsGet Get /v3/apps/{guid}/builds List builds for an app
BuildsAPI V3BuildsGet Get /v3/builds List builds
BuildsAPI V3BuildsGuidGet Get /v3/builds/{guid} Get a build
BuildsAPI V3BuildsGuidPatch Patch /v3/builds/{guid} Update a build
BuildsAPI V3BuildsPost Post /v3/builds Create a build
ConfigurationAPI V3AppsGuidEnvironmentVariablesGet Get /v3/apps/{guid}/environment_variables Get app environment variables
ConfigurationAPI V3AppsGuidEnvironmentVariablesPatch Patch /v3/apps/{guid}/environment_variables Update app environment variables
DefaultAPI AssignDefaultIsolationSegment Patch /v3/organizations/{guid}/relationships/default_isolation_segment Assign Default Isolation Segment
DefaultAPI CreateOrganization Post /v3/organizations Create an Organization
DefaultAPI DeleteOrganization Delete /v3/organizations/{guid} Delete an Organization
DefaultAPI GetDefaultDomain Get /v3/organizations/{guid}/domains/default Get Default Domain
DefaultAPI GetDefaultIsolationSegment Get /v3/organizations/{guid}/relationships/default_isolation_segment Get Default Isolation Segment
DefaultAPI GetOrganization Get /v3/organizations/{guid} Get an Organization
DefaultAPI GetUsageSummary Get /v3/organizations/{guid}/usage_summary Get Usage Summary
DefaultAPI ListOrganizations Get /v3/organizations List Organizations
DefaultAPI ListUsersForOrganization Get /v3/organizations/{guid}/users List Users for an Organization
DefaultAPI RootGet Get / Global API Root
DefaultAPI UpdateOrganization Patch /v3/organizations/{guid} Update an Organization
DefaultAPI V3AppsGuidDropletsGet Get /v3/apps/{guid}/droplets List droplets for an app
DefaultAPI V3AppsGuidRevisionsDeployedGet Get /v3/apps/{guid}/revisions/deployed List deployed revisions for an app
DefaultAPI V3AppsGuidRevisionsGet Get /v3/apps/{guid}/revisions List revisions for an app
DefaultAPI V3AppsGuidTasksPost Post /v3/apps/{guid}/tasks Create a task
DefaultAPI V3DropletsGet Get /v3/droplets List droplets
DefaultAPI V3DropletsGuidDelete Delete /v3/droplets/{guid} Delete a droplet
DefaultAPI V3DropletsGuidGet Get /v3/droplets/{guid} Get a droplet
DefaultAPI V3DropletsGuidPatch Patch /v3/droplets/{guid} Update a droplet
DefaultAPI V3DropletsPost Post /v3/droplets Create or copy a droplet
DefaultAPI V3Get Get /v3 V3 API Root
DefaultAPI V3InfoGet Get /v3/info Get platform info
DefaultAPI V3InfoUsageSummaryGet Get /v3/info/usage_summary Get platform usage summary
DefaultAPI V3IsolationSegmentsGet Get /v3/isolation_segments List isolation segments
DefaultAPI V3IsolationSegmentsGuidDelete Delete /v3/isolation_segments/{guid} Delete an isolation segment
DefaultAPI V3IsolationSegmentsGuidGet Get /v3/isolation_segments/{guid} Get an isolation segment
DefaultAPI V3IsolationSegmentsGuidPatch Patch /v3/isolation_segments/{guid} Update an isolation segment
DefaultAPI V3IsolationSegmentsGuidRelationshipsOrganizationsGet Get /v3/isolation_segments/{guid}/relationships/organizations List organizations relationship
DefaultAPI V3IsolationSegmentsGuidRelationshipsOrganizationsOrgGuidDelete Delete /v3/isolation_segments/{guid}/relationships/organizations/{org_guid} Revoke entitlement to isolation segment for an organization
DefaultAPI V3IsolationSegmentsGuidRelationshipsOrganizationsPost Post /v3/isolation_segments/{guid}/relationships/organizations Entitle organizations for an isolation segment
DefaultAPI V3IsolationSegmentsGuidRelationshipsSpacesGet Get /v3/isolation_segments/{guid}/relationships/spaces List spaces relationship
DefaultAPI V3IsolationSegmentsPost Post /v3/isolation_segments Create an isolation segment
DefaultAPI V3PackagesGuidDropletsGet Get /v3/packages/{guid}/droplets List droplets for a package
DefaultAPI V3ResourceMatchesPost Post /v3/resource_matches Create a resource match
DefaultAPI V3RevisionsGuidEnvironmentVariablesGet Get /v3/revisions/{guid}/environment_variables Get environment variables for a revision
DefaultAPI V3RevisionsGuidGet Get /v3/revisions/{guid} Get a revision
DefaultAPI V3RevisionsGuidPatch Patch /v3/revisions/{guid} Update a revision
DefaultAPI V3ServiceBrokersGet Get /v3/service_brokers List service brokers
DefaultAPI V3ServiceBrokersGuidCatalogPost Post /v3/service_brokers/{guid}/catalog Sync service broker catalog
DefaultAPI V3ServiceBrokersGuidDelete Delete /v3/service_brokers/{guid} Delete a service broker
DefaultAPI V3ServiceBrokersGuidGet Get /v3/service_brokers/{guid} Get a service broker
DefaultAPI V3ServiceBrokersGuidJobsSynchronizationGet Get /v3/service_brokers/{guid}/jobs/synchronization Get broker synchronization job status
DefaultAPI V3ServiceBrokersGuidPatch Patch /v3/service_brokers/{guid} Update a service broker
DefaultAPI V3ServiceBrokersPost Post /v3/service_brokers Create a service broker
DefaultAPI V3ServiceCredentialBindingsGuidDelete Delete /v3/service_credential_bindings/{guid} Delete a service credential binding
DefaultAPI V3ServiceCredentialBindingsGuidDetailsGet Get /v3/service_credential_bindings/{guid}/details Get a service credential binding details
DefaultAPI V3ServiceCredentialBindingsGuidGet Get /v3/service_credential_bindings/{guid} Get a service credential binding
DefaultAPI V3ServiceCredentialBindingsGuidParametersGet Get /v3/service_credential_bindings/{guid}/parameters Get parameters for a service credential binding
DefaultAPI V3ServiceCredentialBindingsGuidPatch Patch /v3/service_credential_bindings/{guid} Update a service credential binding
DefaultAPI V3ServiceCredentialBindingsPost Post /v3/service_credential_bindings Create a service credential binding
DefaultAPI V3ServiceInstancesGet Get /v3/service_instances Retrieve service instances
DefaultAPI V3ServiceInstancesGuidCredentialsGet Get /v3/service_instances/{guid}/credentials Get credentials for a user-provided service instance
DefaultAPI V3ServiceInstancesGuidDelete Delete /v3/service_instances/{guid} Delete a service instance
DefaultAPI V3ServiceInstancesGuidPatch Patch /v3/service_instances/{guid} Update a service instance
DefaultAPI V3ServiceInstancesGuidRelationshipsSharedSpacesPost Post /v3/service_instances/{guid}/relationships/shared_spaces Share a service instance to other spaces
DefaultAPI V3ServiceInstancesGuidRelationshipsSharedSpacesSpaceGuidDelete Delete /v3/service_instances/{guid}/relationships/shared_spaces/{space_guid} Unshare a service instance from another space
DefaultAPI V3ServiceOfferingsGet Get /v3/service_offerings List service offerings
DefaultAPI V3ServiceOfferingsGuidDelete Delete /v3/service_offerings/{guid} Delete a service offering
DefaultAPI V3ServiceOfferingsGuidGet Get /v3/service_offerings/{guid} Get a service offering
DefaultAPI V3ServiceOfferingsGuidPatch Patch /v3/service_offerings/{guid} Update a service offering
DefaultAPI V3ServiceOfferingsPost Post /v3/service_offerings Create a service offering
DefaultAPI V3ServicePlansGet Get /v3/service_plans List service plans
DefaultAPI V3ServicePlansGuidDelete Delete /v3/service_plans/{guid} Delete a service plan
DefaultAPI V3ServicePlansGuidGet Get /v3/service_plans/{guid} Get a service plan
DefaultAPI V3ServicePlansGuidPatch Patch /v3/service_plans/{guid} Update a service plan
DefaultAPI V3ServicePlansPost Post /v3/service_plans Create a service plan
DefaultAPI V3ServiceRouteBindingsGet Get /v3/service_route_bindings List service route bindings
DefaultAPI V3ServiceRouteBindingsGuidDelete Delete /v3/service_route_bindings/{guid} Delete a service route binding
DefaultAPI V3ServiceRouteBindingsGuidGet Get /v3/service_route_bindings/{guid} Get a service route binding
DefaultAPI V3ServiceRouteBindingsGuidParametersGet Get /v3/service_route_bindings/{guid}/parameters Get parameters for a route binding
DefaultAPI V3ServiceRouteBindingsGuidPatch Patch /v3/service_route_bindings/{guid} Update a service route binding
DefaultAPI V3ServiceRouteBindingsPost Post /v3/service_route_bindings Create a service route binding
DefaultAPI V3ServiceUsageEventsGet Get /v3/service_usage_events List service usage events
DefaultAPI V3ServiceUsageEventsGuidGet Get /v3/service_usage_events/{guid} Get a service usage event
DefaultAPI V3ServiceUsageEventsPost Post /v3/service_usage_events Purge and seed service usage events
DefaultAPI V3SpacesGet Get /v3/spaces List spaces
DefaultAPI V3SpacesGuidDelete Delete /v3/spaces/{guid} Delete a space
DefaultAPI V3SpacesGuidGet Get /v3/spaces/{guid} Get a space
DefaultAPI V3SpacesGuidPatch Patch /v3/spaces/{guid} Update a space
DefaultAPI V3SpacesGuidRelationshipsIsolationSegmentGet Get /v3/spaces/{guid}/relationships/isolation_segment Get assigned isolation segment
DefaultAPI V3SpacesGuidRelationshipsIsolationSegmentPatch Patch /v3/spaces/{guid}/relationships/isolation_segment Manage isolation segment
DefaultAPI V3SpacesGuidUsersGet Get /v3/spaces/{guid}/users List users for a space
DefaultAPI V3SpacesPost Post /v3/spaces Create a space
DefaultAPI V3StacksGet Get /v3/stacks List all stacks
DefaultAPI V3StacksGuidAppsGet Get /v3/stacks/{guid}/apps List apps on a stack
DefaultAPI V3StacksGuidDelete Delete /v3/stacks/{guid} Delete a stack
DefaultAPI V3StacksGuidGet Get /v3/stacks/{guid} Get a stack by GUID
DefaultAPI V3StacksGuidPatch Patch /v3/stacks/{guid} Update a stack
DefaultAPI V3StacksPost Post /v3/stacks Create a stack
DefaultAPI V3TasksGet Get /v3/tasks List all tasks
DefaultAPI V3TasksGuidGet Get /v3/tasks/{guid} Get a task
DefaultAPI V3TasksGuidPatch Patch /v3/tasks/{guid} Update a task
DefaultAPI V3TasksGuidPost Post /v3/tasks/{guid} Cancel a task
DefaultAPI V3UsersGet Get /v3/users List users
DefaultAPI V3UsersGuidDelete Delete /v3/users/{guid} Delete a user
DefaultAPI V3UsersGuidGet Get /v3/users/{guid} Get a user
DefaultAPI V3UsersGuidPatch Patch /v3/users/{guid} Update a user
DefaultAPI V3UsersPost Post /v3/users Create a user
DeploymentsAPI V3DeploymentsGet Get /v3/deployments List deployments
DeploymentsAPI V3DeploymentsGuidActionsCancelPost Post /v3/deployments/{guid}/actions/cancel Cancel a deployment
DeploymentsAPI V3DeploymentsGuidActionsContinuePost Post /v3/deployments/{guid}/actions/continue Continue a deployment
DeploymentsAPI V3DeploymentsGuidGet Get /v3/deployments/{guid} Get a deployment
DeploymentsAPI V3DeploymentsGuidPatch Patch /v3/deployments/{guid} Update a deployment
DeploymentsAPI V3DeploymentsPost Post /v3/deployments Create a deployment
DomainsAPI V3DomainsGet Get /v3/domains List domains
DomainsAPI V3DomainsGuidDelete Delete /v3/domains/{guid} Delete a domain
DomainsAPI V3DomainsGuidGet Get /v3/domains/{guid} Get a domain
DomainsAPI V3DomainsGuidPatch Patch /v3/domains/{guid} Update a domain
DomainsAPI V3DomainsGuidRelationshipsSharedOrganizationsOrgGuidDelete Delete /v3/domains/{guid}/relationships/shared_organizations/{org_guid} Unshare a domain
DomainsAPI V3DomainsGuidRelationshipsSharedOrganizationsPost Post /v3/domains/{guid}/relationships/shared_organizations Share a domain
DomainsAPI V3DomainsPost Post /v3/domains Create a domain
EnvironmentVariableGroupsAPI V3EnvironmentVariableGroupsNameGet Get /v3/environment_variable_groups/{name} Get an environment variable group
EnvironmentVariableGroupsAPI V3EnvironmentVariableGroupsNamePatch Patch /v3/environment_variable_groups/{name} Update environment variable group
ExperimentalAPI V3AppsGuidManifestDiffPost Post /v3/apps/{guid}/manifest_diff Generate manifest diff (experimental)
ExperimentalAPI V3RoutesGuidRelationshipsSharedSpacesGet Get /v3/routes/{guid}/relationships/shared_spaces List shared spaces for a route (experimental)
ExperimentalAPI V3RoutesGuidRelationshipsSpacePatch Patch /v3/routes/{guid}/relationships/space Share a route to another space (experimental)
FeatureFlagsAPI V3FeatureFlagsGet Get /v3/feature_flags List feature flags
FeatureFlagsAPI V3FeatureFlagsNameGet Get /v3/feature_flags/{name} Get a feature flag
FeatureFlagsAPI V3FeatureFlagsNamePatch Patch /v3/feature_flags/{name} Update a feature flag
InstancesAPI V3ProcessesGuidInstancesIndexDelete Delete /v3/processes/{guid}/instances/{index} Terminate a process instance
JobsAPI V3JobsGet Get /v3/jobs List jobs
JobsAPI V3JobsGuidGet Get /v3/jobs/{guid} Get a job
ManifestsAPI V3AppsGuidActionsApplyManifestPost Post /v3/apps/{guid}/actions/apply_manifest Apply manifest to an app
ManifestsAPI V3AppsGuidManifestGet Get /v3/apps/{guid}/manifest Get app manifest
ManifestsAPI V3SpacesGuidManifestDiffPost Post /v3/spaces/{guid}/manifest_diff Generate manifest diff for a space
ManifestsAPI V3SpacesGuidManifestPost Post /v3/spaces/{guid}/manifest Apply manifest to a space
MonitoringAPI V3ProcessesGuidStatsGet Get /v3/processes/{guid}/stats Get stats for a process
OrganizationQuotasAPI ApplyOrganizationQuotaToOrganizations Post /v3/organization_quotas/{guid}/relationships/organizations Apply an organization quota to organizations
OrganizationQuotasAPI CreateOrganizationQuota Post /v3/organization_quotas Create an organization quota
OrganizationQuotasAPI DeleteOrganizationQuota Delete /v3/organization_quotas/{guid} Delete an organization quota
OrganizationQuotasAPI GetOrganizationQuota Get /v3/organization_quotas/{guid} Get an organization quota
OrganizationQuotasAPI ListOrganizationQuotas Get /v3/organization_quotas List organization quotas
OrganizationQuotasAPI UpdateOrganizationQuota Patch /v3/organization_quotas/{guid} Update an organization quota
PackagesAPI V3AppsGuidPackagesGet Get /v3/apps/{guid}/packages List packages for an app
PackagesAPI V3PackagesGet Get /v3/packages List packages
PackagesAPI V3PackagesGuidCopyPost Post /v3/packages/{guid}/copy Copy a package
PackagesAPI V3PackagesGuidDelete Delete /v3/packages/{guid} Delete a package
PackagesAPI V3PackagesGuidDownloadGet Get /v3/packages/{guid}/download Download package bits
PackagesAPI V3PackagesGuidGet Get /v3/packages/{guid} Get a package
PackagesAPI V3PackagesGuidPatch Patch /v3/packages/{guid} Update a package
PackagesAPI V3PackagesGuidUploadPost Post /v3/packages/{guid}/upload Upload package bits
PackagesAPI V3PackagesPost Post /v3/packages Create a package
PermissionsAPI V3AppsGuidPermissionsGet Get /v3/apps/{guid}/permissions Get app permissions
ProcessesAPI V3AppsGuidProcessesGet Get /v3/apps/{guid}/processes List processes for an app
ProcessesAPI V3AppsGuidProcessesTypeGet Get /v3/apps/{guid}/processes/{type} Get a process by type for an app
ProcessesAPI V3ProcessesGet Get /v3/processes List processes
ProcessesAPI V3ProcessesGuidActionsScalePost Post /v3/processes/{guid}/actions/scale Scale a process
ProcessesAPI V3ProcessesGuidGet Get /v3/processes/{guid} Get a process
ProcessesAPI V3ProcessesGuidInstancesIndexDelete Delete /v3/processes/{guid}/instances/{index} Terminate a process instance
ProcessesAPI V3ProcessesGuidPatch Patch /v3/processes/{guid} Update a process
ProcessesAPI V3ProcessesGuidSidecarsGet Get /v3/processes/{guid}/sidecars List sidecars for a process
ProcessesAPI V3ProcessesGuidStatsGet Get /v3/processes/{guid}/stats Get stats for a process
ProcessesAPI V3SidecarsGuidProcessesGet Get /v3/sidecars/{guid}/processes List processes for a sidecar
RolesAPI V3RolesGet Get /v3/roles List roles
RolesAPI V3RolesGuidDelete Delete /v3/roles/{guid} Delete a role
RolesAPI V3RolesGuidGet Get /v3/roles/{guid} Get a role
RolesAPI V3RolesPost Post /v3/roles Create a role
RouteMappingsAPI V3RoutesGuidDestinationsDestinationGuidDelete Delete /v3/routes/{guid}/destinations/{destination_guid} Remove destination from a route
RouteMappingsAPI V3RoutesGuidDestinationsGet Get /v3/routes/{guid}/destinations List destinations for a route
RouteMappingsAPI V3RoutesGuidDestinationsPatch Patch /v3/routes/{guid}/destinations Update destinations for a route
RouteMappingsAPI V3RoutesGuidDestinationsPost Post /v3/routes/{guid}/destinations Add destinations to a route
RouteSharingAPI V3RoutesGuidRelationshipsSharedSpacesGet Get /v3/routes/{guid}/relationships/shared_spaces List shared spaces for a route (experimental)
RouteSharingAPI V3RoutesGuidRelationshipsSpacePatch Patch /v3/routes/{guid}/relationships/space Share a route to another space (experimental)
RoutesAPI V3RoutesGet Get /v3/routes List routes
RoutesAPI V3RoutesGuidDelete Delete /v3/routes/{guid} Delete a route
RoutesAPI V3RoutesGuidDestinationsDestinationGuidDelete Delete /v3/routes/{guid}/destinations/{destination_guid} Remove destination from a route
RoutesAPI V3RoutesGuidDestinationsGet Get /v3/routes/{guid}/destinations List destinations for a route
RoutesAPI V3RoutesGuidDestinationsPatch Patch /v3/routes/{guid}/destinations Update destinations for a route
RoutesAPI V3RoutesGuidDestinationsPost Post /v3/routes/{guid}/destinations Add destinations to a route
RoutesAPI V3RoutesGuidGet Get /v3/routes/{guid} Get a route
RoutesAPI V3RoutesGuidPatch Patch /v3/routes/{guid} Update a route
RoutesAPI V3RoutesGuidRelationshipsSharedSpacesGet Get /v3/routes/{guid}/relationships/shared_spaces List shared spaces for a route (experimental)
RoutesAPI V3RoutesGuidRelationshipsSpacePatch Patch /v3/routes/{guid}/relationships/space Share a route to another space (experimental)
RoutesAPI V3RoutesGuidTransferOwnerPost Post /v3/routes/{guid}/transfer_owner Transfer route ownership
RoutesAPI V3RoutesPost Post /v3/routes Create a route
ScalingAPI V3ProcessesGuidActionsScalePost Post /v3/processes/{guid}/actions/scale Scale a process
SecurityGroupsAPI V3SecurityGroupsGet Get /v3/security_groups List security groups
SecurityGroupsAPI V3SecurityGroupsGuidDelete Delete /v3/security_groups/{guid} Delete a security group
SecurityGroupsAPI V3SecurityGroupsGuidGet Get /v3/security_groups/{guid} Get a security group
SecurityGroupsAPI V3SecurityGroupsGuidPatch Patch /v3/security_groups/{guid} Update a security group
SecurityGroupsAPI V3SecurityGroupsGuidRelationshipsRunningSpacesPost Post /v3/security_groups/{guid}/relationships/running_spaces Bind running security group to spaces
SecurityGroupsAPI V3SecurityGroupsGuidRelationshipsRunningSpacesSpaceGuidDelete Delete /v3/security_groups/{guid}/relationships/running_spaces/{space_guid} Unbind running security group from a space
SecurityGroupsAPI V3SecurityGroupsGuidRelationshipsStagingSpacesPost Post /v3/security_groups/{guid}/relationships/staging_spaces Bind staging security group to spaces
SecurityGroupsAPI V3SecurityGroupsGuidRelationshipsStagingSpacesSpaceGuidDelete Delete /v3/security_groups/{guid}/relationships/staging_spaces/{space_guid} Unbind staging security group from a space
SecurityGroupsAPI V3SecurityGroupsPost Post /v3/security_groups Create a security group
SecurityGroupsAPI V3SpacesGuidRunningSecurityGroupsGet Get /v3/spaces/{guid}/running_security_groups List running security groups for a space
SecurityGroupsAPI V3SpacesGuidStagingSecurityGroupsGet Get /v3/spaces/{guid}/staging_security_groups List staging security groups for a space
ServiceInstancesAPI V3ServiceInstancesGuidRelationshipsSharedSpacesGet Get /v3/service_instances/{guid}/relationships/shared_spaces List shared spaces relationship (experimental)
ServiceInstancesAPI V3ServiceInstancesGuidRelationshipsSharedSpacesUsageSummaryGet Get /v3/service_instances/{guid}/relationships/shared_spaces/usage_summary Get usage summary in shared spaces (experimental)
ServicePlanVisibilityAPI V3ServicePlansGuidVisibilityGet Get /v3/service_plans/{guid}/visibility Get a service plan visibility
ServicePlanVisibilityAPI V3ServicePlansGuidVisibilityOrganizationGuidDelete Delete /v3/service_plans/{guid}/visibility/{organization_guid} Remove organization from a service plan visibility
ServicePlanVisibilityAPI V3ServicePlansGuidVisibilityPatch Patch /v3/service_plans/{guid}/visibility Update a service plan visibility
ServicePlanVisibilityAPI V3ServicePlansGuidVisibilityPost Post /v3/service_plans/{guid}/visibility Apply a service plan visibility
SidecarsAPI V3AppsGuidSidecarsGet Get /v3/apps/{guid}/sidecars List sidecars for an app
SidecarsAPI V3AppsGuidSidecarsPost Post /v3/apps/{guid}/sidecars Create a sidecar for an app
SidecarsAPI V3ProcessesGuidSidecarsGet Get /v3/processes/{guid}/sidecars List sidecars for a process
SidecarsAPI V3SidecarsGuidDelete Delete /v3/sidecars/{guid} Delete a sidecar
SidecarsAPI V3SidecarsGuidGet Get /v3/sidecars/{guid} Get a sidecar
SidecarsAPI V3SidecarsGuidPatch Patch /v3/sidecars/{guid} Update a sidecar
SidecarsAPI V3SidecarsGuidProcessesGet Get /v3/sidecars/{guid}/processes List processes for a sidecar
SpaceFeaturesAPI V3SpacesGuidFeaturesGet Get /v3/spaces/{guid}/features List space features
SpaceFeaturesAPI V3SpacesGuidFeaturesNameGet Get /v3/spaces/{guid}/features/{name} Get a space feature
SpaceFeaturesAPI V3SpacesGuidFeaturesNamePatch Patch /v3/spaces/{guid}/features/{name} Update a space feature
SpaceQuotasAPI V3SpaceQuotasGet Get /v3/space_quotas List space quotas
SpaceQuotasAPI V3SpaceQuotasGuidDelete Delete /v3/space_quotas/{guid} Delete a space quota
SpaceQuotasAPI V3SpaceQuotasGuidGet Get /v3/space_quotas/{guid} Get a space quota
SpaceQuotasAPI V3SpaceQuotasGuidPatch Patch /v3/space_quotas/{guid} Update a space quota
SpaceQuotasAPI V3SpaceQuotasGuidRelationshipsSpacesPost Post /v3/space_quotas/{guid}/relationships/spaces Apply a space quota to spaces
SpaceQuotasAPI V3SpaceQuotasGuidRelationshipsSpacesSpaceGuidDelete Delete /v3/space_quotas/{guid}/relationships/spaces/{space_guid} Remove a space quota from a space
SpaceQuotasAPI V3SpaceQuotasPost Post /v3/space_quotas Create a space quota
SpacesAPI V3SpacesGuidManifestDiffPost Post /v3/spaces/{guid}/manifest_diff Generate manifest diff for a space
SpacesAPI V3SpacesGuidManifestPost Post /v3/spaces/{guid}/manifest Apply manifest to a space
SpacesAPI V3SpacesGuidRunningSecurityGroupsGet Get /v3/spaces/{guid}/running_security_groups List running security groups for a space
SpacesAPI V3SpacesGuidStagingSecurityGroupsGet Get /v3/spaces/{guid}/staging_security_groups List staging security groups for a space
SshAPI V3AppsGuidSshEnabledGet Get /v3/apps/{guid}/ssh_enabled Get SSH enabled

Documentation For Models

Documentation For Authorization

Authentication schemes defined for the API:

Admin

  • Type: OAuth
  • Flow: application
  • Authorization URL:
  • Scopes:
  • cloud_controller.admin: admin access

Example

auth := context.WithValue(context.Background(), capiclient.ContextAccessToken, "ACCESSTOKENSTRING")
r, err := client.Service.Operation(auth, args)

Or via OAuth2 module to automatically refresh tokens and perform user authentication.

import "golang.org/x/oauth2"

/* Perform OAuth2 round trip request and obtain a token */

tokenSource := oauth2cfg.TokenSource(createContext(httpClient), &token)
auth := context.WithValue(oauth2.NoContext, capiclient.ContextOAuth2, tokenSource)
r, err := client.Service.Operation(auth, args)

AdminReadOnly

  • Type: OAuth
  • Flow: application
  • Authorization URL:
  • Scopes:
  • cloud_controller.admin_read_only: admin read access

Example

auth := context.WithValue(context.Background(), capiclient.ContextAccessToken, "ACCESSTOKENSTRING")
r, err := client.Service.Operation(auth, args)

Or via OAuth2 module to automatically refresh tokens and perform user authentication.

import "golang.org/x/oauth2"

/* Perform OAuth2 round trip request and obtain a token */

tokenSource := oauth2cfg.TokenSource(createContext(httpClient), &token)
auth := context.WithValue(oauth2.NoContext, capiclient.ContextOAuth2, tokenSource)
r, err := client.Service.Operation(auth, args)

BuildStateUpdater

  • Type: OAuth
  • Flow: application
  • Authorization URL:
  • Scopes:
  • cloud_controller.update_build_state: build state updater access

Example

auth := context.WithValue(context.Background(), capiclient.ContextAccessToken, "ACCESSTOKENSTRING")
r, err := client.Service.Operation(auth, args)

Or via OAuth2 module to automatically refresh tokens and perform user authentication.

import "golang.org/x/oauth2"

/* Perform OAuth2 round trip request and obtain a token */

tokenSource := oauth2cfg.TokenSource(createContext(httpClient), &token)
auth := context.WithValue(oauth2.NoContext, capiclient.ContextOAuth2, tokenSource)
r, err := client.Service.Operation(auth, args)

GlobalAuditor

  • Type: OAuth
  • Flow: application
  • Authorization URL:
  • Scopes:
  • cloud_controller.global_auditor: global auditor access

Example

auth := context.WithValue(context.Background(), capiclient.ContextAccessToken, "ACCESSTOKENSTRING")
r, err := client.Service.Operation(auth, args)

Or via OAuth2 module to automatically refresh tokens and perform user authentication.

import "golang.org/x/oauth2"

/* Perform OAuth2 round trip request and obtain a token */

tokenSource := oauth2cfg.TokenSource(createContext(httpClient), &token)
auth := context.WithValue(oauth2.NoContext, capiclient.ContextOAuth2, tokenSource)
r, err := client.Service.Operation(auth, args)

OAuth2

  • Type: OAuth
  • Flow: accessCode
  • Authorization URL: /oauth/token
  • Scopes:
  • cloud_controller.admin: Full read and write access to all resources
  • cloud_controller.admin_read_only: Read-only access to all resources
  • cloud_controller.global_auditor: Read-only access excluding sensitive data
  • cloud_controller.read: Read access based on user roles
  • cloud_controller.update_build_state: Ability to update build states
  • cloud_controller.write: Write access based on user roles
  • cloud_controller_service_permissions.read: Read-only access for service instance permissions

Example

auth := context.WithValue(context.Background(), capiclient.ContextAccessToken, "ACCESSTOKENSTRING")
r, err := client.Service.Operation(auth, args)

Or via OAuth2 module to automatically refresh tokens and perform user authentication.

import "golang.org/x/oauth2"

/* Perform OAuth2 round trip request and obtain a token */

tokenSource := oauth2cfg.TokenSource(createContext(httpClient), &token)
auth := context.WithValue(oauth2.NoContext, capiclient.ContextOAuth2, tokenSource)
r, err := client.Service.Operation(auth, args)

OrgBillingManager

  • Type: OAuth
  • Flow: application
  • Authorization URL:
  • Scopes:
  • cloud_controller.read: organization manager read access

Example

auth := context.WithValue(context.Background(), capiclient.ContextAccessToken, "ACCESSTOKENSTRING")
r, err := client.Service.Operation(auth, args)

Or via OAuth2 module to automatically refresh tokens and perform user authentication.

import "golang.org/x/oauth2"

/* Perform OAuth2 round trip request and obtain a token */

tokenSource := oauth2cfg.TokenSource(createContext(httpClient), &token)
auth := context.WithValue(oauth2.NoContext, capiclient.ContextOAuth2, tokenSource)
r, err := client.Service.Operation(auth, args)

OrgManager

  • Type: OAuth
  • Flow: application
  • Authorization URL:
  • Scopes:
  • cloud_controller.read: organization manager read access
  • cloud_controller.write: organization manager access

Example

auth := context.WithValue(context.Background(), capiclient.ContextAccessToken, "ACCESSTOKENSTRING")
r, err := client.Service.Operation(auth, args)

Or via OAuth2 module to automatically refresh tokens and perform user authentication.

import "golang.org/x/oauth2"

/* Perform OAuth2 round trip request and obtain a token */

tokenSource := oauth2cfg.TokenSource(createContext(httpClient), &token)
auth := context.WithValue(oauth2.NoContext, capiclient.ContextOAuth2, tokenSource)
r, err := client.Service.Operation(auth, args)

SpaceAuditor

  • Type: OAuth
  • Flow: application
  • Authorization URL:
  • Scopes:
  • cloud_controller.read: space auditor access

Example

auth := context.WithValue(context.Background(), capiclient.ContextAccessToken, "ACCESSTOKENSTRING")
r, err := client.Service.Operation(auth, args)

Or via OAuth2 module to automatically refresh tokens and perform user authentication.

import "golang.org/x/oauth2"

/* Perform OAuth2 round trip request and obtain a token */

tokenSource := oauth2cfg.TokenSource(createContext(httpClient), &token)
auth := context.WithValue(oauth2.NoContext, capiclient.ContextOAuth2, tokenSource)
r, err := client.Service.Operation(auth, args)

SpaceDeveloper

  • Type: OAuth
  • Flow: application
  • Authorization URL:
  • Scopes:
  • cloud_controller.read: space developer read access
  • cloud_controller.write: space developer access

Example

auth := context.WithValue(context.Background(), capiclient.ContextAccessToken, "ACCESSTOKENSTRING")
r, err := client.Service.Operation(auth, args)

Or via OAuth2 module to automatically refresh tokens and perform user authentication.

import "golang.org/x/oauth2"

/* Perform OAuth2 round trip request and obtain a token */

tokenSource := oauth2cfg.TokenSource(createContext(httpClient), &token)
auth := context.WithValue(oauth2.NoContext, capiclient.ContextOAuth2, tokenSource)
r, err := client.Service.Operation(auth, args)

SpaceManager

  • Type: OAuth
  • Flow: application
  • Authorization URL:
  • Scopes:
  • cloud_controller.read: space manager read access
  • cloud_controller.write: space manager access

Example

auth := context.WithValue(context.Background(), capiclient.ContextAccessToken, "ACCESSTOKENSTRING")
r, err := client.Service.Operation(auth, args)

Or via OAuth2 module to automatically refresh tokens and perform user authentication.

import "golang.org/x/oauth2"

/* Perform OAuth2 round trip request and obtain a token */

tokenSource := oauth2cfg.TokenSource(createContext(httpClient), &token)
auth := context.WithValue(oauth2.NoContext, capiclient.ContextOAuth2, tokenSource)
r, err := client.Service.Operation(auth, args)

SpaceSupporter

  • Type: OAuth
  • Flow: application
  • Authorization URL:
  • Scopes:
  • cloud_controller.read: space supporter read access
  • cloud_controller.write: space supporter access

Example

auth := context.WithValue(context.Background(), capiclient.ContextAccessToken, "ACCESSTOKENSTRING")
r, err := client.Service.Operation(auth, args)

Or via OAuth2 module to automatically refresh tokens and perform user authentication.

import "golang.org/x/oauth2"

/* Perform OAuth2 round trip request and obtain a token */

tokenSource := oauth2cfg.TokenSource(createContext(httpClient), &token)
auth := context.WithValue(oauth2.NoContext, capiclient.ContextOAuth2, tokenSource)
r, err := client.Service.Operation(auth, args)

bearerAuth

  • Type: HTTP Bearer token authentication

Example

auth := context.WithValue(context.Background(), capiclient.ContextAccessToken, "BEARER_TOKEN_STRING")
r, err := client.Service.Operation(auth, args)

Documentation for Utility Methods

Due to the fact that model structure members are all pointers, this package contains a number of utility functions to easily obtain pointers to values of basic types. Each of these functions takes a value of the given basic type and returns a pointer to it:

  • PtrBool
  • PtrInt
  • PtrInt32
  • PtrInt64
  • PtrFloat
  • PtrFloat32
  • PtrFloat64
  • PtrString
  • PtrTime

Author

About

CAPI OpenAPI Generated Go Client

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages