Select programming language for code examples

linkChannels

Channels are automatically populated by the current releases and their artifacts. The below endpoints are read-only.

linkThe channel object

Below you will find the various attributes for the channel resource.

linkAttributes

  • linkdata.attributes.name

    stringread only

    The human-readable name of the channel. This can be used as an optional label.

  • linkdata.attributes.key

    stringread only

    The machine-readable key of the channel.

  • linkdata.attributes.created

    timestamp (iso8601)read only

    When the channel was created.

  • linkdata.attributes.updated

    timestamp (iso8601)read only

    When the channel was last updated.

linkRelationships

  • linkdata.relationships.account

    individual

    The account that the channel belongs to.

Example object

{
"data": {
"id": "4332f8c7-29cf-46d9-8912-36da685d4291",
"type": "channels",
"attributes": {
"name": "Stable",
"key": "stable",
"created": "2021-05-14T15:16:43.455Z",
"updated": "2021-05-14T15:16:43.455Z"
},
"relationships": {
"account": {
"links": {
"related": "/v1/accounts/<account>"
},
"data": {
"type": "accounts",
"id": "<account>"
}
}
},
"links": {
"related": "/v1/accounts/<account>/channels/4332f8c7-29cf-46d9-8912-36da685d4291"
}
}
}

linkRetrieve a channel

Retrieves the details of an existing channel.

linkAuthentication

  • linkBearer

    optional

    An authentication token with privileges to read the release channel: either an admin, the product it belongs to, an entitled license (via license key or a license token), or a user with an entitled license. If there are products with an OPEN distribution strategy, no authentication is required to read their associated channels.

linkURL Parameters

  • link<account>

    stringrequired

    The identifier (UUID) or slug of your Keygen account.

  • link<channel>

    stringrequired

    The identifier (UUID) of the channel to be retrieved.

linkReturns

A 200 OK response will be returned along with a channel object.

Upon error, an errors object will be returned along with an HTTP status code indicating the type of error. When an error occurs, the data property will not be included.

Definition

https://api.keygen.sh/v1/accounts/<account>/channels/<channel>

Example request

const fetch = require("node-fetch")
 
const response = await fetch("https://api.keygen.sh/v1/accounts/<account>/channels/4332f8c7-29cf-46d9-8912-36da685d4291", {
method: "GET",
headers: {
"Authorization": "Bearer <token>",
"Accept": "application/vnd.api+json"
}
})
 
const { data, errors } = await response.json()
import requests
import json
 
res = requests.get(
"https://api.keygen.sh/v1/accounts/<account>/channels/4332f8c7-29cf-46d9-8912-36da685d4291",
headers={
"Authorization": "Bearer <token>",
"Accept": "application/vnd.api+json"
}
).json()
import SwiftyJSON
import Alamofire
 
Alamofire.request("https://api.keygen.sh/v1/accounts/<account>/channels/4332f8c7-29cf-46d9-8912-36da685d4291",
headers: [
"Authorization": "Bearer <token>",
"Accept": "application/vnd.api+json"
]
).responseJSON { response in
let json = JSON(data: response.data!)
}
using RestSharp;
 
var client = new RestClient("https://api.keygen.sh/v1/accounts/<account>");
var request = new RestRequest(
"channels/4332f8c7-29cf-46d9-8912-36da685d4291",
Method.GET
);
 
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Accept", "application/vnd.api+json");
 
var response = client.Execute(request);
import com.mashape.unirest.http.exceptions.*
import com.mashape.unirest.http.*
 
val res = Unirest.get("https://api.keygen.sh/v1/accounts/<account>/channels/4332f8c7-29cf-46d9-8912-36da685d4291")
.header("Authorization", "Bearer <token>")
.header("Accept", "application/vnd.api+json")
.asJson()
import com.mashape.unirest.http.exceptions.*;
import com.mashape.unirest.http.*;
 
