ScanopyScanopy
Daemons

Email install command to current user

Requires a verified email: the endpoint mails on demand, so an unproven address would let anyone send Scanopy mail to an inbox they don't own.

Session-only, and IsUser says so at the extractor rather than in the body. "The current user" has no answer for an automation identity: a user API key carries user_id but no address, so this endpoint could never serve one. An API key that wants the command reads it directly from GET /api/v1/daemons/{id}/install-command.

POST
/api/v1/daemons/email-install-command
session_id<token>

Browser session cookie. Obtained via /api/auth/login.

In: cookie

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Request body for emailing an install command to the authenticated user. The server builds the command from the daemon record, exactly as [get_install_command] does; the client only picks which method's command to send.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/v1/daemons/email-install-command" \  -H "Content-Type: application/json" \  -d '{    "daemon_id": "0f0cd6bf-ac90-457b-aa3f-6f24990d5ff6",    "os": "linux",    "purpose": "install"  }'
{
  "meta": {
    "api_version": 1,
    "server_version": "0.18.1"
  },
  "success": true,
  "data": null,
  "error": "string"
}
{
  "meta": {
    "api_version": 1,
    "server_version": "0.18.1"
  },
  "success": true,
  "code": "string",
  "error": "string",
  "params": {
    "property1": null,
    "property2": null
  }
}
{
  "meta": {
    "api_version": 1,
    "server_version": "0.18.1"
  },
  "success": true,
  "code": "string",
  "error": "string",
  "params": {
    "property1": null,
    "property2": null
  }
}
{
  "meta": {
    "api_version": 1,
    "server_version": "0.18.1"
  },
  "success": true,
  "code": "string",
  "error": "string",
  "params": {
    "property1": null,
    "property2": null
  }
}