Skip to content

Latest commit

 

History

History
831 lines (526 loc) · 26.1 KB

ObservablesAPI.md

File metadata and controls

831 lines (526 loc) · 26.1 KB

\ObservablesAPI

All URIs are relative to http://localhost

Method HTTP request Description
AddContextApiV2ObservablesObservableIdContextPost Post /api/v2/observables/{observable_id}/context Add Context
AddTextApiV2ObservablesAddTextPost Post /api/v2/observables/add_text Add Text
BulkAddApiV2ObservablesBulkPost Post /api/v2/observables/bulk Bulk Add
DeleteApiV2ObservablesObservableIdDelete Delete /api/v2/observables/{observable_id} Delete
DeleteContextApiV2ObservablesObservableIdContextDeletePost Post /api/v2/observables/{observable_id}/context/delete Delete Context
DetailsApiV2ObservablesObservableIdGet Get /api/v2/observables/{observable_id} Details
NewApiV2ObservablesPost Post /api/v2/observables/ New
NewExtendedApiV2ObservablesExtendedPost Post /api/v2/observables/extended New Extended
ObservablesRootApiV2ObservablesGet Get /api/v2/observables/ Observables Root
PatchApiV2ObservablesObservableIdPatch Patch /api/v2/observables/{observable_id} Patch
SearchApiV2ObservablesSearchPost Post /api/v2/observables/search Search
TagObservableApiV2ObservablesTagPost Post /api/v2/observables/tag Tag Observable

AddContextApiV2ObservablesObservableIdContextPost

ResponseAddContextApiV2ObservablesObservableIdContextPost AddContextApiV2ObservablesObservableIdContextPost(ctx, observableId).AddContextRequest(addContextRequest).Execute()

Add Context

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/yeti-platform/goyeti"
)

