Update a use case
https://api.faraday.ai/v1/knowledgebase/use_cases/{use_case_id}Save a new revision of a use case. Optimistic locking: pass back therevision_id you read; if the server's current revision has moved past
it, the request is rejected with 409. Fields not present are left at
their current values.
Authentication
Provide your API key in the Authorization header. You can find your API key in the Settings page of the dashboard.
Authorization: Bearer YOUR_TOKENpath parameters
The UUID of a use case
^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$Body
Fields to update on the existing use case
draftone of 2 typesAdvisory flag marking the use case as a work in progress. Whiletrue, no implementation guide is generated for it (seegenerated_guide) and a review weighs the incomplete status
accordingly. Defau...
guideone of 2 typesMarkdown implementation guide. Deprecated — guides are now
generated from the use case (see generated_guide); this
human-authored field is retained for backward compatibility.
Optional.
prefaceone of 2 typesrevision_idstring<uuid>technical_detailsone of 2 typesMarkdown technical annex that the guide generator and the
configuration auditor consume: data sources and schemas, data
grain, stable/reference keys, blockers (e.g. hashed vs cleartext
identity), feature flags, and egress destinations. Optional.
titlestringResponses
200The newly saved use case revision
applies_tostringComputed property: what this use case applies to, taken from its
most recent review. Read-only; absent until a review has classified
it.
this_account, subaccountsarchived_atstring<date-time>Set when this use case has been archived.
draftbooleanAdvisory flag marking the use case as a work in progress. Whiletrue, no implementation guide is generated for it (seegenerated_guide) and a review weighs the incomplete status
accordingly. Defau...
enrollment_creates_resourcesbooleanComputed property: whether those enrollment steps create Faraday
resources in the account named by applies_to, taken from this use
case's most recent review. A knowledgebase is audited only when no
...
generated_guidestringComputed property: the implementation guide generated from this
use case's preface and technical_details. Read-only, and empty
until a guide has been generated. A guide is generated automatically
...
generated_guide_statusobjectComputed property: the status of the most recent implementation-guide
generation for this use case, or absent if none has run. Read-only.
Generation happens automatically once a review judges the use ...
Markdown implementation guide. Deprecated — guides are now
generated from the use case (see generated_guide); this
human-authored field is retained for backward compatibility.
Optional.
The narrative framing of a use case. All three fields are optional
markdown blocks; an empty preface means the use case hasn't been written
up beyond its title and guide.
provisioning_guidebooleanComputed property: whether enrolling or unenrolling a sub-client
requires a repeatable series of steps, taken from this use case's
most recent review. When true, a provisioning guide is generated for
...
Deprecated, and no longer maintained. Which resources serve a use
case is reported by the account's configuration audits instead:
see use_cases[].resources on AccountAudit.
reviewobjectComputed property: the most recent review of this use case, or
absent if it has never been reviewed. Read-only; request a review
with POST /knowledgebase/use_cases/{use_case_id}/review.
technical_detailsstringMarkdown technical annex that the guide generator and the
configuration auditor consume: data sources and schemas, data
grain, stable/reference keys, blockers (e.g. hashed vs cleartext
identity), feature flags, and egress destinations. Optional.
400The request was invalid.
A Faraday error code.
Some possible values include:
Generic HTTP Errors
- BAD_REQUEST: The request could not be validated.
- FORBIDDEN: You do not have permission to access the specified resour...
"ERROR_TYPE"BAD_REQUEST, FORBIDDEN, MAX_RESOURCES_REACHED, INTERNAL_SERVER_ERROR, INVALID_AUTHORIZATION, NOT_FOUND, MALFORMED_API_KEY, MISSING_API_KEY, EXPIRED_API_KEY, VALIDATION_FAILED, CONFLICT, QUOTA_EXCEEDEDA unique ID for this error. Please include this in bug reports.
"082f9513-901c-4308-8081-902a8fe22d7e"validationErrorsarray[object]JSON Schema validation errors, if any.
401No API key was supplied.
A Faraday error code.
Some possible values include:
Generic HTTP Errors
- BAD_REQUEST: The request could not be validated.
- FORBIDDEN: You do not have permission to access the specified resour...
"ERROR_TYPE"BAD_REQUEST, FORBIDDEN, MAX_RESOURCES_REACHED, INTERNAL_SERVER_ERROR, INVALID_AUTHORIZATION, NOT_FOUND, MALFORMED_API_KEY, MISSING_API_KEY, EXPIRED_API_KEY, VALIDATION_FAILED, CONFLICT, QUOTA_EXCEEDEDA unique ID for this error. Please include this in bug reports.
"082f9513-901c-4308-8081-902a8fe22d7e"validationErrorsarray[object]JSON Schema validation errors, if any.
403Access to this resource was forbidden.
A Faraday error code.
Some possible values include:
Generic HTTP Errors
- BAD_REQUEST: The request could not be validated.
- FORBIDDEN: You do not have permission to access the specified resour...
"ERROR_TYPE"BAD_REQUEST, FORBIDDEN, MAX_RESOURCES_REACHED, INTERNAL_SERVER_ERROR, INVALID_AUTHORIZATION, NOT_FOUND, MALFORMED_API_KEY, MISSING_API_KEY, EXPIRED_API_KEY, VALIDATION_FAILED, CONFLICT, QUOTA_EXCEEDEDA unique ID for this error. Please include this in bug reports.
"082f9513-901c-4308-8081-902a8fe22d7e"validationErrorsarray[object]JSON Schema validation errors, if any.
404The requested resource ID was not found.
A Faraday error code.
Some possible values include:
Generic HTTP Errors
- BAD_REQUEST: The request could not be validated.
- FORBIDDEN: You do not have permission to access the specified resour...
"ERROR_TYPE"BAD_REQUEST, FORBIDDEN, MAX_RESOURCES_REACHED, INTERNAL_SERVER_ERROR, INVALID_AUTHORIZATION, NOT_FOUND, MALFORMED_API_KEY, MISSING_API_KEY, EXPIRED_API_KEY, VALIDATION_FAILED, CONFLICT, QUOTA_EXCEEDEDA unique ID for this error. Please include this in bug reports.
"082f9513-901c-4308-8081-902a8fe22d7e"validationErrorsarray[object]JSON Schema validation errors, if any.
409The request was formatted correctly, but conflicted with an existing resource.
A Faraday error code.
Some possible values include:
Generic HTTP Errors
- BAD_REQUEST: The request could not be validated.
- FORBIDDEN: You do not have permission to access the specified resour...
"ERROR_TYPE"BAD_REQUEST, FORBIDDEN, MAX_RESOURCES_REACHED, INTERNAL_SERVER_ERROR, INVALID_AUTHORIZATION, NOT_FOUND, MALFORMED_API_KEY, MISSING_API_KEY, EXPIRED_API_KEY, VALIDATION_FAILED, CONFLICT, QUOTA_EXCEEDEDA unique ID for this error. Please include this in bug reports.
"082f9513-901c-4308-8081-902a8fe22d7e"validationErrorsarray[object]JSON Schema validation errors, if any.
500An internal server error occurred.
A Faraday error code.
Some possible values include:
Generic HTTP Errors
- BAD_REQUEST: The request could not be validated.
- FORBIDDEN: You do not have permission to access the specified resour...
"ERROR_TYPE"BAD_REQUEST, FORBIDDEN, MAX_RESOURCES_REACHED, INTERNAL_SERVER_ERROR, INVALID_AUTHORIZATION, NOT_FOUND, MALFORMED_API_KEY, MISSING_API_KEY, EXPIRED_API_KEY, VALIDATION_FAILED, CONFLICT, QUOTA_EXCEEDEDA unique ID for this error. Please include this in bug reports.
"082f9513-901c-4308-8081-902a8fe22d7e"validationErrorsarray[object]JSON Schema validation errors, if any.
Tags
Test request
Request snippet
curl -X PATCH 'https://api.faraday.ai/v1/knowledgebase/use_cases/{use_case_id}' \
-H 'Content-Type: application/merge-patch+json' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-d '{
"draft": true,
"guide": "string",
"preface": {
"background": "string",
"problem": "string",
"solution": "string"
},
"revision_id": "123e4567-e89b-12d3-a456-426614174000",
"technical_details": "string",
"title": "string"
}'Example response
{
"applies_to": {},
"archived_at": "2024-01-01T12:00:00Z",
"created_at": "2024-01-01T12:00:00Z",
"draft": true,
"enrollment_creates_resources": true,
"generated_guide": "string",
"generated_guide_status": {
"created_at": "2024-01-01T12:00:00Z",
"generated_at": "2024-01-01T12:00:00Z",
"id": "123e4567-e89b-12d3-a456-426614174000",
"status": "pending",
"status_error": "string",
"use_case_id": "123e4567-e89b-12d3-a456-426614174000",
"use_case_revision_id": "123e4567-e89b-12d3-a456-426614174000"
},
"guide": "string",
"id": "123e4567-e89b-12d3-a456-426614174000",
"preface": {
"background": "string",
"problem": "string",
"solution": "string"
},
"provisioning_guide": true,
"resources": [
{
"resource_id": "123e4567-e89b-12d3-a456-426614174000",
"resource_type": "string"
}
],
"review": {
"adequate": true,
"applies_to": {},
"created_at": "2024-01-01T12:00:00Z",
"enrollment_creates_resources": true,
"findings": [
{
"severity": "blocker",
"text": "string"
}
],
"id": "123e4567-e89b-12d3-a456-426614174000",
"model": "string",
"provisioning_guide": true,
"reviewed_at": "2024-01-01T12:00:00Z",
"status": "pending",
"status_error": "string",
"summary": "string",
"use_case_id": "123e4567-e89b-12d3-a456-426614174000",
"use_case_revision_id": "123e4567-e89b-12d3-a456-426614174000"
},
"revision_id": "123e4567-e89b-12d3-a456-426614174000",
"technical_details": "string",
"title": "string"
}