Перейти до вмісту

Документація

REST API

Усе, що ви робите в панелі, може робити і ваш власний код. Один ключ, одна базова URL-адреса і рівно ті права, які у вас уже є. Тут немає жодного обхідного шляху повз панель.

Базова URL-адреса та автентифікація

Кожен шлях на цій сторінці лежить за наведеною нижче базовою URL-адресою, і кожен запит несе ваш ключ у заголовку Authorization. Іншого входу немає: ні сеансового cookie, ні basic auth, ні ключа в рядку запиту.

shell
curl -s https://app.provibr.com/api/v1/me \
  -H "Authorization: Bearer pvk_..."
CORS немає, і це свідоме рішення, а не недогляд. Ключ bearer у браузерному JavaScript — це вже витеклий ключ: його може прочитати кожен відвідувач. Звертайтеся до цього API з власного бекенду, а не зі сторінки в чужому браузері.
Команди та вивід термінала всюди англійською і в панелі, і на цих сторінках. Один текст, одна правда: те, що ви читаєте тут, ваш хост виведе дослівно так само.

Ключі

Ключ ви створюєте у власному профілі, у розділі Ключі API. Він належить вам і одному обліковому запису: ним не діляться з колегами, і він перестає працювати тієї миті, коли ви залишаєте цей обліковий запис.

Ключ показується один раз, коли ви його створюєте. Ми зберігаємо лише його хеш, тож загублений ключ відновити неможливо: створіть новий і відкличте старий.
  • Ключ діє 90 днів, якщо ви не оберете інакше. Можна взяти коротший строк або не брати жодного; ключ без дати завершення — це ключ, про відкликання якого доведеться памʼятати вам самим.
  • Ротація означає створити новий ключ і відкликати старий, лишивши проміжок, у якому працюють обидва. Ротації на місці немає, бо вона лишає вас без робочого ключа, якщо на півдорозі щось піде не так.
  • Ключ можна привʼязати до переліку адрес. Запит з будь-якої іншої адреси відхиляється ще до того, як щось буде прочитано, і ця відмова нічого не повідомляє про ключ тому, хто звернувся.
  • Один учасник тримає щонайбільше 25 ключів. Відкликаний ключ зберігає свій рядок, тож і потім видно, що йому було дозволено, доки він діяв.
Власники та адміністратори бачать у Налаштуваннях кожен ключ облікового запису й учасника, якому він належить. Ця сторінка і є переглядом доступу: це єдине місце, де одразу видно, хто може дістатися до цього облікового запису поза панеллю.

Що дозволено ключу

Ключ несе права: читання або запис, для кожної частини панелі. Що він може насправді — це перетин прав ключа і прав учасника, якому він належить.

Ключ ніколи не дає більше прав, ніж учасник уже має. Позначити право на запис на ключі того, кому не дозволено створювати сервери, означає не дати цьому ключу нічого; так можна лише звузити те, що ключу дозволено.

Права читаються наживо, під час кожного запиту. Заберіть щось в учасника, і кожен його ключ одразу стає вужчим, без потреби щось відкликати. Саме тому ключ переживає зміну ролі, а не скасовується нею.

Усе, що робить агент, потребує часу

Ваша інфраструктура доступна лише через агента у вашій власній мережі, а той агент підключається назовні. Тож кінцева точка, яка змінює машину, не може відповісти результатом. Вона відповідає, що доручення прийнято, і дає вам те, за чим стежити.

  1. Ви надсилаєте запит і отримуєте відповідь про прийняття, із заголовком Location, що вказує на створену команду. Цей заголовок є абсолютним від хоста: розвʼязуйте його відносно джерела, а не відносно базової адреси вище, інакше ви запитаєте шлях, якого не існує.
  2. Ця сама команда є і в тілі відповіді, але загорнута в поле command. Читання нижче повертає її голою, без цієї обгортки: розгорніть її один раз, і перше читання зазвичай зайве.
  3. Ви читаєте команду, доки її стан не стане остаточним: виконано, не вдалося, термін минув або скасовано. Лише в очікуванні не є остаточним, а стан, якого ви не знаєте, також вважається остаточним, тож додане пізніше значення ніколи не змусить вас читати вічно.
  4. Команда, яка не вдалася, несе код помилки самого агента разом з його аргументами, тими самими, які панель показує на вашому екрані.
