Метод выполняет поиск файлов для паспорта открытых данных возвращает их в структурированном формате, сгруппированными по типам.
URL: /wp-json/rest/v1/opendate/files/
Метод: GET
Параметры запроса
| Параметр |
Обязательный |
Тип |
Описание |
| nums |
да |
String |
Значение номера паспорта |
| type |
нет |
String |
Тип файлов. Значение csv, xls, pdf |
Примеры запроса
GET /wp-json/rest/v1/opendate/files/?nums=7708523530-uslovija
Актуальной версией является первый элемент массива.
Успешный ответ:
{
«status»: «success»,
«total_count»: 5,
«search_param»: «7708523530-uslovija»,
«opendata_post_id»: 123,
«target_post_id»: 789,
«sections_count»: 2,
«sections»: {
«xls_files»: {
«section_name»: «XLS Files»,
«section_type»: «xls»,
«count»: 2,
«files»: [
{
«file_id»: 456,
«file_url»: «https://example.com/file.xlsx»,
«file_name»: «data.xlsx»,
«file_extension»: «xlsx»,
«target_post_id»: 789,
«target_post_uri»: «https://example.com/page/»,
«fnew_index»: 0
}
]
},
«pdf_files»: {
«section_name»: «PDF Files»,
«section_type»: «pdf»,
«count»: 3,
«files»: […]
}
}
}
GET /wp-json/rest/v1/opendate/files/?nums=7708523530-uslovija&type=csv
Актуальной версией является первый элемент массива.
Успешный ответ:
{
«status»: «success»,
«total_count»: 10,
«search_param»: «7708523530-ereception»,
«filter_type»: «csv»,
«opendata_post_id»: 3662,
«target_post_id»: 3650,
«sections_count»: 1,
«sections»: {
«csv_files»: {
«section_name»: «CSV Files»,
«section_type»: «csv»,
«count»: 10,
«files»: [
{
«file_id»: 3660,
«file_url»: «https://opendata.fsvps.gov.ru/wp-content/uploads/sites/57/2025/12/data-20251008-structure-20230315T0006.csv»,
«file_name»: «data-20251008-structure-20230315T0006»,
«file_extension»: «csv»,
«target_post_id»: 3650,
«target_post_uri»: «https://opendata.fsvps.gov.ru/files/svedenija-ob-obrashhenijah-grazhdan/»,
«fnew_index»: 1
},
{
«file_id»: 3661,
«file_url»: «https://opendata.fsvps.gov.ru/wp-content/uploads/sites/57/2025/12/data-20250709-structure-20230315T0006.csv»,
«file_name»: «data-20250709-structure-20230315T0006»,
«file_extension»: «csv»,
«target_post_id»: 3650,
«target_post_uri»: «https://opendata.fsvps.gov.ru/files/svedenija-ob-obrashhenijah-grazhdan/»,
«fnew_index»: 1
},
{
«file_id»: 3663,
«file_url»: «https://opendata.fsvps.gov.ru/wp-content/uploads/sites/57/2025/12/data-20250709-structure-20230315T0906.csv»,
«file_name»: «data-20250709-structure-20230315T0906»,
«file_extension»: «csv»,
«target_post_id»: 3650,
«target_post_uri»: «https://opendata.fsvps.gov.ru/files/svedenija-ob-obrashhenijah-grazhdan/»,
«fnew_index»: 1
},
{
«file_id»: 3664,
«file_url»: «https://opendata.fsvps.gov.ru/wp-content/uploads/sites/57/2025/12/data-20250409-structure-20230315T0906.csv»,
«file_name»: «data-20250409-structure-20230315T0906»,
«file_extension»: «csv»,
«target_post_id»: 3650,
«target_post_uri»: «https://opendata.fsvps.gov.ru/files/svedenija-ob-obrashhenijah-grazhdan/»,
«fnew_index»: 1
},
{
«file_id»: 3665,
«file_url»: «https://opendata.fsvps.gov.ru/wp-content/uploads/sites/57/2025/12/data-20250117-structure-20230315T0906.csv»,
«file_name»: «data-20250117-structure-20230315T0906»,
«file_extension»: «csv»,
«target_post_id»: 3650,
«target_post_uri»: «https://opendata.fsvps.gov.ru/files/svedenija-ob-obrashhenijah-grazhdan/»,
«fnew_index»: 1
},
{
«file_id»: 3666,
«file_url»: «https://opendata.fsvps.gov.ru/wp-content/uploads/sites/57/2025/12/data-20241002-structure-20230315T0906.csv»,
«file_name»: «data-20241002-structure-20230315T0906»,
«file_extension»: «csv»,
«target_post_id»: 3650,
«target_post_uri»: «https://opendata.fsvps.gov.ru/files/svedenija-ob-obrashhenijah-grazhdan/»,
«fnew_index»: 1
},
{
«file_id»: 3667,
«file_url»: «https://opendata.fsvps.gov.ru/wp-content/uploads/sites/57/2025/12/data-20240704-structure-20230315T0906.csv»,
«file_name»: «data-20240704-structure-20230315T0906»,
«file_extension»: «csv»,
«target_post_id»: 3650,
«target_post_uri»: «https://opendata.fsvps.gov.ru/files/svedenija-ob-obrashhenijah-grazhdan/»,
«fnew_index»: 1
},
{
«file_id»: 3668,
«file_url»: «https://opendata.fsvps.gov.ru/wp-content/uploads/sites/57/2025/12/1-кв.-2024-г.-ОГ.csv»,
«file_name»: «1-кв.-2024-г.-ОГ»,
«file_extension»: «csv»,
«target_post_id»: 3650,
«target_post_uri»: «https://opendata.fsvps.gov.ru/files/svedenija-ob-obrashhenijah-grazhdan/»,
«fnew_index»: 1
},
{
«file_id»: 3669,
«file_url»: «https://opendata.fsvps.gov.ru/wp-content/uploads/sites/57/2025/12/4-кв.-2023г.-ОГ.csv»,
«file_name»: «4-кв.-2023г.-ОГ»,
«file_extension»: «csv»,
«target_post_id»: 3650,
«target_post_uri»: «https://opendata.fsvps.gov.ru/files/svedenija-ob-obrashhenijah-grazhdan/»,
«fnew_index»: 1
},
{
«file_id»: 3670,
«file_url»: «https://opendata.fsvps.gov.ru/wp-content/uploads/sites/57/2025/12/3-кв.-2023г.-ОГ.csv»,
«file_name»: «3-кв.-2023г.-ОГ»,
«file_extension»: «csv»,
«target_post_id»: 3650,
«target_post_uri»: «https://opendata.fsvps.gov.ru/files/svedenija-ob-obrashhenijah-grazhdan/»,
«fnew_index»: 1
}
]
}
}
}
Ошибки
Параметр не указан:
{
«status»: «error»,
«mess»: «Parameter \»nums\» is required»
}
Паспорт не найден:
{
«status»: «error»,
«mess»: «No posts found with ps1 = 7708523530-uslovija»,
«search_param»: «7708523530-uslovija»,
«total_count»: 0,
«sections_count»: 0,
«sections»: []
}
Файлы не найдены
{
«status»: «error»,
«mess»: «No files found for post with nums = 7708523530-uslovija»,
«search_param»: «7708523530-uslovija»,
«opendata_post_id»: 123,
«target_post_id»: 789,
«total_count»: 0,
«sections_count»: 0,
«sections»: []
}