### Start a Flow with a Label and Tags Source: https://docs.globus.org/cli/reference/flows_start This example demonstrates starting a flow with a descriptive label and associating multiple tags for better searchability. Each tag can be specified individually. ```bash globus flows start --label "My Flow Run" --tag "data-processing" --tag "urgent" ``` -------------------------------- ### Get Identity Example Source: https://docs.globus.org/api/auth/reference Example of how to retrieve an identity resource, demonstrating versioning and potential use of the 'include' query parameter. ```APIDOC ## GET /v2/api/identities/{identity_id} ### Description Retrieves a specific identity resource. This endpoint demonstrates the standard API versioning and the capability to include associated resources via query parameters. ### Method GET ### Endpoint /v2/api/identities/{identity_id} ### Parameters #### Path Parameters - **identity_id** (string) - Required - The unique identifier of the identity to retrieve. #### Query Parameters - **include** (string) - Optional - A comma-separated list of associated resources to include in the response (e.g., `identity_provider`). ### Request Example ``` GET https://auth.globus.org/v2/api/identities/2982f207-04c0-11e5-ac60-22000b92c6ec?include=identity_provider ``` ### Response #### Success Response (200) - **identity** (object) - The primary identity resource document. - **included** (object) - An optional envelope containing associated resources requested via the 'include' parameter. #### Response Example ```json { "identity": { "username": "user@example.com", "resource_server": "globusid.globus.org", "sub": "2982f207-04c0-11e5-ac60-22000b92c6ec", "name": "User Name" }, "included": { "identity_provider": { "id": "00000000-0000-0000-0000-000000000000", "name": "Globus ID" } } } ``` ``` -------------------------------- ### Example Endpoint Setup Source: https://docs.globus.org/globus-connect-server/v5.4/reference/endpoint/setup This example demonstrates how to set up a Globus Connect Server endpoint. It specifies the endpoint's display name, owner, contact email, and organization. Ensure you replace placeholder values with your actual information. ```bash globus-connect-server endpoint setup "Example Endpoint"\ -o admin@example.org \ --contact-email support@example.org \ --organization "Example Organization" ``` -------------------------------- ### Get Group Response Example Source: https://docs.globus.org/api/groups This example demonstrates the response structure for retrieving a specific group's details, including optional membership and allowed actions. ```json { "name": "string", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "group_type": "regular", "enforce_session": false, "session_limit": 0, "session_timeouts": {}, "my_memberships": [ { "group_id": "306db4e0-7449-4501-b76f-075576fe2d8f", "identity_id": "011a42b9-62d7-49eb-8328-c2e454af88a1", "username": "alice@example.com", "role": "member", "status": "active" } ], "memberships": [ { "group_id": "306db4e0-7449-4501-b76f-075576fe2d8f", "identity_id": "011a42b9-62d7-49eb-8328-c2e454af88a1", "username": "alice@example.com", "role": "member", "status": "active" } ] } ``` -------------------------------- ### Setup Globus Connect Personal with Setup Key (Linux) Source: https://docs.globus.org/globus-connect-personal/troubleshooting-guide Start GCP on a Linux host using a pre-generated setup key. Ensure you are in the GCP install directory and replace the placeholder with your actual setup key. ```bash $ ./globusconnectpersonal -setup --setup-key ${your_setup_key} ``` -------------------------------- ### Create Node Configuration Source: https://docs.globus.org/globus-connect-server/v5.4/reference/node/create This example demonstrates how to create a node configuration file. It uses the client ID from an environment variable, specifies the deployment key file, and exports the resulting node configuration to a JSON file. ```bash globus-connect-server node create \ -c $CLIENT_ID \ --deployment-key deployment-key.json \ --export-node node.json ``` -------------------------------- ### Get Identities by Usernames Example Source: https://docs.globus.org/api/auth/reference Retrieves identity information for specified usernames. This is an example of the GET request format. ```HTTP GET /v2/api/identities?usernames= ``` -------------------------------- ### Get Identities by IDs Source: https://docs.globus.org/api/auth/reference Retrieves identity information for specified identity IDs. This is an example of the GET request format. ```HTTP GET /v2/api/identities?ids= ``` -------------------------------- ### Example Task List URL Source: https://docs.globus.org/api/transfer/overview Construct full resource URLs by appending the specific resource path to the base URL. ```text https://transfer.api.globus.org/v0.10/task_list ``` -------------------------------- ### Simple GET Query Example Source: https://docs.globus.org/api/search/query A basic GET query for simple text matching. This can be directly encoded in a URL. ```json { "q": "the quick brown fox jumps" } ``` -------------------------------- ### Example Project Policy Source: https://docs.globus.org/api/auth/reference This JSON object represents a sample project policy configuration. ```json { "policy": { "authentication_assurance_timeout": 300, "high_assurance": true, "display_name": "test_policy", "id": "579c7af6-200a-4eb2-b4aa-6ccd9f38f2fa", "project_id": "1ea2de2a-64f2-4296-a171-b61f3a5d6c09", "domain_constraints_include": [ "*.edu", "uchicago.edu" ], "description": "blah", "domain_constraints_exclude": null, "required_mfa": true, "evaluate_login_identity": false } } ``` -------------------------------- ### Example API Path Source: https://docs.globus.org/api/search/api_usage This shows an example of an API path. It should be appended to the base URL to form the complete request URL. ```text GET /foo/bar ``` -------------------------------- ### Task List Filter Example Source: https://docs.globus.org/api/transfer/task Example of filtering the task list to retrieve tasks that are still running and have labels starting with 'experiment1'. ```http GET /task_list?filter=status:ACTIVE,INACTIVE/label:~experiment1* ``` -------------------------------- ### Example Account v1.0.0 Schema Source: https://docs.globus.org/globus-connect-server/v5.4/api/schemas/Account_1_0_0_schema Shows an example of the Account v1.0.0 schema, including DATA_TYPE, identity_id, storage_gateway_id, and username. ```json { "DATA_TYPE": "account#1.0.0", "identity_id": "011a42b9-62d7-49eb-8328-c2e454af88a1", "storage_gateway_id": "62c250f4-af41-4074-89a9-b6aff8c56fcb", "username": "string" } ``` -------------------------------- ### Get My Groups Response Example Source: https://docs.globus.org/api/groups This example shows the structure of the response when retrieving all groups a user is a member of. It includes group details and membership information. ```json [ { "id": "", "name": "A Group", "group_type": "regular", "enforce_session": false, "my_memberships": [ { "group_id": "", "identity_id": "", "username": "alice@example.com", "role": "admin" } ] }, { "id": "", "name": "A Plus Group", "group_type": "plus", "enforce_session": true, "my_memberships": [ { "group_id": "", "identity_id": "", "username": "alice@university.edu", "role": "member" }, { "group_id": "", "identity_id": "", "username": "alice@nationallab.gov", "role": "manager" } ] } ] ``` -------------------------------- ### Example GET Request URL Source: https://docs.globus.org/api/auth/reference Illustrates the standard URL format for GET requests to the Globus Auth API, including the base URL and version prefix. ```http GET https://auth.globus.org/v2/api/identities/2982f207-04c0-11e5-ac60-22000b92c6ec ``` -------------------------------- ### Output Expression Examples Source: https://docs.globus.org/globus-connect-server/v5.4/identity-mapping-guide Demonstrates how to construct output strings using identity properties and captured groups from match expressions. ```text "{0}" ``` ```text "u_{0}" ``` ```text "{1}" ``` ```text "u_93234" ``` ```text "{email}" ``` ```text "{0}@users.example.org" ``` -------------------------------- ### Get Collection Domain Response Example Source: https://docs.globus.org/globus-connect-server/v5.4/api/openapi_Domains Example of a successful response when retrieving a custom collection domain. It includes domain-specific details and follows the result envelope. ```json { "code": "string", "data": [ { "DATA_TYPE": "domain#1.0.0", "certificate": "string", "certificate_chain": "string", "certificate_chain_path": "string", "certificate_path": "string", "domain_name": "string", "private_key": "string", "private_key_path": "string", "wildcard": true } ], "DATA_TYPE": "result#1.0.0", "detail": null, "has_next_page": false, "http_response_code": 100, "marker": "string", "message": "string" } ``` -------------------------------- ### Start a Flow with JSON Output Formatting Source: https://docs.globus.org/cli/reference/flows_start This snippet demonstrates how to start a flow and request the output in JSON format. This is useful for programmatic processing of the command's results. ```bash globus flows start --format json ``` -------------------------------- ### Example Connector 1.0.0 Schema Source: https://docs.globus.org/globus-connect-server/v5.4/api/schemas/Connector_1_0_0_schema An example of a Connector 1.0.0 document, showing the expected format for connector information. ```json { "DATA_TYPE": "connector#1.0.0", "display_name": "POSIX", "id": "string", "version": "string" } ``` -------------------------------- ### Hello World Action Provider Source: https://docs.globus.org/api/flows/hosted-action-providers/ap-hello-world This action provider is designed for testing and learning. It always returns 'Hello': 'World'. It can optionally echo a provided string, simulate a delay, or test dependent scope consent. ```APIDOC ## POST https://actions.globus.org/hello_world ### Description Invokes the Hello World action provider. This provider is for testing and learning purposes. It returns a fixed "Hello": "World" pair and can optionally echo a string, simulate a delay, or require consent to a dependent scope. ### Method POST ### Endpoint https://actions.globus.org/hello_world ### Parameters #### Query Parameters None #### Request Body - **echo_string** (string) - Optional - If provided, the action provider will return an additional key "hello" with the value of this parameter. - **sleep_time** (integer) - Optional - If provided, the action provider will respond with 'ACTIVE' and remain so for the specified number of seconds before succeeding. If not provided, the action succeeds immediately. - **required_dependent_scope** (string) - Optional - If provided, the action provider will require consent to this dependent scope, testing the application's ability to handle `ConsentRequired` errors. ### Request Example ```json { "echo_string": "Test String", "sleep_time": 5 } ``` ### Response #### Success Response (200) - **Hello** (string) - Always returns "World". - **hello** (string) - Returned if `echo_string` was provided in the request body. #### Response Example ```json { "Hello": "World", "hello": "Test String" } ``` ``` -------------------------------- ### Setup Python Environment and Install Packages Source: https://docs.globus.org/globus-connect-server/v5.4/use-client-credentials This command sets up a Python virtual environment and installs the necessary globus-sdk and requests packages. Activate the environment before running Python scripts. ```bash python3 -mvenv globus_examples . ./globus_examples/bin/activate pip3 install --upgrade pip pip3 install globus-sdk requests ``` -------------------------------- ### Next Token Paging Example Source: https://docs.globus.org/api/transfer/overview Demonstrates next token paging using the 'next_token' query parameter. Pass the 'next_token' from the response to fetch subsequent pages of results. ```bash GET /endpoint//shared_endpoint_list?max_results=100 { "next_token": "abc", ... } GET /endpoint//shared_endpoint_list?max_results=100&next_token=abc { "next_token": null, ... } ``` -------------------------------- ### HPSS Transfer Error: Operation timed out example Source: https://docs.globus.org/premium-storage-connectors/latest/hpss Example log output for a transfer operation timeout, indicating that a mover set did not start the transfer within the MVR_CLIENT_TIMEOUT period. ```text 2019-06-12 14:29:39 Error (transfer) Endpoint: XXXX HPSS Archive (e38ee901-6d04-11e5-ba46-22000b92c6ec) Server: XXXX:2811 Command: STOR ~/scratch_backups/XXXX Message: The operation timed out --- Details: Timeout waiting for response ``` -------------------------------- ### Make Directory Action Provider Output Source: https://docs.globus.org/api/transfer/action-providers/mkdir This is an example of the JSON output received after successfully creating a directory using the Make Directory action provider. It includes details about the action's status, completion time, and resource information. ```json { "action_id": "ig58Jabcdefghi", "completion_time": "2023-06-28 15:42:52.434871+00:00", "creator_id": "urn:globus:auth:identity:12341234-abcd-abcd-abcd-123412341234", "details": { "DATA_TYPE": "mkdir_result", "code": "DirectoryCreated", "message": "The directory was created successfully", "request_id": "BaT9LmWZc", "resource": "/operation/endpoint/6c54cade-bde5-45c1-bdea-f4bd71dba2cc/mkdir" }, "display_status": "SUCCEEDED", "label": null, "manage_by": [], "monitor_by": [], "release_after": "P30D", "start_time": "2023-06-28 15:42:51.005049+00:00", "status": "SUCCEEDED" } ``` -------------------------------- ### OIDC Userinfo Endpoint Request Example Source: https://docs.globus.org/api/auth/reference Example of an HTTP GET request to the OIDC Userinfo Endpoint. Ensure the Authorization header contains a valid access token with the 'openid' scope. ```http GET /v2/oauth2/userinfo Host: auth.globus.org Authorization: Bearer A7oU1xJ8-ddvRiMf-ZFDvXb ``` -------------------------------- ### Marker Paging Example Source: https://docs.globus.org/api/transfer/overview Illustrates marker paging using the 'marker' query parameter and 'next_marker' response field. Pass the 'next_marker' from the previous response to fetch the next page. ```bash GET task//successful_transfers { "marker": null, "next_marker": 123, ... } GET task//successful_transfers?marker=123 { "marker": 123, "next_marker": 456, ... } GET task//successful_transfers?marker=456 { "marker": 456, "next_marker": null, ... } ``` -------------------------------- ### Start a Flow with JMESPath Filtering Source: https://docs.globus.org/cli/reference/flows_start Use this example to start a flow and apply a JMESPath expression to filter the JSON output. This forces the output format to be JSON processed by the specified expression. ```bash globus flows start --jmespath 'run_id' ``` -------------------------------- ### Offset Paging Example Source: https://docs.globus.org/api/transfer/overview Demonstrates how to paginate results using offset and limit parameters. Increment the offset by the limit to fetch subsequent pages. ```bash GET /task_list?offset=0&limit=50 GET /task_list?offset=50&limit=50 GET /task_list?offset=100&limit=50 ``` -------------------------------- ### Start Globus Connect Personal Setup Source: https://docs.globus.org/globus-connect-personal/install/linux Initiates the interactive setup process for Globus Connect Personal. This command must be run from within the extracted Globus Connect Personal directory. ```bash $ ./globusconnectpersonal ``` -------------------------------- ### Stat File or Directory Example Output Source: https://docs.globus.org/api/transfer/action-providers/stat Shows the detailed information returned after successfully executing the Stat File or Directory action, including file type, permissions, and size. ```json { "action_id": "FJmGKabcdefgh", "completion_time": "2024-02-28 15:23:00.269995+00:00", "creator_id": "urn:globus:auth:identity:12341234-abcd-abcd-abcd-123412341234", "details": { "DATA_TYPE": "file", "group": "tutorial", "last_modified": "2023-12-18 16:52:50+00:00", "link_group": null, "link_last_modified": null, "link_size": null, "link_target": null, "link_user": null, "name": "godata", "permissions": "0755", "size": 4096, "type": "dir", "user": "tutorial" }, "display_status": "SUCCEEDED", "label": null, "manage_by": [], "monitor_by": [], "release_after": "P30D", "start_time": "2024-02-28 15:22:58.772247+00:00", "status": "SUCCEEDED" } ``` -------------------------------- ### Make a GET API Call to Globus Timers Source: https://docs.globus.org/cli/reference/api_timers This example demonstrates how to make a GET request to a specific path within the Globus Timers service. The path is appended to the base service URL. ```bash globus api timers GET /foo/bar ``` -------------------------------- ### Load and Dump Audit Logs to CSV Source: https://docs.globus.org/globus-connect-server/v5.4/reference/audit/dump This example demonstrates loading audit logs and then dumping them to a CSV file using the default database path. Ensure you have read access to the database. ```bash sudo globus-connect-server audit load sudo globus-connect-server audit dump -F csv > audit-logs-full.csv ``` -------------------------------- ### Make a GET API call to Globus Auth Source: https://docs.globus.org/cli/reference/api_auth This example demonstrates how to make a GET request to a specific path within the Globus Auth service. The command joins the provided path with the base service URL. ```bash globus api auth GET /foo/bar ``` -------------------------------- ### Numeric Range Example (1.0.0) Source: https://docs.globus.org/api/search/reference/delete_by_query Filter results for a numeric field within a specified start and end value. ```json { "type": "range", "field_name": "cardinality_of_foobar", "values": [ { "from": "10", "to": "50" } ] } ``` -------------------------------- ### Example POST Request to Create Project Source: https://docs.globus.org/api/auth/reference This JSON payload is used to create a new project, specifying display name, contact email, and administrators. ```json { "display_name": "Guardians of the Galaxy", "contact_email": "star.lord2@guardians.galaxy", "admin_ids": [ "bd420b5e-2739-11ee-9eec-0242ac110002" ], "admin_group_ids": [] } ```