CDN API · Distributions
Check status of a Distribution Release
curl --request POST \ --url https://cdn.lingohub.com/v1/distributions/check \ --header 'Authorization: Bearer cdn_eyJhbGciOiJIUz...' \ --header 'Content-Type: application/json' \ --data '{ "clientVersion": "2.1.0", "clientRelease": "beta-3", "distributionEnvironment": "DEVELOPMENT", "distributionType": "NATIVE_FORMAT"}'import requests
url = "https://cdn.lingohub.com/v1/distributions/check"
payload = { "clientVersion": "2.1.0", "clientRelease": "beta-3", "distributionEnvironment": "DEVELOPMENT", "distributionType": "NATIVE_FORMAT"}headers = { "Authorization": "Bearer cdn_eyJhbGciOiJIUz...", "Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())const url = 'https://cdn.lingohub.com/v1/distributions/check';const options = { method: 'POST', headers: { Authorization: 'Bearer cdn_eyJhbGciOiJIUz...', 'Content-Type': 'application/json' }, body: '{"clientVersion":"2.1.0","clientRelease":"beta-3","distributionEnvironment":"DEVELOPMENT","distributionType":"NATIVE_FORMAT"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}package main
import ( "fmt" "strings" "net/http" "io")
func main() {
url := "https://cdn.lingohub.com/v1/distributions/check"
payload := strings.NewReader("{\n \"clientVersion\": \"2.1.0\",\n \"clientRelease\": \"beta-3\",\n \"distributionEnvironment\": \"DEVELOPMENT\",\n \"distributionType\": \"NATIVE_FORMAT\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer cdn_eyJhbGciOiJIUz...") req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close() body, _ := io.ReadAll(res.Body)
fmt.Println(res) fmt.Println(string(body))
}OkHttpClient client = new OkHttpClient();
MediaType mediaType = MediaType.parse("application/json");RequestBody body = RequestBody.create(mediaType, "{\n \"clientVersion\": \"2.1.0\",\n \"clientRelease\": \"beta-3\",\n \"distributionEnvironment\": \"DEVELOPMENT\",\n \"distributionType\": \"NATIVE_FORMAT\"\n}");Request request = new Request.Builder() .url("https://cdn.lingohub.com/v1/distributions/check") .post(body) .addHeader("Authorization", "Bearer cdn_eyJhbGciOiJIUz...") .addHeader("Content-Type", "application/json") .build();
Response response = client.newCall(request).execute();<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('POST', 'https://cdn.lingohub.com/v1/distributions/check', [ 'body' => '{ "clientVersion": "2.1.0", "clientRelease": "beta-3", "distributionEnvironment": "DEVELOPMENT", "distributionType": "NATIVE_FORMAT"}', 'headers' => [ 'Authorization' => 'Bearer cdn_eyJhbGciOiJIUz...', 'Content-Type' => 'application/json', ],]);
echo $response->getBody();require 'uri'require 'net/http'
url = URI("https://cdn.lingohub.com/v1/distributions/check")
http = Net::HTTP.new(url.host, url.port)http.use_ssl = true
request = Net::HTTP::Post.new(url)request["Authorization"] = 'Bearer cdn_eyJhbGciOiJIUz...'request["Content-Type"] = 'application/json'request.body = "{\n \"clientVersion\": \"2.1.0\",\n \"clientRelease\": \"beta-3\",\n \"distributionEnvironment\": \"DEVELOPMENT\",\n \"distributionType\": \"NATIVE_FORMAT\"\n}"
response = http.request(request)puts response.read_bodyusing System.Net.Http.Headers;var client = new HttpClient();var request = new HttpRequestMessage{ Method = HttpMethod.Post, RequestUri = new Uri("https://cdn.lingohub.com/v1/distributions/check"), Headers = { { "Authorization", "Bearer cdn_eyJhbGciOiJIUz..." }, }, Content = new StringContent("{\n \"clientVersion\": \"2.1.0\",\n \"clientRelease\": \"beta-3\",\n \"distributionEnvironment\": \"DEVELOPMENT\",\n \"distributionType\": \"NATIVE_FORMAT\"\n}") { Headers = { ContentType = new MediaTypeHeaderValue("application/json") } }};using (var response = await client.SendAsync(request)){ response.EnsureSuccessStatusCode(); var body = await response.Content.ReadAsStringAsync(); Console.WriteLine(body);}Checks whether a new Distribution Release is available for the given environment, type, and optional version/release filters. Requires a valid CDN key as a Bearer token in the Authorization header. Returns 200 with release details if a matching release exists, or 204 if no release matches.
Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Request body for checking the status of a Distribution Release. Requires mandatory distribution environment and type filters. The client version and release optionally narrow it to a version-specific distribution.
object
The semantic version of the client application. Used as an optional filter to match a version-specific distribution.
Example
2.1.0The release identifier of the client application. Used as an optional filter.
Example
beta-3The target distribution environment. This is a mandatory filter.
Example
PRODUCTIONThe target distribution type. This is a mandatory filter.
Example
MOBILE_SDK_IOSResponses
Section titled “Responses”A matching Distribution Release was found.
Response containing details of a matching Distribution Release, including its identifier, name, creation timestamp, and a pre-signed download URL.
object
The unique identifier of the Distribution Release.
The human-readable name of the Distribution Release.
The timestamp when the Distribution Release was created.
A pre-signed S3 URL to download the Distribution Release files. Valid for 24 hours.
Examples
A distribution release matching the filter
Matching release found
{ "distributionReleaseId": "rel_019f9d57-d0ec-7fa2-99f2-4ac2eb20e671", "name": "your project release", "createdAt": "2025-02-24T13:11:30.909+00:00", "filesUrl": "https://lingohub-exports.s3.amazonaws.com/distributions/rel_019f9d57-d0ec-7fa2-99f2-4ac2eb20e671.zip"}No Distribution Release matches the given filter. The response body is empty.
Response containing details of a matching Distribution Release, including its identifier, name, creation timestamp, and a pre-signed download URL.
object
The unique identifier of the Distribution Release.
Example
rel_019f9d57-d0ec-7fa2-99f2-4ac2eb20e671The human-readable name of the Distribution Release.
Example
v2.1.0 Production ReleaseThe timestamp when the Distribution Release was created.
Example
2025-02-24T13:11:30A pre-signed S3 URL to download the Distribution Release files. Valid for 24 hours.
Example
https://lingohub-exports.s3.amazonaws.com/distributions/rel_019f9d57-d0ec-7fa2-99f2-4ac2eb20e671.zipUnauthorized: The Authorization header is missing, malformed, or contains an invalid/expired CDN key.
A structured error detail indicating which field caused the error and the specific error codes.
object
The field or area that caused the error.
The list of error codes describing what went wrong for this field.
Examples
CDN key not found or expired
Invalid CDN key
{ "type": "about:blank", "status": 401, "detail": "Unauthorized", "errors": [ { "field": "AUTHORIZATION", "infos": [ "CDN_KEY_NOT_FOUND" ] } ]}Not Found: No distribution or distribution release matches the given environment, type, and version.
A structured error detail indicating which field caused the error and the specific error codes.
object
The field or area that caused the error.
The list of error codes describing what went wrong for this field.
Examples
No matching distribution exists
Distribution not found
{ "type": "about:blank", "status": 404, "detail": "Not Found", "errors": [ { "field": "DISTRIBUTION", "infos": [ "DISTRIBUTION_NOT_FOUND" ] } ]}Unprocessable Entity: The request body failed validation (e.g. invalid language code or semantic version format).
Too Many Requests: The workspace’s CDN usage budget has been exceeded. Please add more CDN budget.
A structured error detail indicating which field caused the error and the specific error codes.
object
The field or area that caused the error.
The list of error codes describing what went wrong for this field.
Examples
CDN budget exhausted
Usage limit exceeded
{ "type": "about:blank", "status": 429, "detail": "Too Many Requests", "errors": [ { "field": "USAGE", "infos": [ "USAGE_LIMIT_EXCEEDED" ] } ]}Internal Server Error: An unexpected error occurred.