Learn how to seamlessly replicate webapp workflows using our API by identifying the correct parameters through your browser's Inspector tool.
If you're looking to replicate a workflow from our webapp using the API, you're in luck—everything you can do on the webapp can also be done with the API. To identify the correct API parameters for any action, follow these steps:
Open the Webapp and Access the Inspector Tool
Start by navigating to the webapp and performing the workflow you want to replicate using the API. Once you're ready, right-click anywhere on the screen and select "Inspect" or press Ctrl+Shift+I
(Windows/Linux) or Cmd+Option+I
(Mac) to open the browser's Developer Tools.
Navigate to the Network Tab
In the Developer Tools window, go to the "Network" tab. This tab tracks all network activity between your browser and the server, including the API requests you're interested in. To narrow down the search, use the filter options and select "Fetch/XHR," which will display only the relevant API calls.
Trigger the Workflow
Perform the action on the webapp that you want to replicate via the API. For example, if you’re triggering an inference, initiate the inference process. As this action is performed, you’ll see a series of requests appear in the Network tab.
Examine the Requests
Pay close attention to the requests related to the workflow. For instance, when triggering an inference, you'll notice a POST request followed by several GET requests as the process unfolds. Click on each request to view its details.
Review the Payload and Response
To find the correct API parameters, examine the "Payload" section of the POST request. This section shows the data sent to the server, which includes the parameters you’ll need to replicate the workflow via the API. You can also check the "Response" section to understand the server's reply, which can provide additional insights into what data is required or expected.
POST Payload:
POST Response:
GET Response during inference progress:
Replicate the Workflow with the API
Once you've identified the necessary parameters and understood the request flow, you can use this information to construct your API calls. With these parameters, you can replicate the exact workflow from the webapp using the API, ensuring consistency across both platforms.
By following these steps, you'll be able to identify the correct API parameters for any workflow you enjoy on the webapp, allowing you to seamlessly transition your tasks to the API.
Was this helpful?