Redshift Data API Service
amazonaws · Cloud
You can use the Amazon Redshift Data API to run queries on Amazon Redshift tables. You can run SQL statements, which are committed if the statement succeeds. For more information about the Amazon Redshift Data API and CLI usage examples, see Using the Amazon Redshift Data API in the Amazon Redshift Management Guide .
Authentication
Sample Requests
Describes the detailed information about a table from metadata in the cluster. The information includes its columns. A token is returned to page through the column list. Depending on the authorization method, use one of the following combinations of request parameters: Secrets M
Hover any highlighted part to learn what it does
| X-Amz-Target | RedshiftData.DescribeTable |
curl -X POST "https://api.apis.guru/v2/specs/amazonaws.com/redshift-data/2019-12-20/#X-Amz-Target=RedshiftData.DescribeTable?NextToken=example&MaxResults=example" \ -H "X-Amz-Target: RedshiftData.DescribeTable"
import requests
params = {
"NextToken": "example",
"MaxResults": "example"
}
headers = {
"X-Amz-Target": "RedshiftData.DescribeTable"
}
response = requests.post(
"https://api.apis.guru/v2/specs/amazonaws.com/redshift-data/2019-12-20/#X-Amz-Target=RedshiftData.DescribeTable",
params=params,
headers=headers,
)
print(response.json())const url = new URL('https://api.apis.guru/v2/specs/amazonaws.com/redshift-data/2019-12-20/#X-Amz-Target=RedshiftData.DescribeTable');
url.searchParams.set('NextToken', 'example');
url.searchParams.set('MaxResults', 'example');
const response = await fetch(url, {
method: 'POST',
headers: {
'X-Amz-Target': 'RedshiftData.DescribeTable'
},
});
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
baseURL, _ := url.Parse("https://api.apis.guru/v2/specs/amazonaws.com/redshift-data/2019-12-20/#X-Amz-Target=RedshiftData.DescribeTable")
q := baseURL.Query()
q.Set("NextToken", "example")
q.Set("MaxResults", "example")
baseURL.RawQuery = q.Encode()
targetURL := baseURL.String()
req, _ := http.NewRequest("POST", targetURL, nil)
req.Header.Set("X-Amz-Target", "RedshiftData.DescribeTable")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://api.apis.guru/v2/specs/amazonaws.com/redshift-data/2019-12-20/#X-Amz-Target=RedshiftData.DescribeTable")
uri.query = URI.encode_www_form({
"NextToken" => "example",
"MaxResults" => "example"
})
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Post.new(uri)
req["X-Amz-Target"] = "RedshiftData.DescribeTable"
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://api.apis.guru/v2/specs/amazonaws.com/redshift-data/2019-12-20/#X-Amz-Target=RedshiftData.DescribeTable?" . http_build_query([
"NextToken" => "example",
"MaxResults" => "example"
]);
$opts = ["http" => [
"method" => "POST",
"header" => implode("\r\n", [
"X-Amz-Target: RedshiftData.DescribeTable"
]),
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Fetches the temporarily cached result of an SQL statement. A token is returned to page through the statement results. For more information about the Amazon Redshift Data API and CLI usage examples, see Using the Amaz
Hover any highlighted part to learn what it does
| X-Amz-Target | RedshiftData.GetStatementResult |
curl -X POST "https://api.apis.guru/v2/specs/amazonaws.com/redshift-data/2019-12-20/#X-Amz-Target=RedshiftData.GetStatementResult?NextToken=example" \ -H "X-Amz-Target: RedshiftData.GetStatementResult"
import requests
params = {
"NextToken": "example"
}
headers = {
"X-Amz-Target": "RedshiftData.GetStatementResult"
}
response = requests.post(
"https://api.apis.guru/v2/specs/amazonaws.com/redshift-data/2019-12-20/#X-Amz-Target=RedshiftData.GetStatementResult",
params=params,
headers=headers,
)
print(response.json())const url = new URL('https://api.apis.guru/v2/specs/amazonaws.com/redshift-data/2019-12-20/#X-Amz-Target=RedshiftData.GetStatementResult');
url.searchParams.set('NextToken', 'example');
const response = await fetch(url, {
method: 'POST',
headers: {
'X-Amz-Target': 'RedshiftData.GetStatementResult'
},
});
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
baseURL, _ := url.Parse("https://api.apis.guru/v2/specs/amazonaws.com/redshift-data/2019-12-20/#X-Amz-Target=RedshiftData.GetStatementResult")
q := baseURL.Query()
q.Set("NextToken", "example")
baseURL.RawQuery = q.Encode()
targetURL := baseURL.String()
req, _ := http.NewRequest("POST", targetURL, nil)
req.Header.Set("X-Amz-Target", "RedshiftData.GetStatementResult")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://api.apis.guru/v2/specs/amazonaws.com/redshift-data/2019-12-20/#X-Amz-Target=RedshiftData.GetStatementResult")
uri.query = URI.encode_www_form({
"NextToken" => "example"
})
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Post.new(uri)
req["X-Amz-Target"] = "RedshiftData.GetStatementResult"
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://api.apis.guru/v2/specs/amazonaws.com/redshift-data/2019-12-20/#X-Amz-Target=RedshiftData.GetStatementResult?" . http_build_query([
"NextToken" => "example"
]);
$opts = ["http" => [
"method" => "POST",
"header" => implode("\r\n", [
"X-Amz-Target: RedshiftData.GetStatementResult"
]),
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));List the databases in a cluster. A token is returned to page through the database list. Depending on the authorization method, use one of the following combinations of request parameters: Secrets Manager - when connecting to a cluster, provide the secret-arn of a se
Hover any highlighted part to learn what it does
| X-Amz-Target | RedshiftData.ListDatabases |
curl -X POST "https://api.apis.guru/v2/specs/amazonaws.com/redshift-data/2019-12-20/#X-Amz-Target=RedshiftData.ListDatabases?NextToken=example&MaxResults=example" \ -H "X-Amz-Target: RedshiftData.ListDatabases"
import requests
params = {
"NextToken": "example",
"MaxResults": "example"
}
headers = {
"X-Amz-Target": "RedshiftData.ListDatabases"
}
response = requests.post(
"https://api.apis.guru/v2/specs/amazonaws.com/redshift-data/2019-12-20/#X-Amz-Target=RedshiftData.ListDatabases",
params=params,
headers=headers,
)
print(response.json())const url = new URL('https://api.apis.guru/v2/specs/amazonaws.com/redshift-data/2019-12-20/#X-Amz-Target=RedshiftData.ListDatabases');
url.searchParams.set('NextToken', 'example');
url.searchParams.set('MaxResults', 'example');
const response = await fetch(url, {
method: 'POST',
headers: {
'X-Amz-Target': 'RedshiftData.ListDatabases'
},
});
const data = await response.json();
console.log(data);package main
import (
"fmt"
"io"
"net/http"
"net/url"
)
func main() {
baseURL, _ := url.Parse("https://api.apis.guru/v2/specs/amazonaws.com/redshift-data/2019-12-20/#X-Amz-Target=RedshiftData.ListDatabases")
q := baseURL.Query()
q.Set("NextToken", "example")
q.Set("MaxResults", "example")
baseURL.RawQuery = q.Encode()
targetURL := baseURL.String()
req, _ := http.NewRequest("POST", targetURL, nil)
req.Header.Set("X-Amz-Target", "RedshiftData.ListDatabases")
client := &http.Client{}
resp, _ := client.Do(req)
defer resp.Body.Close()
body, _ := io.ReadAll(resp.Body)
fmt.Println(string(body))
}require "net/http"
require "json"
uri = URI("https://api.apis.guru/v2/specs/amazonaws.com/redshift-data/2019-12-20/#X-Amz-Target=RedshiftData.ListDatabases")
uri.query = URI.encode_www_form({
"NextToken" => "example",
"MaxResults" => "example"
})
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = uri.scheme == "https"
req = Net::HTTP::Post.new(uri)
req["X-Amz-Target"] = "RedshiftData.ListDatabases"
res = http.request(req)
puts JSON.parse(res.body)<?php
$url = "https://api.apis.guru/v2/specs/amazonaws.com/redshift-data/2019-12-20/#X-Amz-Target=RedshiftData.ListDatabases?" . http_build_query([
"NextToken" => "example",
"MaxResults" => "example"
]);
$opts = ["http" => [
"method" => "POST",
"header" => implode("\r\n", [
"X-Amz-Target: RedshiftData.ListDatabases"
]),
]];
$ctx = stream_context_create($opts);
$res = file_get_contents($url, false, $ctx);
print_r(json_decode($res, true));Postman Setup Guide
- See official documentation for authentication and setup.
What can you build with Redshift Data API Service?
Redshift Data API Service is a Cloud API. Developers commonly use cloud APIs for:
- provisioning and managing cloud infrastructure
- automating deployments and container orchestration
- monitoring uptime and performance metrics
- managing storage buckets and databases
- setting up auto-scaling and load balancing
No authentication required. This API is open — no signup or key needed. Ideal for quick prototypes and public-facing features. Redshift Data API Service is free to use, making it a low-risk choice to experiment with.
New to APIs? Read our beginner's guide · Learn about API keys · What is REST?