\ConnectionApi

All URIs are relative to http://localhost/api/v1

MethodHTTP requestDescription
DeleteConnectionDelete /connections/{connection_id}Delete a connection
GetConnectionGet /connections/{connection_id}Get a connection
GetConnectionsGet /connectionsList connections
PatchConnectionPatch /connections/{connection_id}Update a connection
PostConnectionPost /connectionsCreate a connection
TestConnectionPost /connections/testTest a connection

DeleteConnection

DeleteConnection(ctx, connectionId).Execute()

Delete a connection

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    connectionId := "connectionId_example" // string | The connection ID.

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.ConnectionApi.DeleteConnection(context.Background(), connectionId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `ConnectionApi.DeleteConnection``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

NameTypeDescriptionNotes
ctxcontext.Contextcontext for authentication, logging, cancellation, deadlines, tracing, etc.
connectionIdstringThe connection ID.

Other Parameters

Other parameters are passed through a pointer to a apiDeleteConnectionRequest struct via the builder pattern

NameTypeDescriptionNotes

Return type

(empty response body)

Authorization

Basic, Kerberos

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetConnection

Connection GetConnection(ctx, connectionId).Execute()

Get a connection

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    connectionId := "connectionId_example" // string | The connection ID.

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.ConnectionApi.GetConnection(context.Background(), connectionId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `ConnectionApi.GetConnection``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetConnection`: Connection
    fmt.Fprintf(os.Stdout, "Response from `ConnectionApi.GetConnection`: %v\n", resp)
}

Path Parameters

NameTypeDescriptionNotes
ctxcontext.Contextcontext for authentication, logging, cancellation, deadlines, tracing, etc.
connectionIdstringThe connection ID.

Other Parameters

Other parameters are passed through a pointer to a apiGetConnectionRequest struct via the builder pattern

NameTypeDescriptionNotes

Return type

Connection

Authorization

Basic, Kerberos

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

GetConnections

ConnectionCollection GetConnections(ctx).Limit(limit).Offset(offset).OrderBy(orderBy).Execute()

List connections

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    limit := int32(56) // int32 | The numbers of items to return. (optional) (default to 100)
    offset := int32(56) // int32 | The number of items to skip before starting to collect the result set. (optional)
    orderBy := "orderBy_example" // string | The name of the field to order the results by. Prefix a field name with `-` to reverse the sort order.  *New in version 2.1.0*  (optional)

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.ConnectionApi.GetConnections(context.Background()).Limit(limit).Offset(offset).OrderBy(orderBy).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `ConnectionApi.GetConnections``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetConnections`: ConnectionCollection
    fmt.Fprintf(os.Stdout, "Response from `ConnectionApi.GetConnections`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiGetConnectionsRequest struct via the builder pattern

NameTypeDescriptionNotes
limitint32The numbers of items to return.[default to 100]
offsetint32The number of items to skip before starting to collect the result set.
orderBystringThe name of the field to order the results by. Prefix a field name with `-` to reverse the sort order. New in version 2.1.0

Return type

ConnectionCollection

Authorization

Basic, Kerberos

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

PatchConnection

Connection PatchConnection(ctx, connectionId).Connection(connection).UpdateMask(updateMask).Execute()

Update a connection

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    connectionId := "connectionId_example" // string | The connection ID.
    connection := *openapiclient.NewConnection() // Connection | 
    updateMask := []string{"Inner_example"} // []string | The fields to update on the resource. If absent or empty, all modifiable fields are updated. A comma-separated list of fully qualified names of fields.  (optional)

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.ConnectionApi.PatchConnection(context.Background(), connectionId).Connection(connection).UpdateMask(updateMask).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `ConnectionApi.PatchConnection``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `PatchConnection`: Connection
    fmt.Fprintf(os.Stdout, "Response from `ConnectionApi.PatchConnection`: %v\n", resp)
}

Path Parameters

NameTypeDescriptionNotes
ctxcontext.Contextcontext for authentication, logging, cancellation, deadlines, tracing, etc.
connectionIdstringThe connection ID.

Other Parameters

Other parameters are passed through a pointer to a apiPatchConnectionRequest struct via the builder pattern

NameTypeDescriptionNotes

connection | Connection | | updateMask | []string | The fields to update on the resource. If absent or empty, all modifiable fields are updated. A comma-separated list of fully qualified names of fields. |

Return type

Connection

Authorization

Basic, Kerberos

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

PostConnection

Connection PostConnection(ctx).Connection(connection).Execute()

Create a connection

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    connection := *openapiclient.NewConnection() // Connection | 

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.ConnectionApi.PostConnection(context.Background()).Connection(connection).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `ConnectionApi.PostConnection``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `PostConnection`: Connection
    fmt.Fprintf(os.Stdout, "Response from `ConnectionApi.PostConnection`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiPostConnectionRequest struct via the builder pattern

NameTypeDescriptionNotes
connectionConnection

Return type

Connection

Authorization

Basic, Kerberos

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

TestConnection

ConnectionTest TestConnection(ctx).Connection(connection).Execute()

Test a connection

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    connection := *openapiclient.NewConnection() // Connection | 

    configuration := openapiclient.NewConfiguration()
    api_client := openapiclient.NewAPIClient(configuration)
    resp, r, err := api_client.ConnectionApi.TestConnection(context.Background()).Connection(connection).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `ConnectionApi.TestConnection``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `TestConnection`: ConnectionTest
    fmt.Fprintf(os.Stdout, "Response from `ConnectionApi.TestConnection`: %v\n", resp)
}

Path Parameters

Other Parameters

Other parameters are passed through a pointer to a apiTestConnectionRequest struct via the builder pattern

NameTypeDescriptionNotes
connectionConnection

Return type

ConnectionTest

Authorization

Basic, Kerberos

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]