shell
# 1. the order - answers 202 with a Location header
curl -s -D - -X POST https://app.provibr.com/api/v1/servers/<serverId>/actions/start \
  -H "Authorization: Bearer pvk_..."

# 2. the outcome - repeat until the status is final
curl -s https://app.provibr.com/api/v1/commands/<commandId> \
  -H "Authorization: Bearer pvk_..."
Читання так ніколи не працює. Перелік ресурсів, адреса чи рахунок відповідають одразу, бо ця відповідь надходить із нашої бази даних, а не з вашого хоста.

Що повертається

Кожна кінцева точка каже, чим вона відповідає: 200 для читання, 201 коли щось створено, 202 коли вашому агенту ще належить попрацювати. І кожна описує тіло, яке повертає, з власною назвою для кожного ресурсу, тож згенерований код має один тип на ресурс, а не один на кінцеву точку.

Читайте поблажливо те, що повертається. У межах цієї версії лише додається, тож може зʼявитися поле, якого ви не знаєте. Відхилення його перетворило б нашу обіцянку додаткових змін на розрив на вашому боці. Те, що ви надсилаєте, оцінюється суворо: назва поля з друкарською помилкою відхиляється, а не ігнорується мовчки.

Посторінковий вивід

Переліки відповідають сторінкою і курсором; ви передаєте той курсор назад, доки він не повернеться порожнім. За замовчуванням сторінка містить 50 рядків, а щонайбільше — 100 рядків.

Ніколи не зупиняйтеся на короткій сторінці. Деякі переліки фільтрують рядок за рядком уже після читання, за вашими правами або за тим, що вміє провайдер, і цілком законно повертають менше рядків, ніж ви просили, хоча далі є ще. Курсор є єдиним сигналом завершення.

Помилки

Кожна відповідь, яка не є успіхом, має однакову форму, незалежно від того, що і де пішло не так.

json
{
  "error": {
    "code": "validation_failed",
    "message": "Name is too long (max 64).",
    "detail": "server.validation.apiKeys.nameTooLong",
    "params": { "max": 64 },
    "requestId": "3f9c1b2a-..."
  }
}
code
Слово, за яким ви розгалужуєтеся. Воно походить із закритого переліку, тож невідоме вам значення означає, що ви говорите з новішою версією, ніж та, під яку ви писали.
message
Одне речення англійською призначене для того, хто читає журнал. Ніколи не розгалужуйтеся за ним: формулювання може змінитися будь-коли.
detail
Стабільний ключ, там, де він є. Це той самий ключ, який панель використовує для власного повідомлення, тож ви можете подати це речення своєю мовою.
params
Аргументи, що належать цьому ключу: перевищена межа, вже зайняте імʼя, хост, який відмовив.
requestId
Ідентифікатор цього запиту, він же в заголовку відповіді. Наводьте його, коли про щось нас запитуєте.
Ніде немає стану, який казав би «існує, але ще не збудовано». Шлях, якого ця версія не пропонує, — це звичайне «не знайдено», бо дорожня карта не є тим, що має видавати повідомлення про помилку.
«Не знайдено» означає одне з двох, і стабільний ключ каже, що саме. Або ця частина API тут вимкнена, або ресурсу немає у вашому обліковому записі. Другий випадок навмисно охоплює як ідентифікатор, якого не існує, так і той, який вам не дозволено бачити, бо їх розрізнення дозволило б будь-кому промацувати наявні рядки.

Скільки можна запитувати

Ви можете робити 120 запитів за хвилину на кожен ключ і 600 запитів на обліковий запис, разом за всіма його ключами. Друга межа існує, щоб двадцять ключів не могли створити вдвадцятеро більше навантаження на той самий хост.

Кожна відповідь повідомляє межу, скільки від неї лишилося і коли вікно скидається. Відмова додає, скільки варто зачекати; дотримуйтеся саме цього числа, а не власноруч обраної затримки.

Як безпечно повторити запит

Усе, що щось створює, приймає заголовок idempotency-key, який ви складаєте самі. Повторіть той самий запит із тим самим значенням, і ви отримаєте назад перший результат, а не другу машину, другий ключ чи другу команду.

Повторне використання того самого значення для іншого запиту відхиляється навмисно. Ключ, який означає дві речі, не означає нічого, а альтернатива, тихо зробити і друге теж, — це і є те, як зʼявляється машина, якої ніхто не замовляв.

