Add a pentest credential
Add a credential of any kind to a pentest, TOTP included.
One body for every caller: the kind's spec, as GraphQL validates it. A URL-bound kind binds to the asset its login_url's host names, and the whole URL, path included, is stored. One for an account that already has a credential replaces it.
A body that fails its kind's spec is refused before this runs (422), without echoing the input.
An API key created in Portal → Settings → API, sent as Authorization: Bearer <key>.
In: header
Path Parameters
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X POST "https://api.ethiack.com/v1/pentests/string/credentials/" \ -H "Content-Type: application/json" \ -d '{ "kind": "login", "login_url": "https://app.example.com/login", "username": "[email protected]", "password": "<password>", "totp_secret": "JBSWY3DPEHPK3PXP" }'{
"id": 0,
"kind": "login",
"login_url": "string",
"username": "string",
"password": "string",
"sso_provider": "google",
"totp_secret": "string"
}{
"detail": [
{
"loc": [
"string"
],
"msg": "string",
"type": "string",
"input": null,
"ctx": {}
}
]
}Create a pentest POST
Create a pentest in draft: continuous, or an ordered SWIFT / DEPTH. Conflicts (HTTP 409) when the organization is already running as many continuous pentests as its subscription meters. With `category`, a fixed-price SWIFT / DEPTH pentest whose cost is reserved as pending debits. Nothing is charged and the balance is not checked yet; that happens on start. Either way the pentest is left in draft: `POST {slug}/start` is what puts it to work.
Remove a pentest credential DELETE
Remove a credential of any kind from a pentest. Absent, invisible, and other-pentest credentials all answer 404, so ids cannot be probed; 403 is only possible on a credential the caller can read but not delete.