[{"data":1,"prerenderedAt":2011},["ShallowReactive",2],{"\u002Fdocs\u002Freference\u002Fapi":3},{"id":4,"title":5,"body":6,"description":2003,"extension":2004,"meta":2005,"navigation":2006,"path":2007,"seo":2008,"stem":2009,"__hash__":2010},"docs\u002Fdocs\u002Freference\u002Fapi.md","REST API",{"type":7,"value":8,"toc":1969},"minimark",[9,13,22,27,32,47,164,183,187,190,265,319,348,352,457,537,549,694,827,835,838,842,846,885,903,907,912,917,921,926,932,1083,1087,1091,1096,1099,1183,1191,1211,1215,1219,1229,1233,1238,1287,1292,1387,1391,1396,1415,1489,1493,1505,1509,1523,1527,1533,1545,1549,1560,1564,1568,1582,1586,1591,1686,1709,1713,1718,1733,1804,1808,1818,1822,1835,1839,1848,1852,1857,1860,1951,1955,1965],[10,11,5],"h1",{"id":12},"rest-api",[14,15,16,17,21],"p",{},"The dashboard is built on the server's JSON API, and you can call the same endpoints from scripts\nand automations. All paths are relative to your server, for example\n",[18,19,20],"code",{},"https:\u002F\u002Fnetignite.example.com\u002Fapi\u002Fdevices",".",[23,24,26],"h2",{"id":25},"basics","Basics",[28,29,31],"h3",{"id":30},"authentication","Authentication",[14,33,34,35,42,43,46],{},"The API uses the same session cookie as the dashboard. Log in with\n",[36,37,39],"a",{"href":38},"#log-in",[18,40,41],{},"POST \u002Fapi\u002Fauth\u002Flogin"," and send the returned ",[18,44,45],{},"session"," cookie with every request.\nAPI keys aren't available yet.",[48,49,55],"pre",{"className":50,"code":51,"filename":52,"language":53,"meta":54,"style":54},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","# Log in and store the session cookie\ncurl -c cookies.txt -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"username\":\"admin\",\"password\":\"\u003Cpassword>\"}' \\\n  https:\u002F\u002Fnetignite.example.com\u002Fapi\u002Fauth\u002Flogin\n\n# Use the cookie\ncurl -b cookies.txt https:\u002F\u002Fnetignite.example.com\u002Fapi\u002Fdevices\ncurl -b cookies.txt -X POST https:\u002F\u002Fnetignite.example.com\u002Fapi\u002Fdevices\u002F1\u002Fwakeup\n","Terminal","bash","",[18,56,57,66,97,114,120,127,133,146],{"__ignoreMap":54},[58,59,62],"span",{"class":60,"line":61},"line",1,[58,63,65],{"class":64},"sHwdD","# Log in and store the session cookie\n",[58,67,69,73,77,80,83,87,90,93],{"class":60,"line":68},2,[58,70,72],{"class":71},"sBMFI","curl",[58,74,76],{"class":75},"sfazB"," -c",[58,78,79],{"class":75}," cookies.txt",[58,81,82],{"class":75}," -H",[58,84,86],{"class":85},"sMK4o"," \"",[58,88,89],{"class":75},"Content-Type: application\u002Fjson",[58,91,92],{"class":85},"\"",[58,94,96],{"class":95},"sTEyZ"," \\\n",[58,98,100,103,106,109,112],{"class":60,"line":99},3,[58,101,102],{"class":75},"  -d",[58,104,105],{"class":85}," '",[58,107,108],{"class":75},"{\"username\":\"admin\",\"password\":\"\u003Cpassword>\"}",[58,110,111],{"class":85},"'",[58,113,96],{"class":95},[58,115,117],{"class":60,"line":116},4,[58,118,119],{"class":75},"  https:\u002F\u002Fnetignite.example.com\u002Fapi\u002Fauth\u002Flogin\n",[58,121,123],{"class":60,"line":122},5,[58,124,126],{"emptyLinePlaceholder":125},true,"\n",[58,128,130],{"class":60,"line":129},6,[58,131,132],{"class":64},"# Use the cookie\n",[58,134,136,138,141,143],{"class":60,"line":135},7,[58,137,72],{"class":71},[58,139,140],{"class":75}," -b",[58,142,79],{"class":75},[58,144,145],{"class":75}," https:\u002F\u002Fnetignite.example.com\u002Fapi\u002Fdevices\n",[58,147,149,151,153,155,158,161],{"class":60,"line":148},8,[58,150,72],{"class":71},[58,152,140],{"class":75},[58,154,79],{"class":75},[58,156,157],{"class":75}," -X",[58,159,160],{"class":75}," POST",[58,162,163],{"class":75}," https:\u002F\u002Fnetignite.example.com\u002Fapi\u002Fdevices\u002F1\u002Fwakeup\n",[14,165,166,167,170,171,174,175,178,179,182],{},"Every endpoint except those under ",[18,168,169],{},"\u002Fapi\u002Fauth\u002F"," requires a session. Without one, the server answers\n",[18,172,173],{},"401"," with ",[18,176,177],{},"No session found"," or ",[18,180,181],{},"Invalid session",". Sessions last 30 days and end when the server\nrestarts.",[28,184,186],{"id":185},"responses","Responses",[14,188,189],{},"Responses share one envelope:",[48,191,195],{"className":192,"code":193,"language":194,"meta":54,"style":54},"language-json shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","{\n    \"status\": \"OK\",\n    \"message\": \"Devices retrieved successfully.\",\n    \"data\": []\n}\n","json",[18,196,197,202,226,246,260],{"__ignoreMap":54},[58,198,199],{"class":60,"line":61},[58,200,201],{"class":85},"{\n",[58,203,204,207,211,213,216,218,221,223],{"class":60,"line":68},[58,205,206],{"class":85},"    \"",[58,208,210],{"class":209},"spNyl","status",[58,212,92],{"class":85},[58,214,215],{"class":85},":",[58,217,86],{"class":85},[58,219,220],{"class":75},"OK",[58,222,92],{"class":85},[58,224,225],{"class":85},",\n",[58,227,228,230,233,235,237,239,242,244],{"class":60,"line":99},[58,229,206],{"class":85},[58,231,232],{"class":209},"message",[58,234,92],{"class":85},[58,236,215],{"class":85},[58,238,86],{"class":85},[58,240,241],{"class":75},"Devices retrieved successfully.",[58,243,92],{"class":85},[58,245,225],{"class":85},[58,247,248,250,253,255,257],{"class":60,"line":116},[58,249,206],{"class":85},[58,251,252],{"class":209},"data",[58,254,92],{"class":85},[58,256,215],{"class":85},[58,258,259],{"class":85}," []\n",[58,261,262],{"class":60,"line":122},[58,263,264],{"class":85},"}\n",[266,267,268,281],"table",{},[269,270,271],"thead",{},[272,273,274,278],"tr",{},[275,276,277],"th",{},"Field",[275,279,280],{},"Description",[282,283,284,301,310],"tbody",{},[272,285,286,291],{},[287,288,289],"td",{},[18,290,210],{},[287,292,293,296,297,300],{},[18,294,295],{},"\"OK\""," on success, ",[18,298,299],{},"\"ERROR\""," on failure.",[272,302,303,307],{},[287,304,305],{},[18,306,232],{},[287,308,309],{},"Human-readable result. Missing on the status endpoints.",[272,311,312,316],{},[287,313,314],{},[18,315,252],{},[287,317,318],{},"The result, if any.",[14,320,321,322,325,326,328,329,332,333,336,337,340,341,344,345,21],{},"Errors use the matching HTTP status code: ",[18,323,324],{},"400"," for invalid input, ",[18,327,173],{}," without a valid session,\n",[18,330,331],{},"404"," for agents or devices that don't exist or belong to another user, ",[18,334,335],{},"409"," for conflicts,\n",[18,338,339],{},"503"," when an agent is offline, and ",[18,342,343],{},"500"," for server errors. Updates answer ",[18,346,347],{},"201",[28,349,351],{"id":350},"objects","Objects",[48,353,356],{"className":192,"code":354,"filename":355,"language":194,"meta":54,"style":54},"{\n    \"id\": 3,\n    \"name\": \"Office ESP32\",\n    \"type\": \"microcontroller\",\n    \"description\": \"Under the desk\",\n    \"ownerID\": 1\n}\n","Agent",[18,357,358,362,379,399,419,439,453],{"__ignoreMap":54},[58,359,360],{"class":60,"line":61},[58,361,201],{"class":85},[58,363,364,366,369,371,373,377],{"class":60,"line":68},[58,365,206],{"class":85},[58,367,368],{"class":209},"id",[58,370,92],{"class":85},[58,372,215],{"class":85},[58,374,376],{"class":375},"sbssI"," 3",[58,378,225],{"class":85},[58,380,381,383,386,388,390,392,395,397],{"class":60,"line":99},[58,382,206],{"class":85},[58,384,385],{"class":209},"name",[58,387,92],{"class":85},[58,389,215],{"class":85},[58,391,86],{"class":85},[58,393,394],{"class":75},"Office ESP32",[58,396,92],{"class":85},[58,398,225],{"class":85},[58,400,401,403,406,408,410,412,415,417],{"class":60,"line":116},[58,402,206],{"class":85},[58,404,405],{"class":209},"type",[58,407,92],{"class":85},[58,409,215],{"class":85},[58,411,86],{"class":85},[58,413,414],{"class":75},"microcontroller",[58,416,92],{"class":85},[58,418,225],{"class":85},[58,420,421,423,426,428,430,432,435,437],{"class":60,"line":122},[58,422,206],{"class":85},[58,424,425],{"class":209},"description",[58,427,92],{"class":85},[58,429,215],{"class":85},[58,431,86],{"class":85},[58,433,434],{"class":75},"Under the desk",[58,436,92],{"class":85},[58,438,225],{"class":85},[58,440,441,443,446,448,450],{"class":60,"line":129},[58,442,206],{"class":85},[58,444,445],{"class":209},"ownerID",[58,447,92],{"class":85},[58,449,215],{"class":85},[58,451,452],{"class":375}," 1\n",[58,454,455],{"class":60,"line":135},[58,456,264],{"class":85},[266,458,459,471],{},[269,460,461],{},[272,462,463,466,469],{},[275,464,465],{},"Agent field",[275,467,468],{},"Type",[275,470,280],{},[282,472,473,485,497,515,526],{},[272,474,475,479,482],{},[287,476,477],{},[18,478,368],{},[287,480,481],{},"number",[287,483,484],{},"Agent ID, also the Connection ID.",[272,486,487,491,494],{},[287,488,489],{},[18,490,385],{},[287,492,493],{},"string",[287,495,496],{},"Display name.",[272,498,499,503,512],{},[287,500,501],{},[18,502,405],{},[287,504,505,508,509],{},[18,506,507],{},"\"server\""," | ",[18,510,511],{},"\"microcontroller\"",[287,513,514],{},"Agent type.",[272,516,517,521,523],{},[287,518,519],{},[18,520,425],{},[287,522,493],{},[287,524,525],{},"Free text; may be empty.",[272,527,528,532,534],{},[287,529,530],{},[18,531,445],{},[287,533,481],{},[287,535,536],{},"ID of the owning user.",[14,538,539,540,544,545,21],{},"Agent objects never contain the secret. The server stores only a hash of it and returns the\nsecret once, when you ",[36,541,543],{"href":542},"#create-an-agent","create an agent"," or\n",[36,546,548],{"href":547},"#regenerate-an-agent-secret","regenerate its secret",[48,550,553],{"className":192,"code":551,"filename":552,"language":194,"meta":54,"style":54},"{\n    \"id\": 1,\n    \"name\": \"Gaming PC\",\n    \"type\": \"desktop\",\n    \"description\": null,\n    \"macAddress\": \"AA:BB:CC:DD:EE:FF\",\n    \"port\": 9,\n    \"agentID\": 3,\n    \"ownerID\": 1\n}\n","Device",[18,554,555,559,574,593,612,625,645,661,676,689],{"__ignoreMap":54},[58,556,557],{"class":60,"line":61},[58,558,201],{"class":85},[58,560,561,563,565,567,569,572],{"class":60,"line":68},[58,562,206],{"class":85},[58,564,368],{"class":209},[58,566,92],{"class":85},[58,568,215],{"class":85},[58,570,571],{"class":375}," 1",[58,573,225],{"class":85},[58,575,576,578,580,582,584,586,589,591],{"class":60,"line":99},[58,577,206],{"class":85},[58,579,385],{"class":209},[58,581,92],{"class":85},[58,583,215],{"class":85},[58,585,86],{"class":85},[58,587,588],{"class":75},"Gaming PC",[58,590,92],{"class":85},[58,592,225],{"class":85},[58,594,595,597,599,601,603,605,608,610],{"class":60,"line":116},[58,596,206],{"class":85},[58,598,405],{"class":209},[58,600,92],{"class":85},[58,602,215],{"class":85},[58,604,86],{"class":85},[58,606,607],{"class":75},"desktop",[58,609,92],{"class":85},[58,611,225],{"class":85},[58,613,614,616,618,620,622],{"class":60,"line":122},[58,615,206],{"class":85},[58,617,425],{"class":209},[58,619,92],{"class":85},[58,621,215],{"class":85},[58,623,624],{"class":85}," null,\n",[58,626,627,629,632,634,636,638,641,643],{"class":60,"line":129},[58,628,206],{"class":85},[58,630,631],{"class":209},"macAddress",[58,633,92],{"class":85},[58,635,215],{"class":85},[58,637,86],{"class":85},[58,639,640],{"class":75},"AA:BB:CC:DD:EE:FF",[58,642,92],{"class":85},[58,644,225],{"class":85},[58,646,647,649,652,654,656,659],{"class":60,"line":135},[58,648,206],{"class":85},[58,650,651],{"class":209},"port",[58,653,92],{"class":85},[58,655,215],{"class":85},[58,657,658],{"class":375}," 9",[58,660,225],{"class":85},[58,662,663,665,668,670,672,674],{"class":60,"line":148},[58,664,206],{"class":85},[58,666,667],{"class":209},"agentID",[58,669,92],{"class":85},[58,671,215],{"class":85},[58,673,376],{"class":375},[58,675,225],{"class":85},[58,677,679,681,683,685,687],{"class":60,"line":678},9,[58,680,206],{"class":85},[58,682,445],{"class":209},[58,684,92],{"class":85},[58,686,215],{"class":85},[58,688,452],{"class":375},[58,690,692],{"class":60,"line":691},10,[58,693,264],{"class":85},[266,695,696,707],{},[269,697,698],{},[272,699,700,703,705],{},[275,701,702],{},"Device field",[275,704,468],{},[275,706,280],{},[282,708,709,720,730,755,767,783,806,817],{},[272,710,711,715,717],{},[287,712,713],{},[18,714,368],{},[287,716,481],{},[287,718,719],{},"Device ID.",[272,721,722,726,728],{},[287,723,724],{},[18,725,385],{},[287,727,493],{},[287,729,496],{},[272,731,732,736,752],{},[287,733,734],{},[18,735,405],{},[287,737,738,508,740,508,743,508,746,508,749],{},[18,739,507],{},[18,741,742],{},"\"desktop\"",[18,744,745],{},"\"laptop\"",[18,747,748],{},"\"printer\"",[18,750,751],{},"\"nas\"",[287,753,754],{},"Device type.",[272,756,757,761,764],{},[287,758,759],{},[18,760,425],{},[287,762,763],{},"string | null",[287,765,766],{},"Free text.",[272,768,769,773,775],{},[287,770,771],{},[18,772,631],{},[287,774,493],{},[287,776,777,778,178,780,21],{},"MAC address, ",[18,779,640],{},[18,781,782],{},"AA-BB-CC-DD-EE-FF",[272,784,785,789,791],{},[287,786,787],{},[18,788,651],{},[287,790,481],{},[287,792,793,794,797,798,801,802,805],{},"Wake-on-LAN UDP port, ",[18,795,796],{},"1","–",[18,799,800],{},"65535"," (usually ",[18,803,804],{},"9",").",[272,807,808,812,814],{},[287,809,810],{},[18,811,667],{},[287,813,481],{},[287,815,816],{},"ID of one of your agents; it wakes this device.",[272,818,819,823,825],{},[287,820,821],{},[18,822,445],{},[287,824,481],{},[287,826,536],{},[14,828,829,831,832,834],{},[18,830,368],{}," and ",[18,833,445],{}," are set by the server. Leave them out of request bodies.",[23,836,31],{"id":837},"authentication-1",[28,839,841],{"id":840},"log-in","Log in",[14,843,844],{},[18,845,41],{},[266,847,848,860],{},[269,849,850],{},[272,851,852,855,857],{},[275,853,854],{},"Body field",[275,856,468],{},[275,858,859],{},"Required",[282,861,862,874],{},[272,863,864,869,871],{},[287,865,866],{},[18,867,868],{},"username",[287,870,493],{},[287,872,873],{},"yes",[272,875,876,881,883],{},[287,877,878],{},[18,879,880],{},"password",[287,882,493],{},[287,884,873],{},[14,886,887,888,890,891,174,894,897,898,174,900,21],{},"Sets the ",[18,889,45],{}," cookie and answers ",[18,892,893],{},"200",[18,895,896],{},"Login successful",". Wrong credentials return\n",[18,899,173],{},[18,901,902],{},"No matching credentials found",[28,904,906],{"id":905},"log-out","Log out",[14,908,909],{},[18,910,911],{},"POST \u002Fapi\u002Fauth\u002Flogout",[14,913,914,915,21],{},"Ends the session and clears the cookie. Always answers ",[18,916,893],{},[28,918,920],{"id":919},"get-the-session","Get the session",[14,922,923],{},[18,924,925],{},"GET \u002Fapi\u002Fauth\u002Fsession",[14,927,928,929,931],{},"Returns the logged-in user, or ",[18,930,173],{}," if there is no valid session.",[48,933,935],{"className":192,"code":934,"language":194,"meta":54,"style":54},"{\n    \"status\": \"OK\",\n    \"message\": \"Session valid\",\n    \"data\": {\n        \"userID\": 1,\n        \"username\": \"admin\",\n        \"role\": \"admin\",\n        \"favorites\": [],\n        \"expirationTimestamp\": 1792351800000\n    }\n}\n",[18,936,937,941,959,978,991,1007,1026,1045,1059,1073,1078],{"__ignoreMap":54},[58,938,939],{"class":60,"line":61},[58,940,201],{"class":85},[58,942,943,945,947,949,951,953,955,957],{"class":60,"line":68},[58,944,206],{"class":85},[58,946,210],{"class":209},[58,948,92],{"class":85},[58,950,215],{"class":85},[58,952,86],{"class":85},[58,954,220],{"class":75},[58,956,92],{"class":85},[58,958,225],{"class":85},[58,960,961,963,965,967,969,971,974,976],{"class":60,"line":99},[58,962,206],{"class":85},[58,964,232],{"class":209},[58,966,92],{"class":85},[58,968,215],{"class":85},[58,970,86],{"class":85},[58,972,973],{"class":75},"Session valid",[58,975,92],{"class":85},[58,977,225],{"class":85},[58,979,980,982,984,986,988],{"class":60,"line":116},[58,981,206],{"class":85},[58,983,252],{"class":209},[58,985,92],{"class":85},[58,987,215],{"class":85},[58,989,990],{"class":85}," {\n",[58,992,993,996,999,1001,1003,1005],{"class":60,"line":122},[58,994,995],{"class":85},"        \"",[58,997,998],{"class":71},"userID",[58,1000,92],{"class":85},[58,1002,215],{"class":85},[58,1004,571],{"class":375},[58,1006,225],{"class":85},[58,1008,1009,1011,1013,1015,1017,1019,1022,1024],{"class":60,"line":129},[58,1010,995],{"class":85},[58,1012,868],{"class":71},[58,1014,92],{"class":85},[58,1016,215],{"class":85},[58,1018,86],{"class":85},[58,1020,1021],{"class":75},"admin",[58,1023,92],{"class":85},[58,1025,225],{"class":85},[58,1027,1028,1030,1033,1035,1037,1039,1041,1043],{"class":60,"line":135},[58,1029,995],{"class":85},[58,1031,1032],{"class":71},"role",[58,1034,92],{"class":85},[58,1036,215],{"class":85},[58,1038,86],{"class":85},[58,1040,1021],{"class":75},[58,1042,92],{"class":85},[58,1044,225],{"class":85},[58,1046,1047,1049,1052,1054,1056],{"class":60,"line":148},[58,1048,995],{"class":85},[58,1050,1051],{"class":71},"favorites",[58,1053,92],{"class":85},[58,1055,215],{"class":85},[58,1057,1058],{"class":85}," [],\n",[58,1060,1061,1063,1066,1068,1070],{"class":60,"line":678},[58,1062,995],{"class":85},[58,1064,1065],{"class":71},"expirationTimestamp",[58,1067,92],{"class":85},[58,1069,215],{"class":85},[58,1071,1072],{"class":375}," 1792351800000\n",[58,1074,1075],{"class":60,"line":691},[58,1076,1077],{"class":85},"    }\n",[58,1079,1081],{"class":60,"line":1080},11,[58,1082,264],{"class":85},[23,1084,1086],{"id":1085},"account","Account",[28,1088,1090],{"id":1089},"update-an-account","Update an account",[14,1092,1093],{},[18,1094,1095],{},"PUT \u002Fapi\u002Faccount\u002F\u003CuserID>",[14,1097,1098],{},"Updates the username and password of the logged-in user.",[266,1100,1101,1113],{},[269,1102,1103],{},[272,1104,1105,1107,1109,1111],{},[275,1106,854],{},[275,1108,468],{},[275,1110,859],{},[275,1112,280],{},[282,1114,1115,1131,1150,1164],{},[272,1116,1117,1121,1123,1125],{},[287,1118,1119],{},[18,1120,868],{},[287,1122,493],{},[287,1124,873],{},[287,1126,1127,1128,1130],{},"New or current username. Must be unique (",[18,1129,335],{}," otherwise).",[272,1132,1133,1137,1141,1143],{},[287,1134,1135],{},[18,1136,1051],{},[287,1138,481,1139],{},[58,1140],{},[287,1142,873],{},[287,1144,1145,1146,1149],{},"IDs of favorite devices. Send the current list (",[18,1147,1148],{},"[]"," if none).",[272,1151,1152,1156,1158,1161],{},[287,1153,1154],{},[18,1155,880],{},[287,1157,493],{},[287,1159,1160],{},"no",[287,1162,1163],{},"New password. Omit it or send an empty string to keep the current one.",[272,1165,1166,1170,1178,1180],{},[287,1167,1168],{},[18,1169,1032],{},[287,1171,1172,508,1175],{},[18,1173,1174],{},"\"user\"",[18,1176,1177],{},"\"admin\"",[287,1179,1160],{},[287,1181,1182],{},"See below.",[14,1184,1185,1186,174,1188,21],{},"Answers ",[18,1187,347],{},[18,1189,1190],{},"User Account updated successfully",[14,1192,1193,1197,1198,1201,1202,1204,1205,1207,1208,1210],{},[1194,1195,1196],"strong",{},"Admin mode."," Admins can add ",[18,1199,1200],{},"?adminMode=true"," to update the user given in the path instead of\nthemselves. The first user (ID ",[18,1203,796],{},") can also change other users' ",[18,1206,1032],{},", and must send ",[18,1209,1032],{}," when\nediting someone else.",[23,1212,1214],{"id":1213},"agents","Agents",[28,1216,1218],{"id":1217},"list-agents","List agents",[14,1220,1221,1224,1225,21],{},[18,1222,1223],{},"GET \u002Fapi\u002Fagents"," returns all of your agents as an array of ",[36,1226,1228],{"href":1227},"#objects","agent objects",[28,1230,1232],{"id":1231},"create-an-agent","Create an agent",[14,1234,1235],{},[18,1236,1237],{},"POST \u002Fapi\u002Fagents",[266,1239,1240,1250],{},[269,1241,1242],{},[272,1243,1244,1246,1248],{},[275,1245,854],{},[275,1247,468],{},[275,1249,859],{},[282,1251,1252,1262,1276],{},[272,1253,1254,1258,1260],{},[287,1255,1256],{},[18,1257,385],{},[287,1259,493],{},[287,1261,873],{},[272,1263,1264,1268,1274],{},[287,1265,1266],{},[18,1267,405],{},[287,1269,1270,508,1272],{},[18,1271,507],{},[18,1273,511],{},[287,1275,873],{},[272,1277,1278,1282,1284],{},[287,1279,1280],{},[18,1281,425],{},[287,1283,493],{},[287,1285,1286],{},"yes (may be empty)",[14,1288,1185,1289,1291],{},[18,1290,347],{}," with the new agent's ID and its generated secret. Store the secret now: it isn't\nreturned again. The agent can connect right away.",[48,1293,1295],{"className":192,"code":1294,"language":194,"meta":54,"style":54},"{\n    \"status\": \"OK\",\n    \"message\": \"Agent created successfully\",\n    \"data\": { \"id\": 3, \"secret\": \"6f1c2e9a0b7d4c3e8a5f1b2c3d4e5f60\" }\n}\n",[18,1296,1297,1301,1319,1338,1383],{"__ignoreMap":54},[58,1298,1299],{"class":60,"line":61},[58,1300,201],{"class":85},[58,1302,1303,1305,1307,1309,1311,1313,1315,1317],{"class":60,"line":68},[58,1304,206],{"class":85},[58,1306,210],{"class":209},[58,1308,92],{"class":85},[58,1310,215],{"class":85},[58,1312,86],{"class":85},[58,1314,220],{"class":75},[58,1316,92],{"class":85},[58,1318,225],{"class":85},[58,1320,1321,1323,1325,1327,1329,1331,1334,1336],{"class":60,"line":99},[58,1322,206],{"class":85},[58,1324,232],{"class":209},[58,1326,92],{"class":85},[58,1328,215],{"class":85},[58,1330,86],{"class":85},[58,1332,1333],{"class":75},"Agent created successfully",[58,1335,92],{"class":85},[58,1337,225],{"class":85},[58,1339,1340,1342,1344,1346,1348,1351,1353,1355,1357,1359,1361,1364,1366,1369,1371,1373,1375,1378,1380],{"class":60,"line":116},[58,1341,206],{"class":85},[58,1343,252],{"class":209},[58,1345,92],{"class":85},[58,1347,215],{"class":85},[58,1349,1350],{"class":85}," {",[58,1352,86],{"class":85},[58,1354,368],{"class":71},[58,1356,92],{"class":85},[58,1358,215],{"class":85},[58,1360,376],{"class":375},[58,1362,1363],{"class":85},",",[58,1365,86],{"class":85},[58,1367,1368],{"class":71},"secret",[58,1370,92],{"class":85},[58,1372,215],{"class":85},[58,1374,86],{"class":85},[58,1376,1377],{"class":75},"6f1c2e9a0b7d4c3e8a5f1b2c3d4e5f60",[58,1379,92],{"class":85},[58,1381,1382],{"class":85}," }\n",[58,1384,1385],{"class":60,"line":122},[58,1386,264],{"class":85},[28,1388,1390],{"id":1389},"get-agent-statuses","Get agent statuses",[14,1392,1393],{},[18,1394,1395],{},"GET \u002Fapi\u002Fagents\u002Fstatus?ids=1,2",[14,1397,1398,1399,1402,1403,1406,1407,1410,1411,1414],{},"Returns the connection status of your agents as a map from agent ID to ",[18,1400,1401],{},"\"online\"",", ",[18,1404,1405],{},"\"offline\"","\nor ",[18,1408,1409],{},"\"unknown\"",". Without ",[18,1412,1413],{},"ids",", all of your agents are included.",[48,1416,1418],{"className":192,"code":1417,"language":194,"meta":54,"style":54},"{ \"status\": \"OK\", \"data\": { \"1\": \"online\", \"2\": \"offline\" } }\n",[18,1419,1420],{"__ignoreMap":54},[58,1421,1422,1425,1427,1429,1431,1433,1435,1437,1439,1441,1443,1445,1447,1449,1451,1453,1455,1457,1459,1461,1464,1466,1468,1470,1473,1475,1477,1479,1482,1484,1487],{"class":60,"line":61},[58,1423,1424],{"class":85},"{",[58,1426,86],{"class":85},[58,1428,210],{"class":209},[58,1430,92],{"class":85},[58,1432,215],{"class":85},[58,1434,86],{"class":85},[58,1436,220],{"class":75},[58,1438,92],{"class":85},[58,1440,1363],{"class":85},[58,1442,86],{"class":85},[58,1444,252],{"class":209},[58,1446,92],{"class":85},[58,1448,215],{"class":85},[58,1450,1350],{"class":85},[58,1452,86],{"class":85},[58,1454,796],{"class":71},[58,1456,92],{"class":85},[58,1458,215],{"class":85},[58,1460,86],{"class":85},[58,1462,1463],{"class":75},"online",[58,1465,92],{"class":85},[58,1467,1363],{"class":85},[58,1469,86],{"class":85},[58,1471,1472],{"class":71},"2",[58,1474,92],{"class":85},[58,1476,215],{"class":85},[58,1478,86],{"class":85},[58,1480,1481],{"class":75},"offline",[58,1483,92],{"class":85},[58,1485,1486],{"class":85}," }",[58,1488,1382],{"class":85},[28,1490,1492],{"id":1491},"get-an-agent","Get an agent",[14,1494,1495,1498,1499,1502,1503,21],{},[18,1496,1497],{},"GET \u002Fapi\u002Fagents\u002F\u003Cid>"," returns one ",[36,1500,1501],{"href":1227},"agent object",", or ",[18,1504,331],{},[28,1506,1508],{"id":1507},"update-an-agent","Update an agent",[14,1510,1511,1514,1515,1517,1518,1502,1520,1522],{},[18,1512,1513],{},"PUT \u002Fapi\u002Fagents\u002F\u003Cid>"," takes the same body as ",[36,1516,1232],{"href":542}," and answers\n",[18,1519,347],{},[18,1521,331],{}," if the agent doesn't exist. It changes only the name, type and description.",[28,1524,1526],{"id":1525},"regenerate-an-agent-secret","Regenerate an agent secret",[14,1528,1529,1532],{},[18,1530,1531],{},"POST \u002Fapi\u002Fagents\u002F\u003Cid>\u002Fregenerate-secret"," (no body)",[14,1534,1535,1536,1538,1539,1541,1542,1544],{},"Replaces the agent's secret and answers ",[18,1537,893],{}," with the new one, in the same shape as\n",[36,1540,1232],{"href":542},". The old secret stops working immediately and a connected\nagent is disconnected. Returns ",[18,1543,331],{}," if the agent doesn't exist.",[28,1546,1548],{"id":1547},"delete-an-agent","Delete an agent",[14,1550,1551,1554,1555,1502,1557,1559],{},[18,1552,1553],{},"DELETE \u002Fapi\u002Fagents\u002F\u003Cid>"," answers ",[18,1556,893],{},[18,1558,331],{}," if the agent doesn't exist. A connected agent is\ndisconnected. Devices assigned to the agent are not deleted; reassign them first.",[23,1561,1563],{"id":1562},"devices","Devices",[28,1565,1567],{"id":1566},"list-devices","List devices",[14,1569,1570,1573,1574,1577,1578,1581],{},[18,1571,1572],{},"GET \u002Fapi\u002Fdevices"," returns all of your devices as an array of ",[36,1575,1576],{"href":1227},"device objects",". Add\n",[18,1579,1580],{},"?onlyFavorites=true"," to return only the devices in your favorites list.",[28,1583,1585],{"id":1584},"create-a-device","Create a device",[14,1587,1588],{},[18,1589,1590],{},"POST \u002Fapi\u002Fdevices",[266,1592,1593,1603],{},[269,1594,1595],{},[272,1596,1597,1599,1601],{},[275,1598,854],{},[275,1600,468],{},[275,1602,859],{},[282,1604,1605,1615,1635,1645,1661,1676],{},[272,1606,1607,1611,1613],{},[287,1608,1609],{},[18,1610,385],{},[287,1612,493],{},[287,1614,873],{},[272,1616,1617,1621,1633],{},[287,1618,1619],{},[18,1620,405],{},[287,1622,1623,508,1625,508,1627,508,1629,508,1631],{},[18,1624,507],{},[18,1626,742],{},[18,1628,745],{},[18,1630,748],{},[18,1632,751],{},[287,1634,873],{},[272,1636,1637,1641,1643],{},[287,1638,1639],{},[18,1640,425],{},[287,1642,493],{},[287,1644,1160],{},[272,1646,1647,1651,1659],{},[287,1648,1649],{},[18,1650,631],{},[287,1652,1653,1654,178,1656,1658],{},"string (",[18,1655,640],{},[18,1657,782],{},")",[287,1660,873],{},[272,1662,1663,1667,1674],{},[287,1664,1665],{},[18,1666,651],{},[287,1668,1669,1670,797,1672,1658],{},"integer (",[18,1671,796],{},[18,1673,800],{},[287,1675,873],{},[272,1677,1678,1682,1684],{},[287,1679,1680],{},[18,1681,667],{},[287,1683,481],{},[287,1685,873],{},[14,1687,1185,1688,1690,1691,1693,1694,174,1696,1699,1700,1702,1703,1705,1706,21],{},[18,1689,347],{},"; ",[18,1692,252],{}," is the new device's ID. Invalid fields return ",[18,1695,324],{},[18,1697,1698],{},"Invalid payload",".\nAn ",[18,1701,667],{}," that isn't one of your agents returns ",[18,1704,324],{}," with\n",[18,1707,1708],{},"No matching agent found for the given AgentID",[28,1710,1712],{"id":1711},"get-device-statuses","Get device statuses",[14,1714,1715],{},[18,1716,1717],{},"GET \u002Fapi\u002Fdevices\u002Fstatus?ids=1,2",[14,1719,1720,1721,1402,1723,178,1725,1410,1727,1729,1730,1732],{},"Asks each device's agent whether the device is online and returns a map from device ID to\n",[18,1722,1401],{},[18,1724,1405],{},[18,1726,1409],{},[18,1728,1413],{},", all of your devices are checked. The\ndevices are checked one after another, and each check can take up to 5 seconds, so filter with\n",[18,1731,1413],{}," when you only need a few.",[48,1734,1736],{"className":192,"code":1735,"language":194,"meta":54,"style":54},"{ \"status\": \"OK\", \"data\": { \"1\": \"online\", \"4\": \"unknown\" } }\n",[18,1737,1738],{"__ignoreMap":54},[58,1739,1740,1742,1744,1746,1748,1750,1752,1754,1756,1758,1760,1762,1764,1766,1768,1770,1772,1774,1776,1778,1780,1782,1784,1786,1789,1791,1793,1795,1798,1800,1802],{"class":60,"line":61},[58,1741,1424],{"class":85},[58,1743,86],{"class":85},[58,1745,210],{"class":209},[58,1747,92],{"class":85},[58,1749,215],{"class":85},[58,1751,86],{"class":85},[58,1753,220],{"class":75},[58,1755,92],{"class":85},[58,1757,1363],{"class":85},[58,1759,86],{"class":85},[58,1761,252],{"class":209},[58,1763,92],{"class":85},[58,1765,215],{"class":85},[58,1767,1350],{"class":85},[58,1769,86],{"class":85},[58,1771,796],{"class":71},[58,1773,92],{"class":85},[58,1775,215],{"class":85},[58,1777,86],{"class":85},[58,1779,1463],{"class":75},[58,1781,92],{"class":85},[58,1783,1363],{"class":85},[58,1785,86],{"class":85},[58,1787,1788],{"class":71},"4",[58,1790,92],{"class":85},[58,1792,215],{"class":85},[58,1794,86],{"class":85},[58,1796,1797],{"class":75},"unknown",[58,1799,92],{"class":85},[58,1801,1486],{"class":85},[58,1803,1382],{"class":85},[28,1805,1807],{"id":1806},"get-a-device","Get a device",[14,1809,1810,1498,1813,1502,1816,21],{},[18,1811,1812],{},"GET \u002Fapi\u002Fdevices\u002F\u003Cid>",[36,1814,1815],{"href":1227},"device object",[18,1817,331],{},[28,1819,1821],{"id":1820},"update-a-device","Update a device",[14,1823,1824,1514,1827,1517,1830,1502,1832,1834],{},[18,1825,1826],{},"PUT \u002Fapi\u002Fdevices\u002F\u003Cid>",[36,1828,1585],{"href":1829},"#create-a-device",[18,1831,347],{},[18,1833,331],{}," if the device doesn't exist.",[28,1836,1838],{"id":1837},"delete-a-device","Delete a device",[14,1840,1841,1554,1844,1502,1846,1834],{},[18,1842,1843],{},"DELETE \u002Fapi\u002Fdevices\u002F\u003Cid>",[18,1845,893],{},[18,1847,331],{},[28,1849,1851],{"id":1850},"wake-a-device","Wake a device",[14,1853,1854,1532],{},[18,1855,1856],{},"POST \u002Fapi\u002Fdevices\u002F\u003Cid>\u002Fwakeup",[14,1858,1859],{},"Sends a Wake-on-LAN command through the device's agent.",[266,1861,1862,1875],{},[269,1863,1864],{},[272,1865,1866,1869,1872],{},[275,1867,1868],{},"Status",[275,1870,1871],{},"Message",[275,1873,1874],{},"Meaning",[282,1876,1877,1891,1909,1923,1937],{},[272,1878,1879,1883,1888],{},[287,1880,1881],{},[18,1882,893],{},[287,1884,1885],{},[18,1886,1887],{},"Wakeup command sent",[287,1889,1890],{},"The agent sent the magic packet.",[272,1892,1893,1897,1906],{},[287,1894,1895],{},[18,1896,331],{},[287,1898,1899,1902,1903],{},[18,1900,1901],{},"Device not found or inaccessible by user"," \u002F ",[18,1904,1905],{},"Agent not found",[287,1907,1908],{},"Unknown device, or its agent no longer exists or belongs to another user.",[272,1910,1911,1915,1920],{},[287,1912,1913],{},[18,1914,339],{},[287,1916,1917],{},[18,1918,1919],{},"Agent is offline",[287,1921,1922],{},"The agent isn't connected.",[272,1924,1925,1929,1934],{},[287,1926,1927],{},[18,1928,343],{},[287,1930,1931],{},[18,1932,1933],{},"Failed to send wakeup command",[287,1935,1936],{},"The agent didn't answer within 5 seconds.",[272,1938,1939,1943,1948],{},[287,1940,1941],{},[18,1942,343],{},[287,1944,1945],{},[18,1946,1947],{},"Wakeup command failed: …",[287,1949,1950],{},"The agent rejected the command, for example because of an invalid MAC address.",[23,1952,1954],{"id":1953},"agent-websocket","Agent WebSocket",[14,1956,1957,1960,1961,21],{},[18,1958,1959],{},"\u002Fapi\u002Fagent-control-service"," is the WebSocket endpoint for agents, not a REST endpoint. See\n",[36,1962,1964],{"href":1963},"\u002Fdocs\u002Fagents\u002Fprotocol","Agent Protocol",[1966,1967,1968],"style",{},"html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}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 .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}",{"title":54,"searchDepth":68,"depth":68,"links":1970},[1971,1976,1981,1984,1993,2002],{"id":25,"depth":68,"text":26,"children":1972},[1973,1974,1975],{"id":30,"depth":99,"text":31},{"id":185,"depth":99,"text":186},{"id":350,"depth":99,"text":351},{"id":837,"depth":68,"text":31,"children":1977},[1978,1979,1980],{"id":840,"depth":99,"text":841},{"id":905,"depth":99,"text":906},{"id":919,"depth":99,"text":920},{"id":1085,"depth":68,"text":1086,"children":1982},[1983],{"id":1089,"depth":99,"text":1090},{"id":1213,"depth":68,"text":1214,"children":1985},[1986,1987,1988,1989,1990,1991,1992],{"id":1217,"depth":99,"text":1218},{"id":1231,"depth":99,"text":1232},{"id":1389,"depth":99,"text":1390},{"id":1491,"depth":99,"text":1492},{"id":1507,"depth":99,"text":1508},{"id":1525,"depth":99,"text":1526},{"id":1547,"depth":99,"text":1548},{"id":1562,"depth":68,"text":1563,"children":1994},[1995,1996,1997,1998,1999,2000,2001],{"id":1566,"depth":99,"text":1567},{"id":1584,"depth":99,"text":1585},{"id":1711,"depth":99,"text":1712},{"id":1806,"depth":99,"text":1807},{"id":1820,"depth":99,"text":1821},{"id":1837,"depth":99,"text":1838},{"id":1850,"depth":99,"text":1851},{"id":1953,"depth":68,"text":1954},"Reference for the NetIgnite server's HTTP API: authentication, accounts, agents, devices and Wake-on-LAN.","md",{},{"title":5},"\u002Fdocs\u002Freference\u002Fapi",{"title":5,"description":2003},"docs\u002Freference\u002Fapi","VeSN3uyHlgqcrPJvPEmotTGNJPJDLd5Q-FCxxPAOU-4",1792355946365]