### Get Dataset Meta Information - JSON Response Example Source: https://data.egov.kz/pages/samples/index This snippet shows a sample JSON response for a request to retrieve meta information about a dataset. It details various attributes of the dataset, including its API URI, names in different languages, descriptions, responsible party, creation/modification dates, and a breakdown of its fields with labels and types. ```json { "apiUri" : "pharmacy", "nameRu" : "Аптеки", "nameEn" : "Pharmacy", "nameKk" : "Дәріханалар", "descriptionRu" : "Данный набор содержит наименования аптек, коды ...", "descriptionEn" : "This set contains names of pharmacies, codes of ...", "descriptionKk" : "Осы жиынтық дәріханалар, өңірлер кодтары мен ...", "responsible" : { "phone" : "+7 123 456 78 90", "email" : "test@test.kz", "fullnameKk" : "Дәріханалар", "fullnameEn" : "Pharmacy", "fullnameRu" : "Аптеки" }, "createdDate" : "2015-01-05T13:53:19.702Z", "modifiedDate" : "2015-01-05T13:53:19.702Z", "fields" : { "id" : { "labelKk" : "Id", "labelEn" : "Id", "type" : "Int", "labelRu" : "Id" }, "Name" : { "labelKk" : "Name", "labelEn" : "Name", "type" : "String", "labelRu" : "Name" }, "Region" : { "labelKk" : "Region", "labelEn" : "Region", "type" : "Int", "labelRu" : "Region" }, "geoposition" : { "labelKk" : "Geoposition", "labelEn" : "Geoposition", "type" : "Geoposition", "labelRu" : "Geoposition" }, "Address" : { "labelKk" : "Address", "labelEn" : "Address", "type" : "String", "labelRu" : "Address" } } } ``` -------------------------------- ### JSON Response: Sample Dataset Records Example Source: https://data.egov.kz/pages/samples/index Example JSON response containing a sample of records from a dataset. This is returned when querying for actual data, potentially filtered by size or other parameters. Each object in the array represents a single record. ```JSON [ { "dat_sover" : "01.01.2016", "street" : "ДОСТЫЌ", "stat" : "ст.293 ч.2", "time_period" : "1", "organ" : "УВД районаЕсиль", "crime_code" : "2930", "hard_code" : "2", "month" : "1", "longitude" : "71.434872580000004", "year" : "2016", "city_code" : "г. Астана", "ud" : "167115030000038", "latitude" : "51.126707959999997", "objectid" : "2316830", "home_number" : "13", "reg_code" : "РайонЕсил" }, { "dat_sover" : "01.01.2016", "street" : "САУРАН", "stat" : "ст.190 ч.1", "time_period" : "3", "organ" : "УВД районаЕсиль", "crime_code" : "1900", "hard_code" : "1", "month" : "1", "longitude" : "71.422323582999994", "year" : "2016", "city_code" : "г. Астана", "ud" : "157115030024346", "latitude" : "51.121251012999998", "objectid" : "2139389", "home_number" : "6/1", "reg_code" : "РайонЕсил" }, ... ``` -------------------------------- ### JSON Response: Dataset Mapping Schema Example Source: https://data.egov.kz/pages/samples/index Example JSON response showing the structure and types of fields for a dataset. This is typically returned by the mapping endpoints and helps in understanding the data schema. ```JSON { "astana_kalasynyn_kylmystyk_kuk1" : { "mappings" : { "v1" : { "properties" : { "city_code" : { "type" : "string", "store" : true }, "crime_code" : { "type" : "string", "store" : true }, "dat_sover" : { "type" : "string", "store" : true }, "hard_code" : { "type" : "string", "store" : true }, "home_number" : { "type" : "string", "store" : true }, "latitude" : { "type" : "string", "store" : true }, "longitude" : { "type" : "string", "store" : true } ... ``` -------------------------------- ### Get Dataset Sample (Specific Version) Source: https://data.egov.kz/pages/samples/index Retrieves a sample of data records from a specific version of a dataset. This is useful for previewing the data content. ```APIDOC ## GET /api/v4/{dataset_name}/{version} ### Description Retrieves a sample of data records from a specific version of a dataset. ### Method GET ### Endpoint /api/v4/{dataset_name}/{version} ### Path Parameters - **dataset_name** (string) - Required - The name of the dataset (e.g., astana_kalasynyn_kylmystyk_kuk1). - **version** (string) - Required - The specific version of the dataset (e.g., v1). ### Response #### Success Response (200) - **data** (array) - An array of data record objects. #### Response Example ```json [ { "dat_sover": "01.01.2016", "street": "ДОСТЫЌ", "stat": "ст.293 ч.2" } ] ``` ``` -------------------------------- ### GET /meta/dataset/version Source: https://data.egov.kz/pages/samples/index Retrieves meta information for a specific dataset and version. The response is in JSON format and includes dataset details or an error message. ```APIDOC ## GET /meta/dataset/version ### Description Retrieves meta information for a specific dataset and version. The response is in JSON format and includes dataset details or an error message. ### Method GET ### Endpoint /meta/dataset/version ### Parameters #### Path Parameters - **dataset** (string) - Required - The name of the dataset. - **version** (string) - Required - The version of the dataset. #### Query Parameters None #### Request Body None ### Request Example ``` GET /meta/pharmacy/v1 ``` ### Response #### Success Response (200) - **apiUri** (string) - The API URI for the dataset. - **nameRu** (string) - The name of the dataset in Russian. - **nameEn** (string) - The name of the dataset in English. - **nameKk** (string) - The name of the dataset in Kazakh. - **descriptionRu** (string) - The description of the dataset in Russian. - **descriptionEn** (string) - The description of the dataset in English. - **descriptionKk** (string) - The description of the dataset in Kazakh. - **responsible** (object) - Information about the responsible party. - **phone** (string) - The phone number of the responsible party. - **email** (string) - The email address of the responsible party. - **fullnameKk** (string) - The full name of the responsible party in Kazakh. - **fullnameEn** (string) - The full name of the responsible party in English. - **fullnameRu** (string) - The full name of the responsible party in Russian. - **createdDate** (string) - The date the dataset was created. - **modifiedDate** (string) - The date the dataset was last modified. - **fields** (object) - An object containing details about each field in the dataset. - **fieldName** (object) - Details for a specific field. - **labelKk** (string) - The field label in Kazakh. - **labelEn** (string) - The field label in English. - **type** (string) - The data type of the field. - **labelRu** (string) - The field label in Russian. #### Response Example ```json { "apiUri" : "pharmacy", "nameRu" : "Аптеки", "nameEn" : "Pharmacy", "nameKk" : "Дәріханалар", "descriptionRu" : "Данный набор содержит наименования аптек, коды ...", "descriptionEn" : "This set contains names of pharmacies, codes of ...", "descriptionKk" : "Осы жиынтық дәріханалар, өңірлер кодтары мен ...", "responsible" : { "phone" : "+7 123 456 78 90", "email" : "test@test.kz", "fullnameKk" : "Дәріханалар", "fullnameEn" : "Pharmacy", "fullnameRu" : "Аптеки" }, "createdDate" : "2015-01-05T13:53:19.702Z", "modifiedDate" : "2015-01-05T13:53:19.702Z", "fields" : { "id" : { "labelKk" : "Id", "labelEn" : "Id", "type" : "Int", "labelRu" : "Id" }, "Name" : { "labelKk" : "Name", "labelEn" : "Name", "type" : "String", "labelRu" : "Name" }, "Region" : { "labelKk" : "Region", "labelEn" : "Region", "type" : "Int", "labelRu" : "Region" }, "geoposition" : { "labelKk" : "Geoposition", "labelEn" : "Geoposition", "type" : "Geoposition", "labelRu" : "Geoposition" }, "Address" : { "labelKk" : "Address", "labelEn" : "Address", "type" : "String", "labelRu" : "Address" } } } ``` ``` -------------------------------- ### Get Dataset Fields and Types Source: https://data.egov.kz/pages/samples/index Retrieves the list of fields and their types for a given dataset. This is useful for understanding the structure of the data. ```APIDOC ## GET /api/v4/{dataset_name} ### Description Shows the description of the fields with their types and structure for a specified dataset. ### Method GET ### Endpoint /api/v4/{dataset_name} ### Path Parameters - **dataset_name** (string) - Required - The name of the dataset (e.g., astana_kalasynyn_kylmystyk_kuk1). ### Response #### Success Response (200) - **dataset_name** (object) - An object containing the mapping information for the dataset. #### Response Example ```json { "astana_kalasynyn_kylmystyk_kuk1": { "mappings": { "v1": { "properties": { "city_code": { "type": "string", "store": true }, "crime_code": { "type": "string", "store": true }, "dat_sover": { "type": "string", "store": true } } } } } } ``` ``` -------------------------------- ### Get Dataset Sample with From and Size Source: https://data.egov.kz/pages/samples/index Retrieves a specified number of records from a dataset version, with the option to skip a certain number of initial records. The 'source' parameter includes 'from' and 'size' for precise data retrieval. ```APIDOC ## GET /api/v4/{dataset_name}/{version} ### Description Retrieves a specified number of records from a dataset version, with the ability to skip a defined number of initial records using the 'from' and 'size' parameters within the 'source' query parameter. ### Method GET ### Endpoint /api/v4/{dataset_name}/{version} ### Path Parameters - **dataset_name** (string) - Required - The name of the dataset (e.g., astana_kalasynyn_kylmystyk_kuk1). - **version** (string) - Required - The specific version of the dataset (e.g., v1). ### Query Parameters - **source** (json object) - Required - Contains parameters like 'from' to specify the starting record index and 'size' to limit the number of records returned. ### Request Example ```json { "source": "{\"from\": 5, \"size\": 3}" } ``` ### Response #### Success Response (200) - **data** (array) - An array of data record objects, starting from the specified 'from' index and limited by the 'size' parameter. #### Response Example ```json [ { "dat_sover": "01.01.2016", "street": "МЈСКЕУ", "stat": "ст.188 ч.1" } ] ``` ``` -------------------------------- ### Get Dataset Sample with Size Limit Source: https://data.egov.kz/pages/samples/index Retrieves a specified number of records from a dataset version. The 'source' parameter is used to define the size of the returned dataset. ```APIDOC ## GET /api/v4/{dataset_name}/{version} ### Description Retrieves a specified number of records from a dataset version, controlled by the 'size' parameter within the 'source' query parameter. ### Method GET ### Endpoint /api/v4/{dataset_name}/{version} ### Path Parameters - **dataset_name** (string) - Required - The name of the dataset (e.g., astana_kalasynyn_kylmystyk_kuk1). - **version** (string) - Required - The specific version of the dataset (e.g., v1). ### Query Parameters - **source** (json object) - Required - Contains parameters like 'size' to limit the number of records returned. ### Request Example ```json { "source": "{\"size\": 5}" } ``` ### Response #### Success Response (200) - **data** (array) - An array of data record objects, limited by the 'size' parameter. #### Response Example ```json [ { "dat_sover": "01.01.2016", "street": "ДОСТЫЌ", "stat": "ст.293 ч.2" } ] ``` ``` -------------------------------- ### Dataset Search API Source: https://data.egov.kz/pages/samples/index This endpoint performs a search based on the dataset, utilizing the 'source' parameter to specify search and filtration criteria. The search is performed using the GET method. ```APIDOC ## GET /api/v4/dataset ### Description Performs a search on the dataset using the provided 'source' parameter for query and filtration. ### Method GET ### Endpoint /api/v4/dataset ### Query Parameters - **source** (json object) - Required - Describes how the search and filtration should be executed. ### Request Example ```json { "source": "{\"query\": \"example\", \"filter\": \"criteria\"}" } ``` ### Response #### Success Response (200) - **data** (array) - Contains the search results or a message about an error. #### Response Example ```json [ { "field1": "value1", "field2": "value2" } ] ``` ``` -------------------------------- ### API Request: Get Dataset Records with Filters (JSON) Source: https://data.egov.kz/pages/samples/index This endpoint allows fetching records from a specific dataset, with options to filter and paginate results using a JSON object passed as the 'source' parameter. Supports specifying dataset version, size, and 'from' for pagination. The server responds with JSON data or error messages. ```HTTP /api/v4/{dataset_name} /api/v4/{dataset_name}/version?source={Query in Json Object} /api/v4/{dataset_name}/version?source={"size": 5} /api/v4/{dataset_name}/version?source={"from":5, "size": 3} ``` -------------------------------- ### API Request: Get Dataset Mapping Schema Source: https://data.egov.kz/pages/samples/index This endpoint retrieves the schema, including field types and structure, for a specified dataset. It's useful for understanding the data format before querying for records. The response is in JSON format. ```HTTP /api/v4/mapping/{dataset_name} /api/v4/mapping/{dataset_name}/version ``` -------------------------------- ### Search Criminal Offenses by Field in Astana Source: https://data.egov.kz/pages/samples/index Retrieves a list of criminal offenses committed in Astana city on Imanov street with a severity code of '2'. This query uses a boolean 'must' clause to ensure both the street and severity conditions are met. Field names and types can be inferred from other examples. ```json /api/v4/astana_kalasynyn_kylmystyk_kuk1/v1?source={ "size":100, "query": { "bool":{ "must":[ {"match":{"hard_code": "2"}}, {"match":{"street": "Иманова"}} ] } } } ``` -------------------------------- ### Search Healthcare Organizations by Geo-distance in Akmola Region Source: https://data.egov.kz/pages/samples/index Finds healthcare organizations in the Akmola region within a 10 km radius of the coordinates (51.608524, 68.171934). This example utilizes a 'filtered' query with both a 'must' match on the 'address' field and a 'geo_distance' filter. This is applicable when the 'geoposition' field is of type 'geoposition'. ```json /api/v4/medorg/v1?source={ "size":100, "query": { "filtered": { "query":{ "bool":{ "must":[ {"match":{ "address": "Акмолинская" }} ] } }, "filter": { "geo_distance": { "distance": "10km", "geoposition": { "lat": 51.608524, "lon": 68.171934 } } } } } } ``` -------------------------------- ### Mapping Dataset Version API Source: https://data.egov.kz/pages/samples/index This endpoint retrieves the field descriptions, including types and structure, for a specific version of a dataset. ```APIDOC ## GET /api/v4/mapping/dataset/version ### Description Retrieves the descriptions of fields, their types, and structure for a specific version of a dataset. ### Method GET ### Endpoint /api/v4/mapping/dataset/version ### Query Parameters - **dataset_name** (string) - Required - The name of the dataset. - **version** (string) - Required - The specific version of the dataset. ### Response #### Success Response (200) - **mappings** (object) - An object containing the field mappings for the specified dataset version. #### Response Example ```json { "dataset_name": { "mappings": { "v1": { "properties": { "field_name": { "type": "string", "store": true } } } } } } ``` ``` -------------------------------- ### Mapping Dataset API Source: https://data.egov.kz/pages/samples/index This endpoint retrieves the field descriptions, including types and structure, for the records used in a dataset. ```APIDOC ## GET /api/v4/mapping/dataset ### Description Retrieves the descriptions of fields, their types, and structure for the records within a dataset. ### Method GET ### Endpoint /api/v4/mapping/dataset ### Query Parameters - **dataset_name** (string) - Required - The name of the dataset to retrieve mappings for. ### Response #### Success Response (200) - **mappings** (object) - An object containing the field mappings for the dataset. #### Response Example ```json { "dataset_name": { "mappings": { "v1": { "properties": { "field_name": { "type": "string", "store": true } } } } } } ``` ``` -------------------------------- ### Dataset Version Search API Source: https://data.egov.kz/pages/samples/index Similar to the dataset search API, this endpoint allows searching within a specific version of the dataset. The 'source' parameter is used for query and filtration. ```APIDOC ## GET /api/v4/dataset/version ### Description Performs a search on a specific version of the dataset using the provided 'source' parameter for query and filtration. ### Method GET ### Endpoint /api/v4/dataset/version ### Query Parameters - **source** (json object) - Required - Describes how the search and filtration should be executed. ### Request Example ```json { "source": "{\"version\": \"v1\", \"query\": \"example\"}" } ``` ### Response #### Success Response (200) - **data** (array) - Contains the search results or a message about an error. #### Response Example ```json [ { "field1": "value1", "field2": "value2" } ] ``` ``` -------------------------------- ### Search Criminal Offenses Source: https://data.egov.kz/pages/samples/index This endpoint allows searching for criminal offenses in Astana city based on severity and street name. It filters results where 'hard_code' matches '2' and 'street' matches 'Иманова'. ```APIDOC ## POST /api/v4/astana_kalasynyn_kylmystyk_kuk1/v1 ### Description Searches for criminal offenses committed in Astana city, filtering by a specific severity level ('hard_code') and street name. ### Method POST ### Endpoint /api/v4/astana_kalasynyn_kylmystyk_kuk1/v1 ### Parameters #### Query Parameters - **source** (object) - Required - A JSON object containing the search query. ### Request Body ```json { "size": 100, "query": { "bool": { "must": [ { "match": { "hard_code": "2" } }, { "match": { "street": "Иманова" } } ] } } } ``` ### Response #### Success Response (200) - **Array of Objects**: Each object represents a criminal offense with details like date, street, status, time period, organ, crime code, hard code, month, coordinates, year, city code, unique identifier (ud), latitude, longitude, object ID, home number, and registration code. #### Response Example ```json [ { "dat_sover": "18.02.2016", "street": "ИМАНОВА", "stat": "ст.188 ч.1", "time_period": "1", "organ": "Алматинский РУВД", "crime_code": "1880", "hard_code": "2", "month": "2", "longitude": "71.444085013999995", "year": "2016", "city_code": "г. Астана", "ud": "167111030008206", "latitude": "51.164931746000001", "objectid": "1942307", "home_number": "21", "reg_code": "Район Алматы" } ] ``` ``` -------------------------------- ### Search Healthcare Organizations by Geolocation Source: https://data.egov.kz/pages/samples/index This endpoint retrieves healthcare organizations within a specified radius of given coordinates, optionally filtering by region and sorting by distance. The 'geoposition' field is used for location-based filtering. ```APIDOC ## GET /api/v4/medorg/v1 ### Description Retrieves healthcare organizations based on location criteria, including proximity to coordinates and region. ### Method GET ### Endpoint /api/v4/medorg/v1 ### Parameters #### Query Parameters - **source** (object) - Required - A JSON object containing the search query and optional sorting. ### Request Body #### Example 1: Healthcare organizations in Akmola region within 10km of (51.608524, 68.171934) ```json { "size": 100, "query": { "filtered": { "query": { "bool": { "must": [ { "match": { "address": "Акмолинская" } } ] } }, "filter": { "geo_distance": { "distance": "10km", "geoposition": { "lat": 51.608524, "lon": 68.171934 } } } } } } ``` #### Example 2: Healthcare organizations in South Kazakhstan within 5km of (42.359461, 69.622625), sorted by ascending distance ```json { "size": 100, "query": { "filtered": { "query": { "bool": { "must": [ { "match": { "region": "Южно-Казахстанскаяобласть" } } ] } }, "filter": { "geo_distance": { "distance": "1200m", "geoposition": { "lat": 42.359461, "lon": 69.622625 } } } } }, "sort": [ { "_geo_distance": { "geoposition": { "lat": 42.359461, "lon": 69.622625 }, "order": "asc", "unit": "m" } } ] } ``` ### Response #### Success Response (200) - **Array of Objects**: Each object represents a healthcare organization with details like region, ID, address, geoposition, and name. #### Response Example ```json [ { "region": "Акмолнская область", "id": 148, "address": "Акмолинская область, Атбасарский район, село Самарка", "geoposition": "51.602993, 68.032539", "name": "Самарский МП" } ] ``` ``` -------------------------------- ### Search Healthcare Organizations by Geo-distance and Sort in South Kazakhstan Source: https://data.egov.kz/pages/samples/index Retrieves healthcare organizations in the South Kazakhstan region within a 1200m radius of coordinates (42.359461, 69.622625). Results are sorted in ascending order of remoteness from the specified coordinates. This demonstrates combined filtering and sorting based on geospatial data. ```json /api/v4/medorg/v1?source={ "size":100, "query": { "filtered": { "query":{ "bool":{ "must":[ {"match":{ "region": "Южно-Казахстанскаяобласть" }} ] } }, "filter": { "geo_distance": { "distance": "1200m", "geoposition": { "lat": 42.359461, "lon": 69.622625 } } } } }, "sort": [{ "_geo_distance": { "geoposition": { "lat": 42.359461, "lon": 69.622625 }, "order": "asc", "unit": "m" } }] } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.