10 KiB
\AnnotationsAPI
All URIs are relative to /api/v1
| Method | HTTP request | Description |
|---|---|---|
| CreateAnnotation | Post /annotations | Create annotation (org scoped) |
| DeleteAnnotation | Delete /annotations/{id} | Delete annotation (org scoped) |
| GetAnnotation | Get /annotations/{id} | Get annotation by ID (org scoped) |
| ListAnnotations | Get /annotations | List annotations (org scoped) |
| UpdateAnnotation | Patch /annotations/{id} | Update annotation (org scoped) |
CreateAnnotation
DtoAnnotationResponse CreateAnnotation(ctx).Body(body).XOrgID(xOrgID).Execute()
Create annotation (org scoped)
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/glueops/autoglue-sdk-go"
)
func main() {
body := *openapiclient.NewDtoCreateAnnotationRequest() // DtoCreateAnnotationRequest | Annotation payload
xOrgID := "xOrgID_example" // string | Organization UUID (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AnnotationsAPI.CreateAnnotation(context.Background()).Body(body).XOrgID(xOrgID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AnnotationsAPI.CreateAnnotation``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateAnnotation`: DtoAnnotationResponse
fmt.Fprintf(os.Stdout, "Response from `AnnotationsAPI.CreateAnnotation`: %v\n", resp)
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiCreateAnnotationRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| body | DtoCreateAnnotationRequest | Annotation payload | |
| xOrgID | string | Organization UUID |
Return type
Authorization
OrgKeyAuth, OrgSecretAuth, BearerAuth
HTTP request headers
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteAnnotation
string DeleteAnnotation(ctx, id).XOrgID(xOrgID).Execute()
Delete annotation (org scoped)
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/glueops/autoglue-sdk-go"
)
func main() {
id := "id_example" // string | Annotation ID (UUID)
xOrgID := "xOrgID_example" // string | Organization UUID (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AnnotationsAPI.DeleteAnnotation(context.Background(), id).XOrgID(xOrgID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AnnotationsAPI.DeleteAnnotation``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `DeleteAnnotation`: string
fmt.Fprintf(os.Stdout, "Response from `AnnotationsAPI.DeleteAnnotation`: %v\n", resp)
}
Path Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| id | string | Annotation ID (UUID) |
Other Parameters
Other parameters are passed through a pointer to a apiDeleteAnnotationRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
xOrgID | string | Organization UUID |
Return type
string
Authorization
OrgKeyAuth, OrgSecretAuth, BearerAuth
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GetAnnotation
DtoAnnotationResponse GetAnnotation(ctx, id).XOrgID(xOrgID).Execute()
Get annotation by ID (org scoped)
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/glueops/autoglue-sdk-go"
)
func main() {
id := "id_example" // string | Annotation ID (UUID)
xOrgID := "xOrgID_example" // string | Organization UUID (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AnnotationsAPI.GetAnnotation(context.Background(), id).XOrgID(xOrgID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AnnotationsAPI.GetAnnotation``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetAnnotation`: DtoAnnotationResponse
fmt.Fprintf(os.Stdout, "Response from `AnnotationsAPI.GetAnnotation`: %v\n", resp)
}
Path Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| id | string | Annotation ID (UUID) |
Other Parameters
Other parameters are passed through a pointer to a apiGetAnnotationRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
xOrgID | string | Organization UUID |
Return type
Authorization
OrgKeyAuth, OrgSecretAuth, BearerAuth
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListAnnotations
[]DtoAnnotationResponse ListAnnotations(ctx).XOrgID(xOrgID).Key(key).Value(value).Q(q).Execute()
List annotations (org scoped)
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/glueops/autoglue-sdk-go"
)
func main() {
xOrgID := "xOrgID_example" // string | Organization UUID (optional)
key := "key_example" // string | Exact key (optional)
value := "value_example" // string | Exact value (optional)
q := "q_example" // string | key contains (case-insensitive) (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AnnotationsAPI.ListAnnotations(context.Background()).XOrgID(xOrgID).Key(key).Value(value).Q(q).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AnnotationsAPI.ListAnnotations``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListAnnotations`: []DtoAnnotationResponse
fmt.Fprintf(os.Stdout, "Response from `AnnotationsAPI.ListAnnotations`: %v\n", resp)
}
Path Parameters
Other Parameters
Other parameters are passed through a pointer to a apiListAnnotationsRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|---|---|---|
| xOrgID | string | Organization UUID | |
| key | string | Exact key | |
| value | string | Exact value | |
| q | string | key contains (case-insensitive) |
Return type
Authorization
OrgKeyAuth, OrgSecretAuth, BearerAuth
HTTP request headers
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UpdateAnnotation
DtoAnnotationResponse UpdateAnnotation(ctx, id).Body(body).XOrgID(xOrgID).Execute()
Update annotation (org scoped)
Example
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/glueops/autoglue-sdk-go"
)
func main() {
id := "id_example" // string | Annotation ID (UUID)
body := *openapiclient.NewDtoUpdateAnnotationRequest() // DtoUpdateAnnotationRequest | Fields to update
xOrgID := "xOrgID_example" // string | Organization UUID (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.AnnotationsAPI.UpdateAnnotation(context.Background(), id).Body(body).XOrgID(xOrgID).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `AnnotationsAPI.UpdateAnnotation``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateAnnotation`: DtoAnnotationResponse
fmt.Fprintf(os.Stdout, "Response from `AnnotationsAPI.UpdateAnnotation`: %v\n", resp)
}
Path Parameters
| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| id | string | Annotation ID (UUID) |
Other Parameters
Other parameters are passed through a pointer to a apiUpdateAnnotationRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
body | DtoUpdateAnnotationRequest | Fields to update | xOrgID | string | Organization UUID |
Return type
Authorization
OrgKeyAuth, OrgSecretAuth, BearerAuth
HTTP request headers
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]