roruenЛогин
Ad
ITA
FusionWorks
Последний
Комментарий

[url=https://www.aspessolarproducts.com/article/prices-solar-geyser-cost.html/]high pressure solar g...

Министерство Образования(+373 22) 23-46-09Официальный сайт

API

Зарегистрируйтесь, чтобы получить последние обновления API.
Name
Email

API Overview

Наша команда предоставляет бесплатные REST-услуги для того, чтобы вы смогли получить последние данные по школам. Авторизация не требуется. Более того, вы можете зарегистрироваться для получения последних обновлений API.

API Services

Общие (базовые) URL для API: http://afla.md/ws/

Institutions' list

URL: /institutionslist/[parameters]

Парраметры (опциональные)

  • search - ключевое слово для поиска по названиям школ
  • locality - id локации, для поиска школ, в данной лоации
  • region - id региона, для поиска школ, в данном регионе
  • page_number - количество школ отображаемых на странице(см. ниже)
  • page - начальная страница, для отображения. Пример : page=1&page_number=10 вернёт записи от 0 до 10, page=1&page_number=10 вернёт записи 10...20
  • sort_by - поле, по которому делать сортировку (имена полей можно найти в наборе результатов, возвращаемых веб-сервисом)
  • sort_method - ASC для сортировки, в порядке возрастания и DESC - в порядке убывания

Результаты:

JSON-массив с двумя елементами:
  • institutions - массив со всеми найдеными школами
  • num_rows - общее количество записей по данному запросу

Каждая запись в массиве школы, содержит:
  • id - уникальный номер
  • name_ro - название на Румынском языке
  • name_ru - название на Русском языке
  • name_en - название на Английском языке
  • keywords
  • institution_type_id
  • institution_type_name_ro
  • locality_id
  • locality_name_ro
  • description_ro - описание школы на Румынском языке
  • description_ru - описание школы на Русском языке
  • description_en - описание школы на Английском языке
  • location
  • language_id
  • language_name
  • latitude
  • longitude
  • height

Примеры:

Содержит 2 записи, которые содержат слово "cantemir", начиная с 2 страницы (к примеру, запись #2 и #3)
Запрос: afla.md/ws/institutionslist/?search=cantemir&page=2&page_number=2
Ответ:
{"institutions":[{"id":"1834","name_ro":"L.T. D. Cantemir","name_ru":"","name_en":"L.T. D. Cantemir","keywords":"L.T. D. Cantemir","institution_type_id":"2","institution_type_name_ro":"Liceu","locality_id":"1157","locality_name_ro":"MUN.BALTI","description_ro":"","description_ru":"","description_en":"","location":"POINT(47.76033 27.919006)","language_id":"4","language_name":"unknown","":"0","latitude":"47.76033","longitude":"27.919006","height":150},{"id":"1972","name_ro":"Liceul Teoretic \"Antioh Cantemir\"","name_ru":"","name_en":"Liceul Teoretic \"Antioh Cantemir\"","keywords":"Moldova A.Cantemir Lyceum ","institution_type_id":"2","institution_type_name_ro":"Liceu","locality_id":"1161","locality_name_ro":"sec.Buiucani","description_ro":"","description_ru":"","description_en":"","location":"","language_id":"4","language_name":"unknown","":"0","latitude":null,"longitude":"","height":150}],"num_rows":"1529"}

Institution details

URL: /institutiondetails/id/[action]/[category]

Парраметры:

  • id - id школы
  • action - какого рода детали получать. Доступные опции:
    • general - общие детали школы, как в /institutionslist/
    • photos - массив фотографий (ссылки)
    • amenities - возвращает ассоциативный массив со школыми удобствами, удобства сгруппированы по категориям.

      Список категорий удобств:

      • GENERAL
      • FIGURES
      • INFRASTRUCTURE
      • COMMUNICATIONS
      • LANG_OF_STUDY
      • STUDENT_NATION
      • FINANCE_111
      • FINANCE_112
      • FINANCE_113
      • FINANCE_114
      • FINANCE_116
      • FINANCE_131
      • FINANCE_132
      • FINANCE_134
      • FINANCE_135
      • FINANCE_241
      • FINANCE_242
      • FINANCE_243
      • FINANCE_271
      • FINANCE_291
    • opinions - список мнений
    Если action не указан, то служба будет возвращать массив со всеми этими данными

  • category - указывает по какой категории(номер) вернуть. Зависит от action:
action вид категории
general не влияет
photos id фото
amenity название группы удобств
opinions id номер мнения

Возвращает:

JSON-массив, соответствующие action/category при условии:

Примеры:

Главная информация по школе
Запрос: http://afla.md/ws/institutiondetails/1834/general
Ответ:
{","","id",":1834","name_ro":"L.T. D. Cantemir","name_ru":"","name_en":"L.T. D. Cantemir","keywords":"L.T. D. Cantemir","institution_type_id":"2","institution_type_name_ro":"Liceu","locality_id":"1157","locality_name_ro":"MUN.BALTI","locality_name_ru":"","locality_name_en":"Mayoralty of the municipality of Balti","address":"","phones":"","url":"","region_id":"41","region_name_ro":"mun. B\u0103l\u0163i","region_name_ru":"","region_name_en":"Council of the municipality of Balti","description_ro":"","description_ru":"","description_en":"","location":"POINT(47.76033 27.919006)","language_id":"4","language_name":"unknown","":"0","latitude":"47.76033","longitude":"27.919006","height":150,"students_count":"632"}
Выбор главной группы удобств
Запрос: http://afla.md/ws/institutiondetails/1834/amenities/GENERAL
Ответ:
[{"id":"76414","amenity_id":"3","amenity_name_ro":"Num\u0103rul de etaje ale blocului de studii","amenity_name_ru":"","amenity_name_en":"FLOOR_COUNT","class":"GENERAL","code":"FLOOR_COUNT","unit":"","value":"0","year":"2010"},{"id":"76424","amenity_id":"2","amenity_name_ro":"Anul construc\u0163iei","amenity_name_ru":"","amenity_name_en":"CONSTRUCTION_YEAR","class":"GENERAL","code":"CONSTRUCTION_YEAR","unit":"","value":"1962","year":"2010"},{"id":"110356","amenity_id":"54","amenity_name_ro":"Numar de elevi","amenity_name_ru":"","amenity_name_en":"STUDENTS_COUNT","class":"GENERAL","code":"STUDENTS_COUNT","unit":"","value":"632","year":"2010"}]

Region's list

URL: /regionslist/

Возвращает:

JSON-массив с двумя елементами:
  • regions - массив со всеми найдеными регионами
  • num_rows - общее количество записей
Каждая запись содержит:
  • id - уникальный номер региона
  • name_ro - название региона на Румынском языке
  • name_ru - название региона на Русском языке
  • name_en - название региона на Английском языке
  • keywords - ключевые слова

Примеры:


Запрос: afla.md/ws/regionslist/
Ответ:
{"regions":[{"id":"41","name_ro":"mun. B\u0103l\u0163i","name_ru":"","name_en":"Council of the municipality of Balti","keywords":"Council of the municipality of Balti","":"0"},{"id":"42","name_ro":"mun. Chi\u015fin\u0103u","name_ru":"","name_en":" Council of the municipality of Chisinau","keywords":" Council of the municipality of Chisinau","":"0"},{"id":"43","name_ro":"r-l Anenii Noi","name_ru":"","name_en":"District Council Anenii Noi","keywords":"District Council Anenii Noi","":"0"},{"id":"44","name_ro":"r-l Basarabeasca","name_ru":"","name_en":"District Council Basarabeasca","keywords":"District Council Basarabeasca","":"0"},{"id":"45","name_ro":"r-l Briceni","name_ru":"","name_en":"District Council Briceni","keywords":"District Council Briceni","":"0"},{"id":"46","name_ro":"r-l Cahul","name_ru":"","name_en":" District Council Cahul","keywords":" District Council Cahul","":"0"},{"id":"47","name_ro":"r-l C\u0103l\u0103ra\u015fi","name_ru":"","name_en":"District Council Calarasi","keywords":"District Council Calarasi","":"0"},{"id":"48","name_ro":"r-l Cantemir","name_ru":"","name_en":"District Council Cantemir","keywords":"District Council Cantemir","":"0"},{"id":"49","name_ro":"r-l C\u0103u\u015feni","name_ru":"","name_en":"District Council Causeni","keywords":"District Council Causeni","":"0"},{"id":"50","name_ro":"r-l Cimi\u015flia","name_ru":"","name_en":"District Council Cimislia","keywords":"District Council Cimislia","":"0"},{"id":"51","name_ro":"r-l Criuleni","name_ru":"","name_en":"District Council Criuleni","keywords":"District Council Criuleni","":"0"},{"id":"52","name_ro":"r-l Dondu\u015feni","name_ru":"","name_en":"District Council Donduseni","keywords":"District Council Donduseni","":"0"},{"id":"53","name_ro":"r-l Drochia","name_ru":"","name_en":"District Council Drochia","keywords":"District Council Drochia","":"0"},{"id":"54","name_ro":"r-l Dub\u0103sari","name_ru":"","name_en":"District Council Dubasari","keywords":"District Council Dubasari","":"0"},{"id":"55","name_ro":"r-l Edine\u0163","name_ru":"","name_en":"District Council Edinet","keywords":"District Council Edinet","":"0"},{"id":"56","name_ro":"r-l F\u0103le\u015fti","name_ru":"","name_en":" District Council Falesti","keywords":" District Council Falesti","":"0"},{"id":"57","name_ro":"r-l Flore\u015fti","name_ru":"","name_en":"r-l Flore\u015fti","keywords":"r-l Flore\u015fti","":"0"},{"id":"58","name_ro":"r-l Glodeni","name_ru":"","name_en":"District Council Glodeni","keywords":"District Council Glodeni","":"0"},{"id":"59","name_ro":"r-l H\u0103nce\u015fti","name_ru":"","name_en":"District Council Hincesti","keywords":"District Council Hincesti","":"0"},{"id":"60","name_ro":"r-l Ialoveni","name_ru":"","name_en":"District Council Ialoveni","keywords":"District Council Ialoveni","":"0"},{"id":"61","name_ro":"r-l Leova","name_ru":"","name_en":" District Council Leova","keywords":" District Council Leova","":"0"},{"id":"62","name_ro":"r-l Nisporeni","name_ru":"","name_en":"District Council Nisporeni","keywords":"District Council Nisporeni","":"0"},{"id":"63","name_ro":"r-l Ocni\u0163a","name_ru":"","name_en":"District Council Ocnita","keywords":"District Council Ocnita","":"0"},{"id":"64","name_ro":"r-l Orhei","name_ru":"","name_en":"District Council Orhei","keywords":"District Council Orhei","":"0"},{"id":"65","name_ro":"r-l Rezina","name_ru":"","name_en":"District Council Rezina","keywords":"District Council Rezina","":"0"},{"id":"66","name_ro":"r-l R\u00ee\u015fcani","name_ru":"","name_en":"District Council Riscani","keywords":"District Council Riscani","":"0"},{"id":"67","name_ro":"r-l S\u00eengerei","name_ru":"","name_en":"District Council Singerei","keywords":"District Council Singerei","":"0"},{"id":"68","name_ro":"r-l \u015eold\u0103ne\u015fti","name_ru":"","name_en":"District Council Soldanesti","keywords":"District Council Soldanesti","":"0"},{"id":"69","name_ro":"r-l Soroca","name_ru":"","name_en":"District Council Soroca","keywords":"District Council Soroca","":"0"},{"id":"70","name_ro":"r-l \u015etefan Vod\u0103","name_ru":"","name_en":"District Council Stefan-Voda","keywords":"District Council Stefan-Voda","":"0"},{"id":"71","name_ro":"r-l Str\u0103\u015feni","name_ru":"","name_en":"District Council Straseni","keywords":"District Council Straseni","":"0"},{"id":"72","name_ro":"r-l Taraclia","name_ru":"","name_en":"District Council Taraclia","keywords":"District Council Taraclia","":"0"},{"id":"73","name_ro":"r-l Telene\u015fti","name_ru":"","name_en":"District Council Telenesti","keywords":"District Council Telenesti","":"0"},{"id":"74","name_ro":"r-l Ungheni","name_ru":"","name_en":"District Council Ungheni","keywords":"District Council Ungheni","":"0"},{"id":"75","name_ro":"UTA G\u0103g\u0103uzia","name_ru":"","name_en":"District Council ATU Gagauzia","keywords":"District Council ATU Gagauzia","":"0"}],"num_rows":"35"}

Localities list

URL: /localitieslist/

Парраметры:

  • id - id региона
Если никаких действий не указано, то служба вернёт массив со всеми данными

Возвращает:

JSON-массив, соответствующий ID Каждая запись содержит:
  • id - уникальный номер локации
  • name_ro - название локации на Румынском языке
  • name_ru - название локации на Русском языке
  • name_en - название локации на Английском языке
  • regon_id - уникальный номер региона
  • keywords - ключевые слова

Примеры:

Главная информация по школам
Запрос: http://afla.md/ws/localitieslist?region_id=41
Ответ:
{"region_localities":[{"id":"1157","name_ro":"MUN.BALTI","name_ru":"","name_en":"Mayoralty of the municipality of Balti","region_id":"41","keywords":"Mayoralty of the municipality of Balti","":"0"},{"id":"1158","name_ro":"S.ELIZAVETA","name_ru":"","name_en":"Mayoralty of Elizaveta","region_id":"41","keywords":"Mayoralty of Elizaveta","":"0"},{"id":"1159","name_ro":"S.SADOVOE","name_ru":"","name_en":"Mayoralty of Sadovoe","region_id":"41","keywords":"Mayoralty of Sadovoe","":"0"}],"num_rows":null}
Выбор всех записей по локации
Запрос: http://afla.md/ws/localitieslist
Ответ:
Вся информация по локациям

Scores list

URL: /scores/institutionid/[action]

Парраметры:

  • id - id школы
  • action - какого типа детали вернуть. Доступные опции:
    • all - возвращает все записи по оценкам в школе
    • summary - средние данные по таблице
Если action не указан, то служба вернёт все оценки школы

Информация:

Переменная Значение
sex_id: 1 Женский
sex_id: 2 Мужской
profile_id: 1 Гуманитарный
profile_id: 2 Реальный
profile_id: 3 Художественный
profile_id: 4 Спортивный

Возвращает:

JSON-массив, соответствующий id:

Примеры:

Выборка всех оценок школы
Запрос: http://afla.md/ws/scores/1977/?action=all
Ответ:
{"scores":{"2010":[{"bachelor_result_med_extras":"6.88","bachelor_result_med_bachelor":"5.75","year":"2010","profile_id":"1","sex_id":"1"},{"bachelor_result_med_extras":"8.11","bachelor_result_med_bachelor":"6.25","year":"2010","profile_id":"1","sex_id":"1"},{"bachelor_result_med_extras":"7.74","bachelor_result_med_bachelor":"8.00","year":"2010","profile_id":"1","sex_id":"1"},{"bachelor_result_med_extras":"8.96","bachelor_result_med_bachelor":"8.25","year":"2010","profile_id":"1","sex_id":"1"},{"bachelor_result_med_extras":"6.73","bachelor_result_med_bachelor":"6.25","year":"2010","profile_id":"1","sex_id":"2"},
Вывод среднего балла по школе
Запрос: http://afla.md/ws/scores/1977/?action=summary
Ответ:
{"scoressummary":{"2005":[{"id":"21457","institution_id":"2016","institution_name_ro":"Liceul teoretic \"Hyperion\" Anenii Noi","profile_id":"1","profile_name_ro":"Umanist","sex_id":"1","sex_name_ro":"Feminin","year":"2005","score_summary_result_med_extras":"","score_summary_result_med_bachelor":""},{"id":"21458","institution_id":"2016","institution_name_ro":"Liceul teoretic \"Hyperion\" Anenii Noi","profile_id":"1","profile_name_ro":"Umanist","sex_id":"2","sex_name_ro":"Masculin","year":"2005","score_summary_result_med_extras":"","score_summary_result_med_bachelor":""},{"id":"21459","institution_id":"2016","institution_name_ro":"Liceul teoretic \"Hyperion\" Anenii Noi","profile_id":"2","profile_name_ro":"Real","sex_id":"1","sex_name_ro":"Feminin","year":"2005","score_summary_result_med_extras":"","score_summary_result_med_bachelor":""},{"id":"21460","institution_id":"2016","institution_name_ro":"Liceul teoretic \"Hyperion\" Anenii Noi","profile_id":"2","profile_name_ro":"Real","sex_id":"2","sex_name_ro":"Masculin","year":"2005","score_summary_result_med_extras":"","score_summary_result_med_bachelor":""}]