curl --request GET \
--url https://radiotools.rivi.software/api/v1/stations/{stationSlug}/graphql \
--header 'Authorization: Bearer <token>'import requests
url = "https://radiotools.rivi.software/api/v1/stations/{stationSlug}/graphql"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://radiotools.rivi.software/api/v1/stations/{stationSlug}/graphql', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://radiotools.rivi.software/api/v1/stations/{stationSlug}/graphql",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://radiotools.rivi.software/api/v1/stations/{stationSlug}/graphql"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://radiotools.rivi.software/api/v1/stations/{stationSlug}/graphql")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://radiotools.rivi.software/api/v1/stations/{stationSlug}/graphql")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {},
"errors": [
{
"message": "<string>",
"locations": [
{
"line": 123,
"column": 123
}
],
"path": [
"<string>"
],
"extensions": {}
}
],
"extensions": {}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "The request contains invalid parameters or input.",
"requestId": "28e5d867-1f87-4ca7-bca9-4ebc09b36ba3",
"issues": [
{
"path": "query",
"message": "Check the parameter types and bounds documented for this operation."
}
]
}
}{
"error": {
"code": "UNAUTHENTICATED",
"message": "A valid station credential with the required scope is needed.",
"requestId": "28e5d867-1f87-4ca7-bca9-4ebc09b36ba3"
}
}{
"error": {
"code": "FORBIDDEN",
"message": "The credential does not permit this operation.",
"requestId": "28e5d867-1f87-4ca7-bca9-4ebc09b36ba3"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "The resource is missing, unpublished, disabled, or unavailable for this station. A switched-off station module returns MODULE_DISABLED.",
"requestId": "28e5d867-1f87-4ca7-bca9-4ebc09b36ba3"
}
}{
"error": {
"code": "REVISION_CONFLICT",
"message": "The request conflicts with the current resource revision.",
"requestId": "28e5d867-1f87-4ca7-bca9-4ebc09b36ba3"
}
}{
"error": {
"code": "RATE_LIMITED",
"message": "Too many requests. Reduce the request frequency.",
"requestId": "28e5d867-1f87-4ca7-bca9-4ebc09b36ba3"
}
}{
"data": {},
"errors": [
{
"message": "<string>",
"locations": [
{
"line": 123,
"column": 123
}
],
"path": [
"<string>"
],
"extensions": {}
}
],
"extensions": {}
}{
"error": {
"code": "PROVIDER_UNAVAILABLE",
"message": "An upstream service is temporarily unavailable.",
"requestId": "28e5d867-1f87-4ca7-bca9-4ebc09b36ba3"
}
}Query with GraphQL (GET)
Query the station’s published data with GraphQL. Requires a station-scoped Bearer credential with listener:read. GET carries the query in URL parameters, with variables and extensions as JSON-encoded strings; POST accepts a JSON GraphQL request. Send X-Preview-Grant only to read an editorial preview.
After the station admits the request, responses use the GraphQL data and errors envelope. Authentication and station errors use the standard error response. Responses are no-store; keep the credential on your server, out of browser bundles and URLs. See the GraphQL guide for the schema.
curl --request GET \
--url https://radiotools.rivi.software/api/v1/stations/{stationSlug}/graphql \
--header 'Authorization: Bearer <token>'import requests
url = "https://radiotools.rivi.software/api/v1/stations/{stationSlug}/graphql"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://radiotools.rivi.software/api/v1/stations/{stationSlug}/graphql', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://radiotools.rivi.software/api/v1/stations/{stationSlug}/graphql",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://radiotools.rivi.software/api/v1/stations/{stationSlug}/graphql"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://radiotools.rivi.software/api/v1/stations/{stationSlug}/graphql")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://radiotools.rivi.software/api/v1/stations/{stationSlug}/graphql")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {},
"errors": [
{
"message": "<string>",
"locations": [
{
"line": 123,
"column": 123
}
],
"path": [
"<string>"
],
"extensions": {}
}
],
"extensions": {}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "The request contains invalid parameters or input.",
"requestId": "28e5d867-1f87-4ca7-bca9-4ebc09b36ba3",
"issues": [
{
"path": "query",
"message": "Check the parameter types and bounds documented for this operation."
}
]
}
}{
"error": {
"code": "UNAUTHENTICATED",
"message": "A valid station credential with the required scope is needed.",
"requestId": "28e5d867-1f87-4ca7-bca9-4ebc09b36ba3"
}
}{
"error": {
"code": "FORBIDDEN",
"message": "The credential does not permit this operation.",
"requestId": "28e5d867-1f87-4ca7-bca9-4ebc09b36ba3"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "The resource is missing, unpublished, disabled, or unavailable for this station. A switched-off station module returns MODULE_DISABLED.",
"requestId": "28e5d867-1f87-4ca7-bca9-4ebc09b36ba3"
}
}{
"error": {
"code": "REVISION_CONFLICT",
"message": "The request conflicts with the current resource revision.",
"requestId": "28e5d867-1f87-4ca7-bca9-4ebc09b36ba3"
}
}{
"error": {
"code": "RATE_LIMITED",
"message": "Too many requests. Reduce the request frequency.",
"requestId": "28e5d867-1f87-4ca7-bca9-4ebc09b36ba3"
}
}{
"data": {},
"errors": [
{
"message": "<string>",
"locations": [
{
"line": 123,
"column": 123
}
],
"path": [
"<string>"
],
"extensions": {}
}
],
"extensions": {}
}{
"error": {
"code": "PROVIDER_UNAVAILABLE",
"message": "An upstream service is temporarily unavailable.",
"requestId": "28e5d867-1f87-4ca7-bca9-4ebc09b36ba3"
}
}Authorizations
Station-scoped listener credential. Send Authorization: Bearer <token>, for example Bearer rtm_…. Sending the rtm_ token alone without Bearer returns 401 UNAUTHENTICATED. In the interactive playground, enter only the raw rtm_ token; the playground adds the prefix. Listener REST and GraphQL: listener:read. Listener devices: push:register.
Headers
Editorial preview grant from the station's website preview link. Send it to read the unpublished revision it was issued for; omit it for published data.
Path Parameters
Public station slug from the station settings; distinct from the internal station ID.
Query Parameters
GraphQL query document, URL-encoded.
Operation to run when the query document contains more than one.
GraphQL variables as a JSON-encoded string.
GraphQL extensions as a JSON-encoded string.
Was this page helpful?