Skip to content

docs: update REST API documentation to v2#135

Open
clutester wants to merge 1 commit into
mitre:masterfrom
clutester:docs/update-rest-api-v2
Open

docs: update REST API documentation to v2#135
clutester wants to merge 1 commit into
mitre:masterfrom
clutester:docs/update-rest-api-v2

Conversation

@clutester
Copy link
Copy Markdown

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

  • This change requires a documentation update.

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

  • Run each newly formatted API/v2 curl command against local instance to validate solutions.
  • Proof read changes to validate proper terminology is present.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant