Skip to main content
POST
/
spiffe-mappings
Create SPIFFE Mapping
curl --request POST \
  --url https://use.hoop.dev/api/spiffe-mappings \
  --header 'Content-Type: application/json' \
  --data '
{
  "trust_domain": "customer.com",
  "agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "agent_template": "<string>",
  "groups": [
    "agents"
  ],
  "spiffe_id": "spiffe://customer.com/agent/arqa-prod",
  "spiffe_prefix": "spiffe://customer.com/agent/"
}
'
{
  "trust_domain": "customer.com",
  "agent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "agent_template": "<string>",
  "created_at": "<string>",
  "groups": [
    "agents"
  ],
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "org_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "spiffe_id": "spiffe://customer.com/agent/arqa-prod",
  "spiffe_prefix": "spiffe://customer.com/agent/",
  "updated_at": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://mintlify.hoop.dev/docs/llms.txt

Use this file to discover all available pages before exploring further.

Body

application/json

The mapping to create

trust_domain
string
required

SPIFFE trust domain. Must match the trust domain configured on the gateway for SPIFFE authentication to succeed.

Example:

"customer.com"

agent_id
string<uuid>

ID of the Hoop agent this mapping resolves to (exact form). Mutually exclusive with AgentTemplate.

agent_template
string

Go text/template that renders to a Hoop agent name. Used with SPIFFEPrefix. See the SPIFFE docs for template field details. Mutually exclusive with AgentID.

groups
string[]

The groups assigned to the agent when authenticating via this mapping.

Example:
["agents"]
spiffe_id
string

Exact SPIFFE ID to match. Mutually exclusive with SPIFFEPrefix.

Example:

"spiffe://customer.com/agent/arqa-prod"

spiffe_prefix
string

SPIFFE ID prefix. Matches any SVID whose sub begins with this string; longest-prefix wins on lookup. Mutually exclusive with SPIFFEID.

Example:

"spiffe://customer.com/agent/"

Response

Created

trust_domain
string
required

SPIFFE trust domain. Must match the trust domain configured on the gateway for SPIFFE authentication to succeed.

Example:

"customer.com"

agent_id
string<uuid>

ID of the Hoop agent this mapping resolves to (exact form). Mutually exclusive with AgentTemplate.

agent_template
string

Go text/template that renders to a Hoop agent name. Used with SPIFFEPrefix. See the SPIFFE docs for template field details. Mutually exclusive with AgentID.

created_at
string
read-only

Creation timestamp

groups
string[]

The groups assigned to the agent when authenticating via this mapping.

Example:
["agents"]
id
string<uuid>
read-only

The unique identifier of this resource

org_id
string<uuid>
read-only

Organization ID

spiffe_id
string

Exact SPIFFE ID to match. Mutually exclusive with SPIFFEPrefix.

Example:

"spiffe://customer.com/agent/arqa-prod"

spiffe_prefix
string

SPIFFE ID prefix. Matches any SVID whose sub begins with this string; longest-prefix wins on lookup. Mutually exclusive with SPIFFEID.

Example:

"spiffe://customer.com/agent/"

updated_at
string
read-only

Last update timestamp