What is a target?
1. What is a target?
A target is a single API route, like GET /resources.
When users use the Globus Registered API (GRA) CLI to initialize a repository (the gra init command),
the GRA CLI will ask for the URL to — or a local file path for — an OpenAPI specification document.
When the OpenAPI document is loaded, users can then choose one or more targets
to configure and eventually publish as Registered APIs in the Globus Flows service.
For example, an OpenAPI specification might define five individual APIs:
| Name | HTTP method | Path |
|---|---|---|
Create a new thing |
|
|
List all the things |
|
|
Show one thing |
|
|
Update one thing |
|
|
Delete one thing |
|
|
The GRA CLI presents all of these to the user as targets. The user might create Registered APIs for all of these targets, or they might choose some subset of targets to publish.
Targets may have different types of parameters that must be provided.
In the example table above, the last three paths include the text {thing_id};
this indicates that those three targets require a path parameter.
2. How are targets and Registered APIs related?
A target is one part of a Registered API.
Registered APIs include additional information, such as roles.