HTTP Commands

HTTP Commands

All SaveToDB products support URLs in the Actions Menu and Context Menu.

Every version of the SaveToDB add-in allows you to use URLs to retrieve data.

SaveToDB 10 supports URLs and complex HTTP commands universally. You can use POST to get data, save changes, retrieve value lists, and more.

URL Parameters

This section explains how to define URL parameters.

For example, a URL can include a symbol as a segment:

https://some-service/APPL

You can define the parameter name and default value using curly brackets:

https://some-service/{Symbol=APPL}

Here's an example with a standard URL parameter, "s":

https://some-service?s=APPL

The SaveToDB add-in will display this in the ribbon.

To change the parameter name and specify the default value, use curly brackets:

https://some-service?s={Symbol=APPL}

To disable parameters entirely, append {} at the end of the URL:

https://some-service?s=APPL{}

Parser Parameters

The SaveToDB add-in automatically extracts data from JSON, XML, HTML, CSV, and plain text.

You can customize parser results by applying specific parser parameters.

Add parser parameters after the URL, separating them with semicolons and parameter values with commas.

For example:

https://query1.finance.yahoo.com/v7/finance/options/{Symbol=AAPL};pages=50;rootpath=*.*.*.calls,*.*.*.puts

https://www.zohoapis.com/crm/v2/settings/fields?module={module=Accounts};RootPath=fields;ApiResult=true

Supported Parser Parameters

ParameterTypeMeaning
AddRowNumBooleanAdd a _RowNum column.
ApiResultBooleanUse a special JSON parser for REST API results.
AsIsBooleanOutput Yahoo Finance and MSN Money JSON values as is.
CapitalLetterBooleanCapitalize the first letters of headers (JSON only).
CollapsedNodesStringInclude specified XML nodes in the parent node column.
FirstRowIntegerSet the first row of the source data to output.
FirstRowHasNamesBooleanIndicate whether the source data has headers.
IgnoredTagsStringExclude specified XML tags from column creation.
InputSeparatorStringDefine the CSV input separator.
KeptNodesStringInclude specified XML or JSON nodes in the output, even if they have no data.
PagesIntegerSet the number of pages to load.
RootPathStringDefine XML nodes, JSON properties, or HTML table numbers to select data.
SkippedNodesStringExclude specified XML nodes or JSON properties from the output.

HTTP Headers

SaveToDB 10 allows you to set request headers inline.

Add HTTP headers after the URL, separated by a single CR, LF, or CRLF. Use a colon to separate header names and values.

For example:

https://some-service/{Symbol}
Accept: application/json
Referrer: https://some-service/page

You can also use parameters defined in curly brackets within headers (e.g., to customize the referrer).

HTTP Methods

SaveToDB 10 supports the following HTTP methods: GET, POST, PUT, PATCH, MERGE, and DELETE.

Use these methods when specifying REST API commands to save changes.

Add the method before the URL, separated by a space.

Message Body

SaveToDB 10 supports application/json and application/x-www-form-urlencoded body formats.

It automatically detects the format based on the body definition.

The body can include parameters prefixed with the @ character.

You can manually specify parameters for all properties or use built-in parameters like @json_row_values and @form_row_values, which include all row values.

Separate the body from the URL and headers with two line breaks.

Here's an example of a POST command:

POST https://www.zohoapis.com/crm/v2/Contacts

{"data":[{@json_row_values}]}

For more details, see Saving Data Using REST API.

Select Queries from HTTP Requests

SaveToDB 10 supports select queries from HTTP requests.

For instance, you can add a symbol parameter value to output columns like this:

SELECT @Symbol, * FROM https://some-service/{Symbol=APPL}

However, we recommend using the full form with column aliases and square brackets for URLs and HTTP messages:

SELECT @Symbol AS Symbol, * FROM [https://some-service/{Symbol=APPL}]

You can specify required column names and assign new names using aliases. For example:

SELECT @Symbol AS Symbol, d AS Date, l AS Last FROM [https://some-service/{Symbol=APPL}]

You can also use multi-line queries, including WHERE and ORDER BY clauses:

SELECT
    @Symbol AS Symbol,
    d AS Date,
    l AS Last
FROM
    [https://some-service/{Symbol=APPL}]
ORDER BY
    Date

Here's a more complex example:

SELECT
    @Symbol AS Symbol,
    d AS Date,
    l AS Last
FROM
    [POST https://some-service/;ApiResult=true HTTP/1.1
Accept: application/json
Referrer: https://some-service/page

{"symbol":@symbol}
]
ORDER BY
    Date

Formal Grammar of HTTP Commands

HTTP-command = HTTP-message | select

HTTP-message = [ method SP ] request-target [ SP HTTP-version] *( NEWLINE header-name ":" header-value ) [ 2*NEWLINE message-body ]

method = "GET" | "POST" | "PUT" | "PATCH" | "MERGE" | "DELETE"

request-target = absolute-URI *( ";" parser-parameter-name "=" parser-parameter-value )

HTTP-version = "HTTP/1.1"

select = "SELECT" SP select-fields SP "FROM" SP select-source [SP "WHERE" conditions ] [ SP "ORDER BY" orderBy ]

select-source = "[" HTTP-message "]" / DQUOTE HTTP-message DQUOTE

NEWLINE = CR | LF | CRLF

This grammar extends RFC standards:

This website is using cookies. By continuing to browse, you give us your consent to our use of cookies as explained in our Cookie Policy.