Skip to content

Latest commit

 

History

History
67 lines (52 loc) · 3.02 KB

File metadata and controls

67 lines (52 loc) · 3.02 KB

AttributeSearch

(AttributeSearch)

Available Operations

SearchAttributeValues

Search attributes based on filters specified in the request body.

Example Usage

package main

import(
	"github.com/conductorone/conductorone-sdk-go/pkg/models/shared"
	conductoronesdkgo "github.com/conductorone/conductorone-sdk-go"
	"context"
	"log"
)

func main() {
    s := conductoronesdkgo.New(
        conductoronesdkgo.WithSecurity(shared.Security{
            BearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
            Oauth: "Bearer <YOUR_ACCESS_TOKEN_HERE>",
        }),
    )

    ctx := context.Background()
    res, err := s.AttributeSearch.SearchAttributeValues(ctx, &shared.SearchAttributeValuesRequest{
        AttributeTypeIds: []string{
            "string",
        },
        ExcludeIds: []string{
            "string",
        },
        Ids: []string{
            "string",
        },
    })
    if err != nil {
        log.Fatal(err)
    }

    if res.SearchAttributeValuesResponse != nil {
        // handle response
    }
}

Parameters

Parameter Type Required Description
ctx context.Context ✔️ The context to use for the request.
request shared.SearchAttributeValuesRequest ✔️ The request object to use for the request.

Response

*operations.C1APIAttributeV1AttributeSearchSearchAttributeValuesResponse, error

Error Object Status Code Content Type
sdkerrors.SDKError 4xx-5xx /