arazzo: 1.0.1 info: title: Coresignal Company Elasticsearch Search and Bulk Collect summary: Run an Elasticsearch DSL company query, then bulk collect the full records for every matching ID. description: >- A high-throughput company enrichment pattern. The workflow submits a full Elasticsearch DSL query to the Multi-source Company API, which returns an array of matching company IDs, and then bulk collects the full enriched records for all of those IDs in a single follow-up call. Every step spells out its request inline, including the apikey authentication header and the Elasticsearch DSL query body, so the flow can be read and executed without opening the underlying OpenAPI description. version: 1.0.0 sourceDescriptions: - name: companyApi url: ../openapi/coresignal-multi-source-company-api-openapi.yml type: openapi workflows: - workflowId: company-esdsl-bulk-collect summary: Query companies with Elasticsearch DSL and bulk collect every match. description: >- Posts an Elasticsearch DSL query to the company search endpoint and bulk collects the full records for the returned IDs. inputs: type: object required: - apikey - query properties: apikey: type: string description: Coresignal API key sent in the apikey header. query: type: object description: Elasticsearch DSL query object used as the search request body. steps: - stepId: searchCompanies description: >- Search company records using a full Elasticsearch DSL query body. Returns an array of matching Coresignal company IDs. operationId: searchCompaniesByEsDsl parameters: - name: apikey in: header value: $inputs.apikey requestBody: contentType: application/json payload: $inputs.query successCriteria: - condition: $statusCode == 200 outputs: companyIds: $response.body - stepId: bulkCollectCompanies description: >- Retrieve the full enriched company records for the array of IDs returned by the Elasticsearch DSL search. operationId: bulkCollectCompanies parameters: - name: apikey in: header value: $inputs.apikey requestBody: contentType: application/json payload: ids: $steps.searchCompanies.outputs.companyIds successCriteria: - condition: $statusCode == 200 outputs: companies: $response.body firstCompanyName: $response.body#/0/name outputs: companyIds: $steps.searchCompanies.outputs.companyIds companies: $steps.bulkCollectCompanies.outputs.companies