Flows API
  • Globus Flows
  • Overview
  • Getting Started
    • How to Run a Flow
    • How to Monitor a Flow Run
    • How to Create a Flow
    • How to Manage High Assurance Flows
  • Authoring Flows
    • Introduction
    • Actions
    • Expressions
    • Choice States
    • Wait States
    • Fail States
    • Pass States
    • Protecting Secrets
    • Handling Exceptions
    • Performing Actions as Different Users
    • Run Context
    • Validating Flow Definitions
    • High Assurance Flows
  • Authoring Input Schemas
  • Registered APIs
    • Feature Overview
    • Tutorials
    • Explanations
    • How-tos
    • Reference
    • The Globus Registered API CLI
  • Authentication and Authorization
  • Consents and Resuming Runs
  • Permissions
  • Limits
  • Hosted Registered APIs
    • Usage notes
    • Globus Groups Registered APIs
    • Globus Search Registered APIs
  • Hosted Action Providers
    • Hello World
    • Globus Search - Ingest Task
    • Globus Search - Delete Task
    • Send Notification Email
    • Wait For User Selection
    • Expression Evaluation
    • DataCite Mint
    • Transfer APs
    • Compute AP
  • Example Flows
    • Simple Transfer
    • Move (copy and delete) files
    • Transfer and Share Files
    • Two Stage Globus Transfer
    • Transfer After Approval
    • Looping Batched Move
    • Tar and Transfer with Globus Compute
Skip to main content
Globus Docs
  • Getting Started
    Getting Started

    Getting Started and Tutorial docs cover how to perform some activity or provide an introduction to a feature. They are not comprehensive, but help you get started with Globus or with new Globus features.

    • Users
    • Admins
    • Developers
  • Reference
    Reference
    • Service
      • Auth
      • Groups
      • Transfer
      • Timers
      • Flows
      • Compute
      • Search
    • Agents
      • Globus Connect Server
      • GCS CLI
      • Globus Connect Personal
      • Globus Compute
    • SDK
      • Python
      • JavaScript/TypeScript
    • Clients
      • CLI
    • Security and Compliance
      • Product Security
      • Privacy
      • Solutions for Sensitive Data
      • FAQs
  • Solutions & Guides
    Solutions & Guides

    Find practical approaches for leveraging Globus in research environments, integrating with platforms, and building science gateways. Access hands-on guides, integration instructions, and real-world scenarios for advanced usage.

    • Portals/Science Gateways
    • Guides
  • Support
    Support

    Find answers to frequently asked questions, connect with the community by joining our mailing lists, or reach out directly to Globus support.

    • FAQs
    • Mailing Lists
    • Contact Us
    • Check Support Tickets
  • Site Search
  1. Home
  2. Globus Services
  3. Globus Flows
  4. Registered APIs
  5. Tutorials
  6. Use a Registered API in a Flow

Use a Registered API in a Flow

Table of Contents
  • 1. Prerequisites
  • 2. Create a flow definition file
  • 3. Create the flow
  • 4. Run the flow
  • 5. Recap
  • 6. Next Steps

Now that you’ve created your first Registered API, you’re ready to use it in a flow!

1. Prerequisites

You’ll need these three things before continuing with this tutorial

  • The Globus CLI must be installed.

  • You need to log into the Globus CLI with the same Globus Auth identity that you used in the previous section of the tutorial.

  • You’ll need the Registered API ID that you copied at the end of the last section of the tutorial.

2. Create a flow definition file

Create a file named definition.json and copy in the JSON document shown below:

{
  "StartAt": "DemoRegisteredApi",
  "States": {
    "DemoRegisteredApi": {
      "Type": "Action",
      "Handler": {
        "Type": "RegisteredAPI",
        "Id": "REPLACE_ME_WITH_YOUR_REGISTERED_API_ID!"
      },
      "Parameters": {},
      "ResultPath": "$.MyFlows",
      "End": true
    }
  }
}
Note

Be sure to replace the text REPLACE_ME_WITH_YOUR_REGISTERED_API_ID! with the Registered API ID that you copied in the previous section of the tutorial.

3. Create the flow