Ви можете надіслати і власний x-request-id. Він повертається у відповіді й потрапляє до наших журналів — це найдешевший спосіб покласти ваш рядок поряд із нашим.

Провайдери

У маршрутизації цього API немає жодної назви провайдера. На запитання, які системи ви можете підключити, яких полів вимагають їхні облікові дані і що вони вміють, відповідає кінцева точка виявлення, а тіло, яке ви надсилаєте для створення інтеграції, будується з того самого реєстру. Провайдер, який стає доступним, зʼявляється в обох місцях без жодної зміни кінцевих точок.

Це працює і у зворотний бік. Попросіть чогось у машини, провайдер якої цього не вміє (консоль на обліковому записі хостингу, диск на ігровому сервері), і ви отримаєте відмову, яка називає відсутню можливість, ще до того, як щось піде до вашого агента.

Усі кінцеві точки

Згруповані так, як їх групує специфікація. Кожен шлях іде після базової URL-адреси, а поряд стоїть право, якого вимагає кінцева точка; де не стоїть нічого, достатньо чинного ключа.

Цей перелік є цитатою, тому в усіх мовах він лишається англійською: шляхи, права та короткі описи — це дослівно те, що каже специфікація, і переклад показав би вам інше слово, ніж та відповідь, яку ви отримаєте.
Кілька частин стоять за перемикачем розгортання, і опис охоплює їх незалежно від того, увімкнений він чи ні, тож один згенерований клієнт працює з будь-якою інсталяцією. Який перемикач потрібен кінцевій точці, написано поруч із нею; чи увімкнений він у цій інсталяції, видно з машиночитного опису нижче. Коли він вимкнений, шлях відповідає «не знайдено»; жоден ключ і жодна роль його не вмикає.

Self

The key itself: what it may do, and managing the keys of this member.

  • GET /api-keysapi-keys:manageList the API keys of the member behind this key, including revoked ones.
  • POST /api-keys201api-keys:manageCreate an API key. The secret is returned once and never again.
  • DELETE /api-keys/{keyId}api-keys:manageRevoke an API key belonging to the member behind this key.
  • GET /dashboardThe dashboard tiles as numbers: servers, agents, capacity, credit, incidents, notifications.
  • GET /meDescribe the organization, member and permissions behind this API key or app session.
  • GET /organizationsList every account this member can work in, oldest membership first.
  • POST /organizations/{organizationId}/activateSwitch the active account of this session. Returns the account you are now in.
  • POST /ws-ticketMint a single-use ticket for the realtime WebSocket.

Discovery

What this platform can integrate with. Read this first if you build forms: a provider that goes live shows up here without any change to the endpoints below.

  • GET /integration-typesagents:readList the integration types this platform can manage, with their capabilities.

Servers

