List relays
client.moq.relays.list(RelayListParams { account_id, asc, created_after, 2 more } params, RequestOptionsoptions?): SinglePage<RelayListResponse { created, modified, name, uid } >
GET/accounts/{account_id}/moq/relays
Lists all MoQ relays for the account. Returns only metadata. Config, status, and tokens are omitted.
Results are cursor-paginated (keyset on the created timestamp).
Use created_before / created_after with the created value of the
first/last item in a page to fetch the adjacent page. result_info
reports the page count and the total matching the cursor filters.
Security
API Token
The preferred authorization scheme for interacting with the Cloudflare API. Create a token.
Example:
List relays
import Cloudflare from 'cloudflare';
const client = new Cloudflare({
apiToken: process.env['CLOUDFLARE_API_TOKEN'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const relayListResponse of client.moq.relays.list({
account_id: '023e105f4ecef8ad9ca31a8372d0c353',
})) {
console.log(relayListResponse.uid);
}{
"errors": [
{
"code": 0,
"message": "message"
}
],
"messages": [
{
"code": 0,
"message": "message"
}
],
"success": true,
"result": [
{
"created": "2019-12-27T18:11:19.117Z",
"modified": "2019-12-27T18:11:19.117Z",
"name": "name",
"uid": "a1b2c3d4e5f67890a1b2c3d4e5f67890"
}
],
"result_info": {
"count": 0,
"total": 0
}
}Returns Examples
{
"errors": [
{
"code": 0,
"message": "message"
}
],
"messages": [
{
"code": 0,
"message": "message"
}
],
"success": true,
"result": [
{
"created": "2019-12-27T18:11:19.117Z",
"modified": "2019-12-27T18:11:19.117Z",
"name": "name",
"uid": "a1b2c3d4e5f67890a1b2c3d4e5f67890"
}
],
"result_info": {
"count": 0,
"total": 0
}
}