[{"data":1,"prerenderedAt":765},["ShallowReactive",2],{"docs-\u002Fdocs\u002Fapi":3,"docs-nav":724},{"id":4,"title":5,"body":6,"description":715,"extension":716,"group":717,"meta":718,"navigation":719,"path":720,"seo":721,"stem":722,"__hash__":723},"docs\u002Fdocs\u002F09.api.md","API",{"type":7,"value":8,"toc":704},"minimark",[9,13,35,40,53,89,100,104,194,208,212,267,291,295,298,450,477,513,517,520,557,561,576,631,635,657,661,686,690,700],[10,11,5],"h1",{"id":12},"api",[14,15,16,17,22,23,27,28,34],"p",{},"The panel and the ",[18,19,21],"a",{"href":20},"\u002Fdocs\u002Fcli","CLI"," both run on Nebla's REST API, so anything you can do in the browser you can script. The API lives under ",[24,25,26],"code",{},"\u002Fv1"," on your panel and is described by an ",[18,29,33],{"href":30,"rel":31},"https:\u002F\u002Fgithub.com\u002Fnebla-cloud\u002Fnebla\u002Fblob\u002Fmain\u002Fapi\u002Fopenapi.yaml",[32],"nofollow","OpenAPI 3 spec"," in the repository.",[36,37,39],"h2",{"id":38},"authentication","Authentication",[14,41,42,43,47,48,52],{},"Create a token on a project's ",[44,45,46],"strong",{},"API tokens"," page (see ",[18,49,51],{"href":50},"\u002Fdocs\u002Fprojects#api-tokens","Projects and access",") and send it as a bearer token:",[54,55,60],"pre",{"className":56,"code":57,"language":58,"meta":59,"style":59},"language-sh shiki shiki-themes github-light-high-contrast github-light-high-contrast github-dark-high-contrast","curl -H \"Authorization: Bearer $NEBLA_TOKEN\" https:\u002F\u002Fpanel.example.com\u002Fv1\u002Fservers\n","sh","",[24,61,62],{"__ignoreMap":59},[63,64,67,71,75,79,83,86],"span",{"class":65,"line":66},"line",1,[63,68,70],{"class":69},"szw1H","curl",[63,72,74],{"class":73},"ssYy9"," -H",[63,76,78],{"class":77},"semJd"," \"Authorization: Bearer ",[63,80,82],{"class":81},"s7iLA","$NEBLA_TOKEN",[63,84,85],{"class":77},"\"",[63,87,88],{"class":77}," https:\u002F\u002Fpanel.example.com\u002Fv1\u002Fservers\n",[14,90,91,92,95,96,99],{},"A token belongs to one project, so requests need no project ID. A ",[44,93,94],{},"Read"," token can only make ",[24,97,98],{},"GET"," requests. A token reaches the project's locations, images, server types, SSH keys, servers, volumes, firewalls and actions. Account, project and admin endpoints need a browser session.",[36,101,103],{"id":102},"resources","Resources",[105,106,107,120],"table",{},[108,109,110],"thead",{},[111,112,113,117],"tr",{},[114,115,116],"th",{},"Path",[114,118,119],{},"What it holds",[121,122,123,141,151,164,174,184],"tbody",{},[111,124,125,138],{},[126,127,128,131,132,131,135],"td",{},[24,129,130],{},"\u002Flocations",", ",[24,133,134],{},"\u002Fimages",[24,136,137],{},"\u002Fserver_types",[126,139,140],{},"What the project can create servers from",[111,142,143,148],{},[126,144,145],{},[24,146,147],{},"\u002Fssh_keys",[126,149,150],{},"The project's SSH keys",[111,152,153,158],{},[126,154,155],{},[24,156,157],{},"\u002Fservers",[126,159,160,161],{},"Servers, with power, rebuild, change type, console and metrics under ",[24,162,163],{},"\u002Fservers\u002F{id}\u002F…",[111,165,166,171],{},[126,167,168],{},[24,169,170],{},"\u002Fvolumes",[126,172,173],{},"Volumes, with attach, detach and resize actions",[111,175,176,181],{},[126,177,178],{},[24,179,180],{},"\u002Ffirewalls",[126,182,183],{},"Firewalls, with set rules, apply and remove actions",[111,185,186,191],{},[126,187,188],{},[24,189,190],{},"\u002Factions",[126,192,193],{},"Every action in the project",[14,195,196,197,131,200,203,204,207],{},"Objects can be looked up by ID. Lists take filters such as ",[24,198,199],{},"name",[24,201,202],{},"status"," and ",[24,205,206],{},"label_selector",".",[36,209,211],{"id":210},"create-a-server","Create a server",[54,213,215],{"className":56,"code":214,"language":58,"meta":59,"style":59},"curl -X POST https:\u002F\u002Fpanel.example.com\u002Fv1\u002Fservers \\\n  -H \"Authorization: Bearer $NEBLA_TOKEN\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"name\": \"web1\", \"server_type\": \"small-2\", \"image\": \"debian-13\", \"location\": \"home\", \"ssh_keys\": [\"laptop\"]}'\n",[24,216,217,234,248,258],{"__ignoreMap":59},[63,218,219,221,224,227,230],{"class":65,"line":66},[63,220,70],{"class":69},[63,222,223],{"class":73}," -X",[63,225,226],{"class":77}," POST",[63,228,229],{"class":77}," https:\u002F\u002Fpanel.example.com\u002Fv1\u002Fservers",[63,231,233],{"class":232},"sklAV"," \\\n",[63,235,237,240,242,244,246],{"class":65,"line":236},2,[63,238,239],{"class":73},"  -H",[63,241,78],{"class":77},[63,243,82],{"class":81},[63,245,85],{"class":77},[63,247,233],{"class":232},[63,249,251,253,256],{"class":65,"line":250},3,[63,252,239],{"class":73},[63,254,255],{"class":77}," \"Content-Type: application\u002Fjson\"",[63,257,233],{"class":232},[63,259,261,264],{"class":65,"line":260},4,[63,262,263],{"class":73},"  -d",[63,265,266],{"class":77}," '{\"name\": \"web1\", \"server_type\": \"small-2\", \"image\": \"debian-13\", \"location\": \"home\", \"ssh_keys\": [\"laptop\"]}'\n",[14,268,269,131,272,131,275,278,279,282,283,286,287,290],{},[24,270,271],{},"server_type",[24,273,274],{},"image",[24,276,277],{},"location"," and each SSH key take an ID or a name. The response has the new ",[24,280,281],{},"server",", the ",[24,284,285],{},"action"," that creates it, and ",[24,288,289],{},"next_actions"," that follow it.",[36,292,294],{"id":293},"actions","Actions",[14,296,297],{},"Anything that changes a server, volume or firewall runs in the background as an action. The call returns the action straight away:",[54,299,303],{"className":300,"code":301,"language":302,"meta":59,"style":59},"language-json shiki shiki-themes github-light-high-contrast github-light-high-contrast github-dark-high-contrast","{\n  \"action\": {\n    \"id\": 812,\n    \"command\": \"start_server\",\n    \"status\": \"running\",\n    \"progress\": 0,\n    \"resources\": [{ \"id\": 42, \"type\": \"server\" }],\n    \"error\": null,\n    \"started\": \"2026-11-21T10:04:12Z\",\n    \"finished\": null\n  }\n}\n","json",[24,304,305,310,319,333,345,358,371,401,414,427,438,444],{"__ignoreMap":59},[63,306,307],{"class":65,"line":66},[63,308,309],{"class":81},"{\n",[63,311,312,316],{"class":65,"line":236},[63,313,315],{"class":314},"sb7M8","  \"action\"",[63,317,318],{"class":81},": {\n",[63,320,321,324,327,330],{"class":65,"line":250},[63,322,323],{"class":314},"    \"id\"",[63,325,326],{"class":81},": ",[63,328,329],{"class":73},"812",[63,331,332],{"class":81},",\n",[63,334,335,338,340,343],{"class":65,"line":260},[63,336,337],{"class":314},"    \"command\"",[63,339,326],{"class":81},[63,341,342],{"class":77},"\"start_server\"",[63,344,332],{"class":81},[63,346,348,351,353,356],{"class":65,"line":347},5,[63,349,350],{"class":314},"    \"status\"",[63,352,326],{"class":81},[63,354,355],{"class":77},"\"running\"",[63,357,332],{"class":81},[63,359,361,364,366,369],{"class":65,"line":360},6,[63,362,363],{"class":314},"    \"progress\"",[63,365,326],{"class":81},[63,367,368],{"class":73},"0",[63,370,332],{"class":81},[63,372,374,377,380,383,385,388,390,393,395,398],{"class":65,"line":373},7,[63,375,376],{"class":314},"    \"resources\"",[63,378,379],{"class":81},": [{ ",[63,381,382],{"class":314},"\"id\"",[63,384,326],{"class":81},[63,386,387],{"class":73},"42",[63,389,131],{"class":81},[63,391,392],{"class":314},"\"type\"",[63,394,326],{"class":81},[63,396,397],{"class":77},"\"server\"",[63,399,400],{"class":81}," }],\n",[63,402,404,407,409,412],{"class":65,"line":403},8,[63,405,406],{"class":314},"    \"error\"",[63,408,326],{"class":81},[63,410,411],{"class":73},"null",[63,413,332],{"class":81},[63,415,417,420,422,425],{"class":65,"line":416},9,[63,418,419],{"class":314},"    \"started\"",[63,421,326],{"class":81},[63,423,424],{"class":77},"\"2026-11-21T10:04:12Z\"",[63,426,332],{"class":81},[63,428,430,433,435],{"class":65,"line":429},10,[63,431,432],{"class":314},"    \"finished\"",[63,434,326],{"class":81},[63,436,437],{"class":73},"null\n",[63,439,441],{"class":65,"line":440},11,[63,442,443],{"class":81},"  }\n",[63,445,447],{"class":65,"line":446},12,[63,448,449],{"class":81},"}\n",[14,451,452,453,456,457,459,460,463,464,467,468,470,471,473,474,207],{},"Poll ",[24,454,455],{},"GET \u002Fv1\u002Factions\u002F{id}"," until ",[24,458,202],{}," is ",[24,461,462],{},"success"," or ",[24,465,466],{},"error",". The CLI backs off from one second to five between polls. When an action fails, ",[24,469,466],{}," has a ",[24,472,24],{}," and a plain ",[24,475,476],{},"message",[14,478,479,480,483,484,131,487,131,490,131,493,131,496,131,499,463,502,505,506,509,510,207],{},"Server actions are ",[24,481,482],{},"POST \u002Fv1\u002Fservers\u002F{id}\u002Factions\u002F{name}",", where the name is ",[24,485,486],{},"poweron",[24,488,489],{},"poweroff",[24,491,492],{},"shutdown",[24,494,495],{},"reboot",[24,497,498],{},"reset",[24,500,501],{},"rebuild",[24,503,504],{},"change_type",". A second change to a resource while an action runs on it is refused with ",[24,507,508],{},"409"," and the code ",[24,511,512],{},"locked",[36,514,516],{"id":515},"errors","Errors",[14,518,519],{},"Errors use HTTP status codes and a JSON body:",[54,521,523],{"className":300,"code":522,"language":302,"meta":59,"style":59},"{ \"error\": { \"code\": \"not_found\", \"message\": \"not found\" } }\n",[24,524,525],{"__ignoreMap":59},[63,526,527,530,533,536,539,541,544,546,549,551,554],{"class":65,"line":66},[63,528,529],{"class":81},"{ ",[63,531,532],{"class":314},"\"error\"",[63,534,535],{"class":81},": { ",[63,537,538],{"class":314},"\"code\"",[63,540,326],{"class":81},[63,542,543],{"class":77},"\"not_found\"",[63,545,131],{"class":81},[63,547,548],{"class":314},"\"message\"",[63,550,326],{"class":81},[63,552,553],{"class":77},"\"not found\"",[63,555,556],{"class":81}," } }\n",[36,558,560],{"id":559},"pagination","Pagination",[14,562,563,564,567,568,571,572,575],{},"List endpoints take ",[24,565,566],{},"page"," (from 1) and ",[24,569,570],{},"per_page"," (default 25, at most 50), and return the total in ",[24,573,574],{},"meta",":",[54,577,579],{"className":300,"code":578,"language":302,"meta":59,"style":59},"{ \"servers\": [], \"meta\": { \"pagination\": { \"page\": 1, \"per_page\": 25, \"total_entries\": 0 } } }\n",[24,580,581],{"__ignoreMap":59},[63,582,583,585,588,591,594,596,599,601,604,606,609,611,614,616,619,621,624,626,628],{"class":65,"line":66},[63,584,529],{"class":81},[63,586,587],{"class":314},"\"servers\"",[63,589,590],{"class":81},": [], ",[63,592,593],{"class":314},"\"meta\"",[63,595,535],{"class":81},[63,597,598],{"class":314},"\"pagination\"",[63,600,535],{"class":81},[63,602,603],{"class":314},"\"page\"",[63,605,326],{"class":81},[63,607,608],{"class":73},"1",[63,610,131],{"class":81},[63,612,613],{"class":314},"\"per_page\"",[63,615,326],{"class":81},[63,617,618],{"class":73},"25",[63,620,131],{"class":81},[63,622,623],{"class":314},"\"total_entries\"",[63,625,326],{"class":81},[63,627,368],{"class":73},[63,629,630],{"class":81}," } } }\n",[36,632,634],{"id":633},"label-selectors","Label selectors",[14,636,637,639,640,131,643,131,646,649,650,653,654,207],{},[24,638,206],{}," takes comma-separated terms that must all match: ",[24,641,642],{},"key=value",[24,644,645],{},"key!=value",[24,647,648],{},"key"," (the label exists) and ",[24,651,652],{},"!key"," (it doesn't). For example ",[24,655,656],{},"role=web,env!=prod",[36,658,660],{"id":659},"rate-limits","Rate limits",[14,662,663,664,131,667,203,670,673,674,677,678,681,682,685],{},"Each token can make 3600 requests an hour, with bursts of up to 100. Every response carries ",[24,665,666],{},"RateLimit-Limit",[24,668,669],{},"RateLimit-Remaining",[24,671,672],{},"RateLimit-Reset",". Past the limit, the panel answers ",[24,675,676],{},"429"," with the code ",[24,679,680],{},"rate_limit_exceeded"," and a ",[24,683,684],{},"Retry-After"," header.",[36,687,689],{"id":688},"health","Health",[14,691,692,695,696,699],{},[24,693,694],{},"GET \u002Fv1\u002Fhealthz"," needs no token and answers ",[24,697,698],{},"200"," while the panel is up. Use it for load balancer and uptime checks.",[701,702,703],"style",{},"html pre.shiki code .szw1H, html code.shiki .szw1H{--shiki-light:#702C00;--shiki-default:#702C00;--shiki-dark:#FFB757}html pre.shiki code .ssYy9, html code.shiki .ssYy9{--shiki-light:#023B95;--shiki-default:#023B95;--shiki-dark:#91CBFF}html pre.shiki code .semJd, html code.shiki .semJd{--shiki-light:#032563;--shiki-default:#032563;--shiki-dark:#ADDCFF}html pre.shiki code .s7iLA, html code.shiki .s7iLA{--shiki-light:#0E1116;--shiki-default:#0E1116;--shiki-dark:#F0F3F6}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sklAV, html code.shiki .sklAV{--shiki-light:#A0111F;--shiki-default:#A0111F;--shiki-dark:#FF9492}html pre.shiki code .sb7M8, html code.shiki .sb7M8{--shiki-light:#024C1A;--shiki-default:#024C1A;--shiki-dark:#72F088}",{"title":59,"searchDepth":236,"depth":236,"links":705},[706,707,708,709,710,711,712,713,714],{"id":38,"depth":236,"text":39},{"id":102,"depth":236,"text":103},{"id":210,"depth":236,"text":211},{"id":293,"depth":236,"text":294},{"id":515,"depth":236,"text":516},{"id":559,"depth":236,"text":560},{"id":633,"depth":236,"text":634},{"id":659,"depth":236,"text":660},{"id":688,"depth":236,"text":689},"Nebla's REST API at \u002Fv1, with project tokens, JSON errors, pagination, rate limits and actions you can wait on.","md","Reference",{},true,"\u002Fdocs\u002Fapi",{"title":5,"description":715},"docs\u002F09.api","NErnHi1zDhIMKqWNHxRZvYg5KiYUQ9huT0F4cLBMQFU",[725,730,734,738,742,746,750,754,758,760,761],{"path":726,"title":727,"group":728,"stem":729},"\u002Fdocs","Overview","Get started","docs\u002F00.index",{"path":731,"title":732,"group":728,"stem":733},"\u002Fdocs\u002Finstall","Install","docs\u002F01.install",{"path":735,"title":736,"group":728,"stem":737},"\u002Fdocs\u002Fproxmox","Connect Proxmox","docs\u002F02.proxmox",{"path":739,"title":740,"group":728,"stem":741},"\u002Fdocs\u002Fadmin","Set up the panel","docs\u002F03.admin",{"path":743,"title":51,"group":744,"stem":745},"\u002Fdocs\u002Fprojects","Use Nebla","docs\u002F04.projects",{"path":747,"title":748,"group":744,"stem":749},"\u002Fdocs\u002Fservers","Servers","docs\u002F05.servers",{"path":751,"title":752,"group":744,"stem":753},"\u002Fdocs\u002Fvolumes","Volumes","docs\u002F06.volumes",{"path":755,"title":756,"group":744,"stem":757},"\u002Fdocs\u002Ffirewalls","Firewalls","docs\u002F07.firewalls",{"path":20,"title":21,"group":717,"stem":759},"docs\u002F08.cli",{"path":720,"title":5,"group":717,"stem":722},{"path":762,"title":763,"group":717,"stem":764},"\u002Fdocs\u002Ftroubleshooting","Troubleshooting","docs\u002F10.troubleshooting",1795243967233]