Connect to HTTP APIs with Omniscope

Modified on Fri, 15 Nov at 1:04 PM

Omniscope offers several flexible options to connect to APIs and integrate data from various sources into your workflows. When connecting to an API, you have a few approaches available:

  1. Check for an Existing Connector: Omniscope comes with pre-configured connectors for popular services. Start by searching for your API in the available connectors list, as you may find an existing solution.

  2. Use the AI Block to Build a Custom Connector: If a connector isn’t available, consider using the AI Block to help build one. The AI Block can assist by generating Python code to handle complex API connections, parsing, and formatting data according to your needs. Simply describe your requirements, and the AI Block will help script the connection process.

  3. Pure HTTP API Requests – Follow This Guide: For cases where you want to work directly with HTTP API requests, Omniscope offers powerful tools for managing various API authentication types, handling pagination, and parsing data. Here’s how:


Basic API Call and Data Parsing

  • Use just the "File" block or "JSON HTTP API" block under the "File" section.
  • Select HTTP API as the Location Type and set the Format to JSON or XML.
  • The block will attempt to auto-detect fields and records, allowing you to parse the response into a table. You can further customise field mappings as needed.
  • Add HTTP headers if necessary (e.g., Authorization) and specify whether to use GET or POST methods.


Paginated API Calls with Looping

  • If your API response is paginated (data is split across multiple pages), Omniscope supports looping through pages by leveraging the For Each block or by using the Batch HTTP block.
  • Define a project parameter to dynamically modify the API endpoint for each page.
  • Use an "API URL with Parameters" block to specify the endpoint with placeholder values (e.g., {page}).
  • Combine this with a For Each block or Batch HTTP block to go through each page and append results in a table.



OAuth Authentication for APIs

  • For APIs requiring OAuth authentication, Omniscope allows you to obtain a bearer token for secure access.
  • First, define the authentication URL and send an initial request to retrieve the token.
  • Store the token, then include it as a Bearer Token in the header of subsequent API calls.
  • This method is illustrated in on this demo with Zoom API in Omniscope but applies to any OAuth-compatible API.
  • The blocks to use to build the workflow are
    • a Text Input to define a base url, 
    • a batch http block to execute the API call to retrieve the access token, 
    • a Parse Text block to parse the json response and extract the token
    • one or more batch http blocks to execute the subsequent calls


Batch API Calls

  • When multiple sequential calls are required, use the Batch HTTP Block.
  • Set up a base URL, then use parameters and text parsing to handle JSON strings from each response.
  • This approach is helpful when you need to make multiple calls based on a list of parameters (like a list of IDs) and merge responses into a unified dataset.


By leveraging these options, Omniscope provides a flexible and powerful solution for connecting to APIs, whether through a pre-built connector, a custom Python script in the AI Block, or direct HTTP API calls with authentication, pagination, and response parsing.


Demo with several use case here; https://public.omniscope.me/Public/How+to+use+any+HTTP+API.iox/

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article