Skip to content

Targets API

Generated from servtuner commit 5b46cdad0e5c.

Saved targets by name, each with its credential status (never a value).

Status Meaning Body
200 Successful Response array of TargetResource

Save a target block under a name. Keys are set separately (credentials).

Request body: TargetCreate (application/json)

Status Meaning Body
201 Successful Response TargetResource

Check an unsaved target block, as New run’s YAML has it; its secretRefs resolve as a run’s would.

Request body: UnsavedTargetCheck (application/json)

Status Meaning Body
200 Successful Response TargetCheckView

Delete the target and the Secrets servtuner manages for it. Past runs keep their copy.

Parameter In Type Required Description
target_id path string Yes
Status Meaning Body
204 Successful Response None
422 Validation Error HTTPValidationError

Returns one saved target.

Parameter In Type Required Description
target_id path string Yes
Status Meaning Body
200 Successful Response TargetResource
422 Validation Error HTTPValidationError

Replace name, description and target block; the keys stay as they are.

Parameter In Type Required Description
target_id path string Yes

Request body: TargetCreate (application/json)

Status Meaning Body
200 Successful Response TargetResource
422 Validation Error HTTPValidationError

Check a saved target with its stored keys, or a one-time api_key that is never stored.

Parameter In Type Required Description
target_id path string Yes

Request body: SavedTargetCheck (application/json)

Status Meaning Body
200 Successful Response TargetCheckView
422 Validation Error HTTPValidationError

DELETE /targets/{target_id}/credentials/{slot}

Section titled “DELETE /targets/{target_id}/credentials/{slot}”

Clears a stored credential.

Parameter In Type Required Description
target_id path string Yes
slot path string Yes
Status Meaning Body
204 Successful Response None
422 Validation Error HTTPValidationError

PUT /targets/{target_id}/credentials/{slot}

Section titled “PUT /targets/{target_id}/credentials/{slot}”

Set or replace a key. Write-only: the response has no body, and no route ever returns the value.

Parameter In Type Required Description
target_id path string Yes
slot path string Yes

Request body: CredentialInput (application/json)

Status Meaning Body
204 Successful Response None
422 Validation Error HTTPValidationError