All URIs are relative to https://yasm.prodyna.com:443/api/graph/v1
Method | HTTP request | Description |
---|---|---|
DeleteImage | Delete /images/{imageId} | Delete Image |
ReadImage | Get /images/{imageId} | Read an Image |
UploadImage | Post /images | Upload an Image as binary and retrieve UUID |
Status DeleteImage(ctx, imageId).Execute()
Delete Image
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/prodyna-yasm/yasm-api-go"
)
func main() {
imageId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ImageAPI.DeleteImage(context.Background(), imageId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ImageAPI.DeleteImage``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DeleteImage`: Status
fmt.Fprintf(os.Stdout, "Response from `ImageAPI.DeleteImage`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
imageId | string |
Other parameters are passed through a pointer to a apiDeleteImageRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
*os.File ReadImage(ctx, imageId).Execute()
Read an Image
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/prodyna-yasm/yasm-api-go"
)
func main() {
imageId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ImageAPI.ReadImage(context.Background(), imageId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ImageAPI.ReadImage``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ReadImage`: *os.File
fmt.Fprintf(os.Stdout, "Response from `ImageAPI.ReadImage`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
imageId | string |
Other parameters are passed through a pointer to a apiReadImageRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: image/jpeg, application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ImageDetails UploadImage(ctx).Body(body).Execute()
Upload an Image as binary and retrieve UUID
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/prodyna-yasm/yasm-api-go"
)
func main() {
body := os.NewFile(1234, "some_file") // *os.File | (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.ImageAPI.UploadImage(context.Background()).Body(body).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ImageAPI.UploadImage``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UploadImage`: ImageDetails
fmt.Fprintf(os.Stdout, "Response from `ImageAPI.UploadImage`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiUploadImageRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
body | *os.File |
- Content-Type: application/octet-stream
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]