Skip to content

Latest commit

 

History

History
316 lines (212 loc) · 11.8 KB

File metadata and controls

316 lines (212 loc) · 11.8 KB

SearchAPI

All URIs are relative to https://api.reveng.ai

Method HTTP request Description
SearchBinaries Get /v2/search/binaries Binaries search
SearchCollections Get /v2/search/collections Collections search
SearchFunctions Get /v2/search/functions Functions search
SearchTags Get /v2/search/tags Tags search

SearchBinaries

BaseResponseBinarySearchResponse SearchBinaries(ctx).Page(page).PageSize(pageSize).PartialName(partialName).PartialSha256(partialSha256).Tags(tags).ModelName(modelName).UserFilesOnly(userFilesOnly).Execute()

Binaries search

Example

package main

import (
	"context"
	"fmt"
	"os"
	revengai "github.com/RevEngAI/sdk-go/v3"
)

func main() {
	page := int32(56) // int32 | The page number to retrieve. (optional) (default to 1)
	pageSize := int32(56) // int32 | Number of items per page. (optional) (default to 10)
	partialName := "partialName_example" // string | The partial or full name of the binary being searched (optional)
	partialSha256 := "partialSha256_example" // string | The partial or full sha256 of the binary being searched (optional)
	tags := []string{"Inner_example"} // []string | The tags to be searched for (optional)
	modelName := "modelName_example" // string | The name of the model used to analyze the binary the function belongs to (optional)
	userFilesOnly := true // bool | Whether to only search user's uploaded files (optional) (default to false)

	configuration := revengai.NewConfiguration()
	apiClient := revengai.NewAPIClient(configuration)
	resp, r, err := apiClient.SearchAPI.SearchBinaries(context.Background()).Page(page).PageSize(pageSize).PartialName(partialName).PartialSha256(partialSha256).Tags(tags).ModelName(modelName).UserFilesOnly(userFilesOnly).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SearchAPI.SearchBinaries``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `SearchBinaries`: BaseResponseBinarySearchResponse
	fmt.Fprintf(os.Stdout, "Response from `SearchAPI.SearchBinaries`: %v\n", resp)
}

Path Parameters

Other Parameters

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

Name Type Description Notes
page int32 The page number to retrieve. [default to 1]
pageSize int32 Number of items per page. [default to 10]
partialName string The partial or full name of the binary being searched
partialSha256 string The partial or full sha256 of the binary being searched
tags []string The tags to be searched for
modelName string The name of the model used to analyze the binary the function belongs to
userFilesOnly bool Whether to only search user's uploaded files [default to false]

Return type

BaseResponseBinarySearchResponse

Authorization

APIKey

HTTP request headers

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

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

SearchCollections

BaseResponseCollectionSearchResponse SearchCollections(ctx).Page(page).PageSize(pageSize).PartialCollectionName(partialCollectionName).PartialBinaryName(partialBinaryName).PartialBinarySha256(partialBinarySha256).Tags(tags).ModelName(modelName).Filters(filters).OrderBy(orderBy).OrderByDirection(orderByDirection).Execute()

Collections search

Example

package main

import (
	"context"
	"fmt"
	"os"
	revengai "github.com/RevEngAI/sdk-go/v3"
)

func main() {
	page := int32(56) // int32 | The page number to retrieve. (optional) (default to 1)
	pageSize := int32(56) // int32 | Number of items per page. (optional) (default to 10)
	partialCollectionName := "partialCollectionName_example" // string | The partial or full name of the collection being searched (optional)
	partialBinaryName := "partialBinaryName_example" // string | The partial or full name of the binary belonging to the collection (optional)
	partialBinarySha256 := "partialBinarySha256_example" // string | The partial or full sha256 of the binary belonging to the collection (optional)
	tags := []string{"Inner_example"} // []string | The tags to be searched for (optional)
	modelName := "modelName_example" // string | The name of the model used to analyze the binary the function belongs to (optional)
	filters := []revengai.Filters{revengai.Filters("official_only")} // []Filters | The filters to be used for the search (optional)
	orderBy := revengai.app__api__rest__v2__collections__enums__OrderBy("created") // AppApiRestV2CollectionsEnumsOrderBy | The field to sort the order by in the results (optional) (default to "created")
	orderByDirection := revengai.Order("ASC") // Order | The order direction in which to return results (optional) (default to "DESC")

	configuration := revengai.NewConfiguration()
	apiClient := revengai.NewAPIClient(configuration)
	resp, r, err := apiClient.SearchAPI.SearchCollections(context.Background()).Page(page).PageSize(pageSize).PartialCollectionName(partialCollectionName).PartialBinaryName(partialBinaryName).PartialBinarySha256(partialBinarySha256).Tags(tags).ModelName(modelName).Filters(filters).OrderBy(orderBy).OrderByDirection(orderByDirection).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SearchAPI.SearchCollections``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `SearchCollections`: BaseResponseCollectionSearchResponse
	fmt.Fprintf(os.Stdout, "Response from `SearchAPI.SearchCollections`: %v\n", resp)
}