HttpResponse<JsonNode> res = Unirest.get("https://api.keygen.sh/v1/accounts/<account>/channels/4332f8c7-29cf-46d9-8912-36da685d4291")
.header("Authorization", "Bearer <token>")
.header("Accept", "application/vnd.api+json")
.asJson();
#include <iostream>
#include <string>
#include <cpprest/http_client.h>
#include <cpprest/filestream.h>
 
using namespace std;
using namespace web;
using namespace web::http;
using namespace web::http::client;
using namespace utility;
 
http_client client("https://api.keygen.sh/v1/accounts/<account>");
http_request req;
 
req.headers().add("Authorization", "Bearer <token>");
req.headers().add("Accept", "application/json");
 
req.set_request_uri("/channels/4332f8c7-29cf-46d9-8912-36da685d4291");
req.set_method(methods::GET);
 
client.request(req)
.then([](http_response res) {
auto data = res.extract_json().get();
})
.wait();
curl https://api.keygen.sh/v1/accounts/<account>/channels/4332f8c7-29cf-46d9-8912-36da685d4291 \
-H 'Authorization: Bearer <token>' \
-H 'Accept: application/vnd.api+json'

Example response / 200 OK

{
"data": {
"id": "4332f8c7-29cf-46d9-8912-36da685d4291",
"type": "channels",
"attributes": {
"name": "Stable",
"key": "stable",
"created": "2021-05-14T15:16:43.455Z",
"updated": "2021-05-14T15:16:43.455Z"
},
"relationships": {
"account": {
"links": {
"related": "/v1/accounts/<account>"
},
"data": {
"type": "accounts",
"id": "<account>"
}
}
},
"links": {
"related": "/v1/accounts/<account>/channels/4332f8c7-29cf-46d9-8912-36da685d4291"
}
}
}

linkList all channels

Returns a list of channels. The channels are returned sorted by creation date, with the most recent channels appearing first.

linkAuthentication

  • linkBearer

    optional

    An authentication token with privileges to read the channels: either an admin, the product the releases belong to, an entitled license (via license key or a license token), or a user with an entitled license. If there are products with an OPEN distribution strategy, no authentication is required to read their associated channels.

linkURL Parameters

  • link<account>

    stringrequired

    The identifier (UUID) or slug of your Keygen account.

linkQuery Parameters

  • linklimit

    integerdefault=10

    A limit on the number of channels to be returned. Limit must be a number between 1 and 100.

    /v1/accounts/<account>/channels?limit=25
  • linkpage

    object<string, integer>

    Object containing page size and page number. Page size must be a number between 1 and 100.

    /v1/accounts/<account>/channels?page[size]=15&page[number]=2

linkReturns

A 200 OK response will be returned along with a list of channel objects.

Upon error, an errors object will be returned along with an HTTP status code indicating the type of error. When an error occurs, the data property will not be included.

Definition

https://api.keygen.sh/v1/accounts/<account>/channels

Example request

const fetch = require("node-fetch")
 
const response = await fetch("https://api.keygen.sh/v1/accounts/<account>/channels?limit=15", {
method: "GET",
headers: {
"Authorization": "Bearer <token>",
"Accept": "application/vnd.api+json"
}
})
 
const { data, errors } = await response.json()
import requests
import json
 
res = requests.get(
"https://api.keygen.sh/v1/accounts/<account>/channels?limit=15",
headers={
"Authorization": "Bearer <token>",
"Accept": "application/vnd.api+json"
}
).json()
import SwiftyJSON
import Alamofire
 
Alamofire.request("https://api.keygen.sh/v1/accounts/<account>/channels?limit=15",
headers: [
"Authorization": "Bearer <token>",
"Accept": "application/vnd.api+json"
]
).responseJSON { response in
let json = JSON(data: response.data!)
}
using RestSharp;
 
var client = new RestClient("https://api.keygen.sh/v1/accounts/<account>");
var request = new RestRequest("channels", Method.GET);
 
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Accept", "application/vnd.api+json");
 
request.AddParameter("limit", 15);
 
