Resources

Categories

The Categories resource is used to list categories as a tree structure.

Listing categories

A GET request will list all of the categories.

Response structure

Path Type Description

response.categories

Array

An array of categories trees

Example request

$ curl 'https://api.brussels/api/categories' -i \
    -H 'Accept: application/hal+json'

Example response

HTTP/1.1 200 OK
Content-Type: application/hal+json;charset=UTF-8

{
  "response": {
    "categories": [
      {
        "id": 1001,
        "nameFr": "Revêtement",
        "nameNl": "Wegdek",
        "nameEn": "Coating",
        "assignable": false,
        "active": true,
        "subCategories": [
          {
            "id": 2300,
            "nameFr": "Neige-verglas",
            "nameNl": "Sneeuw - ijzel",
            "nameEn": "Ice or snow",
            "assignable": false,
            "active": true,
            "parentId": 1001,
            "subCategories": [
              {
                "id": 3400,
                "nameFr": "Trottoir - piste cyclable",
                "nameNl": "Rijweg - fietspad",
                "nameEn": "Sidewalk - bike path",
                "assignable": true,
                "active": true,
                "parentId": 2300
              }
            ]
          },
          {
            "id": 3026,
            "nameFr": "Nid de poule",
            "nameNl": "Gat in de weg",
            "nameEn": "Pothole",
            "assignable": true,
            "active": true,
            "parentId": 1001
          }
        ]
      },
      {
        "id": 1002,
        "nameFr": "Déchets - propreté publique",
        "nameNl": "Afval - openbare netheid",
        "nameEn": "Garbage",
        "assignable": false,
        "active": true,
        "subCategories": [
          {
            "id": 2000,
            "nameFr": "Sacs poubelles",
            "nameNl": "Vuilniszakken",
            "nameEn": "Garbage bags",
            "assignable": false,
            "active": true,
            "parentId": 1002,
            "subCategories": [
              {
                "id": 3029,
                "nameFr": "Sac éventré",
                "nameNl": "Gescheurde zak",
                "nameEn": "Shredded bags",
                "assignable": false,
                "active": true,
                "parentId": 2000,
                "subCategories": [
                  {
                    "id": 4051,
                    "nameFr": "Blanc",
                    "nameNl": "Wit",
                    "nameEn": "White",
                    "assignable": true,
                    "active": true,
                    "parentId": 3029
                  },
                  {
                    "id": 4052,
                    "nameFr": "Vert",
                    "nameNl": "Groen",
                    "nameEn": "Green",
                    "assignable": true,
                    "active": true,
                    "parentId": 3029
                  }
                ]
              }
            ]
          }
        ]
      }
    ]
  }
}

Incidents

The Incidents resource is used to list incidents.

Listing incidents

A GET request will list a page of the incidents.

Request parameters

Parameter Description Optional

page

The current page number (default = 0)

true

size

The current page size (default = 12)

true

municipality

The incidents municipality postal code

true

status

The incidents status

true

category

The incidents category

true

startDate

The incidents last update start date

true

endDate

The incidents last update end date

true

startDaysNumber

The incidents last update days number (used only if startDate is not specified)

true

Response structure

Path Type Description

page.size

Number

The current page size

page.number

Number

The current page number

page.totalElements

Number

The incidents list total elements

page.totalPages

Number

The incidents list total pages number

_embedded.response

Array

The current page incidents list

Example request

$ curl 'https://api.brussels/api/incidents?page=3&size=5&municipality=1000&status=PROCESSING&category=25&startDate=2017-01-01&endDate=2017-01-31&startDaysNumber=15' -i \
    -H 'Accept: application/hal+json'

Example response

HTTP/1.1 200 OK
Content-Type: application/hal+json;charset=UTF-8

{
  "_embedded" : {
    "response" : [ {
      "id" : 52,
      "creationDate" : "2018-03-16T14:27:23.02",
      "updatedDate" : "2018-03-16T14:27:23.02",
      "status" : "CREATED",
      "location" : {
        "coordinates" : {
          "x" : 150032.0,
          "y" : 170637.0
        },
        "address" : {
          "streetNumber" : "21",
          "streetNameFr" : "Avenue des Arts",
          "streetNameNl" : "Kunstlaan",
          "postalCode" : "1000",
          "addressType" : "REGIONAL"
        }
      },
      "responsibleOrganisation" : {
        "id" : 42,
        "nameFr" : "Bruxelles Ville",
        "nameNl" : "Brussel Stadt",
        "nameEn" : "Brussels City",
        "type" : "MUNICIPALITY"
      },
      "category" : {
        "nameFr": "Revêtement / Neige-verglas / Trottoir - piste cyclable",
        "nameNl": "Wegdek / Sneeuw - ijzel / Rijweg - fietspad",
        "nameEn": "Coating / Ice or snow / Sidewalk - bike path",
        "parentId" : 341,
        "id" : 342,
        "public" : true
      },
      "responsibleDepartment" : {
        "id" : 3,
        "nameFr" : "Service KSch",
        "nameNl" : "Service KSch",
        "nameEn" : "Service KSch"
      }
    }, {
      "id" : 617,
      "creationDate" : "2018-03-16T14:27:23.02",
      "updatedDate" : "2018-03-16T14:27:23.02",
      "status" : "CREATED",
      "location" : {
        "coordinates" : {
          "x" : 149570.0,
          "y" : 170714.0
        },
        "address" : {
          "streetNumber" : "2",
          "streetNameFr" : "Rue de la Loi",
          "streetNameNl" : "Wetstraat",
          "postalCode" : "1000",
          "addressType" : "MUNICIPAL"
        }
      },
      "responsibleOrganisation" : {
        "id" : 42,
        "nameFr" : "Bruxelles Ville",
        "nameNl" : "Brussel Stadt",
        "nameEn" : "Brussels City",
        "type" : "MUNICIPALITY"
      },
      "category" : {
        "nameFr" : "Eclairage / Lampe / Éteinte",
        "nameNl" : "Verlichting / Lamp / Brandt niet meer",
        "nameEn" : "Public lightning / Lamp / Turned off",
        "parentId" : 51,
        "id" : 276,
        "public" : true
      },
      "responsibleDepartment" : {
        "id" : 3,
        "nameFr" : "Service Sibelga Eclairage",
        "nameNl" : "Service Sibelga Eclairage",
        "nameEn" : "Service Sibelga Eclairage"
      }
    } ]
  },
  "page" : {
    "size" : 5,
    "totalElements" : 2,
    "totalPages" : 5,
    "number" : 2
  }
}