In the same directory that you created the definition.json file above, run this Globus CLI command:

globus flows create "Demo: List my flows" definition.json

You’ll see output similar to this:

$ globus flows create "Demo: List my flows" definition.json
Flow ID:                  00000000-0000-0000-0000-000000000000
Title:                    Demo: List my flows
Subtitle:
Description:
Keywords:
Owner:                    user@example.domain
High Assurance:           False
Authentication Policy ID: None
Subscription ID:          None
Created At:               2026-03-01 00:00:00
Updated At:               2026-03-01 00:00:00
Administrators:
Viewers:
Starters:
Run Managers:
Run Monitors:

Copy the flow ID for the next step. (You can always run globus flows list if you lose track of it!)

4. Run the flow

You’ll need to run the next Globus CLI command twice, replacing the all-zeroes ID with the real flow ID that you copied from the previous step.

globus flows start 00000000-0000-0000-0000-000000000000

The first time it’s run, you’ll be directed to run a globus login command. This is required whenever you start a flow for the first time with the Globus CLI.

Copy and run the globus login command as directed, which will launch your web browser and direct you through a Globus Auth login flow.

Once you’ve consented to the Globus CLI interacting with your new flow, return to the console and re-run the globus flows start command. You’ll see output similar to this:

$ globus flows start 00000000-0000-0000-0000-000000000000
Run ID:       ffffffff-ffff-ffff-ffff-ffffffffffff
Run Label:    None
Run Tags:
Status:       ACTIVE
Started At:   2026-03-01 11:11:11
Completed At: None
Flow ID:      00000000-0000-0000-0000-000000000000
Flow Title:   Demo: List my flows
Run Owner:    user@example.domain
Run Managers: user@example.domain
Run Monitors:

You can then review the run’s logs. Copy and paste the run ID from your globus flows start output and insert it into this command:

$ globus flows run show-logs --format=json ffffffff-ffff-ffff-ffff-ffffffffffff
{
  ...
}

5. Recap

You’ve reached the end of the tutorial!

Let’s look back at what you’ve accomplished:

  • You initialized a Registered API repository using the gra init command.

  • You configured a single target and reviewed the roles associated with it using the gra manage command.

  • You built and published the repository using the gra build and gra publish commands, which created a single new Registered API.

  • You created a flow that used that Registered API and ran it.

Great work!

6. Next Steps

If you’d like to explore Registered APIs more, here are some ideas:

  • Use the gra manage command to configure some additional targets.

  • Create a new directory and initialize a new Registered API repository using the gra init command…​ but choose a different Globus service’s OpenAPI specification URL!

  • Registered APIs documentation home

  • Globus Flows
  • Overview
  • Getting Started
    • How to Run a Flow
    • How to Monitor a Flow Run
    • How to Create a Flow
    • How to Manage High Assurance Flows
  • Authoring Flows
    • Introduction
    • Actions
    • Expressions
    • Choice States
    • Wait States
    • Fail States
    • Pass States
    • Protecting Secrets
    • Handling Exceptions
    • Performing Actions as Different Users
    • Run Context
    • Validating Flow Definitions
    • High Assurance Flows
  • Authoring Input Schemas
  • Registered APIs
    • Feature Overview
    • Tutorials
    • Explanations
    • How-tos
    • Reference
    • The Globus Registered API CLI
  • Authentication and Authorization
  • Consents and Resuming Runs
  • Permissions
  • Limits
  • Hosted Registered APIs
    • Usage notes
    • Globus Groups Registered APIs
    • Globus Search Registered APIs
  • Hosted Action Providers
    • Hello World
    • Globus Search - Ingest Task
    • Globus Search - Delete Task
    • Send Notification Email
    • Wait For User Selection
    • Expression Evaluation
    • DataCite Mint
    • Transfer APs
    • Compute AP
  • Example Flows
    • Simple Transfer
    • Move (copy and delete) files
    • Transfer and Share Files
    • Two Stage Globus Transfer
    • Transfer After Approval
    • Looping Batched Move
    • Tar and Transfer with Globus Compute
© 2010- The University of Chicago Legal Privacy Accessibility