assets

Create an asset

Create an asset, after the ownership gate.

Audience (organization, partner) is enforced by the asset policy. The gate is the workflow's: a domain or public IP/CIDR needs an active verification covering it (legacy answered 403 "Unverified domain"); an integrator flagged to vouch for its clients gets the proof minted for it instead -- legacy's ownership bypass, recorded as a self-attestation. organization_id defaults to the caller's org.

Args: body (CreateAssetRequest): Asset creation payload. db (AsyncSession): Request-scoped database session. context (ActiveContext): Resolved caller identity and scope.

Returns: SuccessResponse: The legacy create envelope carrying the new id.

Raises: ValueError: No organization_id was given and the caller has no default organization. PermissionError: No active verification covers the target and the caller may not have one minted, or Cerbos denied the create.

post/v1/assets/

Request

  • Base URL
    https://api.ethiack.com (the document declares no server; this is the origin it was published from)
  • Auth
    none declared

Request body

organization_idinteger nullable
asset_valuestring required
asset_type'fqdn' | 'ip' | 'cidr' required

Asset types that can be created through the public API.

A subset of :class:~phoenix.db.models.asset.AssetType: the rest are produced by discovery rather than declared by a caller.

A private CIDR additionally requires a beacon_id — see :meth:CreateAssetRequest._private_ranges_need_a_beacon.

beacon_idinteger nullable
tier'low' | 'medium' | 'high'

Tier (importance level) of an asset.

Stored as the lowercase token (low/medium/high) — the same value the public API uses, so no wire<->storage mapping is needed.

Response

Successful Response

codeinteger required
descriptionstring required
successboolean

Changes

No recorded changes to this operation across all 1 revision of this API.