arazzo: 1.0.1 info: title: Canvas LMS Audit Account Course and Conclude It summary: List courses in an account, read one course's detail, then conclude it. description: >- An account-administration flow for Canvas. The workflow lists the active courses in an account filtered by a search term, reads the first matching course's full detail, and then concludes that course. It models a tidy-up pass an admin runs against an account's catalog. Every step spells out its request inline so the flow can be read and executed without opening the underlying OpenAPI description. version: 1.0.0 sourceDescriptions: - name: canvasApi url: ../openapi/canvas-lms-rest-api-openapi.yml type: openapi workflows: - workflowId: account-course-audit-and-conclude summary: Find an account course by search term and conclude it. description: >- Lists account courses matching a search term, reads the first match's detail, and concludes that course. inputs: type: object required: - accountId - searchTerm properties: accountId: type: string description: The Canvas account id (or self). searchTerm: type: string description: A search term to filter the account's courses by name or code. steps: - stepId: listAccountCourses description: >- List the account's active courses filtered by the supplied search term. operationId: listCoursesInAccount parameters: - name: account_id in: path value: $inputs.accountId - name: search_term in: query value: $inputs.searchTerm - name: state[] in: query value: - available successCriteria: - condition: $statusCode == 200 outputs: firstCourseId: $response.body#/0/id firstCourseName: $response.body#/0/name - stepId: getCourseDetail description: >- Read the first matching course's full detail to confirm it before concluding. operationId: getCourse parameters: - name: course_id in: path value: $steps.listAccountCourses.outputs.firstCourseId successCriteria: - condition: $statusCode == 200 outputs: courseId: $response.body#/id workflowState: $response.body#/workflow_state - stepId: concludeCourse description: >- Conclude the resolved course, a reversible close that preserves data. operationId: deleteCourse parameters: - name: course_id in: path value: $steps.getCourseDetail.outputs.courseId - name: event in: query value: conclude successCriteria: - condition: $statusCode == 200 - condition: $response.body#/conclude == true outputs: concluded: $response.body#/conclude outputs: courseId: $steps.getCourseDetail.outputs.courseId concluded: $steps.concludeCourse.outputs.concluded