What is a parameter?
1. What is a parameter?
In the context of OpenAPI — and registered APIs in the Globus Flows service — a parameter is a piece of variable information that is used to construct an API request.
Here’s an example of a type of parameter called a "path parameter" that you are likely to see when configuring targets in the Globus Registered API (GRA) CLI:
/things/{thing_id} (DELETE)
The text {thing_id} flags that when an attempt is made to DELETE a thing,
the thing’s ID must be provided.
2. What types of parameters exist?
In the previous section, an example was given of a "path parameter", but there are several types of parameters:
-
Path parameters
Path parameters are part of, and visible in, the URL’s path. They are always required.
In the example below,
thing_idis the name of the path parameter:https://domain.example/things/{thing_id} ^^^^^^^^^^ -
Query parameters
Query parameters are part of, and visible in, the URL’s query string.
In the example below,
pageandpage_sizeare the names of the query parameters:https://domain.example/things/?page=2&page_size=25 ^^^^ ^^^^^^^^^ -
Header parameters
Header parameters are added as headers to the HTTP request when an API is called. They are not visible in the URL.
-
Cookie parameters
Cookie parameters are added to the
Cookieheader in the HTTP request when an API is called. They are not visible in the URL.
For more information about parameter types, see this page.