Skip to content
Get started

Draft Instruction

client.teams.ipFilters.draftInstruction(stringteamID, IPFilterDraftInstructionParams { assetIds } body, RequestOptionsoptions?): IPFilterDraftInstructionResponse { instruction }
POST/teams/{teamId}/ip-filters/draft-instruction

Draft a custom IP-detection filter instruction from reference assets (the caller must have read access to every asset)

ParametersExpand Collapse
teamID: string
body: IPFilterDraftInstructionParams { assetIds }
assetIds: Array<string>

Reference assets whose imagery seeds the drafted detection instruction

ReturnsExpand Collapse
IPFilterDraftInstructionResponse { instruction }
instruction: string

Drafted natural-language detection instruction derived from the reference assets

Draft Instruction

import Scenario from '@scenario-labs/sdk';

const client = new Scenario({
  apiKey: process.env['SCENARIO_SDK_API_KEY'], // This is the default and can be omitted
  apiSecret: process.env['SCENARIO_SDK_API_SECRET'], // This is the default and can be omitted
});

const response = await client.teams.ipFilters.draftInstruction('teamId', { assetIds: ['string'] });

console.log(response.instruction);
{
  "instruction": "instruction"
}
Returns Examples
{
  "instruction": "instruction"
}