Virtual machines, hosting accounts and game servers. Everything that changes a machine is asynchronous: you get 202 with a command to poll.

  • GET /serversservers:readList the servers this key may see, oldest first.
  • POST /servers202servers:writeOrder a server: a VM on a hypervisor, a hosting account on a control panel, or a game server on a game panel. Returns 202 with the command to poll.
  • DELETE /servers/{serverId}202servers:writeDelete a server. Returns 202 with a command when the provider is asked to remove it, or 200 when only the platform record is removed.
  • GET /servers/{serverId}servers:readFetch one server, including its agent, integration, capabilities and actions.
  • POST /servers/{serverId}/actions/{verb}202servers:writeRun a power action on a server (start, stop, shutdown, suspend, resume, restart, kill). Returns 202 with the command to poll.
  • POST /servers/{serverId}/actions/network-install202servers:writeInstall a server over the network with a PXE profile. Returns 202 with the command to poll.
  • POST /servers/{serverId}/actions/refresh-firewall-log202servers:writeAsk the agent for the most recent firewall log lines. Returns 202; the lines are in the command result.
  • POST /servers/{serverId}/actions/refresh-firewall-rules202servers:writeAsk the agent to read the current firewall rules and digest. Returns 202; poll the command, then read GET /firewall-rules.
  • POST /servers/{serverId}/actions/refresh-hardware202servers:writeAsk the agent to read the current disk and NIC layout. Returns 202; poll the command, then read GET /hardware.
  • POST /servers/{serverId}/actions/reinstall202servers:writeReinstall a server from an OS template: same vmid, same IP, everything on disk is lost. Returns 202 with the command to poll.
  • POST /servers/{serverId}/actions/sync-ip-filter202servers:writePush the allocated IP addresses into the VM firewall ipset. Returns 202 with the command to poll.
  • GET /servers/{serverId}/addressesservers:readList the IP addresses currently allocated to this server.
  • POST /servers/{serverId}/addressesservers:writeAllocate an IP address to this server, from a pool or a specific address. Synchronous: returns 200 with the allocation and whether the VM firewall picked it up.
  • DELETE /servers/{serverId}/addresses/{allocationId}servers:writeRelease an IP allocation back to the pool. Synchronous: returns 200 and whether the VM firewall picked it up.
  • GET /servers/{serverId}/commandsservers:readList the commands issued against this server, newest first.
  • POST /servers/{serverId}/disks202servers:writeAttach an extra disk to a server. Returns 202 with the command to poll.
  • DELETE /servers/{serverId}/disks/{disk}202servers:writeDetach a disk, optionally destroying the volume. Returns 202 with the command to poll.
  • PATCH /servers/{serverId}/disks/{disk}202servers:writeGrow a disk. Use "boot" as the disk key to grow the boot disk. Returns 202 with the command to poll.
  • GET /servers/{serverId}/firewall-rulesservers:readReturn the last observed firewall rules and the platform's ipfilter intent.
  • PUT /servers/{serverId}/firewall-rules202servers:writeReplace the customer-owned firewall rules. The digest from the last GET is required and acts as an optimistic lock. Returns 202 with the command to poll.
  • GET /servers/{serverId}/hardwareservers:readReturn the most recent hardware observation (disks, NICs, firewall state).
  • GET /servers/{serverId}/metricsservers:readRead the cpu, memory, disk and network series of one server for a window.
  • POST /servers/{serverId}/nics202servers:writeAttach an extra network interface. Note that this turns the VM ipfilter off while the new NIC has no addresses. Returns 202 with the command to poll.
  • DELETE /servers/{serverId}/nics/{nic}202servers:writeDetach a network interface. net0 is protected. Returns 202 with the command to poll.

Commands

The poll side of every asynchronous endpoint. A 202 hands you a command id and a Location header; this is where you read how it ended.

  • GET /commandsservers:readagents:readList commands across the organization, newest first.
  • GET /commands/{commandId}servers:readagents:readPoll one command: its state, result and error code.

Agents

The agents that run inside your own network and do the actual work.

  • GET /agentsagents:readList the agents of this account, oldest first.
  • POST /agents201agents:writeCreate an agent. The activation code and the installation one-liner are returned once and never again.
  • DELETE /agents/{agentId}agents:writeRemove an agent from the panel. Only possible when it is pending or revoked and has no integrations or servers left.
  • GET /agents/{agentId}agents:readGet one agent, including whether it is connected right now.
  • PATCH /agents/{agentId}agents:writeChange the name and/or the description of an agent.
  • POST /agents/{agentId}/actions/reissue-install-linkagents:writeIssue a new activation code and installation one-liner for this agent. Any outstanding enrollment token is superseded; the secrets are returned once.
  • POST /agents/{agentId}/actions/revokeagents:writeRevoke an agent: it loses its certificate and wipes its identity and credential vault. Repeating this is a no-op.
  • POST /agents/{agentId}/actions/update202agents:writeTell an agent to update itself to the release on this environment. Returns 202 with the command to poll.

Integrations