func main() {
	observableId := TODO // interface{} | 
	addContextRequest := *openapiclient.NewAddContextRequest("Source_example", map[string]interface{}(123)) // AddContextRequest | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.ObservablesAPI.AddContextApiV2ObservablesObservableIdContextPost(context.Background(), observableId).AddContextRequest(addContextRequest).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `ObservablesAPI.AddContextApiV2ObservablesObservableIdContextPost``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `AddContextApiV2ObservablesObservableIdContextPost`: ResponseAddContextApiV2ObservablesObservableIdContextPost
	fmt.Fprintf(os.Stdout, "Response from `ObservablesAPI.AddContextApiV2ObservablesObservableIdContextPost`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
observableId interface{}

Other Parameters

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

Name Type Description Notes

addContextRequest | AddContextRequest | |

Return type

ResponseAddContextApiV2ObservablesObservableIdContextPost

Authorization

OAuth2PasswordBearer, APIKeyCookie

HTTP request headers

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

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

AddTextApiV2ObservablesAddTextPost

ResponseAddTextApiV2ObservablesAddTextPost AddTextApiV2ObservablesAddTextPost(ctx).AddTextRequest(addTextRequest).Execute()

Add Text

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/yeti-platform/goyeti"
)

func main() {
	addTextRequest := *openapiclient.NewAddTextRequest("Text_example") // AddTextRequest | 

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

Path Parameters

Other Parameters

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

Name Type Description Notes
addTextRequest AddTextRequest

Return type

ResponseAddTextApiV2ObservablesAddTextPost

Authorization

OAuth2PasswordBearer, APIKeyCookie

HTTP request headers

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

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

BulkAddApiV2ObservablesBulkPost

BulkObservableAddResponse BulkAddApiV2ObservablesBulkPost(ctx).NewBulkObservableAddRequest(newBulkObservableAddRequest).Execute()

Bulk Add

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/yeti-platform/goyeti"
)

func main() {
	newBulkObservableAddRequest := *openapiclient.NewNewBulkObservableAddRequest([]openapiclient.NewObservableRequest{*openapiclient.NewNewObservableRequest("Value_example", openapiclient.ObservableType-Input("cidr"))}) // NewBulkObservableAddRequest | 

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

Path Parameters

Other Parameters

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

Name Type Description Notes
newBulkObservableAddRequest NewBulkObservableAddRequest

Return type

BulkObservableAddResponse

Authorization

OAuth2PasswordBearer, APIKeyCookie

HTTP request headers

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

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

DeleteApiV2ObservablesObservableIdDelete

interface{} DeleteApiV2ObservablesObservableIdDelete(ctx, observableId).Execute()

Delete

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/yeti-platform/goyeti"
)

func main() {
	observableId := "observableId_example" // string | 

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
observableId string

Other Parameters

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

Name Type Description Notes

Return type

interface{}

Authorization

OAuth2PasswordBearer, APIKeyCookie

HTTP request headers

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

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

DeleteContextApiV2ObservablesObservableIdContextDeletePost

ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost DeleteContextApiV2ObservablesObservableIdContextDeletePost(ctx, observableId).DeleteContextRequest(deleteContextRequest).Execute()

Delete Context

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/yeti-platform/goyeti"
)

func main() {
	observableId := TODO // interface{} | 
	deleteContextRequest := *openapiclient.NewDeleteContextRequest("Source_example", map[string]interface{}(123)) // DeleteContextRequest | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.ObservablesAPI.DeleteContextApiV2ObservablesObservableIdContextDeletePost(context.Background(), observableId).DeleteContextRequest(deleteContextRequest).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `ObservablesAPI.DeleteContextApiV2ObservablesObservableIdContextDeletePost``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `DeleteContextApiV2ObservablesObservableIdContextDeletePost`: ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost
	fmt.Fprintf(os.Stdout, "Response from `ObservablesAPI.DeleteContextApiV2ObservablesObservableIdContextDeletePost`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
observableId interface{}

Other Parameters

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

Name Type Description Notes

deleteContextRequest | DeleteContextRequest | |

Return type

ResponseDeleteContextApiV2ObservablesObservableIdContextDeletePost

Authorization

OAuth2PasswordBearer, APIKeyCookie

HTTP request headers

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

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

DetailsApiV2ObservablesObservableIdGet

ResponseDetailsApiV2ObservablesObservableIdGet DetailsApiV2ObservablesObservableIdGet(ctx, observableId).Execute()

Details

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/yeti-platform/goyeti"
)

func main() {
	observableId := TODO // interface{} | 

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
observableId interface{}

Other Parameters

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

Name Type Description Notes

Return type

ResponseDetailsApiV2ObservablesObservableIdGet

Authorization

OAuth2PasswordBearer, APIKeyCookie

HTTP request headers

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

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

NewApiV2ObservablesPost

ResponseNewApiV2ObservablesPost NewApiV2ObservablesPost(ctx).NewObservableRequest(newObservableRequest).Execute()

New

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/yeti-platform/goyeti"
)

func main() {
	newObservableRequest := *openapiclient.NewNewObservableRequest("Value_example", openapiclient.ObservableType-Input("cidr")) // NewObservableRequest | 

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

Path Parameters

Other Parameters

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

Name Type Description Notes
newObservableRequest NewObservableRequest

Return type

ResponseNewApiV2ObservablesPost

Authorization

OAuth2PasswordBearer, APIKeyCookie

HTTP request headers

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

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

NewExtendedApiV2ObservablesExtendedPost

ResponseNewExtendedApiV2ObservablesExtendedPost NewExtendedApiV2ObservablesExtendedPost(ctx).NewExtendedObservableRequest(newExtendedObservableRequest).Execute()

New Extended

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/yeti-platform/goyeti"
)

func main() {
	newExtendedObservableRequest := *openapiclient.NewNewExtendedObservableRequest(*openapiclient.NewObservable1("Value_example", "Key_example", "TODO", openapiclient.RegistryHive("HKEY_CURRENT_CONFIG"))) // NewExtendedObservableRequest | 

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

Path Parameters

Other Parameters

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

Name Type Description Notes
newExtendedObservableRequest NewExtendedObservableRequest

Return type

ResponseNewExtendedApiV2ObservablesExtendedPost

Authorization

OAuth2PasswordBearer, APIKeyCookie

HTTP request headers

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

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

ObservablesRootApiV2ObservablesGet

[]Observable ObservablesRootApiV2ObservablesGet(ctx).Execute()

Observables Root

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/yeti-platform/goyeti"
)

func main() {

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

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

[]Observable

Authorization

OAuth2PasswordBearer, APIKeyCookie

HTTP request headers

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

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

PatchApiV2ObservablesObservableIdPatch

ResponsePatchApiV2ObservablesObservableIdPatch PatchApiV2ObservablesObservableIdPatch(ctx, observableId).PatchObservableRequest(patchObservableRequest).Execute()

Patch

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/yeti-platform/goyeti"
)

func main() {
	observableId := TODO // interface{} | 
	patchObservableRequest := *openapiclient.NewPatchObservableRequest(*openapiclient.NewObservable1("Value_example", "Key_example", "TODO", openapiclient.RegistryHive("HKEY_CURRENT_CONFIG"))) // PatchObservableRequest | 

	configuration := openapiclient.NewConfiguration()
	apiClient := openapiclient.NewAPIClient(configuration)
	resp, r, err := apiClient.ObservablesAPI.PatchApiV2ObservablesObservableIdPatch(context.Background(), observableId).PatchObservableRequest(patchObservableRequest).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `ObservablesAPI.PatchApiV2ObservablesObservableIdPatch``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `PatchApiV2ObservablesObservableIdPatch`: ResponsePatchApiV2ObservablesObservableIdPatch
	fmt.Fprintf(os.Stdout, "Response from `ObservablesAPI.PatchApiV2ObservablesObservableIdPatch`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
observableId interface{}

Other Parameters

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

Name Type Description Notes

patchObservableRequest | PatchObservableRequest | |

Return type

ResponsePatchApiV2ObservablesObservableIdPatch

Authorization

OAuth2PasswordBearer, APIKeyCookie

HTTP request headers

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

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

SearchApiV2ObservablesSearchPost

ObservableSearchResponse SearchApiV2ObservablesSearchPost(ctx).ObservableSearchRequest(observableSearchRequest).Execute()

Search

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/yeti-platform/goyeti"
)

func main() {
	observableSearchRequest := *openapiclient.NewObservableSearchRequest() // ObservableSearchRequest | 

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

Path Parameters

Other Parameters

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

Name Type Description Notes
observableSearchRequest ObservableSearchRequest

Return type

ObservableSearchResponse

Authorization

OAuth2PasswordBearer, APIKeyCookie

HTTP request headers

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

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

TagObservableApiV2ObservablesTagPost

ObservableTagResponse TagObservableApiV2ObservablesTagPost(ctx).ObservableTagRequest(observableTagRequest).Execute()

Tag Observable

Example

package main

import (
	"context"
	"fmt"
	"os"
	openapiclient "github.com/yeti-platform/goyeti"
)

func main() {
	observableTagRequest := *openapiclient.NewObservableTagRequest([]string{"Ids_example"}) // ObservableTagRequest | 

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

Path Parameters

Other Parameters

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

Name Type Description Notes
observableTagRequest ObservableTagRequest

Return type

ObservableTagResponse

Authorization

OAuth2PasswordBearer, APIKeyCookie

HTTP request headers

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

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