arazzo: 1.0.1 info: title: 1Password Stream Item Usages summary: Open an item usage feed from a start time, then continue paging with the cursor while more remain. description: >- The 1Password Events API feed pattern for item usage events, which report when items in shared vaults are filled, copied, or revealed. The workflow opens the item usage feed with a ResetCursor start time to retrieve the first page, then continues paging using the cursor returned by the previous response, branching on the has_more flag to either fetch another page or finish. Each 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: eventsApi url: ../openapi/1password-events-openapi.yml type: openapi workflows: - workflowId: stream-item-usages summary: Open an item usage feed from a start time and page with the cursor while more remain. description: >- Opens the item usage feed from the supplied start time, then fetches the next page using the returned cursor and branches on the has_more flag to keep paging or finish. inputs: type: object required: - startTime properties: startTime: type: string description: An ISO 8601 timestamp to begin fetching item usage events from. limit: type: integer description: The maximum number of item usage records to return per page. steps: - stepId: openFeed description: >- Open the item usage feed using a ResetCursor start time to retrieve the first page of item usage events. operationId: listItemUsagesV2 requestBody: contentType: application/json payload: limit: $inputs.limit start_time: $inputs.startTime successCriteria: - condition: $statusCode == 200 outputs: cursor: $response.body#/cursor hasMore: $response.body#/has_more items: $response.body#/items - stepId: nextPage description: >- Fetch the next page of item usage events using the cursor from the previous response, looping again while the response reports more events are available. operationId: listItemUsagesV2 requestBody: contentType: application/json payload: cursor: $steps.openFeed.outputs.cursor successCriteria: - condition: $statusCode == 200 outputs: cursor: $response.body#/cursor hasMore: $response.body#/has_more items: $response.body#/items onSuccess: - name: morePages type: goto stepId: nextPage criteria: - context: $response.body condition: $.has_more == true type: jsonpath - name: feedDrained type: end criteria: - context: $response.body condition: $.has_more == false type: jsonpath outputs: cursor: $steps.nextPage.outputs.cursor hasMore: $steps.nextPage.outputs.hasMore items: $steps.nextPage.outputs.items