Create a saved test
create_targetCreate a saved test (permission: edit)
Create ONE saved test in the project, as from the dashboard: it is monitored on the cadence of the plan (no schedule field) and its first scan starts right away. With an org key, projectId is required. type website or hbbtv takes url; android takes apk (the gcsPath from POST /uploads; no Play Store URL). A website always gets one web_compliance target; testType (website only, default compliance) only selects the plan gate: datalayer requires the plan that includes journeys. tvPlatform is hbbtv only. country is required and decides the proxy location, locale and timezone; locale and timezone are not accepted. A project holds one test per type: a second one answers 409 target_exists. access (website with an https url only, else 400 field_not_applicable) saves the login and/or secret headers of a protected test environment before the first scan, which already uses them; write-only: the Target answers only access.basicAuth and access.headerNames. A retry with the same Idempotency-Key replays the first result even when the access values (password, header values) differ: to change the access, use a new key or PATCH /targets/{id}. The 201 is the Target plus its first scan as a ScanRef (scan), or scan: null with scanError when the test was saved but its first scan could not be queued; Location is the target URL. idempotencyKey (sent as the Idempotency-Key header): retrying the same call with the same value replays the original answer; the same value with different arguments is 422 idempotency_conflict, and 409 idempotent_in_progress means wait error.meta.retryAfter seconds and retry.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"type": "<type>",
"country": "<country>"
},
"name": "create_target"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| apk | No | The uploaded app: `{ gcsPath }` as POST /uploads answered it (android). | |
| url | No | Absolute http(s) URL of the site or HbbTV app (website, hbbtv). | |
| name | No | Display name of the test. | |
| type | Yes | What the test checks; a project holds one test per type. | |
| access | No | Access to a protected test environment (website test with an https url only; any other test is 400 field_not_applicable): basicAuth { username, password } and/or up to 3 headers, sent only to the origin of the test's url, never to third parties, by every scan, journey recording and replay of the test. Write-only: the values are stored and never returned; the Target and the dashboard show only whether a login is set and the header names. | |
| country | Yes | Scan country (proxy geo, locale, timezone): CZ, DE, AT, IT, ES, NL, DK, FR, BE, PL, IE, SK | |
| testType | No | Website only: compliance (default) or datalayer; selects the plan gate only. | |
| projectId | No | Required with an organization key; must be the key's project with a project key. Missing (organization key) or not a UUID: 400 invalid_request on path projectId; a project outside the key's reach: 404. | |
| tvPlatform | No | The TV platform to emulate; hbbtv only. | |
| idempotencyKey | No | Optional Idempotency-Key: reuse the same value when retrying this exact call so it is applied once. |