The connections from an agent to your infrastructure. Credentials are delivered to the agent once and are never readable back.

  • GET /integrationsagents:readList the integrations of this account, oldest first.
  • POST /integrations202agents:writeCreate an integration and deliver its credentials to the agent. Returns 202 with the credential push to poll.
  • DELETE /integrations/{integrationId}agents:writeDelete an integration. Refuses while servers are still attached.
  • GET /integrations/{integrationId}agents:readGet one integration, with what the provider behind it can do.
  • PATCH /integrations/{integrationId}agents:writeUpdate the name, provider settings, placement limits or enabled state. Credentials cannot be changed here.
  • POST /integrations/{integrationId}/actions/import-unmanagedagents:writeImport resources that exist on the remote system but not in Provibr, from an earlier unmanaged listing.
  • POST /integrations/{integrationId}/actions/list-remote202agents:writeAsk the agent to list something on the remote system (templates, plans, eggs, unmanaged resources). Which kinds exist is in the integration's remoteListings. Returns 202 with the command to poll.
  • POST /integrations/{integrationId}/actions/resend-credentials202agents:writeSend a complete new set of credentials to the agent. Returns 202 with the credential push to poll.
  • POST /integrations/{integrationId}/actions/test202agents:writeAsk the agent to test the connection to this system. Returns 202 with the command to poll.
  • GET /integrations/{integrationId}/install-methodagents:readGet the current install method, or — with ?method= — what switching to another one would do. Changes nothing.
  • PUT /integrations/{integrationId}/install-methodagents:writeSet the install method of this integration. Refuses when published, installable operating systems would lose their source.
  • GET /integrations/{integrationId}/os-linksagents:readList the operating systems linked to this integration, with the provider template and/or PXE profile behind each.
  • DELETE /integrations/{integrationId}/os-links/{osId}agents:writeClear one source for this operating system. The other source stays. Clearing a source that was not set is not an error.
  • PUT /integrations/{integrationId}/os-links/{osId}agents:writeSet one source (provider template or PXE profile) for this operating system on this integration. Leaves the other source untouched.

IPAM

Address space: groups, prefixes, allocations, reservations, child blocks and VLAN pools.

  • DELETE /ipam/allocations/{allocationId}ipam:writeRelease an address allocation or reservation. Sets released_at; the row stays as history.
  • GET /ipam/child-policiesipam:read⚑ ipamAutoAllocationList the child-prefix policies of this account, oldest first.
  • POST /ipam/child-policies201ipam:write⚑ ipamAutoAllocationCreate a child-prefix policy. Returns 201 with the policy.
  • DELETE /ipam/child-policies/{policyId}ipam:write⚑ ipamAutoAllocationDelete a child-prefix policy. Refuses while reservations from it are still live.
  • GET /ipam/child-policies/{policyId}ipam:read⚑ ipamAutoAllocationGet one child-prefix policy.
  • PATCH /ipam/child-policies/{policyId}ipam:write⚑ ipamAutoAllocationReplace a child-prefix policy. Send the whole policy, not just the changed fields.
  • POST /ipam/child-policies/{policyId}/actions/reserveipam:write⚑ ipamAutoAllocationLease a child prefix (and a VLAN id when the policy has a pool) according to this policy. Repeat with the same idempotencyKey to get the same reservation back.
  • GET /ipam/child-reservationsipam:read⚑ ipamAutoAllocationList the child-prefix reservations of this account, oldest first. Includes released rows.
  • POST /ipam/child-reservations/{reservationId}/actions/set-stateipam:write⚑ ipamAutoAllocationMove a reservation to another state. Releasing from quarantine takes two steps: release_pending, then released.
  • GET /ipam/groupsipam:readList the IPAM groups of this account, oldest first.
  • POST /ipam/groups201ipam:writeCreate an IPAM group. Returns 201 with the group.
  • DELETE /ipam/groups/{groupId}ipam:writeDelete an IPAM group. Refuses while prefixes, plans or plan placements still point at it.
  • GET /ipam/groups/{groupId}ipam:readGet one IPAM group.
  • PATCH /ipam/groups/{groupId}ipam:writeReplace an IPAM group. Send the whole group, not just the changed fields.
  • GET /ipam/prefixesipam:readList the IPAM prefixes of this account, oldest first. Includes child blocks.
  • POST /ipam/prefixes201ipam:writeCreate an IPAM prefix. Pass parentId to carve a child block out of an existing one. Returns 201.
  • DELETE /ipam/prefixes/{prefixId}ipam:writeDelete an IPAM prefix. Refuses while child blocks, active allocations, plans or plan placements point at it. Also removes the released-allocation history of this block.
  • GET /ipam/prefixes/{prefixId}ipam:readGet one IPAM prefix, with its address usage.
  • PATCH /ipam/prefixes/{prefixId}ipam:writeReplace an IPAM prefix. Send the whole prefix; parentId is ignored (a block cannot move).
  • GET /ipam/prefixes/{prefixId}/allocationsipam:readList the address allocations of one prefix, oldest first. Includes released rows unless status=active.
  • POST /ipam/reservationsipam:writeReserve one or more addresses without a server. Already-taken addresses are skipped and returned by name.
  • GET /ipam/vlan-poolsipam:read⚑ ipamAutoAllocation⚑ networkAutomationList the VLAN pools of this account, oldest first.
  • POST /ipam/vlan-pools201ipam:write⚑ ipamAutoAllocation⚑ networkAutomationCreate a VLAN pool on a network fabric. Returns 201 with the pool.
  • DELETE /ipam/vlan-pools/{poolId}ipam:write⚑ ipamAutoAllocation⚑ networkAutomationDelete a VLAN pool. Refuses while any reservation (including released ones) or policy points at it.
  • GET /ipam/vlan-pools/{poolId}ipam:read⚑ ipamAutoAllocation⚑ networkAutomationGet one VLAN pool.
  • PATCH /ipam/vlan-pools/{poolId}ipam:write⚑ ipamAutoAllocation⚑ networkAutomationReplace a VLAN pool. Send the whole pool. The fabric cannot change while reservations are live.
  • GET /ipam/vlan-reservationsipam:read⚑ ipamAutoAllocation⚑ networkAutomationList the VLAN reservations of this account, oldest first. Includes released rows.
  • POST /ipam/vlan-reservations/{reservationId}/actions/set-stateipam:write⚑ ipamAutoAllocation⚑ networkAutomationMove a reservation to another state. Releasing from quarantine takes two steps: release_pending, then released.

