index.blade.php (24853B)
1 <!doctype html> 2 <html lang="en"> 3 <head> 4 <meta charset="utf-8"> 5 <meta content="IE=edge,chrome=1" http-equiv="X-UA-Compatible"> 6 <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> 7 <title>Home ERP Documentation</title> 8 9 <link href="https://fonts.googleapis.com/css?family=Open+Sans&display=swap" rel="stylesheet"> 10 11 <link rel="stylesheet" href="{{ asset("/vendor/scribe/css/theme-default.style.css") }}" media="screen"> 12 <link rel="stylesheet" href="{{ asset("/vendor/scribe/css/theme-default.print.css") }}" media="print"> 13 14 <script src="https://cdn.jsdelivr.net/npm/lodash@4.17.10/lodash.min.js"></script> 15 16 <link rel="stylesheet" 17 href="https://unpkg.com/@highlightjs/cdn-assets@11.6.0/styles/obsidian.min.css"> 18 <script src="https://unpkg.com/@highlightjs/cdn-assets@11.6.0/highlight.min.js"></script> 19 20 <script src="https://cdnjs.cloudflare.com/ajax/libs/jets/0.14.1/jets.min.js"></script> 21 22 <style id="language-style"> 23 /* starts out as display none and is replaced with js later */ 24 body .content .bash-example code { display: none; } 25 body .content .javascript-example code { display: none; } 26 </style> 27 28 <script> 29 var tryItOutBaseUrl = "http://localhost"; 30 var useCsrf = Boolean(); 31 var csrfUrl = "/sanctum/csrf-cookie"; 32 </script> 33 <script src="{{ asset("/vendor/scribe/js/tryitout-4.25.0.js") }}"></script> 34 35 <script src="{{ asset("/vendor/scribe/js/theme-default-4.25.0.js") }}"></script> 36 37 </head> 38 39 <body data-languages="["bash","javascript"]"> 40 41 <a href="#" id="nav-button"> 42 <span> 43 MENU 44 <img src="{{ asset("/vendor/scribe/images/navbar.png") }}" alt="navbar-image"/> 45 </span> 46 </a> 47 <div class="tocify-wrapper"> 48 49 <div class="lang-selector"> 50 <button type="button" class="lang-button" data-language-name="bash">bash</button> 51 <button type="button" class="lang-button" data-language-name="javascript">javascript</button> 52 </div> 53 54 <div class="search"> 55 <input type="text" class="search" id="input-search" placeholder="Search"> 56 </div> 57 58 <div id="toc"> 59 <ul id="tocify-header-introduction" class="tocify-header"> 60 <li class="tocify-item level-1" data-unique="introduction"> 61 <a href="#introduction">Introduction</a> 62 </li> 63 </ul> 64 <ul id="tocify-header-authenticating-requests" class="tocify-header"> 65 <li class="tocify-item level-1" data-unique="authenticating-requests"> 66 <a href="#authenticating-requests">Authenticating requests</a> 67 </li> 68 </ul> 69 <ul id="tocify-header-endpoints" class="tocify-header"> 70 <li class="tocify-item level-1" data-unique="endpoints"> 71 <a href="#endpoints">Endpoints</a> 72 </li> 73 <ul id="tocify-subheader-endpoints" class="tocify-subheader"> 74 <li class="tocify-item level-2" data-unique="endpoints-GETapi-user"> 75 <a href="#endpoints-GETapi-user">GET api/user</a> 76 </li> 77 </ul> 78 </ul> 79 <ul id="tocify-header-rooms" class="tocify-header"> 80 <li class="tocify-item level-1" data-unique="rooms"> 81 <a href="#rooms">Rooms</a> 82 </li> 83 <ul id="tocify-subheader-rooms" class="tocify-subheader"> 84 <li class="tocify-item level-2" data-unique="rooms-GETapi-rooms--room_id-"> 85 <a href="#rooms-GETapi-rooms--room_id-">GET api/rooms/{room_id}</a> 86 </li> 87 <li class="tocify-item level-2" data-unique="rooms-GETapi-rooms"> 88 <a href="#rooms-GETapi-rooms">GET api/rooms</a> 89 </li> 90 </ul> 91 </ul> 92 </div> 93 94 <ul class="toc-footer" id="toc-footer"> 95 <li style="padding-bottom: 5px;"><a href="{{ route("scribe.postman") }}">View Postman collection</a></li> 96 <li style="padding-bottom: 5px;"><a href="{{ route("scribe.openapi") }}">View OpenAPI spec</a></li> 97 <li><a href="http://github.com/knuckleswtf/scribe">Documentation powered by Scribe ✍</a></li> 98 </ul> 99 100 <ul class="toc-footer" id="last-updated"> 101 <li>Last updated: October 21, 2023</li> 102 </ul> 103 </div> 104 105 <div class="page-wrapper"> 106 <div class="dark-box"></div> 107 <div class="content"> 108 <h1 id="introduction">Introduction</h1> 109 <aside> 110 <strong>Base URL</strong>: <code>http://localhost</code> 111 </aside> 112 <p>This documentation aims to provide all the information you need to work with our API.</p> 113 114 <h1 id="authenticating-requests">Authenticating requests</h1> 115 <p>To authenticate requests, include an <strong><code>Authorization</code></strong> header with the value <strong><code>"Bearer {YOUR_AUTH_KEY}"</code></strong>.</p> 116 <p>All authenticated endpoints are marked with a <code>requires authentication</code> badge in the documentation below.</p> 117 <p>You can retrieve your token by visiting your dashboard and clicking <b>Generate API token</b>.</p> 118 119 <h1 id="endpoints">Endpoints</h1> 120 121 122 123 <h2 id="endpoints-GETapi-user">GET api/user</h2> 124 125 <p> 126 <small class="badge badge-darkred">requires authentication</small> 127 </p> 128 129 130 131 <span id="example-requests-GETapi-user"> 132 <blockquote>Example request:</blockquote> 133 134 135 <div class="bash-example"> 136 <pre><code class="language-bash">curl --request GET \ 137 --get "http://localhost/api/user" \ 138 --header "Authorization: Bearer {YOUR_AUTH_KEY}" \ 139 --header "Content-Type: application/json" \ 140 --header "Accept: application/json"</code></pre></div> 141 142 143 <div class="javascript-example"> 144 <pre><code class="language-javascript">const url = new URL( 145 "http://localhost/api/user" 146 ); 147 148 const headers = { 149 "Authorization": "Bearer {YOUR_AUTH_KEY}", 150 "Content-Type": "application/json", 151 "Accept": "application/json", 152 }; 153 154 fetch(url, { 155 method: "GET", 156 headers, 157 }).then(response => response.json());</code></pre></div> 158 159 </span> 160 161 <span id="example-responses-GETapi-user"> 162 <blockquote> 163 <p>Example response (200):</p> 164 </blockquote> 165 <details class="annotation"> 166 <summary style="cursor: pointer;"> 167 <small onclick="textContent = parentElement.parentElement.open ? 'Show headers' : 'Hide headers'">Show headers</small> 168 </summary> 169 <pre><code class="language-http">cache-control: no-cache, private 170 content-type: application/json 171 x-ratelimit-limit: 60 172 x-ratelimit-remaining: 56 173 access-control-allow-origin: * 174 </code></pre></details> <pre> 175 176 <code class="language-json" style="max-height: 300px;">{ 177 "id": 1, 178 "name": "MTRNord", 179 "email": "mtrnord@nordgedanken.dev", 180 "email_verified_at": null, 181 "created_at": "2023-10-18T10:55:05.000000Z", 182 "updated_at": "2023-10-18T10:55:05.000000Z" 183 }</code> 184 </pre> 185 </span> 186 <span id="execution-results-GETapi-user" hidden> 187 <blockquote>Received response<span 188 id="execution-response-status-GETapi-user"></span>: 189 </blockquote> 190 <pre class="json"><code id="execution-response-content-GETapi-user" 191 data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre> 192 </span> 193 <span id="execution-error-GETapi-user" hidden> 194 <blockquote>Request failed with error:</blockquote> 195 <pre><code id="execution-error-message-GETapi-user"> 196 197 Tip: Check that you're properly connected to the network. 198 If you're a maintainer of ths API, verify that your API is running and you've enabled CORS. 199 You can check the Dev Tools console for debugging information.</code></pre> 200 </span> 201 <form id="form-GETapi-user" data-method="GET" 202 data-path="api/user" 203 data-authed="1" 204 data-hasfiles="0" 205 data-isarraybody="0" 206 autocomplete="off" 207 onsubmit="event.preventDefault(); executeTryOut('GETapi-user', this);"> 208 <h3> 209 Request 210 <button type="button" 211 style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;" 212 id="btn-tryout-GETapi-user" 213 onclick="tryItOut('GETapi-user');">Try it out ⚡ 214 </button> 215 <button type="button" 216 style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;" 217 id="btn-canceltryout-GETapi-user" 218 onclick="cancelTryOut('GETapi-user');" hidden>Cancel 🛑 219 </button> 220 <button type="submit" 221 style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;" 222 id="btn-executetryout-GETapi-user" 223 data-initial-text="Send Request 💥" 224 data-loading-text="⏱ Sending..." 225 hidden>Send Request 💥 226 </button> 227 </h3> 228 <p> 229 <small class="badge badge-green">GET</small> 230 <b><code>api/user</code></b> 231 </p> 232 <h4 class="fancy-heading-panel"><b>Headers</b></h4> 233 <div style="padding-left: 28px; clear: unset;"> 234 <b style="line-height: 2;"><code>Authorization</code></b> 235 236 237 <input type="text" style="display: none" 238 name="Authorization" class="auth-value" data-endpoint="GETapi-user" 239 value="Bearer {YOUR_AUTH_KEY}" 240 data-component="header"> 241 <br> 242 <p>Example: <code>Bearer {YOUR_AUTH_KEY}</code></p> 243 </div> 244 <div style="padding-left: 28px; clear: unset;"> 245 <b style="line-height: 2;"><code>Content-Type</code></b> 246 247 248 <input type="text" style="display: none" 249 name="Content-Type" data-endpoint="GETapi-user" 250 value="application/json" 251 data-component="header"> 252 <br> 253 <p>Example: <code>application/json</code></p> 254 </div> 255 <div style="padding-left: 28px; clear: unset;"> 256 <b style="line-height: 2;"><code>Accept</code></b> 257 258 259 <input type="text" style="display: none" 260 name="Accept" data-endpoint="GETapi-user" 261 value="application/json" 262 data-component="header"> 263 <br> 264 <p>Example: <code>application/json</code></p> 265 </div> 266 </form> 267 268 <h1 id="rooms">Rooms</h1> 269 270 271 272 <h2 id="rooms-GETapi-rooms--room_id-">GET api/rooms/{room_id}</h2> 273 274 <p> 275 <small class="badge badge-darkred">requires authentication</small> 276 </p> 277 278 279 280 <span id="example-requests-GETapi-rooms--room_id-"> 281 <blockquote>Example request:</blockquote> 282 283 284 <div class="bash-example"> 285 <pre><code class="language-bash">curl --request GET \ 286 --get "http://localhost/api/rooms/9a6c8f8c-df24-4958-86e1-2fe4bb3a7f28" \ 287 --header "Authorization: Bearer {YOUR_AUTH_KEY}" \ 288 --header "Content-Type: application/json" \ 289 --header "Accept: application/json"</code></pre></div> 290 291 292 <div class="javascript-example"> 293 <pre><code class="language-javascript">const url = new URL( 294 "http://localhost/api/rooms/9a6c8f8c-df24-4958-86e1-2fe4bb3a7f28" 295 ); 296 297 const headers = { 298 "Authorization": "Bearer {YOUR_AUTH_KEY}", 299 "Content-Type": "application/json", 300 "Accept": "application/json", 301 }; 302 303 fetch(url, { 304 method: "GET", 305 headers, 306 }).then(response => response.json());</code></pre></div> 307 308 </span> 309 310 <span id="example-responses-GETapi-rooms--room_id-"> 311 <blockquote> 312 <p>Example response (200):</p> 313 </blockquote> 314 <details class="annotation"> 315 <summary style="cursor: pointer;"> 316 <small onclick="textContent = parentElement.parentElement.open ? 'Show headers' : 'Hide headers'">Show headers</small> 317 </summary> 318 <pre><code class="language-http">cache-control: no-cache, private 319 content-type: application/json 320 x-ratelimit-limit: 60 321 x-ratelimit-remaining: 55 322 access-control-allow-origin: * 323 </code></pre></details> <pre> 324 325 <code class="language-json" style="max-height: 300px;">{ 326 "id": "9a6c8f8c-df24-4958-86e1-2fe4bb3a7f28", 327 "created_at": "2023-10-21T17:49:15.000000Z", 328 "updated_at": "2023-10-21T17:49:15.000000Z", 329 "name": "Test", 330 "description": "test", 331 "cabinet_id": null 332 }</code> 333 </pre> 334 </span> 335 <span id="execution-results-GETapi-rooms--room_id-" hidden> 336 <blockquote>Received response<span 337 id="execution-response-status-GETapi-rooms--room_id-"></span>: 338 </blockquote> 339 <pre class="json"><code id="execution-response-content-GETapi-rooms--room_id-" 340 data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre> 341 </span> 342 <span id="execution-error-GETapi-rooms--room_id-" hidden> 343 <blockquote>Request failed with error:</blockquote> 344 <pre><code id="execution-error-message-GETapi-rooms--room_id-"> 345 346 Tip: Check that you're properly connected to the network. 347 If you're a maintainer of ths API, verify that your API is running and you've enabled CORS. 348 You can check the Dev Tools console for debugging information.</code></pre> 349 </span> 350 <form id="form-GETapi-rooms--room_id-" data-method="GET" 351 data-path="api/rooms/{room_id}" 352 data-authed="1" 353 data-hasfiles="0" 354 data-isarraybody="0" 355 autocomplete="off" 356 onsubmit="event.preventDefault(); executeTryOut('GETapi-rooms--room_id-', this);"> 357 <h3> 358 Request 359 <button type="button" 360 style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;" 361 id="btn-tryout-GETapi-rooms--room_id-" 362 onclick="tryItOut('GETapi-rooms--room_id-');">Try it out ⚡ 363 </button> 364 <button type="button" 365 style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;" 366 id="btn-canceltryout-GETapi-rooms--room_id-" 367 onclick="cancelTryOut('GETapi-rooms--room_id-');" hidden>Cancel 🛑 368 </button> 369 <button type="submit" 370 style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;" 371 id="btn-executetryout-GETapi-rooms--room_id-" 372 data-initial-text="Send Request 💥" 373 data-loading-text="⏱ Sending..." 374 hidden>Send Request 💥 375 </button> 376 </h3> 377 <p> 378 <small class="badge badge-green">GET</small> 379 <b><code>api/rooms/{room_id}</code></b> 380 </p> 381 <h4 class="fancy-heading-panel"><b>Headers</b></h4> 382 <div style="padding-left: 28px; clear: unset;"> 383 <b style="line-height: 2;"><code>Authorization</code></b> 384 385 386 <input type="text" style="display: none" 387 name="Authorization" class="auth-value" data-endpoint="GETapi-rooms--room_id-" 388 value="Bearer {YOUR_AUTH_KEY}" 389 data-component="header"> 390 <br> 391 <p>Example: <code>Bearer {YOUR_AUTH_KEY}</code></p> 392 </div> 393 <div style="padding-left: 28px; clear: unset;"> 394 <b style="line-height: 2;"><code>Content-Type</code></b> 395 396 397 <input type="text" style="display: none" 398 name="Content-Type" data-endpoint="GETapi-rooms--room_id-" 399 value="application/json" 400 data-component="header"> 401 <br> 402 <p>Example: <code>application/json</code></p> 403 </div> 404 <div style="padding-left: 28px; clear: unset;"> 405 <b style="line-height: 2;"><code>Accept</code></b> 406 407 408 <input type="text" style="display: none" 409 name="Accept" data-endpoint="GETapi-rooms--room_id-" 410 value="application/json" 411 data-component="header"> 412 <br> 413 <p>Example: <code>application/json</code></p> 414 </div> 415 <h4 class="fancy-heading-panel"><b>URL Parameters</b></h4> 416 <div style="padding-left: 28px; clear: unset;"> 417 <b style="line-height: 2;"><code>room_id</code></b> 418 <small>string</small> 419 420 <input type="text" style="display: none" 421 name="room_id" data-endpoint="GETapi-rooms--room_id-" 422 value="9a6c8f8c-df24-4958-86e1-2fe4bb3a7f28" 423 data-component="url"> 424 <br> 425 <p>The UUID of the room. Example: <code>9a6c8f8c-df24-4958-86e1-2fe4bb3a7f28</code></p> 426 </div> 427 </form> 428 429 <h2 id="rooms-GETapi-rooms">GET api/rooms</h2> 430 431 <p> 432 <small class="badge badge-darkred">requires authentication</small> 433 </p> 434 435 436 437 <span id="example-requests-GETapi-rooms"> 438 <blockquote>Example request:</blockquote> 439 440 441 <div class="bash-example"> 442 <pre><code class="language-bash">curl --request GET \ 443 --get "http://localhost/api/rooms" \ 444 --header "Authorization: Bearer {YOUR_AUTH_KEY}" \ 445 --header "Content-Type: application/json" \ 446 --header "Accept: application/json"</code></pre></div> 447 448 449 <div class="javascript-example"> 450 <pre><code class="language-javascript">const url = new URL( 451 "http://localhost/api/rooms" 452 ); 453 454 const headers = { 455 "Authorization": "Bearer {YOUR_AUTH_KEY}", 456 "Content-Type": "application/json", 457 "Accept": "application/json", 458 }; 459 460 fetch(url, { 461 method: "GET", 462 headers, 463 }).then(response => response.json());</code></pre></div> 464 465 </span> 466 467 <span id="example-responses-GETapi-rooms"> 468 <blockquote> 469 <p>Example response (200):</p> 470 </blockquote> 471 <details class="annotation"> 472 <summary style="cursor: pointer;"> 473 <small onclick="textContent = parentElement.parentElement.open ? 'Show headers' : 'Hide headers'">Show headers</small> 474 </summary> 475 <pre><code class="language-http">cache-control: no-cache, private 476 content-type: application/json 477 x-ratelimit-limit: 60 478 x-ratelimit-remaining: 54 479 access-control-allow-origin: * 480 </code></pre></details> <pre> 481 482 <code class="language-json" style="max-height: 300px;">[ 483 { 484 "id": "9a6c8f8c-df24-4958-86e1-2fe4bb3a7f28", 485 "created_at": "2023-10-21T17:49:15.000000Z", 486 "updated_at": "2023-10-21T17:49:15.000000Z", 487 "name": "Test", 488 "description": "test", 489 "cabinet_id": null 490 }, 491 { 492 "id": "9a6c90b0-b901-4b06-bc63-bc6a576eebd3", 493 "created_at": "2023-10-21T17:52:26.000000Z", 494 "updated_at": "2023-10-21T17:52:26.000000Z", 495 "name": "Test2", 496 "description": "test", 497 "cabinet_id": null 498 } 499 ]</code> 500 </pre> 501 </span> 502 <span id="execution-results-GETapi-rooms" hidden> 503 <blockquote>Received response<span 504 id="execution-response-status-GETapi-rooms"></span>: 505 </blockquote> 506 <pre class="json"><code id="execution-response-content-GETapi-rooms" 507 data-empty-response-text="<Empty response>" style="max-height: 400px;"></code></pre> 508 </span> 509 <span id="execution-error-GETapi-rooms" hidden> 510 <blockquote>Request failed with error:</blockquote> 511 <pre><code id="execution-error-message-GETapi-rooms"> 512 513 Tip: Check that you're properly connected to the network. 514 If you're a maintainer of ths API, verify that your API is running and you've enabled CORS. 515 You can check the Dev Tools console for debugging information.</code></pre> 516 </span> 517 <form id="form-GETapi-rooms" data-method="GET" 518 data-path="api/rooms" 519 data-authed="1" 520 data-hasfiles="0" 521 data-isarraybody="0" 522 autocomplete="off" 523 onsubmit="event.preventDefault(); executeTryOut('GETapi-rooms', this);"> 524 <h3> 525 Request 526 <button type="button" 527 style="background-color: #8fbcd4; padding: 5px 10px; border-radius: 5px; border-width: thin;" 528 id="btn-tryout-GETapi-rooms" 529 onclick="tryItOut('GETapi-rooms');">Try it out ⚡ 530 </button> 531 <button type="button" 532 style="background-color: #c97a7e; padding: 5px 10px; border-radius: 5px; border-width: thin;" 533 id="btn-canceltryout-GETapi-rooms" 534 onclick="cancelTryOut('GETapi-rooms');" hidden>Cancel 🛑 535 </button> 536 <button type="submit" 537 style="background-color: #6ac174; padding: 5px 10px; border-radius: 5px; border-width: thin;" 538 id="btn-executetryout-GETapi-rooms" 539 data-initial-text="Send Request 💥" 540 data-loading-text="⏱ Sending..." 541 hidden>Send Request 💥 542 </button> 543 </h3> 544 <p> 545 <small class="badge badge-green">GET</small> 546 <b><code>api/rooms</code></b> 547 </p> 548 <h4 class="fancy-heading-panel"><b>Headers</b></h4> 549 <div style="padding-left: 28px; clear: unset;"> 550 <b style="line-height: 2;"><code>Authorization</code></b> 551 552 553 <input type="text" style="display: none" 554 name="Authorization" class="auth-value" data-endpoint="GETapi-rooms" 555 value="Bearer {YOUR_AUTH_KEY}" 556 data-component="header"> 557 <br> 558 <p>Example: <code>Bearer {YOUR_AUTH_KEY}</code></p> 559 </div> 560 <div style="padding-left: 28px; clear: unset;"> 561 <b style="line-height: 2;"><code>Content-Type</code></b> 562 563 564 <input type="text" style="display: none" 565 name="Content-Type" data-endpoint="GETapi-rooms" 566 value="application/json" 567 data-component="header"> 568 <br> 569 <p>Example: <code>application/json</code></p> 570 </div> 571 <div style="padding-left: 28px; clear: unset;"> 572 <b style="line-height: 2;"><code>Accept</code></b> 573 574 575 <input type="text" style="display: none" 576 name="Accept" data-endpoint="GETapi-rooms" 577 value="application/json" 578 data-component="header"> 579 <br> 580 <p>Example: <code>application/json</code></p> 581 </div> 582 </form> 583 584 585 586 587 </div> 588 <div class="dark-box"> 589 <div class="lang-selector"> 590 <button type="button" class="lang-button" data-language-name="bash">bash</button> 591 <button type="button" class="lang-button" data-language-name="javascript">javascript</button> 592 </div> 593 </div> 594 </div> 595 </body> 596 </html>