Product SiteDocumentation Site

Chapter 2. Model sharing with rB

2.1. Sensor tree listing
2.2. Domain creation
2.3. Flow sensor creation
2.4. Meraki sensor creation
2.5. MSE sensor creation
2.6. MSE sensor listing for a domain
2.7. Sensor elimination
2.8. Update a Domain sensor
2.9. Update Flow, MSE and Meraki sensors
2.10. Domain override
2.11. Domain Access Point override
2.12. Access Point listing
2.13. Access Point creation
2.14. Access Point Modification
2.15. Access Point destruction
2.16. User listing
2.17. User API key renewal

NOTE:

The redborder API requires authentication via a valid authentication token submitted as a GET parameter. Said GET parameter receives the name auth_token. The following example demonstrates how to correctly sign a request. For the sake of simplicity suppose abcd is a valid authentication token.
https://hostname/api/v1/request_path?auth_token=abcd
Every request on this chapter requires this authentication and will accept the indicated GET parameter unless specified otherwise. From now on this parameter will be omitted on the example requests.

NOTE:

Every request that returns a JSON response body will return a "query" value set to a boolean. Said boolean stands for the query status, so if it is set to true it means that the query was successful and if it is set to false means that the query was not successful. This value will always be found on the root JSON response object and will always be the actual response sibling.

2.1. Sensor tree listing

A sensor and all it's child sensors can be listed by submitting a GET petition to the following URI:
https://hostname/api/v1/sensors/:sensor_uuid/tree
Where :sensor_uuid should be UUID of the root of the tree. If you wish to list all sensors from the submitting user's top domain and beneath you may submit a GET request to the following URI:
https://hostname/api/v1/sensors/tree
If request is successful HTTP 200 OK status code will be returned alongside a nested JSON response describing the requested tree. Currently only JSON is supported as a response format. Format will be the same for both of the requests described above.
On the following lines you may find a real execution example:
      Request:
        HTTP Verb: GET
        URI: https://hostname/api/v1/sensors/8726017729975087448/tree?auth_token=xxxxxx

      Reply:
        Status Code: 200 OK
        Response:
        {
          "query": true,
          "sensor": {
            "id": 492,
            "name": "Test",
            "ip": null,
            "latitude": null,
            "longitude": null,
            "is_deleted": false,
            "applied_at": null,
            "type": 1,
            "real_parent_id": null,
            "group_id": null,
            "binding_id": null,
            "need_apply": false,
            "applying": false,
            "property": {
              "path": ""
            },
            "domain_type": 1,
            "unassigned": false,
            "policy_id": null,
            "reputation_policy_id": null,
            "need_reputation_apply": false,
            "uuid": "697893457705749905",
            "children": [
              {
                "id": 852,
                "name": "Override_brother",
                "ip": null,
                "latitude": null,
                "longitude": null,
                "is_deleted": false,
                "applied_at": null,
                "type": 1,
                "real_parent_id": null,
                "group_id": null,
                "binding_id": null,
                "need_apply": false,
                "applying": false,
                "property": {},
                "domain_type": 1,
                "unassigned": false,
                "policy_id": null,
                "reputation_policy_id": null,
                "need_reputation_apply": false,
                "uuid": "7106963634872672634",
                "children": []
              },
              {
                "id": 847,
                "name": "Override_parent",
                "ip": null,
                "latitude": null,
                "longitude": null,
                "is_deleted": false,
                "applied_at": null,
                "type": 1,
                "real_parent_id": null,
                "group_id": null,
                "binding_id": null,
                "need_apply": false,
                "applying": false,
                "property": {},
                "domain_type": 1,
                "unassigned": false,
                "policy_id": null,
                "reputation_policy_id": null,
                "need_reputation_apply": false,
                "uuid": "6575077023887022161",
                "children": [
                  {
                    "id": 848,
                    "name": "Override_child",
                    "ip": null,
                    "latitude": null,
                    "longitude": null,
                    "is_deleted": false,
                    "applied_at": null,
                    "type": 1,
                    "real_parent_id": null,
                    "group_id": null,
                    "binding_id": null,
                    "need_apply": false,
                    "applying": false,
                    "property": {},
                    "domain_type": 1,
                    "unassigned": false,
                    "policy_id": null,
                    "reputation_policy_id": null,
                    "need_reputation_apply": false,
                    "uuid": "7137236833163733936",
                    "children": []
                  },
                  {
                    "id": 849,
                    "name": "Override_child_2",
                    "ip": null,
                    "latitude": null,
                    "longitude": null,
                    "is_deleted": false,
                    "applied_at": null,
                    "type": 1,
                    "real_parent_id": null,
                    "group_id": null,
                    "binding_id": null,
                    "need_apply": false,
                    "applying": false,
                    "property": {},
                    "domain_type": 1,
                    "unassigned": false,
                    "policy_id": null,
                    "reputation_policy_id": null,
                    "need_reputation_apply": false,
                    "uuid": "4178223226747106768",
                    "children": [
                      {
                        "id": 851,
                        "name": "Override_grandson_2",
                        "ip": null,
                        "latitude": null,
                        "longitude": null,
                        "is_deleted": false,
                        "applied_at": null,
                        "type": 1,
                        "real_parent_id": null,
                        "group_id": null,
                        "binding_id": null,
                        "need_apply": false,
                        "applying": false,
                        "property": {},
                        "domain_type": 101,
                        "unassigned": false,
                        "policy_id": null,
                        "reputation_policy_id": null,
                        "need_reputation_apply": false,
                        "uuid": "7549459708256671519",
                        "access_points": [],
                        "children": []
                      },
                      {
                        "id": 850,
                        "name": "Override_grandson_1",
                        "ip": null,
                        "latitude": null,
                        "longitude": null,
                        "is_deleted": false,
                        "applied_at": null,
                        "type": 1,
                        "real_parent_id": null,
                        "group_id": null,
                        "binding_id": null,
                        "need_apply": false,
                        "applying": false,
                        "property": {},
                        "domain_type": 1,
                        "unassigned": false,
                        "policy_id": null,
                        "reputation_policy_id": null,
                        "need_reputation_apply": false,
                        "uuid": "8126434584577941831",
                        "children": []
                      }
                    ]
                  }
                ]
              }
            ]
          }
        }