Skip to content

Lambda API endpoints

James Kent edited this page Oct 21, 2025 · 3 revisions

Compose-Runner API Cheatsheet

1) Invoke a job

Endpoint: https://rruanembp2jcccmeeamv6xgl4q0kuqsp.lambda-url.us-east-1.on.aws/

Example:

curl -X POST "https://rruanembp2jcccmeeamv6xgl4q0kuqsp.lambda-url.us-east-1.on.aws/"   -H "Content-Type: application/json"   -d '{
    "meta_analysis_id": "pFGy6g3LRo9x",
    "environment": "production"
  }'

Sample response:

{"job_id": "arn:aws:states:us-east-1:631329474511:execution:ComposeRunnerStateMachineB175FBC0-hid7JXdBC4bp:2d667e38-5d50-4828-ace9-c6c7064a7f47", "artifact_prefix": "2d667e38-5d50-4828-ace9-c6c7064a7f47", "status": "SUBMITTED", "status_url": "/jobs/arn:aws:states:us-east-1:631329474511:execution:ComposeRunnerStateMachineB175FBC0-hid7JXdBC4bp:2d667e38-5d50-4828-ace9-c6c7064a7f47"}

2) Status of the job

Endpoint: https://asoqdxtcjngou6odcnvoaqtf7e0rldhf.lambda-url.us-east-1.on.aws/

Example:

curl -X POST "https://asoqdxtcjngou6odcnvoaqtf7e0rldhf.lambda-url.us-east-1.on.aws/"   -H "Content-Type: application/json"   -d '{
        "job_id": "arn:aws:states:us-east-1:631329474511:execution:ComposeRunnerStateMachineB175FBC0-hid7JXdBC4bp:2d667e38-5d50-4828-ace9-c6c7064a7f47"
      }'

Sample Response:

{"job_id": "arn:aws:states:us-east-1:631329474511:execution:ComposeRunnerStateMachineB175FBC0-hid7JXdBC4bp:2d667e38-5d50-4828-ace9-c6c7064a7f47", "status": "RUNNING", "start_time": "2025-10-21T01:32:05.920000+00:00", "output": {}, "artifact_prefix": "2d667e38-5d50-4828-ace9-c6c7064a7f47"}

3) Fetch logs for a job

Endpoint: https://oniyt5po2iorelr326zszptwcy0xbjzz.lambda-url.us-east-1.on.aws/

Example:

curl -X POST "https://oniyt5po2iorelr326zszptwcy0xbjzz.lambda-url.us-east-1.on.aws/"   -H "Content-Type: application/json"   -d '{"artifact_prefix":"2d667e38-5d50-4828-ace9-c6c7064a7f47"}'

Sample response (truncated):

{"artifact_prefix": "2d667e38-5d50-4828-ace9-c6c7064a7f47", "events": [{"timestamp": 1761010403921, "message": "INFO:compose_runner.ecs_task:{\"artifact_prefix\": \"2d667e38-5d50-4828-ace9-c6c7064a7f47\", \"message\": \"workflow.start\", \"meta_analysis_id\": \"pFGy6g3LRo9x\", \"environment\": \"production\", \"no_upload\": false}"}, {"timestamp": 1761010403921, "message": "{\"artifact_prefix\": \"2d667e38-5d50-4828-ace9-c6c7064a7f47\", \"message\": \"workflow.start\", \"meta_analysis_id\": \"pFGy6g3LRo9x\", \"environment\": \"production\", \"no_upload\": false}"}, {"timestamp": 1761010412822, "message": "INFO:nimare.workflows.base:Saving meta-analytic maps, tables and boilerplate to /tmp/2d667e38-5d50-4828-ace9-c6c7064a7f47..."}, {"timestamp": 1761010414670, "message": "INFO:compose_runner.ecs_task:{\"artifact_prefix\": \"2d667e38-5d50-4828-ace9-c6c7064a7f47\", \"message\": \"workflow.completed\", \"result_url\": \"https://compose.neurosynth.org/meta-analyses/pFGy6g3LRo9x\"}"}, {"timestamp": 1761010414670, "message": "{\"artifact_prefix\": \"2d667e38-5d50-4828-ace9-c6c7064a7f47\", \"message\": \"workflow.completed\", \"result_url\": \"https://compose.neurosynth.org/meta-analyses/pFGy6g3LRo9x\"}"}, {"timestamp": 1761010415475, "message": "INFO:compose_runner.ecs_task:{\"artifact_prefix\": \"2d667e38-5d50-4828-ace9-c6c7064a7f47\", \"message\": \"artifacts.uploaded\", \"bucket\": \"composerunnerstack-composerunnerresults0fe459c9-wyzha3pbrx0p\", \"prefix\": \"compose-runner/results\"}"}, {"timestamp": 1761010415475, "message": "{\"artifact_prefix\": \"2d667e38-5d50-4828-ace9-c6c7064a7f47\", \"message\": \"artifacts.uploaded\", \"bucket\": \"composerunnerstack-composerunnerresults0fe459c9-wyzha3pbrx0p\", \"prefix\": \"compose-runner/results\"}"}, {"timestamp": 1761010415502, "message": "{\"artifact_prefix\": \"2d667e38-5d50-4828-ace9-c6c7064a7f47\", \"message\": \"metadata.written\", \"bucket\": \"composerunnerstack-composerunnerresults0fe459c9-wyzha3pbrx0p\", \"prefix\": \"compose-runner/results\"}"}, {"timestamp": 1761010415502, "message": "INFO:compose_runner.ecs_task:{\"artifact_prefix\": \"2d667e38-5d50-4828-ace9-c6c7064a7f47\", \"message\": \"metadata.written\", \"bucket\": \"composerunnerstack-composerunnerresults0fe459c9-wyzha3pbrx0p\", \"prefix\": \"compose-runner/results\"}"}, {"timestamp": 1761010415502, "message": "INFO:compose_runner.ecs_task:{\"artifact_prefix\": \"2d667e38-5d50-4828-ace9-c6c7064a7f47\", \"message\": \"workflow.success\", \"result_url\": \"https://compose.neurosynth.org/meta-analyses/pFGy6g3LRo9x\"}"}, {"timestamp": 1761010415502, "message": "{\"artifact_prefix\": \"2d667e38-5d50-4828-ace9-c6c7064a7f47\", \"message\": \"workflow.success\", \"result_url\": \"https://compose.neurosynth.org/meta-analyses/pFGy6g3LRo9x\"}"}], "next_token": "Bxkq6kVGFtq2y_MoigeqscPOdhXVbhiVtLoAmXb5jCrg43zkk9F9w3uTlqUUpUvsobxltE-I3rbnrO01ZBXjvdnWOhiYu0AF2aJZbCV9hMKl-wju3Ol2yeOpt1bHe6a6gKZzwqqCvLleLF1fLgzJFkGsMCcIspG_yHbZPl6RdabUuQ53haF3Za0P68kymwPXLBTWqd5ZAyKERRx6Qq96S4CtEmS9tjmmmNkiTklJ09M-CrQQNRxFWcGqPCfA_yDc9XwHTe6QDEvWLYF6qWq03m3h-2o8Us5sRcKV5HdSW8M"}

Use next_token for pagination to fetch additional log events.


4) List/download job artifacts

Endpoint: https://23llzhs3nz6o4e47ycofhluqqa0zjyko.lambda-url.us-east-1.on.aws/

Example:

curl -X POST "https://23llzhs3nz6o4e47ycofhluqqa0zjyko.lambda-url.us-east-1.on.aws/"   -H "Content-Type: application/json"   -d '{"artifact_prefix":"2d667e38-5d50-4828-ace9-c6c7064a7f47"}'

Sample response (abbrev.):

{
  "job_id": "421c01e3-074a-4670-ac1d-3b67a28645e6",
  "artifacts": [
    {
      "key": "compose-runner/results/.../boilerplate.txt",
      "filename": "boilerplate.txt",
      "size": 738,
      "last_modified": "2025-10-17T00:07:16+00:00",
      "url": "https://composerunnerstack-.../boilerplate.txt?...&Expires=1760664273"
    },
    {
      "key": "compose-runner/results/.../meta_results.pkl",
      "filename": "meta_results.pkl",
      "size": 26491824,
      "last_modified": "2025-10-17T00:07:15+00:00",
      "url": "https://composerunnerstack-.../meta_results.pkl?...&Expires=1760664273"
    }
    // more files...
  ],
  "bucket": "composerunnerstack-composerunnerresults0fe459c9-wyzha3pbrx0p",
  "prefix": "compose-runner/results/421c01e3-074a-4670-ac1d-3b67a28645e6"
}

Quick reference

  • meta_analysis_id: ID of the meta-analysis to run.
  • environment: Deployment target (e.g., production).
  • artifact_prefix: Returned by the invoke API; use it to query logs and results.
  • result_url: Human-readable results page.
  • artifacts_*: S3 bucket/prefix where outputs are stored.
  • expires_in: Seconds for pre-signed artifact URLs to remain valid.

Tip: Save the job_id and artifact_prefix from step 1; you’ll need it for logs (step 2) and artifacts (step 3).

Clone this wiki locally