# Bundles

When pushing updates or settings to a Bird, we bundle the data up, chunk it, and send it through to the Bird.

You can query the progress of the push by querying the bundle status. Similarly, we can cancel a push by cancelling the bundle.

# Cancel Bundle

POST /api/v1/bundle/cancel

Cancel a specified data bundle.

Required Parameters

auth_token string
A valid auth token
bundle_tag string
A valid data bundle tag

Response

A JSON structure containing bundle information.

Example

    Response
    {
      "action": "cancelled",
      "bundle_tag": "<bundle_tag",
      "result": "success"
    }
    
    1
    2
    3
    4
    5

    # Fetch Bundle Information

    GET /api/v1/bundle/info

    Fetch a specified data bundle status.

    Required Parameters

    auth_token string
    A valid auth token
    bundle_tag string
    A valid data bundle tag

    Response

    A JSON structure containing bundle information.

    Example

      Response
      {
        "bundle_size": 4822,
        "bytes_copied": 5200,
        "checksum": "b2715b845247d599b3d6daee",
        "created_time": 1586855802,
        "created_time_pretty": "17 seconds",
        "ended_time": 1586855812,
        "ended_time_pretty": "7 seconds",
        "name": "Settings push",
        "node_id": "<node_id>",
        "req_len": "400",
        "settings_key": "databundle:settings:d11f0f",
        "started_time": 1586855810,
        "started_time_pretty": "9 seconds",
        "state": "ended",
        "tag": "<bundle_tag>",
        "type_": "settings",
        "updated_time": 1586855812,
        "updated_time_pretty": "7 seconds"
      }
      
      1
      2
      3
      4
      5
      6
      7
      8
      9
      10
      11
      12
      13
      14
      15
      16
      17
      18
      19
      20

      # List All Bundles

      GET /api/v1/bundles/list/all

      Fetch a list of data bundles for all Birds a user can manage.

      Required Parameters

      auth_token string
      A valid auth token

      Optional Parameters

      in_progress_only boolean
      Only return bundles that are currently in progress or waiting

      Response

      A JSON structure containing bundle information.

      Example

        Response
        {
          "bundles": [
            {
              "bundle_size": 4822,
              "bytes_copied": 0,
              "checksum": "b2715b845247d599b3d6daee",
              "created_time": 1586855479,
              "ended_time": null,
              "name": "Settings push",
              "node_id": "<node_id>",
              "req_len": "400",
              "settings_key": "databundle:settings:dd9245",
              "started_time": null,
              "state": "waiting",
              "tag": "<bundle_tag>",
              "type_": "settings",
              "updated_time": null
            }
          ],
          "result": "success"
        }
        
        1
        2
        3
        4
        5
        6
        7
        8
        9
        10
        11
        12
        13
        14
        15
        16
        17
        18
        19
        20
        21

        # List Bird Bundles

        GET /api/v1/bundles/list

        Fetch a list of data bundles for a given Bird

        Required Parameters

        auth_token string
        A valid auth token
        node_id string
        A valid node_id

        Optional Parameters

        in_progress_only boolean
        Only return bundles that are currently in progress or waiting

        Response

        A JSON structure containing bundle information.

        Example

          Response
          {
            "bundles": [
              {
                "bundle_size": 4822,
                "bytes_copied": 0,
                "checksum": "b2715b845247d599b3d6daee",
                "created_time": 1586855600,
                "ended_time": null,
                "name": "Settings push",
                "node_id": "<node_id>",
                "req_len": "400",
                "settings_key": "databundle:settings:ce9c3c",
                "started_time": null,
                "state": "waiting",
                "tag": "<bundle_tag>",
                "type_": "settings",
                "updated_time": null
              }
            ],
            "result": "success"
          }
          
          1
          2
          3
          4
          5
          6
          7
          8
          9
          10
          11
          12
          13
          14
          15
          16
          17
          18
          19
          20
          21