hosting
GET /v1/sites/{siteId}/resource-usage
Get the vendor's own counts of what a package is using.
Аутентификација
Пошаљите API кључ као bearer токен. Кључ мора имати дозволу sites.view; кључ без ње се одбија уз 403, а не 404.
Ова крајња тачка не прихвата id организације. Ваш кључ већ идентификује организацију којој припада, а одговор је ограничен на њу.
Испробајте
Замените све што је у угластим заградама сопственим вредностима, а чувар места кључа кључем са своје контролне табле.
curl -X GET https://api.zinndigital.com/v1/sites/{siteId}/resource-usage \
-H "Authorization: Bearer zdk_live_…"Пријављени сте? API конзола на вашој контролној табли попуњава ваш прави id организације и ваш сопствени кључ, и покреће захтев према живом API-ју како бисте могли да видите стварни одговор. Отворите ову крајњу тачку у API конзоли
Детаљи
How many cron jobs, FTP accounts, databases, database users, aliases and SSH keys the package currently holds, counted by the vendor rather than by us. This is the honest denominator behind every "3 of 5" caption on the hosting tab: a count we derived from our own list would disagree with the package the moment anything was created outside this platform. ⛔ A count the vendor sent in a form we could not read is named in unreadable and reported as 0, never silently folded into the number. A caption built on a zero that means "we could not tell" is worse than no caption. Requires sites.view — the same class of fact as the disk and bandwidth figures beside it. 404 for a site with no managed hosting package.
Параметри
| Назив | Тип | Обавезно | Шта је ово |
|---|---|---|---|
siteId (path) | Uuid | Да | Site ID (UUIDv7). |
Одговор
| Назив | Тип | Обавезно | Шта је ово |
|---|---|---|---|
cron_jobs | integer | Да | Scheduled tasks on the package. |
ftp_accounts | integer | Да | FTP accounts on the package, including its primary one. |
mysql_databases | integer | Да | MySQL databases on the package. |
mysql_users | integer | Да | MySQL users on the package. |
server_aliases | integer | Да | Domain aliases pointed at the package. |
ssh_public_keys | integer | Да | SSH public keys installed on the package. |
unreadable | string[] | Да | ⛔ Counts the vendor sent in a form we could not read. They are named here and reported as 0 above, never silently folded into the number — a caption built on a zero that means… |
Грешке које ова крајња тачка може вратити
401 · 403 · 404 · 429 · 503