Skip to content
Docs
API 1.0.0 · 22 Nov 2026

Search the docs

    Română

    Updates

    Roll firmware out in stages and retain each stage result.

    An update selects a fixed device cohort and firmware version. Stages cover cumulative shares of 5%, 25% and 100%; each target rounds upward to a whole device. Later stages include earlier successes.

    curl

    curl -X POST "$RDC_BASE_URL/iot/v1/updates" \
      -H "Authorization: Bearer $RDC_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
      "operationId": "a1000000-0000-4000-8000-000000000004",
      "expectedRevision": 0,
      "firmware": "2.4.2",
      "deviceIds": [
        "device-1",
        "device-2",
        "device-3",
        "device-4",
        "device-5",
        "device-6",
        "device-7",
        "device-8",
        "device-9",
        "device-10",
        "device-11",
        "device-12",
        "device-13",
        "device-14",
        "device-16",
        "device-17",
        "device-18",
        "device-19",
        "device-20",
        "device-21",
        "device-22",
        "device-23",
        "device-24",
        "device-25",
        "device-26",
        "device-27",
        "device-28",
        "device-29",
        "device-30",
        "device-31",
        "device-32",
        "device-33",
        "device-34",
        "device-35",
        "device-37",
        "device-38",
        "device-39",
        "device-40"
      ]
    }'

    JavaScript

    const response = await fetch(`${process.env.RDC_BASE_URL}/iot/v1/updates`, {
      method: 'POST',
      headers: {
        Authorization: `Bearer ${process.env.RDC_TOKEN}`,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        "operationId": "a1000000-0000-4000-8000-000000000004",
        "expectedRevision": 0,
        "firmware": "2.4.2",
        "deviceIds": [
          "device-1",
          "device-2",
          "device-3",
          "device-4",
          "device-5",
          "device-6",
          "device-7",
          "device-8",
          "device-9",
          "device-10",
          "device-11",
          "device-12",
          "device-13",
          "device-14",
          "device-16",
          "device-17",
          "device-18",
          "device-19",
          "device-20",
          "device-21",
          "device-22",
          "device-23",
          "device-24",
          "device-25",
          "device-26",
          "device-27",
          "device-28",
          "device-29",
          "device-30",
          "device-31",
          "device-32",
          "device-33",
          "device-34",
          "device-35",
          "device-37",
          "device-38",
          "device-39",
          "device-40"
        ]
      }),
    });
    const result = await response.json();

    Python

    import os
    import requests
    
    response = requests.request(
        'POST',
        f'{os.environ["RDC_BASE_URL"]}/iot/v1/updates',
        headers={
            'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
        },
        json={
            'operationId': 'a1000000-0000-4000-8000-000000000004',
            'expectedRevision': 0,
            'firmware': '2.4.2',
            'deviceIds': [
                'device-1',
                'device-2',
                'device-3',
                'device-4',
                'device-5',
                'device-6',
                'device-7',
                'device-8',
                'device-9',
                'device-10',
                'device-11',
                'device-12',
                'device-13',
                'device-14',
                'device-16',
                'device-17',
                'device-18',
                'device-19',
                'device-20',
                'device-21',
                'device-22',
                'device-23',
                'device-24',
                'device-25',
                'device-26',
                'device-27',
                'device-28',
                'device-29',
                'device-30',
                'device-31',
                'device-32',
                'device-33',
                'device-34',
                'device-35',
                'device-37',
                'device-38',
                'device-39',
                'device-40',
            ],
        },
    )
    result = response.json()

    PHP

    <?php
    
    $body = <<<'JSON'
    {
      "operationId": "a1000000-0000-4000-8000-000000000004",
      "expectedRevision": 0,
      "firmware": "2.4.2",
      "deviceIds": [
        "device-1",
        "device-2",
        "device-3",
        "device-4",
        "device-5",
        "device-6",
        "device-7",
        "device-8",
        "device-9",
        "device-10",
        "device-11",
        "device-12",
        "device-13",
        "device-14",
        "device-16",
        "device-17",
        "device-18",
        "device-19",
        "device-20",
        "device-21",
        "device-22",
        "device-23",
        "device-24",
        "device-25",
        "device-26",
        "device-27",
        "device-28",
        "device-29",
        "device-30",
        "device-31",
        "device-32",
        "device-33",
        "device-34",
        "device-35",
        "device-37",
        "device-38",
        "device-39",
        "device-40"
      ]
    }
    JSON;
    
    $curl = curl_init(getenv('RDC_BASE_URL') . '/iot/v1/updates');
    curl_setopt_array($curl, [
        CURLOPT_CUSTOMREQUEST => 'POST',
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_HTTPHEADER => [
            'Authorization: Bearer ' . getenv('RDC_TOKEN'),
            'Content-Type: application/json',
        ],
        CURLOPT_POSTFIELDS => $body,
    ]);
    $result = json_decode(curl_exec($curl), true);
    curl_close($curl);

    C#

    using System.Net.Http.Headers;
    
    var client = new HttpClient();
    var request = new HttpRequestMessage(HttpMethod.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/iot/v1/updates");
    request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
    request.Content = new StringContent("""
    {
      "operationId": "a1000000-0000-4000-8000-000000000004",
      "expectedRevision": 0,
      "firmware": "2.4.2",
      "deviceIds": [
        "device-1",
        "device-2",
        "device-3",
        "device-4",
        "device-5",
        "device-6",
        "device-7",
        "device-8",
        "device-9",
        "device-10",
        "device-11",
        "device-12",
        "device-13",
        "device-14",
        "device-16",
        "device-17",
        "device-18",
        "device-19",
        "device-20",
        "device-21",
        "device-22",
        "device-23",
        "device-24",
        "device-25",
        "device-26",
        "device-27",
        "device-28",
        "device-29",
        "device-30",
        "device-31",
        "device-32",
        "device-33",
        "device-34",
        "device-35",
        "device-37",
        "device-38",
        "device-39",
        "device-40"
      ]
    }
    """, System.Text.Encoding.UTF8, "application/json");
    var response = await client.SendAsync(request);
    var result = await response.Content.ReadAsStringAsync();

    Response 202

    {
      "operationId": "a1000000-0000-4000-8000-000000000004",
      "status": "accepted",
      "aggregateRevision": 1
    }

    Start from ready. A completed stage records successes and failures. A failure pauses progression as failed; fix the cause and retry the same stage. Stop preserves the cohort, progress and outcomes.

    curl

    curl -X POST "$RDC_BASE_URL/iot/v1/updates/update-1/start" \
      -H "Authorization: Bearer $RDC_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
      "operationId": "a1000000-0000-4000-8000-000000000020",
      "expectedRevision": 1
    }'

    JavaScript

    const response = await fetch(`${process.env.RDC_BASE_URL}/iot/v1/updates/update-1/start`, {
      method: 'POST',
      headers: {
        Authorization: `Bearer ${process.env.RDC_TOKEN}`,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        "operationId": "a1000000-0000-4000-8000-000000000020",
        "expectedRevision": 1
      }),
    });
    const result = await response.json();

    Python

    import os
    import requests
    
    response = requests.request(
        'POST',
        f'{os.environ["RDC_BASE_URL"]}/iot/v1/updates/update-1/start',
        headers={
            'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
        },
        json={
            'operationId': 'a1000000-0000-4000-8000-000000000020',
            'expectedRevision': 1,
        },
    )
    result = response.json()

    PHP

    <?php
    
    $body = <<<'JSON'
    {
      "operationId": "a1000000-0000-4000-8000-000000000020",
      "expectedRevision": 1
    }
    JSON;
    
    $curl = curl_init(getenv('RDC_BASE_URL') . '/iot/v1/updates/update-1/start');
    curl_setopt_array($curl, [
        CURLOPT_CUSTOMREQUEST => 'POST',
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_HTTPHEADER => [
            'Authorization: Bearer ' . getenv('RDC_TOKEN'),
            'Content-Type: application/json',
        ],
        CURLOPT_POSTFIELDS => $body,
    ]);
    $result = json_decode(curl_exec($curl), true);
    curl_close($curl);

    C#

    using System.Net.Http.Headers;
    
    var client = new HttpClient();
    var request = new HttpRequestMessage(HttpMethod.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/iot/v1/updates/update-1/start");
    request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
    request.Content = new StringContent("""
    {
      "operationId": "a1000000-0000-4000-8000-000000000020",
      "expectedRevision": 1
    }
    """, System.Text.Encoding.UTF8, "application/json");
    var response = await client.SendAsync(request);
    var result = await response.Content.ReadAsStringAsync();

    Response 202

    {
      "operationId": "a1000000-0000-4000-8000-000000000020",
      "status": "accepted",
      "aggregateRevision": 2
    }

    Read the current revision before each action. Results belong to a specific update, stage and attempt; results from an earlier attempt cannot complete the retried stage. Completion requires the final stage to finish successfully.

    curl

    curl "$RDC_BASE_URL/iot/v1/updates/update-1" \
      -H "Authorization: Bearer $RDC_TOKEN"

    JavaScript

    const response = await fetch(`${process.env.RDC_BASE_URL}/iot/v1/updates/update-1`, {
      method: 'GET',
      headers: {
        Authorization: `Bearer ${process.env.RDC_TOKEN}`,
      },
    });
    const result = await response.json();

    Python

    import os
    import requests
    
    response = requests.request(
        'GET',
        f'{os.environ["RDC_BASE_URL"]}/iot/v1/updates/update-1',
        headers={
            'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
        },
    )
    result = response.json()

    PHP

    <?php
    
    $curl = curl_init(getenv('RDC_BASE_URL') . '/iot/v1/updates/update-1');
    curl_setopt_array($curl, [
        CURLOPT_CUSTOMREQUEST => 'GET',
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_HTTPHEADER => [
            'Authorization: Bearer ' . getenv('RDC_TOKEN'),
        ],
    ]);
    $result = json_decode(curl_exec($curl), true);
    curl_close($curl);

    C#

    using System.Net.Http.Headers;
    
    var client = new HttpClient();
    var request = new HttpRequestMessage(HttpMethod.Get, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/iot/v1/updates/update-1");
    request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
    var response = await client.SendAsync(request);
    var result = await response.Content.ReadAsStringAsync();

    Response 200

    {
      "id": "update-1",
      "firmware": "2.4.2",
      "state": "ready",
      "stage": 0,
      "population": 38,
      "results": [],
      "revision": 1
    }

    curl

    curl -X POST "$RDC_BASE_URL/iot/v1/updates/update-1/stop" \
      -H "Authorization: Bearer $RDC_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
      "operationId": "a1000000-0000-4000-8000-000000000021",
      "expectedRevision": 2
    }'

    JavaScript

    const response = await fetch(`${process.env.RDC_BASE_URL}/iot/v1/updates/update-1/stop`, {
      method: 'POST',
      headers: {
        Authorization: `Bearer ${process.env.RDC_TOKEN}`,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        "operationId": "a1000000-0000-4000-8000-000000000021",
        "expectedRevision": 2
      }),
    });
    const result = await response.json();

    Python

    import os
    import requests
    
    response = requests.request(
        'POST',
        f'{os.environ["RDC_BASE_URL"]}/iot/v1/updates/update-1/stop',
        headers={
            'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
        },
        json={
            'operationId': 'a1000000-0000-4000-8000-000000000021',
            'expectedRevision': 2,
        },
    )
    result = response.json()

    PHP

    <?php
    
    $body = <<<'JSON'
    {
      "operationId": "a1000000-0000-4000-8000-000000000021",
      "expectedRevision": 2
    }
    JSON;
    
    $curl = curl_init(getenv('RDC_BASE_URL') . '/iot/v1/updates/update-1/stop');
    curl_setopt_array($curl, [
        CURLOPT_CUSTOMREQUEST => 'POST',
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_HTTPHEADER => [
            'Authorization: Bearer ' . getenv('RDC_TOKEN'),
            'Content-Type: application/json',
        ],
        CURLOPT_POSTFIELDS => $body,
    ]);
    $result = json_decode(curl_exec($curl), true);
    curl_close($curl);

    C#

    using System.Net.Http.Headers;
    
    var client = new HttpClient();
    var request = new HttpRequestMessage(HttpMethod.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/iot/v1/updates/update-1/stop");
    request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
    request.Content = new StringContent("""
    {
      "operationId": "a1000000-0000-4000-8000-000000000021",
      "expectedRevision": 2
    }
    """, System.Text.Encoding.UTF8, "application/json");
    var response = await client.SendAsync(request);
    var result = await response.Content.ReadAsStringAsync();

    Response 202

    {
      "operationId": "a1000000-0000-4000-8000-000000000021",
      "status": "accepted",
      "aggregateRevision": 3
    }

    curl

    curl -X POST "$RDC_BASE_URL/iot/v1/updates/update-1/resume" \
      -H "Authorization: Bearer $RDC_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
      "operationId": "a1000000-0000-4000-8000-000000000022",
      "expectedRevision": 3
    }'

    JavaScript

    const response = await fetch(`${process.env.RDC_BASE_URL}/iot/v1/updates/update-1/resume`, {
      method: 'POST',
      headers: {
        Authorization: `Bearer ${process.env.RDC_TOKEN}`,
        'Content-Type': 'application/json',
      },
      body: JSON.stringify({
        "operationId": "a1000000-0000-4000-8000-000000000022",
        "expectedRevision": 3
      }),
    });
    const result = await response.json();

    Python

    import os
    import requests
    
    response = requests.request(
        'POST',
        f'{os.environ["RDC_BASE_URL"]}/iot/v1/updates/update-1/resume',
        headers={
            'Authorization': f'Bearer {os.environ["RDC_TOKEN"]}',
        },
        json={
            'operationId': 'a1000000-0000-4000-8000-000000000022',
            'expectedRevision': 3,
        },
    )
    result = response.json()

    PHP

    <?php
    
    $body = <<<'JSON'
    {
      "operationId": "a1000000-0000-4000-8000-000000000022",
      "expectedRevision": 3
    }
    JSON;
    
    $curl = curl_init(getenv('RDC_BASE_URL') . '/iot/v1/updates/update-1/resume');
    curl_setopt_array($curl, [
        CURLOPT_CUSTOMREQUEST => 'POST',
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_HTTPHEADER => [
            'Authorization: Bearer ' . getenv('RDC_TOKEN'),
            'Content-Type: application/json',
        ],
        CURLOPT_POSTFIELDS => $body,
    ]);
    $result = json_decode(curl_exec($curl), true);
    curl_close($curl);

    C#

    using System.Net.Http.Headers;
    
    var client = new HttpClient();
    var request = new HttpRequestMessage(HttpMethod.Post, $"{Environment.GetEnvironmentVariable("RDC_BASE_URL")}/iot/v1/updates/update-1/resume");
    request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", Environment.GetEnvironmentVariable("RDC_TOKEN"));
    request.Content = new StringContent("""
    {
      "operationId": "a1000000-0000-4000-8000-000000000022",
      "expectedRevision": 3
    }
    """, System.Text.Encoding.UTF8, "application/json");
    var response = await client.SendAsync(request);
    var result = await response.Content.ReadAsStringAsync();

    Response 202

    {
      "operationId": "a1000000-0000-4000-8000-000000000022",
      "status": "accepted",
      "aggregateRevision": 4
    }