List resource providers

GET /api/v1/energies

Returns the hierarchy of resource-providing companies.

Query parameters

page integer

Page number.

Response fields

AttributeDescription
idIdentifier (unique key) of the resource provider in the system
nameResource provider name
childrenArray of branches and/or subdivisions
dataArray of returned data
total_pagesTotal number of pages in the returned set
current_pageCurrent page
next_pageNext page available for downloading, null if the current page is the last one

Request

bash
curl -i \
  --header "access-token: *********************" \
  --header "token-type: Bearer" \
  --header "client: **********************" \
  --header "uid: user@local.net" \
  --header "Content-Type: application/json" \
  --request GET \
  "https://uztgs.uz/api/v1/energies?page=1"

Response

json
{"data":[
  {
    "id": 1,
    "name": "Hududgaz",
    "children": [
      { "id": 2, "name": "Hududgaz Andijon", "children": [] },
      { "id": 3, "name": "Hududgaz Buxoro", "children": [] }
    ]
  },
  ...
  ],
  "total_pages": 8,
  "current_page": 1,
  "next_page": 2
}
Dernière mise à jour le

Cette page vous a-t-elle été utile ?