Path Parameters

Other Parameters

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

Name Type Description Notes
page int32 The page number to retrieve. [default to 1]
pageSize int32 Number of items per page. [default to 10]
partialCollectionName string The partial or full name of the collection being searched
partialBinaryName string The partial or full name of the binary belonging to the collection
partialBinarySha256 string The partial or full sha256 of the binary belonging to the collection
tags []string The tags to be searched for
modelName string The name of the model used to analyze the binary the function belongs to
filters []Filters The filters to be used for the search
orderBy AppApiRestV2CollectionsEnumsOrderBy The field to sort the order by in the results [default to "created"]
orderByDirection Order The order direction in which to return results [default to "DESC"]

Return type

BaseResponseCollectionSearchResponse

Authorization

APIKey

HTTP request headers

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

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

SearchFunctions

BaseResponseFunctionSearchResponse SearchFunctions(ctx).Page(page).PageSize(pageSize).PartialName(partialName).ModelName(modelName).Execute()

Functions search

Example

package main

import (
	"context"
	"fmt"
	"os"
	revengai "github.com/RevEngAI/sdk-go/v3"
)

func main() {
	page := int32(56) // int32 | The page number to retrieve. (optional) (default to 1)
	pageSize := int32(56) // int32 | Number of items per page. (optional) (default to 10)
	partialName := "partialName_example" // string | The partial or full name of the function being searched (optional)
	modelName := "modelName_example" // string | The name of the model used to analyze the binary the function belongs to (optional)

	configuration := revengai.NewConfiguration()
	apiClient := revengai.NewAPIClient(configuration)
	resp, r, err := apiClient.SearchAPI.SearchFunctions(context.Background()).Page(page).PageSize(pageSize).PartialName(partialName).ModelName(modelName).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SearchAPI.SearchFunctions``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `SearchFunctions`: BaseResponseFunctionSearchResponse
	fmt.Fprintf(os.Stdout, "Response from `SearchAPI.SearchFunctions`: %v\n", resp)
}

Path Parameters

Other Parameters

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

Name Type Description Notes
page int32 The page number to retrieve. [default to 1]
pageSize int32 Number of items per page. [default to 10]
partialName string The partial or full name of the function being searched
modelName string The name of the model used to analyze the binary the function belongs to

Return type

BaseResponseFunctionSearchResponse

Authorization

APIKey

HTTP request headers

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

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

SearchTags

BaseResponseTagSearchResponse SearchTags(ctx).PartialName(partialName).Page(page).PageSize(pageSize).Execute()

Tags search

Example

package main

import (
	"context"
	"fmt"
	"os"
	revengai "github.com/RevEngAI/sdk-go/v3"
)

func main() {
	partialName := "partialName_example" // string | The partial or full name of the tag to search for
	page := int32(56) // int32 | The page number to retrieve. (optional) (default to 1)
	pageSize := int32(56) // int32 | Number of items per page. (optional) (default to 10)

	configuration := revengai.NewConfiguration()
	apiClient := revengai.NewAPIClient(configuration)
	resp, r, err := apiClient.SearchAPI.SearchTags(context.Background()).PartialName(partialName).Page(page).PageSize(pageSize).Execute()
	if err != nil {
		fmt.Fprintf(os.Stderr, "Error when calling `SearchAPI.SearchTags``: %v\n", err)
		fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
	}
	// response from `SearchTags`: BaseResponseTagSearchResponse
	fmt.Fprintf(os.Stdout, "Response from `SearchAPI.SearchTags`: %v\n", resp)
}

Path Parameters

Other Parameters

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

Name Type Description Notes
partialName string The partial or full name of the tag to search for
page int32 The page number to retrieve. [default to 1]
pageSize int32 Number of items per page. [default to 10]

Return type

BaseResponseTagSearchResponse

Authorization

APIKey

HTTP request headers

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

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