All URIs are relative to https://api.au.sumologic.com/api
Method | HTTP request | Description |
---|---|---|
CreateSearchJob | Post /v1/search/jobs | Create a Search Job. |
DeleteSearchJob | Delete /v1/search/jobs/{searchJobId} | Delete a search job. |
GetSearchJobMessages | Get /v1/search/jobs/{searchJobId}/messages | Fetch messages found by a search job. |
GetSearchJobRecords | Get /v1/search/jobs/{searchJobId}/records | Fetch records produced by a search job. |
GetSearchJobStatus | Get /v1/search/jobs/{searchJobId} | Get status for a search job. |
CreateSearchJob(ctx).SearchJobDefinition(searchJobDefinition).Execute()
Create a Search Job.
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
searchJobDefinition := *openapiclient.NewSearchJobDefinition() // SearchJobDefinition | Create Search Job request body.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DefaultApi.CreateSearchJob(context.Background()).SearchJobDefinition(searchJobDefinition).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.CreateSearchJob``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Other parameters are passed through a pointer to a apiCreateSearchJobRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
searchJobDefinition | SearchJobDefinition | Create Search Job request body. |
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteSearchJob(ctx, searchJobId).Execute()
Delete a search job.
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
searchJobId := "2207828B17FE1D99" // string | The identifier of the search job to retrieve.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DefaultApi.DeleteSearchJob(context.Background(), searchJobId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.DeleteSearchJob``: %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. | |
searchJobId | string | The identifier of the search job to retrieve. |
Other parameters are passed through a pointer to a apiDeleteSearchJobRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SearchJobMessages GetSearchJobMessages(ctx, searchJobId).Offset(offset).Limit(limit).Execute()
Fetch messages found by a search job.
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
searchJobId := "2207828B17FE1D99" // string | The identifier of the search job to retrieve.
offset := int32(56) // int32 | The position from where to start the search operation.
limit := int32(56) // int32 | Limit the number of messages returned in the response. The number of messages returned may be less than the `limit`.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DefaultApi.GetSearchJobMessages(context.Background(), searchJobId).Offset(offset).Limit(limit).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetSearchJobMessages``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetSearchJobMessages`: SearchJobMessages
fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GetSearchJobMessages`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
searchJobId | string | The identifier of the search job to retrieve. |
Other parameters are passed through a pointer to a apiGetSearchJobMessagesRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
offset | int32 | The position from where to start the search operation. | limit | int32 | Limit the number of messages returned in the response. The number of messages returned may be less than the `limit`. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SearchJobRecords GetSearchJobRecords(ctx, searchJobId).Offset(offset).Limit(limit).Execute()
Fetch records produced by a search job.
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
searchJobId := "2207828B17FE1D99" // string | The identifier of the search job to retrieve.
offset := int32(56) // int32 | The position from where to start the search operation.
limit := int32(56) // int32 | Limit the number of records returned in the response. The number of records returned may be less than the `limit`.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DefaultApi.GetSearchJobRecords(context.Background(), searchJobId).Offset(offset).Limit(limit).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetSearchJobRecords``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetSearchJobRecords`: SearchJobRecords
fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GetSearchJobRecords`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
searchJobId | string | The identifier of the search job to retrieve. |
Other parameters are passed through a pointer to a apiGetSearchJobRecordsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
offset | int32 | The position from where to start the search operation. | limit | int32 | Limit the number of records returned in the response. The number of records returned may be less than the `limit`. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SearchJobState GetSearchJobStatus(ctx, searchJobId).Execute()
Get status for a search job.
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
searchJobId := "2207828B17FE1D99" // string | The identifier of the search job to retrieve.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.DefaultApi.GetSearchJobStatus(context.Background(), searchJobId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `DefaultApi.GetSearchJobStatus``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetSearchJobStatus`: SearchJobState
fmt.Fprintf(os.Stdout, "Response from `DefaultApi.GetSearchJobStatus`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
searchJobId | string | The identifier of the search job to retrieve. |
Other parameters are passed through a pointer to a apiGetSearchJobStatusRequest 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]