Skip to content

Latest commit

 

History

History
422 lines (270 loc) · 10.2 KB

ProxiesApi.md

File metadata and controls

422 lines (270 loc) · 10.2 KB

\ProxiesApi

All URIs are relative to https://api.basistheory.com

Method HTTP request Description
Create Post /proxies
Delete Delete /proxies/{id}
Get Get /proxies
GetById Get /proxies/{id}
Patch Patch /proxies/{id}
Update Put /proxies/{id}

Create

Proxy Create(ctx).CreateProxyRequest(createProxyRequest).Execute()

Example

package main

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

func main() {
    createProxyRequest := *openapiclient.NewCreateProxyRequest("Name_example", "DestinationUrl_example") // CreateProxyRequest | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.ProxiesApi.Create(context.Background()).CreateProxyRequest(createProxyRequest).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `ProxiesApi.Create``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `Create`: Proxy
    fmt.Fprintf(os.Stdout, "Response from `ProxiesApi.Create`: %v\n", resp)
}

Path Parameters

Other Parameters

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

Name Type Description Notes
createProxyRequest CreateProxyRequest

Return type

Proxy

Authorization

ApiKey

HTTP request headers

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

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

Delete

Delete(ctx, id).Execute()

Example

package main

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

func main() {
    id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | 

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string

Other Parameters

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

Name Type Description Notes

Return type

(empty response body)

Authorization

ApiKey

HTTP request headers

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

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

Get

ProxyPaginatedList Get(ctx).Id(id).Name(name).Page(page).Start(start).Size(size).Execute()

Example

package main

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

func main() {
    id := []string{"Inner_example"} // []string |  (optional)
    name := "name_example" // string |  (optional)
    page := int32(56) // int32 |  (optional)
    start := "start_example" // string |  (optional)
    size := int32(56) // int32 |  (optional)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.ProxiesApi.Get(context.Background()).Id(id).Name(name).Page(page).Start(start).Size(size).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `ProxiesApi.Get``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `Get`: ProxyPaginatedList
    fmt.Fprintf(os.Stdout, "Response from `ProxiesApi.Get`: %v\n", resp)
}

Path Parameters

Other Parameters

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

Name Type Description Notes
id []string
name string
page int32
start string
size int32

Return type

ProxyPaginatedList

Authorization

ApiKey

HTTP request headers

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

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

GetById

Proxy GetById(ctx, id).Execute()

Example

package main

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

func main() {
    id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | 

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string

Other Parameters

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

Name Type Description Notes

Return type

Proxy

Authorization

ApiKey

HTTP request headers

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

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

Patch

Patch(ctx, id).PatchProxyRequest(patchProxyRequest).Execute()

Example

package main

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

func main() {
    id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | 
    patchProxyRequest := *openapiclient.NewPatchProxyRequest() // PatchProxyRequest | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    r, err := apiClient.ProxiesApi.Patch(context.Background(), id).PatchProxyRequest(patchProxyRequest).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `ProxiesApi.Patch``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string

Other Parameters

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

Name Type Description Notes

patchProxyRequest | PatchProxyRequest | |

Return type

(empty response body)

Authorization

ApiKey

HTTP request headers

  • Content-Type: application/merge-patch+json
  • Accept: application/json

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

Update

Proxy Update(ctx, id).UpdateProxyRequest(updateProxyRequest).Execute()

Example

package main

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

func main() {
    id := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | 
    updateProxyRequest := *openapiclient.NewUpdateProxyRequest("Name_example", "DestinationUrl_example") // UpdateProxyRequest | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.ProxiesApi.Update(context.Background(), id).UpdateProxyRequest(updateProxyRequest).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `ProxiesApi.Update``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `Update`: Proxy
    fmt.Fprintf(os.Stdout, "Response from `ProxiesApi.Update`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
id string

Other Parameters

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

Name Type Description Notes

updateProxyRequest | UpdateProxyRequest | |

Return type

Proxy

Authorization

ApiKey

HTTP request headers

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

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