1Password · Arazzo Workflow

1Password Stream Item Usages

Version 1.0.0

Open an item usage feed from a start time, then continue paging with the cursor while more remain.

1 workflow 1 source API 1 provider
View Spec View on GitHub Password ManagerPasswordsSecuritySecretsArazzoWorkflows

Provider

1password

Workflows

stream-item-usages
Open an item usage feed from a start time and page with the cursor while more remain.
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.
2 steps inputs: limit, startTime outputs: cursor, hasMore, items
1
openFeed
listItemUsagesV2
Open the item usage feed using a ResetCursor start time to retrieve the first page of item usage events.
2
nextPage
listItemUsagesV2
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.

Source API Descriptions

Arazzo Workflow Specification

1password-stream-item-usages-workflow.yml Raw ↑
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