Skip to content

Latest commit

 

History

History
142 lines (88 loc) · 3.61 KB

StorageAPI.md

File metadata and controls

142 lines (88 loc) · 3.61 KB

\StorageAPI

All URIs are relative to https://127.0.0.1:8006/api2/json

Method HTTP request Description
CreateStorage Post /storage createStorage
GetStorage Get /storage getStorage

CreateStorage

CreateStorage200Response CreateStorage(ctx).CreateStorageRequest(createStorageRequest).Execute()

createStorage

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/DirkTheDaring/px-api-client-go"
)

func main() {
    createStorageRequest := *openapiclient.NewCreateStorageRequest("Storage_example", "Type_example") // CreateStorageRequest |  (optional)

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

Path Parameters

Other Parameters

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

Name Type Description Notes
createStorageRequest CreateStorageRequest

Return type

CreateStorage200Response

Authorization

cookie, token

HTTP request headers

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

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

GetStorage

GetStorage200Response GetStorage(ctx).Type_(type_).Execute()

getStorage

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/DirkTheDaring/px-api-client-go"
)

func main() {
    type_ := "type__example" // string | Only list storage of specific type (optional)

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

Path Parameters

Other Parameters

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

Name Type Description Notes
type_ string Only list storage of specific type

Return type

GetStorage200Response

Authorization

cookie, token

HTTP request headers

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

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