compute
GET /v1/compute/regions/resolve
Answer "can I have a machine in this place?" without placing anything.
Նույնականացում
Ուղարկեք API բանալին որպես bearer token: Բանալին պետք է ունենա sites.view թույլտվությունը. առանց դրա բանալին մերժվում է 403, և ոչ թե 404 կարգավիճակով:
Որտեղ տեղադրվում է ձեր կազմակերպության ID-ն
Այs վերջնակետը ընդունում է org_id-ը որպես հարցման պարամետր: Բաց թողեք այն, և կանչը կընդգրկի ձեր ամբողջ վարձակալության ենթածառը. ուղարկեք այն՝ կանչը մեկ կազմակերպության վրա սահմանափակելու համար:
Ձեր կազմակերպության ID-ն գտնվում է Ձեր ղեկավարման վահանակի API բանալիների էկրանին՝ բուն բանալու կողքին: Այն նույն ID-ն է Ձեր կատարած յուրաքանչյուր հարցման մեջ:
Փորձել
Փոխարինեք անկյունային փակագծերում գտնվող ցանկացած բան ձեր սեփական արժեքներով, և բանալու տեղապահը՝ ձեր վահանակի բանալիով:
curl -X GET https://api.zinndigital.com/v1/compute/regions/resolve?location=<location> \
-H "Authorization: Bearer zdk_live_…"Մուտք գործե՞լ եք: Ձեր վահանակի API վահանակը լրացնում է ձեր իրական կազմակերպության ID-ն և ձեր սեփական բանալին և գործարկում է հարցումը ուղիղ API-ի դեմ, որպեսզի կարողանաք տեսնել փաստացի պատասխանը: Բացեք այս վերջնակետը API վահանակում
Մանրամասներ
Free text — a city or a country — resolved against the regions available now. ⛔ A place we do not serve is never silently replaced by one we do. status is one of exact (build there — match is set), nearest (we know the place and do not serve it: alternatives are the closest regions, with great-circle distance and an estimated round trip), country (a country was named: alternatives are our regions in it, with no distance, because a country is not a point) or unrecognised (nothing is guessed). requires_confirmation is true for everything but exact, and the customer's own choice goes back through the ordinary order. latency_ms is an estimate from distance, never a measurement. Requires sites.view.
Պարամետրեր
| Անուն | Տեսակ | Պահանջվում է | Ինչ է դա |
|---|---|---|---|
location (query) | string | Այո | Where the machine is wanted — a city or a country, in any spelling. |
org_id (query) | Uuid | Ոչ | The organisation to resolve for. Required only when the caller belongs to more than one; omitted, it is their own. |
Պատասխան
| Անուն | Տեսակ | Պահանջվում է | Ինչ է դա |
|---|---|---|---|
data | ComputeRegionResolution | Այո | — |
Այս վերջնակետի կողմից վերադարձվող սխալները
401 · 403 · 422 · 429 · 503