Skip to content

Sending Next Requests

Once you have a valid Bearer token, you can now call next APIs by setting the Authorization request header field. The valid syntax is the following:

Content-Type: application/json; charset=utf-8
Authorization: Bearer <access_token>

Example

In the following example, we'll try to fetch all sites created by the authenticated user.

GET https://api.networkale.com/api/v1/sites

Request Headers:

Authorization: Bearer eyJhbGciOiJIU...plaVi7K04EqcjnkhPE8

Response Body:

{
  "status": 200,
  "message": "Sites have been successfully fetched.",
  "data": [
    {
      "createdAt": "2019-10-05T10:51:31.912Z",
      "updatedAt": "2019-10-08T18:20:02.248Z",
      "id": "5d9875b3e1a0bd06ba5bh4D",
      "name": "Site Hospital Example 1",
      "timezone": "Europe/Paris",
      "type": "SITE_HOSPITAL",
      "description": "My site example",
      "location": {
        "type": "Point",
        "coordinates": [
          -4.412685781717301,
          42.44161012295645
        ]
      },
      "zoom": 20,
      "isInProduction": true,
      "street": "22 street road",
      "city": "Paris",
      "state": "",
      "zipCode": "75000",
      "country": "FR",
      "image": "data:image/jpeg;base64,/9j/4QAYR...XhpZgAASU",
      "imageName": "test.jpg"
    }
  ]
}