Skip to main content
POST
Create mapping API

Restrictions

Usage

  • An enrichment rule with mapping_type = api sends POST <url> with the configured headers and the JSON body {"result_label_keys": [...], "event": {...}} (the alert event). The API must answer HTTP 200 with {"result_labels": {"<label>": "<value>"}}.
  • url must use http or https; in SaaS the host must not resolve to an internal IP address.
  • timeout is the total request timeout in seconds (1–3, default 2); retry_count is the number of retries after a failure (0–1, default 0).
  • In SaaS, sensitive header names are rejected: Authorization, Proxy-Authorization, Cookie, X-Api-Key, X-Access-Token, X-Forwarded-For, X-Real-Ip, True-Client-Ip, X-Client-Ip, Host, X-Forwarded-Host, X-Forwarded-Proto, X-Internal-Id, X-User-Id, Transfer-Encoding, Upgrade, Connection (case-insensitive).
  • api_name must be unique among non-deleted mapping APIs; an account holds at most 50 non-deleted mapping APIs. A non-zero team_id must be an existing team.
  • Every call is recorded in the account audit log. Don’t put secrets in request fields.

Authorizations

app_key
string
query
required

APP Key created in the Flashduty console under My → APP Key. Send it as the app_key query parameter or in the Fd-App-Key request header. Its effective access is the intersection of the key's permission scope and the creator's current role permissions. Keep it secret.

Body

application/json
api_name
string
required

Name of the mapping API, unique among non-deleted mapping APIs (max 199 characters).

Maximum string length: 199
url
string<uri>
required

Endpoint called with POST. Must be an http or https URL of at most 500 characters; in SaaS the host must not resolve to an internal IP address.

Maximum string length: 500
description
string

Optional description. Values longer than 500 characters are silently truncated.

insecure_skip_verify
boolean

Skip TLS certificate verification. Default false.

headers
object

Custom HTTP request headers. In SaaS mode, security-sensitive names (authorization, cookie, x-forwarded-for, etc.) are rejected; keys must be RFC 7230 token characters (max 1024 chars) and values max 4096 chars.

timeout
integer
default:2

Timeout of the whole request in seconds (1–3). Defaults to 2 when omitted or 0.

Required range: 1 <= x <= 3
retry_count
integer
default:0

Number of retries after a failed call (0–1). Defaults to 0.

Required range: 0 <= x <= 1
team_id
integer<int64>

Owning team ID; obtain it from POST /team/list. 0 or omitted means no team. A non-zero ID must be an existing team.

Response

Success

Success response envelope. On every 2xx response, request_id identifies the call (also mirrored in the Flashcat-Request-Id header) and data holds the endpoint-specific payload. Failure responses use a different shape — see ErrorResponse.

request_id
string
required

Unique ID for this request. Mirrored in the Flashcat-Request-Id response header. Include it when reporting issues.

Example:

"01HK8XQE3Z7JM2NTFQ5YJ8P9R4"

data
object

Operation-specific payload, documented in each operation's 200 response. Operations without a payload return {} or omit data entirely.