Skip to main content
POST
/
api
/
v1
/
decoys
/
search
Typescript (SDK)
import { ConductoroneSDKTypescript } from "conductorone-sdk-typescript";

const conductoroneSDKTypescript = new ConductoroneSDKTypescript({
  security: {
    bearerAuth: "<YOUR_BEARER_TOKEN_HERE>",
    oauth: "<YOUR_OAUTH_HERE>",
  },
});

async function run() {
  const result = await conductoroneSDKTypescript.decoySearch.search();

  console.log(result);
}

run();
{
  "list": [
    {
      "annotations": {},
      "createdAt": "2023-11-07T05:31:56Z",
      "description": "<string>",
      "disabled": true,
      "displayName": "<string>",
      "id": "<string>",
      "lastUsedAt": "2023-11-07T05:31:56Z",
      "materialFingerprintSha256": "<string>",
      "updatedAt": "2023-11-07T05:31:56Z"
    }
  ],
  "nextPageToken": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Authorization
string
header
required

This API uses OAuth2 with the Client Credential flow. Client Credentials must be sent in the BODY, not the headers. For an example of how to implement this, refer to the c1TokenSource.Token() function.

Body

application/json

The DecoySearchRequest message.

annotationKeys
string[] | null

Filter to decoys that have at least one of these annotation keys set. Empty means no annotation filter. Per-key constraints match the c1api annotation-bag standard (min_len 1, max_len 128, same regex used by every annotation-bag-typed field across c1api).

hasBeenUsed
boolean | null

Filter to decoys that have been used at least once. False / unset means no filter (show all). The "never used" case is not covered in this filter; add an explicit field if needed.

kinds
enum<string>[] | null

Filter by kind (OR within the list). Empty means any kind.

Available options:
DECOY_KIND_UNSPECIFIED,
DECOY_KIND_USER_CLIENT_CREDENTIAL,
DECOY_KIND_CONNECTOR_CLIENT,
DECOY_KIND_WORKLOAD_FEDERATION,
DECOY_KIND_ACCESS_TOKEN
pageSize
integer<int32> | null

The pageSize field.

pageToken
string | null

The pageToken field.

query
string | null

Free-text query against display_name and description. Empty means no text filter.

statuses
enum<string>[] | null

Filter by status (OR within the list). Empty means any status.

Available options:
DECOY_STATUS_FILTER_UNSPECIFIED,
DECOY_STATUS_FILTER_ACTIVE,
DECOY_STATUS_FILTER_DISABLED

Response

200 - application/json

Successful response

The DecoySearchResponse message.

list
Decoy · object[] | null

The list field.

nextPageToken
string | null

The nextPageToken field.