Plans

What your customers can order: VPS plans, hosting plans and game plans.

  • GET /plans/gamecatalog:readList the game plans of this account, oldest first.
  • POST /plans/game201catalog:writeCreate a game plan. Returns 201 with the plan.
  • GET /plans/game/{planId}catalog:readGet one game plan.
  • PATCH /plans/game/{planId}catalog:writeReplace a game plan. Send the whole plan, not just the changed fields.
  • POST /plans/game/{planId}/actions/{verb}catalog:writeActivate or deactivate a game plan. Verbs: activate, deactivate.
  • GET /plans/vpscatalog:readList the VPS plans of this account, oldest first.
  • POST /plans/vps201catalog:writeCreate a VPS plan. Returns 201 with the plan.
  • GET /plans/vps/{planId}catalog:readGet one VPS plan.
  • PATCH /plans/vps/{planId}catalog:writeReplace a VPS plan. Send the whole plan, not just the changed fields.
  • POST /plans/vps/{planId}/actions/{verb}catalog:writeActivate or deactivate a VPS plan. Verbs: activate, deactivate.
  • GET /plans/webcatalog:readList the hosting plans of this account, oldest first.
  • POST /plans/web201catalog:writeCreate a hosting plan. Returns 201 with the plan.
  • GET /plans/web/{planId}catalog:readGet one hosting plan.
  • PATCH /plans/web/{planId}catalog:writeReplace a hosting plan. Send the whole plan, not just the changed fields.
  • POST /plans/web/{planId}/actions/{verb}catalog:writeActivate or deactivate a hosting plan. Verbs: activate, deactivate.

Billing

Read-only: subscription, invoices, payments and credit.

  • GET /billing/creditbilling:readRead the prepaid credit balance of this account, in cents.
  • GET /billing/credit/ledgerbilling:readList the credit ledger entries of this account, newest first.
  • GET /billing/invoicesbilling:readList the billing documents of this account, newest first.
  • GET /billing/invoices/{invoiceId}billing:readRead one billing document, including its line items.
  • GET /billing/paymentsbilling:readList the payments of this account, newest first.
  • GET /billing/subscriptionbilling:readRead the subscription of this account: status, capacity and monthly price.

Events

The audit log of this account. Page until nextCursor is null - a short page does not mean the end.

  • GET /eventsactivity:readList audit events of this account, newest first. Page until nextCursor is null; a short page does not mean the end.

Notifications

The inbox of the signed-in member, grouped per subject, plus which categories reach that member over which channel. App sessions only: a notification is addressed to a person, and an API key is a machine secret - use Events for machine access to what happened.

  • GET /notification-preferencesThe notification matrix of the signed-in member: per category, per channel, on or off.
  • PUT /notification-preferencesSet part or all of the notification matrix in one call. Returns the matrix as it now stands.
  • GET /notificationsList the notifications of the signed-in member, grouped per subject, newest first. Page until nextCursor is null.
  • POST /notifications/{notificationId}/readMark one notification as read. Returns the new unread badge count.
  • POST /notifications/read-allMark every unread notification of this member as read. Returns the new unread badge count.
  • GET /notifications/unread-countThe unread badge count of this member: unread subjects, not rows.

