Description

@globus/sdk provides modules for interacting with the various APIs that make up the Globus platform.

Key Concepts

  • All service methods return a Promise that resolves to a Fetch API Response object.
    • Under the hood, we are returning the result of a composed fetch.
  • All service methods accept a ServiceMethodOptions object to pass query parameters, a payload, and headers.
  • All service methods support a tail argument to pass options to the SDK, including the composed fetch call.

Example

Using the SDK to search for endpoints via Transfer API.

import { transfer } from "@globus/sdk";

const result = await (
await globus.transfer.endpointSearch(
{
query: { filter_fulltext: "Globus Tutorial" }
headers: {
Authorization: "Bearer MY_ACCESS_TOKEN",
},
},
{
fetch: {
// Provide parameters to the underlying `fetch` call.
// https://developer.mozilla.org/en-US/docs/Web/API/fetch#parameters
options: {
priority: "high"
},
},
}
)
).json();

Example

Using the SDK to fetch a single flow from the Flows API.

import { flows } from "@globus/sdk";

const result = await (await flows.flows.get("452bbea3-5e3b-45a5-af08-50179839a4e8")).json();

Index

Core

Service

Generated using TypeDoc