🤖API Functions
Primitive functions that allow you to access API data within Flipside with Snowflake SQL
API functions serve as a low-level primitive that enables you to query any API (or Node RPC) and bring those results into Flipside. This is particularly useful for 3rd Party Data APIs or blockchain nodes/networks not yet supported by higher-level functions such as our EVM Functions.
API Function Examples
💡Query TheGraph💡Query Defi LlamaUDF_API Documentation
Syntax
Arguments
Required:
url
(string): The URL to call. If you are doing a GET request that does not require authentication, you can pass the URL directly. Otherwise, you may need to pass in some or all of the optional arguments below. You may also need to pass a secret value into the URL if you are using an API that requires authentication.
Optional:
method
(string): The HTTP method to use (GET, POST, etc.)Default:
GET
, unlessdata
is passed, in which it will default toPOST
headers
(object): A JSON object containing the headers to send with the request.Default:
{'Content-Type': 'application/json'}
data
(object): A JSON object containing the data to send with the request. Batched JSON RPC requests are supported by passing an array of JSON RPC requests.Default:
null
secret_name
(string): The name of the secret to use for authentication.
Last updated