Tickets

Support conversations with the Provibr desk. App sessions only: every message has an author, and an API key is a machine secret with no person behind it - use Events for machine access to what happened.

  • GET /ticketsList the support conversations of this account, most recent activity first. Page until nextCursor is null.
  • POST /tickets201Open a support conversation. Returns the ticket including its first message.
  • GET /tickets/{ticketId}One support conversation: the header and the whole thread, oldest message first.
  • POST /tickets/{ticketId}/closeClose a support conversation. Returns the conversation as it now stands.
  • POST /tickets/{ticketId}/messagesReply to a support conversation. Returns the conversation as it now stands.

Webhooks

Endpoints that receive lifecycle events, and the delivery history of each of them.

  • GET /webhook-deliveries/{deliveryId}webhooks:read⚑ lifecycleBindingsRead one webhook delivery, including every attempt that was made.
  • POST /webhook-deliveries/{deliveryId}/actions/cancelwebhooks:write⚑ lifecycleBindingsCancel a delivery. Returns the state reached: cancelled (nothing was sent) or cancel_requested (a request is in flight and its remote effect is unknown).
  • POST /webhook-deliveries/{deliveryId}/actions/resend202webhooks:write⚑ lifecycleBindingsSend an existing delivery again under a NEW delivery ID. The receiver will process the event a second time; this is not a retry.
  • POST /webhook-deliveries/{deliveryId}/actions/retry202webhooks:write⚑ lifecycleBindingsRetry a failed delivery under the same delivery ID. The body and its signature stay byte-identical.
  • GET /webhookswebhooks:read⚑ lifecycleBindingsList the webhook endpoints of this account, oldest first.
  • POST /webhooks201webhooks:write⚑ lifecycleBindingsCreate a webhook endpoint. Returns 201 with the endpoint and the signing secret — shown once and never again.
  • DELETE /webhooks/{webhookId}webhooks:write⚑ lifecycleBindingsDelete a webhook endpoint. Its lifecycle bindings AND its entire delivery history are deleted with it.
  • GET /webhooks/{webhookId}webhooks:read⚑ lifecycleBindingsRead one webhook endpoint, including its full revision history.
  • PATCH /webhooks/{webhookId}webhooks:write⚑ lifecycleBindingsPublish a new revision of a webhook endpoint. Omitted fields are carried over from the current revision.
  • POST /webhooks/{webhookId}/actions/rotate-secretwebhooks:write⚑ lifecycleBindingsRotate the HMAC signing secret. Publishes a new revision and returns the secret once; earlier deliveries stay verifiable with their own key ID.
  • POST /webhooks/{webhookId}/actions/test202webhooks:write⚑ lifecycleBindingsQueue a synthetic test delivery. Returns 202 with a deliveryId; nothing has been sent yet.
  • GET /webhooks/{webhookId}/deliverieswebhooks:read⚑ lifecycleBindingsList the deliveries of one webhook endpoint, newest first.

Devices

The phones and tablets the Provibr app runs on. App sessions only, and a push token is never returned - registering a device is the opt-in for push, forgetting one is the way back.

  • GET /devicesList the devices of the signed-in member, active ones first, including disabled ones.
  • POST /devicesRegister this device for push, or refresh the registration it already has.
  • DELETE /devices/{deviceId}Stop sending push to one of your devices. Returns the device as it now stands.

Машиночитний опис

Та сама інформація у вигляді документа OpenAPI 3.1, згенерованого з коду, який обслуговує ці кінцеві точки, а не написаного поряд із ним. Передайте його генератору клієнтів, редактору або набору тестів.

shell
curl -s https://app.provibr.com/api/v1/openapi.json
Документ публічний і не потребує ключа: він описує те, що існує, а не те, що міститься у вашому обліковому записі.

У межах цієї версії зміни — це доповнення: нові кінцеві точки, нові необовʼязкові поля, нові значення в переліку. Читайте поблажливо поля, яких ви не знаєте, і не вважайте фатальним код помилки, якого ви не знаєте.