mirror of
https://github.com/unraid/api.git
synced 2026-01-02 22:50:02 -06:00
fix: simplify api setup index
This commit is contained in:
@@ -6,17 +6,17 @@ The Unraid API provides a GraphQL interface that allows you to interact with you
|
|||||||
|
|
||||||
1. First, enable developer mode using the CLI:
|
1. First, enable developer mode using the CLI:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
unraid-api developer
|
unraid-api developer
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Follow the prompts to enable the sandbox. This will allow you to access the Apollo Sandbox interface.
|
2. Follow the prompts to enable the sandbox. This will allow you to access the Apollo Sandbox interface.
|
||||||
|
|
||||||
3. Access the GraphQL playground by navigating to:
|
3. Access the GraphQL playground by navigating to:
|
||||||
|
|
||||||
```
|
```txt
|
||||||
http://YOUR_SERVER_IP/graphql
|
http://YOUR_SERVER_IP/graphql
|
||||||
```
|
```
|
||||||
|
|
||||||
## Authentication
|
## Authentication
|
||||||
|
|
||||||
@@ -44,7 +44,7 @@ The generated API key should be included in your GraphQL requests as a header:
|
|||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"x-api-key": "YOUR_API_KEY"
|
"x-api-key": "YOUR_API_KEY"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -83,20 +83,20 @@ The API provides access to various aspects of your Unraid server:
|
|||||||
|
|
||||||
```graphql
|
```graphql
|
||||||
query {
|
query {
|
||||||
info {
|
info {
|
||||||
os {
|
os {
|
||||||
platform
|
platform
|
||||||
distro
|
distro
|
||||||
release
|
release
|
||||||
uptime
|
uptime
|
||||||
|
}
|
||||||
|
cpu {
|
||||||
|
manufacturer
|
||||||
|
brand
|
||||||
|
cores
|
||||||
|
threads
|
||||||
|
}
|
||||||
}
|
}
|
||||||
cpu {
|
|
||||||
manufacturer
|
|
||||||
brand
|
|
||||||
cores
|
|
||||||
threads
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -104,22 +104,22 @@ query {
|
|||||||
|
|
||||||
```graphql
|
```graphql
|
||||||
query {
|
query {
|
||||||
array {
|
array {
|
||||||
state
|
state
|
||||||
capacity {
|
capacity {
|
||||||
disks {
|
disks {
|
||||||
free
|
free
|
||||||
used
|
used
|
||||||
total
|
total
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
disks {
|
||||||
|
name
|
||||||
|
size
|
||||||
|
status
|
||||||
|
temp
|
||||||
|
}
|
||||||
}
|
}
|
||||||
disks {
|
|
||||||
name
|
|
||||||
size
|
|
||||||
status
|
|
||||||
temp
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -127,13 +127,13 @@ query {
|
|||||||
|
|
||||||
```graphql
|
```graphql
|
||||||
query {
|
query {
|
||||||
dockerContainers {
|
dockerContainers {
|
||||||
id
|
id
|
||||||
names
|
names
|
||||||
state
|
state
|
||||||
status
|
status
|
||||||
autoStart
|
autoStart
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ The Unraid API provides a GraphQL interface for programmatic interaction with yo
|
|||||||
The API is available through the Unraid Connect Plugin:
|
The API is available through the Unraid Connect Plugin:
|
||||||
|
|
||||||
1. Install Unraid Connect Plugin from Apps
|
1. Install Unraid Connect Plugin from Apps
|
||||||
2. Configure the plugin
|
2. [Configure the plugin](./how-to-use-the-api.md#enabling-the-graphql-sandbox)
|
||||||
3. Access API functionality through the plugin interface
|
3. Access API functionality through the [GraphQL Sandbox](./how-to-use-the-api.md#accessing-the-graphql-sandbox)
|
||||||
|
|
||||||
## Future Availability
|
## Future Availability
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user