-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update API Documentation #234
Conversation
WalkthroughThe changes update the documentation for the Unraid API by adding detailed sections on the command-line interface (CLI), a comprehensive guide for using the API with GraphQL, and a release roadmap covering upcoming features. The CLI documentation now includes various commands such as start, stop, restart, logs, configuration, API key management, SSO management, and report generation. The API guide outlines steps for enabling developer mode, authentication, schema usage, and best practices, while the roadmap document defines feature statuses across multiple categories. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant CLI
participant API_Server
User->>CLI: Enter a CLI command (e.g., start, stop)
CLI->>API_Server: Send command request
API_Server-->>CLI: Process and return status/logs
CLI-->>User: Display command output
sequenceDiagram
participant User
participant CLI/Sandbox
participant API_GraphQL_Server
User->>CLI/Sandbox: Enable Developer Mode/Access GraphQL Sandbox
CLI/Sandbox->>API_GraphQL_Server: Authenticate & send GraphQL query
API_GraphQL_Server-->>CLI/Sandbox: Return queried data
CLI/Sandbox-->>User: Display results
Suggested Reviewers
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (5)
docs/api/public/cli.md (2)
11-11
: Fix formatting inconsistency in option lists.The bullet points for command options have inconsistent spacing. Some have extra spaces before the bullet point which affects rendering.
Apply this formatting fix to maintain consistency:
- - `--log-level`: Optional. Set logging level (trace|debug|info|warn|error) +- `--log-level`: Optional. Set logging level (trace|debug|info|warn|error) - - `--delete`: Optional. Delete the PM2 home directory +- `--delete`: Optional. Delete the PM2 home directory - - `-l, --lines`: Optional. Number of lines to tail (default: 100) +- `-l, --lines`: Optional. Number of lines to tail (default: 100) - - `-e, --environment`: Optional. Target environment (production|staging) +- `-e, --environment`: Optional. Target environment (production|staging) - - `--name <name>`: Name of the key +- `--name <name>`: Name of the key - - `-r, --raw`: Display raw command output +- `-r, --raw`: Display raw command outputAlso applies to: 21-21, 39-39, 59-59, 81-81, 153-153
🧰 Tools
🪛 LanguageTool
[uncategorized] ~11-~11: Loose punctuation mark.
Context: ...the Unraid API service. ---log-level
: Optional. Set logging level (trace|debu...(UNLIKELY_OPENING_PUNCTUATION)
158-161
: Enhance the notes section with additional details.The notes section could benefit from more detailed explanations and proper punctuation.
Apply these improvements:
-1. Most commands that modify the system state will require appropriate permissions. -2. Some commands may require the API to be running or stopped depending on their function. -3. When using API keys, ensure you store them securely as they provide access to your system. -4. SSO configuration changes may require a service restart to take effect. +1. Most commands that modify the system state will require appropriate permissions (e.g., admin role). +2. Some commands may require the API to be running or stopped, depending on their function. +3. When using API keys, ensure you store them securely, as they provide access to your system. +4. SSO configuration changes may require a service restart to take effect. Use the `restart` command after making changes.🧰 Tools
🪛 LanguageTool
[uncategorized] ~159-~159: Possible missing comma found.
Context: ...ds may require the API to be running or stopped depending on their function. 3. When us...(AI_HYDRA_LEO_MISSING_COMMA)
[uncategorized] ~160-~160: Possible missing comma found.
Context: ...n using API keys, ensure you store them securely as they provide access to your system. ...(AI_HYDRA_LEO_MISSING_COMMA)
docs/api/public/how-to-use-the-api.md (3)
17-19
: Add language identifier to the code block.The code block for the server URL should specify a language for proper syntax highlighting.
Apply this fix:
-``` +```plaintext http://YOUR_SERVER_IP/graphql🧰 Tools
🪛 markdownlint-cli2 (0.17.2)
17-17: Fenced code blocks should have a language specified
null(MD040, fenced-code-language)
26-26
: Fix grammatical error in authentication section.The phrase "signed into" should be "signed in to" when referring to computer systems.
Apply this fix:
-2. Cookies (default method when signed into the WebGUI) +2. Cookies (default method when signed in to the WebGUI)🧰 Tools
🪛 LanguageTool
[grammar] ~26-~26: The verb ‘signed into’ is not standard English, except in the context of the law (“The bill was signed into law”). Write “signed in to”. For websites and computers, other options are “logged in to” or “logged on to”.
Context: ...PI Keys 2. Cookies (default method when signed into the WebGUI) ### Creating an API Key U...(SIGN_INTO)
169-174
: Enhance best practices section with security recommendations.The best practices section could benefit from additional security-focused recommendations.
Add these important security practices:
1. Use the Apollo Sandbox to explore the schema and test queries 2. Start with small queries and gradually add fields as needed 3. Monitor your query complexity to maintain performance 4. Use appropriate roles and permissions for your API keys 5. Keep your API keys secure and rotate them periodically +6. Implement request timeouts in your applications +7. Use HTTPS for all API communications +8. Implement proper error handling for rate limits and authentication failures +9. Regularly audit API key usage and revoke unused keys🧰 Tools
🪛 LanguageTool
[grammar] ~170-~170: The verb “Monitor” needs to be in the to-infinitive form.
Context: ...all queries and gradually add fields as needed 3. Monitor your query complexity to maintain perfo...(MISSING_TO_BEFORE_A_VERB)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
docs/api/public/cli.md
(1 hunks)docs/api/public/how-to-use-the-api.md
(1 hunks)docs/api/public/upcoming-features.md
(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- docs/api/public/upcoming-features.md
🧰 Additional context used
🪛 LanguageTool
docs/api/public/cli.md
[uncategorized] ~11-~11: Loose punctuation mark.
Context: ...the Unraid API service. - --log-level
: Optional. Set logging level (trace|debu...
(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~21-~21: Loose punctuation mark.
Context: ...ps the Unraid API service. - --delete
: Optional. Delete the PM2 home directory...
(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~39-~39: Loose punctuation mark.
Context: ...``` View the API logs. - -l, --lines
: Optional. Number of lines to tail (defa...
(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~59-~59: Loose punctuation mark.
Context: ...ing environments. - -e, --environment
: Optional. Target environment (productio...
(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~81-~81: Loose punctuation mark.
Context: ...e API keys. Options: - --name <name>
: Name of the key - --create
: Create a ...
(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~153-~153: Loose punctuation mark.
Context: ...Generate a system report. - -r, --raw
: Display raw command output - `-j, --jso...
(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~159-~159: Possible missing comma found.
Context: ...ds may require the API to be running or stopped depending on their function. 3. When us...
(AI_HYDRA_LEO_MISSING_COMMA)
[uncategorized] ~160-~160: Possible missing comma found.
Context: ...n using API keys, ensure you store them securely as they provide access to your system. ...
(AI_HYDRA_LEO_MISSING_COMMA)
docs/api/public/how-to-use-the-api.md
[grammar] ~26-~26: The verb ‘signed into’ is not standard English, except in the context of the law (“The bill was signed into law”). Write “signed in to”. For websites and computers, other options are “logged in to” or “logged on to”.
Context: ...PI Keys 2. Cookies (default method when signed into the WebGUI) ### Creating an API Key U...
(SIGN_INTO)
[uncategorized] ~146-~146: Loose punctuation mark.
Context: ...al core types: ### Base Types - Node
: Interface for objects with unique IDs -...
(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~153-~153: Loose punctuation mark.
Context: ... integers ### Resource Types - Array
: Array and disk management - Docker
: C...
(UNLIKELY_OPENING_PUNCTUATION)
[uncategorized] ~163-~163: Loose punctuation mark.
Context: ...ased Access Available roles: - admin
: Full access - connect
: Remote access ...
(UNLIKELY_OPENING_PUNCTUATION)
[grammar] ~170-~170: The verb “Monitor” needs to be in the to-infinitive form.
Context: ...all queries and gradually add fields as needed 3. Monitor your query complexity to maintain perfo...
(MISSING_TO_BEFORE_A_VERB)
🪛 markdownlint-cli2 (0.17.2)
docs/api/public/how-to-use-the-api.md
17-17: Fenced code blocks should have a language specified
null
(MD040, fenced-code-language)
⏰ Context from checks skipped due to timeout of 90000ms (2)
- GitHub Check: build
- GitHub Check: AWS Amplify Console Web Preview
This pull request is automatically being deployed by Amplify Hosting (learn more). |
23eea11
to
3010db5
Compare
3010db5
to
5a9f5a2
Compare
This PR updates the API documentation based on changes from the main repository.
Changes were automatically generated from api/docs/* directory.
@coderabbitai ignore