{
  "openapi": "3.0.1",
  "info": {
    "title": "GA4GH TRS Tool Registry Extractor",
    "description": "Point at ANY GA4GH TRS v2 registry (Dockstore, WorkflowHub) and pull tools, workflows, tool classes, versions and CWL/WDL/NFL/GALAXY descriptors into clean flat rows. Auto-pages via next_page, round-trips %2F tool ids, surfaces each version's descriptor types. Pay per tool.",
    "version": "0.1",
    "x-build-id": "Wvpg7AFX6MbMJYJN3"
  },
  "servers": [
    {
      "url": "https://api.apify.com/v2"
    }
  ],
  "paths": {
    "/acts/datamule~ga4gh-trs-tool-registry-extractor/run-sync-get-dataset-items": {
      "post": {
        "operationId": "run-sync-get-dataset-items-datamule-ga4gh-trs-tool-registry-extractor",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for its completion, and returns Actor's dataset items in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    },
    "/acts/datamule~ga4gh-trs-tool-registry-extractor/runs": {
      "post": {
        "operationId": "runs-sync-datamule-ga4gh-trs-tool-registry-extractor",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor and returns information about the initiated run in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/runsResponseSchema"
                }
              }
            }
          }
        }
      }
    },
    "/acts/datamule~ga4gh-trs-tool-registry-extractor/run-sync": {
      "post": {
        "operationId": "run-sync-datamule-ga4gh-trs-tool-registry-extractor",
        "x-openai-isConsequential": false,
        "summary": "Executes an Actor, waits for completion, and returns the OUTPUT from Key-value store in response.",
        "tags": [
          "Run Actor"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/inputSchema"
              }
            }
          }
        },
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "description": "Enter your Apify token here"
          }
        ],
        "responses": {
          "200": {
            "description": "OK"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "inputSchema": {
        "type": "object",
        "required": [
          "sources"
        ],
        "properties": {
          "sources": {
            "title": "TRS v2 base URL(s)",
            "type": "array",
            "description": "One or more GA4GH TRS (Tool Registry Service) v2 base/root URLs. Examples: https://dockstore.org/api/ga4gh/trs/v2 (Dockstore) and https://workflowhub.eu/ga4gh/trs/v2 (WorkflowHub). Point at the TRS BASE — do NOT append an endpoint like /tools; the actor builds the paths for you.",
            "items": {
              "type": "string"
            }
          },
          "mode": {
            "title": "Mode (what to extract)",
            "enum": [
              "tools",
              "toolClasses",
              "service-info",
              "tool-versions",
              "tool-descriptor"
            ],
            "type": "string",
            "description": "Which part of the registry to harvest. 'tools' lists tools/workflows (paginated, filterable). 'toolClasses' returns the registry taxonomy. 'service-info' returns the registry's identity. 'tool-versions' returns one row per version (all tools, or the ones in Tool ID). 'tool-descriptor' returns the descriptor file (CWL/WDL/NFL/GALAXY…) for each version — surfacing whatever types the version advertises.",
            "default": "tools"
          },
          "toolId": {
            "title": "Tool ID(s) (tool-versions / tool-descriptor)",
            "type": "array",
            "description": "Optional. For 'tool-versions' or 'tool-descriptor' mode, restrict to these TRS tool ids instead of walking every tool. Use the id EXACTLY as the registry returns it (e.g. quay.io/collaboratory/dockstore-tool-bedtools-genomecov on Dockstore, or 2 on WorkflowHub) — the actor URL-encodes the slashes for you. Leave empty to harvest versions/descriptors across all tools (bounded by Max records).",
            "items": {
              "type": "string"
            }
          },
          "descriptorType": {
            "title": "Descriptor type (optional)",
            "enum": [
              "",
              "CWL",
              "WDL",
              "NFL",
              "GALAXY",
              "SMK",
              "PLAIN_CWL",
              "PLAIN_WDL",
              "PLAIN_NFL",
              "PLAIN_GALAXY"
            ],
            "type": "string",
            "description": "Optional. For 'tool-descriptor' mode, pin a single descriptor language to fetch (CWL, WDL, NFL for Nextflow, GALAXY, or SMK for Snakemake). Leave empty to fetch every type each version actually advertises — different tools expose different languages, so the default follows the version. In 'tools' mode this is also forwarded as the TRS descriptorType filter.",
            "default": ""
          },
          "versionId": {
            "title": "Version ID (optional)",
            "type": "string",
            "description": "Optional. For 'tool-descriptor' mode, restrict to a single version (matched against the version id OR name). Leave empty to emit descriptors for every version of each selected tool."
          },
          "includeDescriptorContent": {
            "title": "Include descriptor file content",
            "type": "boolean",
            "description": "For 'tool-descriptor' mode: when true (default), each row carries the descriptor file's text in descriptorContent (capped for very large files). Turn off to emit only the descriptor's metadata + URL (smaller rows).",
            "default": true
          },
          "name": {
            "title": "Filter: name / search",
            "type": "string",
            "description": "Optional TRS /tools filter. Free-text tool name / search query (Dockstore treats this as a search over name & description)."
          },
          "toolClass": {
            "title": "Filter: tool class",
            "type": "string",
            "description": "Optional TRS /tools filter. Restrict to a tool class, e.g. Workflow, CommandLineTool, Notebook, Service. Use 'toolClasses' mode first to see what a registry offers."
          },
          "organization": {
            "title": "Filter: organization",
            "type": "string",
            "description": "Optional TRS /tools filter. Restrict to tools published by an organization (e.g. collaboratory, nf-core)."
          },
          "registry": {
            "title": "Filter: image registry",
            "type": "string",
            "description": "Optional TRS /tools filter. Restrict to tools whose image lives in this container registry host (e.g. quay.io)."
          },
          "author": {
            "title": "Filter: author",
            "type": "string",
            "description": "Optional TRS /tools filter. Restrict to tools by author."
          },
          "checker": {
            "title": "Filter: checker workflows only",
            "type": "boolean",
            "description": "Optional TRS /tools filter. When true, restrict to tools that have a checker workflow. Leave unset for all tools.",
            "default": false
          },
          "extraParams": {
            "title": "Extra query parameters (optional)",
            "type": "object",
            "description": "Optional extra TRS query parameters as a JSON object, forwarded verbatim on /tools requests (e.g. an id or alias filter). The limit/offset paging is managed for you and cannot be overridden."
          },
          "maxRecords": {
            "title": "Max records (total)",
            "minimum": 1,
            "type": "integer",
            "description": "Maximum total rows to emit across all sources. Pagination (following the registry's next_page) is followed until this cap is reached, so a huge registry never runs forever. Each returned row is one billable event. Default 1000.",
            "default": 1000
          },
          "bearerToken": {
            "title": "Bearer token (optional)",
            "type": "string",
            "description": "Optional OAuth2 bearer token for auth-gated registries or private tools. Sent as Authorization: Bearer ***. NOT required for public registries (Dockstore, WorkflowHub) — leave empty. Never logged."
          },
          "extraHeaders": {
            "title": "Extra request headers",
            "type": "object",
            "description": "Optional extra HTTP headers to send with every request, as a JSON object (e.g. an API-key header a specific registry requires). Leave empty for public registries."
          }
        }
      },
      "runsResponseSchema": {
        "type": "object",
        "properties": {
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "actId": {
                "type": "string"
              },
              "userId": {
                "type": "string"
              },
              "startedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "finishedAt": {
                "type": "string",
                "format": "date-time",
                "example": "2025-01-08T00:00:00.000Z"
              },
              "status": {
                "type": "string",
                "example": "READY"
              },
              "meta": {
                "type": "object",
                "properties": {
                  "origin": {
                    "type": "string",
                    "example": "API"
                  },
                  "userAgent": {
                    "type": "string"
                  }
                }
              },
              "stats": {
                "type": "object",
                "properties": {
                  "inputBodyLen": {
                    "type": "integer",
                    "example": 2000
                  },
                  "rebootCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "restartCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "resurrectCount": {
                    "type": "integer",
                    "example": 0
                  },
                  "computeUnits": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "options": {
                "type": "object",
                "properties": {
                  "build": {
                    "type": "string",
                    "example": "latest"
                  },
                  "timeoutSecs": {
                    "type": "integer",
                    "example": 300
                  },
                  "memoryMbytes": {
                    "type": "integer",
                    "example": 1024
                  },
                  "diskMbytes": {
                    "type": "integer",
                    "example": 2048
                  }
                }
              },
              "buildId": {
                "type": "string"
              },
              "defaultKeyValueStoreId": {
                "type": "string"
              },
              "defaultDatasetId": {
                "type": "string"
              },
              "defaultRequestQueueId": {
                "type": "string"
              },
              "buildNumber": {
                "type": "string",
                "example": "1.0.0"
              },
              "containerUrl": {
                "type": "string"
              },
              "usage": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "integer",
                    "example": 1
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              },
              "usageTotalUsd": {
                "type": "number",
                "example": 0.00005
              },
              "usageUsd": {
                "type": "object",
                "properties": {
                  "ACTOR_COMPUTE_UNITS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATASET_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "KEY_VALUE_STORE_WRITES": {
                    "type": "number",
                    "example": 0.00005
                  },
                  "KEY_VALUE_STORE_LISTS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_READS": {
                    "type": "integer",
                    "example": 0
                  },
                  "REQUEST_QUEUE_WRITES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_INTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "DATA_TRANSFER_EXTERNAL_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_RESIDENTIAL_TRANSFER_GBYTES": {
                    "type": "integer",
                    "example": 0
                  },
                  "PROXY_SERPS": {
                    "type": "integer",
                    "example": 0
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}