paths: /v1/approval/context: get: tags: [Approval Knowledge] operationId: getApprovalContext x-implementation-status: planned summary: Get rules, documents, and style preferences together parameters: - $ref: ../components/parameters.yaml#/CorpId - name: documentLimit in: query schema: type: integer minimum: 1 - name: latestRuleVersion in: query schema: type: boolean - name: ruleVersionNumber in: query schema: type: integer responses: "200": description: Approval context. content: application/json: schema: $ref: ../components/schemas/index.yaml#/ApprovalContext /v1/approval/search: post: tags: [Approval Knowledge] operationId: searchApprovalKnowledge x-implementation-status: planned summary: Search approval rules, documents, and preferences requestBody: required: true content: application/json: schema: $ref: ../components/schemas/index.yaml#/ApprovalSearchRequest responses: "200": description: Search results with line context. content: application/json: schema: $ref: ../components/schemas/index.yaml#/ApprovalSearchResponse /v1/approval/rules: get: tags: [Approval Knowledge] operationId: listApprovalRules x-implementation-status: implemented summary: List current draft approval rules responses: "200": description: Draft rules. content: application/json: schema: $ref: ../components/schemas/index.yaml#/ApprovalRulesResponse post: tags: [Approval Knowledge] operationId: createApprovalRule x-implementation-status: planned summary: Create draft approval rule requestBody: required: true content: application/json: schema: $ref: ../components/schemas/index.yaml#/ApprovalRuleInput responses: "200": description: Created rule. content: application/json: schema: $ref: ../components/schemas/index.yaml#/ApprovalRule /v1/approval/rules/{ruleId}: parameters: - $ref: ../components/parameters.yaml#/RuleId patch: tags: [Approval Knowledge] operationId: updateApprovalRule x-implementation-status: planned summary: Update draft approval rule requestBody: required: true content: application/json: schema: $ref: ../components/schemas/index.yaml#/ApprovalRulePatch responses: "200": description: Updated rule. content: application/json: schema: $ref: ../components/schemas/index.yaml#/ApprovalRule delete: tags: [Approval Knowledge] operationId: deleteApprovalRule x-implementation-status: planned summary: Delete draft approval rule responses: "200": description: Deleted. /v1/approval/rule-versions: get: tags: [Approval Knowledge] operationId: listApprovalRuleVersions x-implementation-status: planned summary: List published approval rule versions responses: "200": description: Published rule versions. content: application/json: schema: type: array items: $ref: ../components/schemas/index.yaml#/RuleSetVersion /v1/approval/rule-versions/{versionId}: parameters: - $ref: ../components/parameters.yaml#/VersionId get: tags: [Approval Knowledge] operationId: getApprovalRuleVersion x-implementation-status: planned summary: Get published approval rule version responses: "200": description: Rule version. content: application/json: schema: $ref: ../components/schemas/index.yaml#/RuleSetVersion /v1/approval/rules/by-version: get: tags: [Approval Knowledge] operationId: getApprovalRuleByVersion x-implementation-status: planned summary: Get one wrapped rule from a published version parameters: - $ref: ../components/parameters.yaml#/CorpId - name: versionNumber in: query schema: type: integer - name: versionId in: query schema: type: string - name: latest in: query schema: type: boolean - name: code in: query schema: type: string description: Display rule code such as '#0038'. - name: runtimeId in: query schema: type: string description: Runtime rule ID such as rule-205. - name: recordId in: query schema: type: string description: Infer versionNumber from an approval run. responses: "200": description: One rule from a published version. content: application/json: schema: type: object additionalProperties: true /v1/approval/rule-versions/publish: post: tags: [Approval Knowledge] operationId: publishApprovalRuleVersion x-implementation-status: planned summary: Publish current draft rules requestBody: required: true content: application/json: schema: $ref: ../components/schemas/index.yaml#/PublishRuleVersionRequest responses: "200": description: Published version. content: application/json: schema: type: object additionalProperties: true /v1/approval/documents: get: tags: [Approval Knowledge] operationId: listApprovalDocuments x-implementation-status: planned summary: List approval knowledge documents parameters: - $ref: ../components/parameters.yaml#/Offset - name: limit in: query schema: type: integer minimum: 1 default: 20 - name: scenario in: query schema: type: array items: type: string style: form explode: true responses: "200": description: Documents. content: application/json: schema: $ref: ../components/schemas/index.yaml#/ApprovalDocumentsResponse post: tags: [Approval Knowledge] operationId: createApprovalDocument x-implementation-status: planned summary: Create approval knowledge document requestBody: required: true content: application/json: schema: $ref: ../components/schemas/index.yaml#/ApprovalDocumentInput responses: "200": description: Created document. content: application/json: schema: $ref: ../components/schemas/index.yaml#/ApprovalDocument /v1/approval/documents/{documentId}: parameters: - $ref: ../components/parameters.yaml#/DocumentId get: tags: [Approval Knowledge] operationId: getApprovalDocument x-implementation-status: planned summary: Get approval knowledge document responses: "200": description: Document. content: application/json: schema: $ref: ../components/schemas/index.yaml#/ApprovalDocument patch: tags: [Approval Knowledge] operationId: updateApprovalDocument x-implementation-status: planned summary: Update approval knowledge document requestBody: required: true content: application/json: schema: $ref: ../components/schemas/index.yaml#/ApprovalDocumentPatch responses: "200": description: Updated document. content: application/json: schema: $ref: ../components/schemas/index.yaml#/ApprovalDocument delete: tags: [Approval Knowledge] operationId: deleteApprovalDocument x-implementation-status: planned summary: Delete approval knowledge document responses: "200": description: Deleted document confirmation. /v1/approval/style-preferences: get: tags: [Approval Knowledge] operationId: getApprovalStylePreferences x-implementation-status: planned summary: Get approval style preferences responses: "200": description: Style preferences. content: application/json: schema: $ref: ../components/schemas/index.yaml#/ApprovalStylePreferences patch: tags: [Approval Knowledge] operationId: updateApprovalStylePreferences x-implementation-status: planned summary: Update approval style preferences requestBody: required: true content: application/json: schema: $ref: ../components/schemas/index.yaml#/ApprovalStylePreferences responses: "200": description: Updated style preferences. content: application/json: schema: $ref: ../components/schemas/index.yaml#/ApprovalStylePreferences /v1/preferences: get: tags: [Approval Knowledge] operationId: getPreferences x-implementation-status: implemented summary: Get current decision, thinking-depth and rule-version preferences parameters: - $ref: ../components/parameters.yaml#/CorpId responses: "200": description: Decision preferences, thinking depth preference and the bound rule set version. content: application/json: schema: $ref: ../components/schemas/index.yaml#/ApprovalStylePreferences /v1/preferences/decision: post: tags: [Approval Knowledge] operationId: updatePreferenceDecision x-implementation-status: implemented summary: Update decision preferences (takes effect immediately for the running approval agent) parameters: - $ref: ../components/parameters.yaml#/CorpId requestBody: required: true content: application/json: schema: type: object properties: explicitApprove: type: string explicitReject: type: string exemptApprove: type: string review: type: string dryRun: type: boolean description: Return the before/after diff without writing. responses: "200": description: Updated preferences, or the previewed diff when dryRun is set. content: application/json: schema: $ref: ../components/schemas/index.yaml#/ApprovalStylePreferences