var response = client.Execute(request);
import com.mashape.unirest.http.exceptions.*
import com.mashape.unirest.http.*
 
val res = Unirest.get("https://api.keygen.sh/v1/accounts/<account>/channels")
.header("Authorization", "Bearer <token>")
.header("Accept", "application/vnd.api+json")
.queryString("limit", 15)
.asJson()
import com.mashape.unirest.http.exceptions.*;
import com.mashape.unirest.http.*;
 
HttpResponse<JsonNode> res = Unirest.get("https://api.keygen.sh/v1/accounts/<account>/channels")
.header("Authorization", "Bearer <token>")
.header("Accept", "application/vnd.api+json")
.queryString("limit", 15)
.asJson();
#include <iostream>
#include <string>
#include <cpprest/http_client.h>
#include <cpprest/filestream.h>
 
using namespace std;
using namespace web;
using namespace web::http;
using namespace web::http::client;
using namespace utility;
 
http_client client("https://api.keygen.sh/v1/accounts/<account>");
http_request req;
 
req.headers().add("Authorization", "Bearer <token>");
req.headers().add("Accept", "application/json");
 
uri_builder uri("/channels");
uri.append_query("limit", 15);
 
req.set_request_uri(uri.to_uri());
req.set_method(methods::GET);
 
client.request(req)
.then([](http_response res) {
auto data = res.extract_json().get();
})
.wait();
curl https://api.keygen.sh/v1/accounts/<account>/channels?limit=15 -g \
-H 'Authorization: Bearer <token>' \
-H 'Accept: application/vnd.api+json'

Example response / 200 OK

{
"data": [
{
"id": "4f136854-fe2f-473d-830b-c0e988320785",
"type": "channels",
"attributes": {
"name": "Beta",
"key": "beta",
"created": "2021-05-14T21:54:18.066Z",
"updated": "2021-05-14T21:54:18.066Z"
},
"relationships": {
"account": {
"links": {
"related": "/v1/accounts/<account>"
},
"data": {
"type": "accounts",
"id": "<account>"
}
}
},
"links": {
"related": "/v1/accounts/<account>/channels/4f136854-fe2f-473d-830b-c0e988320785"
}
},
{
"id": "acefa0b6-4680-4ffb-85b2-af18edcbeced",
"type": "channels",
"attributes": {
"name": "Alpha",
"key": "alpha",
"created": "2021-05-14T21:23:11.196Z",
"updated": "2021-05-14T21:23:11.196Z"
},
"relationships": {
"account": {
"links": {
"related": "/v1/accounts/<account>"
},
"data": {
"type": "accounts",
"id": "<account>"
}
}
},
"links": {
"related": "/v1/accounts/<account>/channels/acefa0b6-4680-4ffb-85b2-af18edcbeced"
}
},
{
"id": "92ddfbca-0a74-4d26-8801-0b496e1fdb09",
"type": "channels",
"attributes": {
"name": "Release Candidate",
"key": "rc",
"created": "2021-05-14T15:45:12.911Z",
"updated": "2021-05-14T15:45:12.911Z"
},
"relationships": {
"account": {
"links": {
"related": "/v1/accounts/<account>"
},
"data": {
"type": "accounts",
"id": "<account>"
}
}
},
"links": {
"related": "/v1/accounts/<account>/channels/92ddfbca-0a74-4d26-8801-0b496e1fdb09"
}
},
{
"id": "4332f8c7-29cf-46d9-8912-36da685d4291",
"type": "channels",
"attributes": {
"name": "Stable",
"key": "stable",
"created": "2021-05-14T15:16:43.455Z",
"updated": "2021-05-14T15:16:43.455Z"
},
"relationships": {
"account": {
"links": {
"related": "/v1/accounts/<account>"
},
"data": {
"type": "accounts",
"id": "<account>"
}
}
},
"links": {
"related": "/v1/accounts/<account>/channels/4332f8c7-29cf-46d9-8912-36da685d4291"
}
}
]
}