Action Provider: Hello World
URL: https://actions.globus.org/hello_world [Introspect]
Scope: https://auth.globus.org/scopes/actions.globus.org/hello_world
Synchronous / Asynchronous: Either
The Hello World action provider is useful for testing and learning purposes.
The action provider will always return an output with the key/value pair "Hello": "World".
If echo_string is included in the parameters submitted to the action provider,
an additional key, "hello", and the value of the echo_string parameter will be returned.
If sleep_time is included in the parameters submitted to the action provider,
the action provider will immediately respond that the action is "ACTIVE"
and subsequent status checks will show that the action is still "ACTIVE"
until sleep_time seconds have elapsed since the action started running.
After sleep_time seconds have elapsed, status checks will show that the action is "SUCCEEDED".
(If sleep_time is not included, the status of the action will immediately be "SUCCEEDED".)
If required_dependent_scope is included in the parameters submitted to the action provider,
the action provider will require consent to that dependent scope,
which is a useful way to test that an application can handle ConsentRequired errors.
Usage Example
The example below demonstrates how to use the action provider in a flow.
Features of the flow:
-
The
echo_stringvalue is an expression (indicated by the.=suffix) which generates the value passed to the action provider using anameparameter. In this case, it demonstrates string concatenation syntax.
{
"StartAt": "HelloWorld",
"States": {
"HelloWorld": {
"Type": "Action",
"ActionUrl": "https://actions.globus.org/hello_world/",
"Parameters": {
"echo_string.=": "'Greetings, ' + name + '!'",
"sleep_time": 10
},
"End": true
}
}
}
Features of the input schema:
-
A constraint (
minLength) ensures that the user provides a string that is not blank.
{
"properties": {
"name": {
"title": "Name to greet",
"type": "string",
"minLength": 1
}
},
"required": [
"name"
],
"additionalProperties": false
}
{
"name": "Demo User"
}