Microsoft Planner · Arazzo Workflow

Microsoft Planner Rename a Plan and Describe Its Categories

Version 1.0.0

Read a plan and its details for ETags, rename the plan, then set category label descriptions.

1 workflow 1 source API 1 provider
View Spec View on GitHub CollaborationMicrosoft 365ProductivityProject ManagementTask ManagementArazzoWorkflows

Provider

microsoft-planner

Workflows

rename-plan
Rename a plan and set its category label descriptions.
Chains getPlan, getPlanDetails, updatePlan, and updatePlanDetails, capturing each resource's ETag for the matching If-Match header before patching.
4 steps inputs: categoryDescriptions, newTitle, planId outputs: planId, title
1
getPlan
getPlan
Read the plan to capture its current ETag for the rename's If-Match header.
2
getPlanDetails
getPlanDetails
Read the plan details to capture its ETag for the category-description patch's If-Match header.
3
updatePlan
updatePlan
Patch the plan with the new title. The If-Match header carries the plan ETag. Planner returns 200 with the updated plan.
4
updatePlanDetails
updatePlanDetails
Patch the plan details with category label descriptions. The If-Match header carries the plan details ETag. Planner returns 200 with the updated plan details.

Source API Descriptions

Arazzo Workflow Specification

microsoft-planner-rename-plan-workflow.yml Raw ↑
arazzo: 1.0.1
info:
  title: Microsoft Planner Rename a Plan and Describe Its Categories
  summary: Read a plan and its details for ETags, rename the plan, then set category label descriptions.
  description: >-
    A plannerPlan holds the title while a separate plannerPlanDetails resource
    holds the 25 category label descriptions. Both require an If-Match ETag to
    update. This flow reads the plan and the plan details to capture their ETags,
    patches the plan with a new title, and patches the plan details with category
    label descriptions. Every request is spelled out inline so the flow can be
    read and executed without opening the underlying OpenAPI description.
  version: 1.0.0
sourceDescriptions:
- name: plannerApi
  url: ../openapi/microsoft-planner-openapi.yml
  type: openapi
workflows:
- workflowId: rename-plan
  summary: Rename a plan and set its category label descriptions.
  description: >-
    Chains getPlan, getPlanDetails, updatePlan, and updatePlanDetails, capturing
    each resource's ETag for the matching If-Match header before patching.
  inputs:
    type: object
    required:
    - planId
    - newTitle
    properties:
      planId:
        type: string
        description: The id of the plan to rename.
      newTitle:
        type: string
        description: The new title for the plan.
      categoryDescriptions:
        type: object
        description: >-
          Optional plannerCategoryDescriptions object (category1..category25)
          giving human labels to the plan's category columns.
  steps:
  - stepId: getPlan
    description: >-
      Read the plan to capture its current ETag for the rename's If-Match header.
    operationId: getPlan
    parameters:
    - name: plan-id
      in: path
      value: $inputs.planId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      planEtag: $response.body#/@odata.etag
  - stepId: getPlanDetails
    description: >-
      Read the plan details to capture its ETag for the category-description
      patch's If-Match header.
    operationId: getPlanDetails
    parameters:
    - name: plan-id
      in: path
      value: $inputs.planId
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      detailsEtag: $response.body#/@odata.etag
  - stepId: updatePlan
    description: >-
      Patch the plan with the new title. The If-Match header carries the plan
      ETag. Planner returns 200 with the updated plan.
    operationId: updatePlan
    parameters:
    - name: plan-id
      in: path
      value: $inputs.planId
    - name: If-Match
      in: header
      value: $steps.getPlan.outputs.planEtag
    requestBody:
      contentType: application/json
      payload:
        title: $inputs.newTitle
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      title: $response.body#/title
  - stepId: updatePlanDetails
    description: >-
      Patch the plan details with category label descriptions. The If-Match
      header carries the plan details ETag. Planner returns 200 with the updated
      plan details.
    operationId: updatePlanDetails
    parameters:
    - name: plan-id
      in: path
      value: $inputs.planId
    - name: If-Match
      in: header
      value: $steps.getPlanDetails.outputs.detailsEtag
    requestBody:
      contentType: application/json
      payload:
        categoryDescriptions: $inputs.categoryDescriptions
    successCriteria:
    - condition: $statusCode == 200
    outputs:
      detailsId: $response.body#/id
  outputs:
    planId: $inputs.planId
    title: $steps.updatePlan.outputs.title