Skip to main content
POST
Delete knowledge file

Restrictions

Usage

  • Deleting a file that does not exist succeeds with status = ok.
  • When other files in the knowledge still reference the target via @ref, the delete fails with ReferenceExist naming the referrers; set force to delete anyway (the referrers are then returned in warnings).
  • Pass expected_version to delete only if nobody changed the knowledge since your last read; on mismatch the call returns HTTP 200 with status = conflict.
  • Omitting pack_id targets the account knowledge; editing account knowledge requires the account owner or an admin, editing team knowledge requires membership of that team.
  • Every call is recorded in the account audit log.

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

Knowledge file to remove.

rel_path
string
required

Path of the file relative to the knowledge root. Same path rules as POST /safari/knowledge/file/put.

pack_id
string

Knowledge ID; defaults to the caller's account-scope knowledge.

force
boolean

Delete even when other knowledge files reference this file; the referrers are then returned as warnings instead of blocking the delete.

expected_version
integer
default:0

Optimistic-concurrency guard. 0 or omitted: delete unconditionally. A positive value: delete only if the knowledge's current version equals it; otherwise nothing is deleted and the call returns HTTP 200 with status = conflict and the current version.

Required range: x >= 0

Response

Success

Standard response envelope used by every Flashduty public API. On success data contains the endpoint-specific payload and error is absent. On failure error is present and data is absent. request_id is always present and is also mirrored in the Flashcat-Request-Id response header.

request_id
string
required

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

Example:

"01HK8XQE3Z7JM2NTFQ5YJ8P9R4"

error
object

Error payload inside the response envelope. Present only on non-2xx responses.

data
object

Delete result.