Skip to content

Latest commit

 

History

History
268 lines (226 loc) · 17.1 KB

OPENAPI-README.md

File metadata and controls

268 lines (226 loc) · 17.1 KB

Go API client for delphix_dct_api

Delphix API Gateway 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: 1.0
  • Package version: 1.0.0
  • Build package: org.openapitools.codegen.languages.GoClientCodegen For more information, please visit https://support.delphix.com

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 delphix_dct_api "github.com/GIT_USER_ID/GIT_REPO_ID"

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 sw.ContextServerIndex of type int.

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

Templated Server URL

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

ctx := context.WithValue(context.Background(), delphix_dct_api.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 sw.ContextOperationServerIndices and sw.ContextOperationServerVariables context maps.

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

Documentation for API Endpoints

All URIs are relative to /v1

Class Method HTTP request Description
ApiClientsApi CreateApiClient Post /management/api-clients Create a new API Client.
ApiClientsApi DeleteApiClient Delete /management/api-clients/{id} Delete an API client
ApiClientsApi GetApiClient Get /management/api-clients/{id} Get an API client by id
ApiClientsApi GetApiClients Get /management/api-clients Returns a list of API clients.
ApiClientsApi UpdateApiClient Put /management/api-clients/{id} Update an Api client.
BookmarksApi CreateBookmark Post /bookmarks Create a bookmark at the current time.
BookmarksApi DeleteBookmark Delete /bookmarks/{bookmarkId} Delete a bookmark.
BookmarksApi GetBookmarkById Get /bookmarks/{bookmarkId} Get a bookmark by ID.
BookmarksApi GetBookmarks Get /bookmarks List all bookmarks.
BookmarksApi GetVdbGroupsByBookmark Get /bookmarks/{bookmarkId}/vdb-groups List VDB Groups compatible with this bookmark.
DSourcesApi CreateTagsDsource Post /dsources/{dsourceId}/tags Create tags for a dSource.
DSourcesApi GetDsourceById Get /dsources/{dsourceId} Get a dSource by ID.
DSourcesApi GetDsources Get /dsources List all dSources.
DSourcesApi GetTagsDsource Get /dsources/{dsourceId}/tags Get tags for a dSource.
EnginesApi ConnectivityCheck Post /engines/connectivity/check Checks connectivity between an engine and a remote host on a given port.
EnvironmentsApi CreateEnvironmentTags Post /environments/{environmentId}/tags Create tags for an Environment.
EnvironmentsApi CreateEnvironments Post /environments Create an environment.
EnvironmentsApi DeleteEnvironment Delete /environments/{environmentId} Delete an environment by ID.
EnvironmentsApi DisableEnvironment Put /environments/{environmentId}/disable Disable environment.
EnvironmentsApi EnableEnvironment Put /environments/{environmentId}/enable Enable a disabled environment.
EnvironmentsApi GetEnvironmentById Get /environments/{environmentId} Returns an environment by ID.
EnvironmentsApi GetEnvironments Get /environments List all environments.
EnvironmentsApi GetTagsEnvironment Get /environments/{environmentId}/tags Get tags for an Environment.
EnvironmentsApi ListEnvironmentUsers Get /environments/{environmentId}/users List environment users.
EnvironmentsApi RefreshEnvironment Put /environments/{environmentId}/refresh Refresh environment.
EnvironmentsApi UpdateEnvironment Put /environments/{environmentId} Update an environment by ID.
JobsApi AbandonJob Post /jobs/{jobId}/abandon Abandons a job.
JobsApi GetJobById Get /jobs/{jobId} Returns a job by ID.
ManagementApi CreateHashicorpVault Post /management/vaults/hashicorp Configure a new Hashicorp Vault
ManagementApi DeleteHashicorpVault Delete /management/vaults/hashicorp/{vaultId} Delete a Hashicorp vault by id
ManagementApi GetHashicorpVault Get /management/vaults/hashicorp/{vaultId} Get a Hashicorp vault by id
ManagementApi GetHashicorpVaults Get /management/vaults/hashicorp Returns a list of configured Hashicorp vaults.
ManagementApi GetRegisteredEngine Get /management/engines/{engineId} Returns a registered engine by ID.
ManagementApi GetRegisteredEngines Get /management/engines Returns a list of registered engines.
ManagementApi RegisterEngine Post /management/engines Register an engine.
ManagementApi UnregisterEngine Delete /management/engines/{engineId} Unregister an engine.
ManagementApi UpdateRegisteredEngine Put /management/engines/{engineId} Update a registered engine.
ReportingApi GetVirtualizationStorageSummaryReport Get /reporting/virtualization-storage-summary-report Gets the storage summary report for virtualization engines.
SnapshotsApi GetSnapshotById Get /snapshots/{snapshotId} Get a Snapshot by ID.
SnapshotsApi GetSnapshots Get /snapshots List Snapshots for a dSource or VDB.
SourcesApi GetSourceById Get /sources/{sourceId} Get a source by ID.
SourcesApi GetSources Get /sources List all sources.
VDBGroupsApi CreateVdbGroup Post /vdb-groups Create a new VDBGroup.
VDBGroupsApi DeleteVdbGroup Delete /vdb-groups/{vdbGroupId} Delete a VDBGoup.
VDBGroupsApi GetBookmarksByVdbGroup Get /vdb-groups/{vdbGroupId}/bookmarks List bookmarks compatible with this VDB Group.
VDBGroupsApi GetVdbGroup Get /vdb-groups/{vdbGroupId} Get a VDBGroup by name.
VDBGroupsApi GetVdbGroups Get /vdb-groups List all VDBGroups.
VDBGroupsApi RefreshVdbGroup Post /vdb-groups/{vdbGroupId}/refresh Refresh a VDBGroup.
VDBGroupsApi RollbackVdbGroup Post /vdb-groups/{vdbGroupId}/rollback Rollback a VDBGroup.
VDBsApi CreateVdbTags Post /vdbs/{vdbId}/tags Create tags for a VDB.
VDBsApi DeleteVdb Post /vdbs/{vdbId}/delete Delete a VDB.
VDBsApi DeleteVdbTags Post /vdbs/{vdbId}/tags/delete Delete tags for a VDB.
VDBsApi DisableVdb Post /vdbs/{vdbId}/disable Disable a VDB.
VDBsApi EnableVdb Post /vdbs/{vdbId}/enable Enable a VDB.
VDBsApi GetTagsVdb Get /vdbs/{vdbId}/tags Get tags for a VDB.
VDBsApi GetVdbById Get /vdbs/{vdbId} Get a VDB by ID.
VDBsApi GetVdbs Get /vdbs List all vdbs.
VDBsApi ProvisionVdbBySnapshot Post /vdbs/provision_by_snapshot Provision a new VDB by snapshot.
VDBsApi ProvisionVdbByTimestamp Post /vdbs/provision_by_timestamp Provision a new VDB by timestamp.
VDBsApi RefreshVdbBySnapshot Post /vdbs/{vdbId}/refresh_by_snapshot Refresh a VDB by snapshot.
VDBsApi RefreshVdbByTimestamp Post /vdbs/{vdbId}/refresh_by_timestamp Refresh a VDB by timestamp.
VDBsApi RollbackVdbBySnapshot Post /vdbs/{vdbId}/rollback_by_snapshot Rollback a VDB by snapshot.
VDBsApi RollbackVdbByTimestamp Post /vdbs/{vdbId}/rollback_by_timestamp Rollback a VDB by timestamp.
VDBsApi SearchVdbs Post /vdbs/search Search for VDBs.
VDBsApi StartVdb Post /vdbs/{vdbId}/start Start a VDB.
VDBsApi StopVdb Post /vdbs/{vdbId}/stop Stop a VDB.
VDBsApi UpdateVdbById Patch /vdbs/{vdbId} Update values of a VDB

Documentation For Models

Documentation For Authorization

ApiKeyAuth

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

Note, each API key must be added to a map of map[string]APIKey where the key is: Authorization and passed in as the auth context for each request.

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

[email protected]