All URIs are relative to https://api.au.sumologic.com/api
Method | HTTP request | Description |
---|---|---|
CreateConnection | Post /v1/connections | Create a new connection. |
DeleteConnection | Delete /v1/connections/{id} | Delete a connection. |
GetConnection | Get /v1/connections/{id} | Get a connection. |
ListConnections | Get /v1/connections | Get a list of connections. |
TestConnection | Post /v1/connections/test | Test a new connection url. |
UpdateConnection | Put /v1/connections/{id} | Update a connection. |
Connection CreateConnection(ctx).ConnectionDefinition(connectionDefinition).Execute()
Create a new connection.
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
connectionDefinition := *openapiclient.NewConnectionDefinition("Type_example", "Name_example") // ConnectionDefinition | Information about the new connection.
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.ConnectionManagementApi.CreateConnection(context.Background()).ConnectionDefinition(connectionDefinition).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ConnectionManagementApi.CreateConnection``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateConnection`: Connection
fmt.Fprintf(os.Stdout, "Response from `ConnectionManagementApi.CreateConnection`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiCreateConnectionRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
connectionDefinition | ConnectionDefinition | Information about the new connection. |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteConnection(ctx, id).Type_(type_).Execute()
Delete a connection.
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
id := "id_example" // string | Identifier of the connection to delete.
type_ := "type__example" // string | Type of connection to delete. Valid values are `WebhookConnection`, `ServiceNowConnection`.
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.ConnectionManagementApi.DeleteConnection(context.Background(), id).Type_(type_).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ConnectionManagementApi.DeleteConnection``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | Identifier of the connection to delete. |
Other parameters are passed through a pointer to a apiDeleteConnectionRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
type_ | string | Type of connection to delete. Valid values are `WebhookConnection`, `ServiceNowConnection`. |
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Connection GetConnection(ctx, id).Type_(type_).Execute()
Get a connection.
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
id := "id_example" // string | Identifier of connection to return.
type_ := "type__example" // string | Type of connection to return. Valid values are `WebhookConnection`, `ServiceNowConnection`. (default to "WebhookConnection")
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.ConnectionManagementApi.GetConnection(context.Background(), id).Type_(type_).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ConnectionManagementApi.GetConnection``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetConnection`: Connection
fmt.Fprintf(os.Stdout, "Response from `ConnectionManagementApi.GetConnection`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | Identifier of connection to return. |
Other parameters are passed through a pointer to a apiGetConnectionRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
type_ | string | Type of connection to return. Valid values are `WebhookConnection`, `ServiceNowConnection`. | [default to "WebhookConnection"]
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ListConnectionsResponse ListConnections(ctx).Limit(limit).Token(token).Execute()
Get a list of connections.
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
limit := int32(56) // int32 | Limit the number of connections returned in the response. The number of connections returned may be less than the `limit`. (optional) (default to 100)
token := "token_example" // string | Continuation token to get the next page of results. A page object with the next continuation token is returned in the response body. Subsequent GET requests should specify the continuation token to get the next page of results. `token` is set to null when no more pages are left. (optional)
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.ConnectionManagementApi.ListConnections(context.Background()).Limit(limit).Token(token).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ConnectionManagementApi.ListConnections``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ListConnections`: ListConnectionsResponse
fmt.Fprintf(os.Stdout, "Response from `ConnectionManagementApi.ListConnections`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiListConnectionsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
limit | int32 | Limit the number of connections returned in the response. The number of connections returned may be less than the `limit`. | [default to 100] |
token | string | Continuation token to get the next page of results. A page object with the next continuation token is returned in the response body. Subsequent GET requests should specify the continuation token to get the next page of results. `token` is set to null when no more pages are left. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
TestConnectionResponse TestConnection(ctx).ConnectionDefinition(connectionDefinition).Execute()
Test a new connection url.
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
connectionDefinition := *openapiclient.NewConnectionDefinition("Type_example", "Name_example") // ConnectionDefinition | Information about the new connection.
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.ConnectionManagementApi.TestConnection(context.Background()).ConnectionDefinition(connectionDefinition).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ConnectionManagementApi.TestConnection``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `TestConnection`: TestConnectionResponse
fmt.Fprintf(os.Stdout, "Response from `ConnectionManagementApi.TestConnection`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiTestConnectionRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
connectionDefinition | ConnectionDefinition | Information about the new connection. |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Connection UpdateConnection(ctx, id).ConnectionDefinition(connectionDefinition).Execute()
Update a connection.
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
id := "id_example" // string | Identifier of the connection to update.
connectionDefinition := *openapiclient.NewConnectionDefinition("Type_example", "Name_example") // ConnectionDefinition | Information to update about the connection.
configuration := openapiclient.NewConfiguration()
api_client := openapiclient.NewAPIClient(configuration)
resp, r, err := api_client.ConnectionManagementApi.UpdateConnection(context.Background(), id).ConnectionDefinition(connectionDefinition).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `ConnectionManagementApi.UpdateConnection``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateConnection`: Connection
fmt.Fprintf(os.Stdout, "Response from `ConnectionManagementApi.UpdateConnection`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
id | string | Identifier of the connection to update. |
Other parameters are passed through a pointer to a apiUpdateConnectionRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
connectionDefinition | ConnectionDefinition | Information to update about the connection. |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]