v62

latestOpenAPI 3.1.0Dual (AGPL3.0, Commercial License Available)raw.githubusercontent.com2026-08-03211303932.5 KB
Networks

Create a new network

post/api/v1/networks

Request body

credential_idsstring[] required

Credential IDs associated with this network (hydrated from junction table).

namestring required

Human-facing name for this network.

organization_idstring uuid required

The organization that owns this record.

stale_after_hoursinteger nullable required

How long a discovery-managed entity on this network may go unobserved before it reads as stale. None = unset; callers resolve the effective value through [Network::stale_after], never by reading this directly.

Network-scoped because staleness is only meaningful relative to scan cadence, and cadence is a property of a network's discoveries.

tagsstring[] required

Tags assigned to this entity.

created_atstring date-time required

When this record was first created.

effective_stale_after_hoursinteger

stale_after_hours with the server's default already applied.

Computed, never stored (excluded from to_params). Published so the frontend derives staleness from the same number the digest uses rather than re-declaring the default in TypeScript, where the two could drift and a host could read stale in the app but current in the digest email.

idstring uuid required

Server-assigned unique identifier.

updated_atstring date-time required

When this record was last modified.

Example request

{
  "created_at": "2026-01-15T10:30:00Z",
  "credential_ids": [],
  "effective_stale_after_hours": 672,
  "id": "550e8400-e29b-41d4-a716-446655440002",
  "name": "Home Network",
  "organization_id": "550e8400-e29b-41d4-a716-446655440001",
  "stale_after_hours": null,
  "tags": [],
  "updated_at": "2026-01-15T10:30:00Z"
}

Response

Network created

errorstring nullable

Human-readable failure message. Omitted on success.

successboolean required

true when the request succeeded. false responses carry error instead of data.

Example response

{
  "data": {
    "created_at": "2026-01-15T10:30:00Z",
    "credential_ids": [],
    "effective_stale_after_hours": 672,
    "id": "550e8400-e29b-41d4-a716-446655440002",
    "name": "Home Network",
    "organization_id": "550e8400-e29b-41d4-a716-446655440001",
    "stale_after_hours": null,
    "tags": [],
    "updated_at": "2026-01-15T10:30:00Z"
  },
  "meta": {
    "api_version": 1,
    "server_version": "0.17.7"
  }
}