Skip to main content

URL

Give each table exactly one HTTP or HTTPS endpoint:

CREATE VIRTUAL TABLE links USING vttp (
URL ('https://api.example.com/links'),
url TEXT PATH '$.url',
title TEXT
);

SELECT title FROM links WHERE url = 'https://example.com/article';

Here, URL (...) tells VTTP where to send the request. The url TEXT column reads the payload's url field, so the WHERE clause filters links from the response.

If the API needs query parameters, include them in the configured URL:

CREATE VIRTUAL TABLE todos USING vttp (
URL ('https://jsonplaceholder.typicode.com/todos?userId=1'),
id INT,
title TEXT
);

Missing or repeated URL declarations, and invalid URLs, fail at table creation. VTTP doesn't follow redirects, so make sure this is the final endpoint.

URL(...), url (...), and UrL (...) all work. If you need a different endpoint, drop and recreate the table. The old links('https://...') query syntax is no longer supported.