Targets API
Generated from servtuner commit 5b46cdad0e5c.
GET /targets
Section titled “GET /targets”Saved targets by name, each with its credential status (never a value).
| Status | Meaning | Body |
|---|---|---|
200 |
Successful Response | array of TargetResource |
POST /targets
Section titled “POST /targets”Save a target block under a name. Keys are set separately (credentials).
Request body: TargetCreate (application/json)
| Status | Meaning | Body |
|---|---|---|
201 |
Successful Response | TargetResource |
POST /targets/check
Section titled “POST /targets/check”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 /targets/{target_id}
Section titled “DELETE /targets/{target_id}”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 |
GET /targets/{target_id}
Section titled “GET /targets/{target_id}”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 |
PUT /targets/{target_id}
Section titled “PUT /targets/{target_id}”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 |
POST /targets/{target_id}/check
Section titled “POST /targets/{target_id}/check”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 |