docs: update REST API documentation to v2#135
Open
clutester wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Updates the Fieldmanual plugin documentation to reflect the current REST API v2 endpoints and syntax. Replaces outdated API v1 examples and corrects formatting issues that previously led to user errors (such as 500 Internal Server Errors during file exfiltration).
Specific updates include:
Updated example curl commands to use proper API v2 endpoint paths (/api/v2/...).
Corrected HTTP methods for resource interactions (e.g., using GET to view agent profiles/abilities instead of POST, and PATCH for updating operation states).
Fixed the multipart/form-data syntax in the /file/upload documentation to ensure the @ symbol is explicitly included so files are properly staged rather than passed as raw strings.
Added clarification on header formatting (e.g., KEY, Accept: application/json, and X-Request-Id).
Improved documentation by adding logical examples of widely used REST endpoints.
Type of change
How Has This Been Tested?
Please describe the tests that you ran to verify your changes.
Manual Command Execution: Manually executed the updated curl examples against a local Caldera instance to verify they return the expected HTTP 200 responses and properly formatted JSON payloads.
File Transfer Verification: Tested the /file/upload and /file/download exfiltration/staging commands between a remote agent host and the Caldera server to ensure files are successfully written to the data/exfil/ and data/payloads/ directories without triggering server-side 500 errors.
Checklist:
My code follows the style guidelines of this project
I have performed a self-review of my own code
I have made corresponding changes to the documentation
I have added tests that prove my fix is effective or that my feature works (N/A - Purely documentation)
Tests