REST Interface
The SATriage REST API exposes endpoints covering projects, profiles, reports, tools, and user administration. All requests require authentication using API tokens (via the SATriageToken header) or an active browser session.
Requestor Verification (userId Parameter): Where required, the userId={user_id} query parameter identifies the calling requestor (not the target resource). As a secondary security control, the server verifies that this value matches the user ID embedded inside the supplied session or API token—preventing a stolen token from being used unless the caller also knows the associated user ID.
Projects Endpoints
The /api/projects service enables programmatic CRUD operations, Git source retrieval, language-based tool suggestions, automated AST execution, triage analysis, and asynchronous job polling for software projects:
Retrieves a list of all software projects accessible to the specified user, including owned and shared projects.
| Success Code | 200 OK |
|---|---|
| Response Header | Content-Type: application/json |
| Response Body | JSON array containing project objects. |
Retrieves complete configuration and context details for a single project by its unique identifier.
| Success Code | 200 OK |
|---|---|
| Response Header | Content-Type: application/json |
| Response Body | JSON object representing the requested project definition. |
Provisions a new software project definition. Append share=true to immediately grant read access across the organization.
| Success Code | 201 Created |
|---|---|
| Request Body | JSON object containing the project definition, source repositories, and deployment parameters. |
| Response Header | Content-Type: application/json |
| Response Body | Created project JSON object, including its assigned unique id. |
Updates an existing software project. Only the project owner or administrators can update definitions.
| Success Code | 201 Created |
|---|---|
| Request Body | JSON object containing updated project fields. |
| Response Header | Content-Type: application/json |
Permanently removes a project definition and unlinks its associated scan metadata.
| Success Code | 200 OK |
|---|---|
| Response Header | Content-Type: application/json |
Executes an immediate synchronous triage analysis against the specified project's existing scan results using the supplied evaluation profile.
| Query Parameters |
profile (required): Evaluation profile identifier.detail (optional): Level of defect verbosity (full or brief).maxResults (optional): Caps the output to the top N ranked findings.saveResults (optional): Set to true to incorporate metrics into Management Reports.
|
|---|---|
| Success Code | 201 Created |
| Response Header | Content-Type: application/json |
| Response Body | SARIF-formatted AnalysisResult JSON object containing the assigned analysis identifier, result expiration window, and the 1-to-N ranked defect findings. |
Triggers asynchronous batch analysis across all registered software projects (requires Manager or Administrator role) and saves results for Management Reports.
| Query Parameters |
profile (required): Evaluation profile identifier.detail (optional): Level of defect verbosity (full or brief).maxResults (optional): Caps the output per project to the top N ranked findings.
|
|---|---|
| Success Code | 202 Accepted |
| Response Headers |
Content-Type: application/jsonLocation: /api/projects/jobs/{jobId}Retry-After: 5
|
| Response Body | JSON representation of a JobStatus object. Once state reaches COMPLETED via the job status endpoint, result contains a list of SARIF AnalysisResult objects. |
Queues asynchronous execution of all built-in AST tools configured for the project (pulling fresh Git code when applicable).
| Query Parameters | sendMail (optional): Set to true to email the user when scanning completes. |
|---|---|
| Success Code | 202 Accepted |
| Response Headers |
Content-Type: application/jsonLocation: /api/projects/jobs/{jobId}Retry-After: 5
|
| Response Body | JSON representation of a JobStatus object containing jobId, projectId, statusUrl, createdAt, state, progress, and message. |
Queues an asynchronous two-phase pipeline that first executes all configured AST scanning tools on the project and then immediately runs SARIF triage analysis using the specified profile.
| Query Parameters |
profile (required): Evaluation profile identifier.detail (optional): Level of defect verbosity (full or brief).maxResults (optional): Caps the output to the top N ranked findings.saveResults (optional): Set to true to incorporate metrics into Management Reports.sendMail (optional): Set to true to email the user when scan and analysis complete.
|
|---|---|
| Success Code | 202 Accepted |
| Response Headers |
Content-Type: application/jsonLocation: /api/projects/jobs/{jobId}Retry-After: 5
|
| Response Body | JSON representation of a JobStatus object. Once state reaches COMPLETED, result contains a list holding the generated SARIF AnalysisResult object. |
Synchronously retrieves source code for the project from a remote Git repository, performing a git pull if the repository already exists locally or a git clone if it does not. Does not return until the operation completes.
| Query Parameters | repoURL (required): URL-encoded remote Git repository URL (starting with http:// or https://). |
|---|---|
| Success Code | 200 OK |
| Error Codes | 400 Bad Request (missing or invalid repoURL), 401 Unauthorized (not authorized or project not found), 500 Internal Server Error (pull or clone failed) |
| Response Header | Content-Type: application/json |
| Response Body | JSON object indicating success (status and repoURL) or an error message. |
Inspects the programming languages detected in the project's configured source paths and returns the static analysis tools applicable to those languages.
| Success Code | 200 OK |
|---|---|
| Error Codes | 401 Unauthorized (not authorized or project not found), 500 Internal Server Error (failed to determine suggested tools) |
| Response Header | Content-Type: application/json |
| Response Body | JSON array of applicable Tool names (for example, ["PMD", "ESLint"]). |
Checks whether a specific project currently has an active asynchronous job (PENDING or RUNNING).
| Success Codes | 200 OK (active job found), 204 No Content (no active job for this project) |
|---|---|
| Error Codes | 401 Unauthorized (not authorized or project not found) |
| Response Headers |
Content-Type: application/json (on 200 OK)Retry-After: 5 (on 200 OK)
|
| Response Body | JSON representation of the active JobStatus object (200 OK only). |
Polls the execution state, percentage progress, status message, and completed SARIF results of any asynchronous job started by /scan, /scanAndAnalyze, or /api/projects/analyze.
| Success Code | 200 OK |
|---|---|
| Error Codes | 404 Not Found (job ID unknown or expired after TTL), 401 Unauthorized |
| Response Header | Content-Type: application/json |
| Response Body | JSON JobStatus object with state (PENDING, RUNNING, COMPLETED, or FAILED), progress (0–100), message, finishedAt (epoch ms once finished), and result (when applicable). |
Profiles Endpoints
The /api/profiles service manages analytical queries and prioritization profiles used to weight defect findings during analysis:
Retrieves a list of all query profiles defined for the tenant organization, including default system profiles and custom shared profiles.
| Success Code | 200 OK |
|---|---|
| Response Header | Content-Type: application/json |
| Response Body | JSON array containing profile objects. |
Retrieves the complete definition, configuration parameters, and risk weight rankings for a single profile by its unique identifier.
| Success Code | 200 OK |
|---|---|
| Response Header | Content-Type: application/json |
| Response Body | JSON object representing the requested profile. |
Provisions a new evaluation profile with custom defect risk ordering or weighting rules.
| Success Code | 201 Created |
|---|---|
| Request Body | JSON object containing the profile definition (Name, Profile Type, Share flag, and Code Defect Risk order mappings). |
| Response Header | Content-Type: application/json |
| Response Body | Created profile JSON object, including its assigned unique id. |
Updates an existing evaluation profile. Replaces or amends risk categories, ordering, and metadata.
| Success Code | 201 Created |
|---|---|
| Request Body | JSON object containing updated profile parameters. |
| Response Header | Content-Type: application/json |
Permanently deletes a specified evaluation profile from the organization's repository.
| Success Code | 200 OK |
|---|---|
| Response Header | Content-Type: application/json |
Reports Endpoints
The /api/reports service enables programmatic discovery and generation of executive and management reports:
Retrieves a list of all available management report identifiers configured within the system.
| Success Code | 200 OK |
|---|---|
| Response Header | Content-Type: application/json |
| Response Body | JSON array containing report ID string objects. |
Executes and compiles a specific management report by its identifier, returning the structured reporting output and aggregated metrics.
| Success Code | 201 Created |
|---|---|
| Response Header | Content-Type: application/json |
| Response Body | JSON object containing compiled report output and summary data. |
Tools Endpoints
The /api/tools service queries the security scanners installed and available for execution within the SATriage instance:
Retrieves a list of all available built-in AST scanning tools installed and ready to execute within this SATriage instance.
| Success Code | 200 OK |
|---|---|
| Response Header | Content-Type: application/json |
| Response Body | JSON array of tool names (for example, ["bandit", "PMD"]). |
Users Endpoints
The /api/users service provides programmatic CRUD management for user accounts within the tenant organization. All operations require the requesting user to hold the Administrator role (returning 401 Unauthorized otherwise). In single-user routes, {id} identifies the target user account being viewed or modified, while userId={user_id} identifies the calling administrator for token verification:
Retrieves all user accounts belonging to the administrator's customer organization.
| Success Code | 200 OK |
|---|---|
| Response Header | Content-Type: application/json |
| Response Body | JSON array of User objects. |
Retrieves account details, assigned roles, and license settings for a single user by ID.
| Success Code | 200 OK |
|---|---|
| Response Header | Content-Type: application/json |
| Response Body | JSON representation of the requested User object. |
Creates a new user account within the customer organization and persists state. Returns 400 Bad Request if the user ID already exists or uses a reserved system identifier.
| Success Code | 201 Created |
|---|---|
| Request Body | JSON User object including unique id, name, email, password, roles, and optional license, organization, and phone fields. |
| Response Header | Content-Type: application/json |
| Response Body | Created User JSON object. |
Updates an existing user account and persists state. The payload's id must match the path parameter and correspond to an existing user.
| Success Code | 201 Created |
|---|---|
| Request Body | JSON User object containing updated profile, credential, license, or role fields. |
| Response Header | Content-Type: application/json |
| Response Body | Updated User JSON object. |
Deletes a user account from the organization and persists state. System accounts and the currently authenticated administrator cannot be deleted.
| Success Code | 200 OK |
|---|---|
| Response Header | Content-Type: application/json |
Model Context Protocol (MCP) Interface
SATriage exposes a native Model Context Protocol (MCP) HTTP endpoint at /mcp. Operating as a stateless JSON-RPC 2.0 gateway front-end to the underlying REST architecture, this endpoint enables AI engineering assistants and LLM agents (such as Claude Desktop, Cursor, Hermes, and OpenClaw) to inspect project definitions, retrieve remote Git repositories, discover installed and language-appropriate scanning tools, trigger asynchronous static code scans, poll job progress, and ingest prioritized SARIF defect lists autonomously.
Protocol & Connection Details
| Endpoint URL | /mcp (HTTP POST for JSON-RPC messages; HTTP DELETE for session teardown) |
|---|---|
| Protocol Version | 2024-11-05 (JSON-RPC 2.0 with stateless Mcp-Session-Id negotiation) |
| Server Identifier | project-and-profile-management-mcp-server (v1.5.0) |
| Authentication |
Requires standard session authentication or programmatic token passed via header: SATriageToken: <API_TOKEN>. User identity (userId) is automatically resolved from the token context.
|
Sample Client Configuration
To connect an external MCP-compatible client (e.g., Claude Desktop, IDE extensions) to your SATriage instance, configure an HTTP MCP server entry in your client settings file:
{
"mcpServers": {
"satriage": {
"url": "https://your-satriage-host/mcp",
"headers": {
"SATriageToken": "<YOUR_SATRIAGE_API_TOKEN>"
}
}
}
}
Supported MCP Methods
initialize: Negotiates client capabilities, establishes protocol version2024-11-05, mints anMcp-Session-Idresponse header, and reports server metadata.ping: Responds to client liveness checks with an empty JSON-RPC result object.notifications/initialized: Acknowledges client readiness (returns HTTP202 Accepted).tools/list: Returns JSON Schema definitions for all available project, job, profile, and scanning tool endpoints.tools/call: Executes a specific tool by forwarding parameters to the respective SATriage REST endpoint and returning the output as formatted content.
Available MCP Tools
The MCP handler exposes 19 discrete tools mapped directly to Project, Asynchronous Job, Profile, and Scanning Tool lifecycle workflows:
Lists all software projects accessible to the authenticated user.
| Arguments | None |
|---|---|
| Underlying REST Call | GET /api/projects?userId={user_id} |
Retrieves configuration details and metadata for a single project.
| Arguments | id (string, required): Project identifier. |
|---|---|
| Underlying REST Call | GET /api/projects/{id}?userId={user_id} |
Provisions a new software project definition.
| Arguments |
projectData (object, required): Full Project POJO payload.share (boolean, optional): Whether to share the project organization-wide.
|
|---|---|
| Underlying REST Call | POST /api/projects?userId={user_id}[&share=true] |
Updates an existing software project configuration.
| Arguments |
id (string, required): Project ID to update.projectData (object, required): Updated Project POJO schema.share (boolean, optional): Whether to share the project.
|
|---|---|
| Underlying REST Call | PUT /api/projects/{id}?userId={user_id}[&share=true] |
Deletes a specified software project definition.
| Arguments | id (string, required): Project identifier. |
|---|---|
| Underlying REST Call | DELETE /api/projects/{id}?userId={user_id} |
Synchronously runs SARIF static triage analysis on a single project's existing scan results using a designated analysis profile ID.
| Arguments |
id (string, required): Project ID.profile (string, required): Target profile identifier (use list_profiles to discover).detail (string, optional, enum: ["brief", "full"], default: "brief"): Verbosity of defect output. Note: Always prefer brief (~2.7MB) to prevent context window overflow; full (~27MB) can exceed token limits.maxResults (integer, optional): Maximum defect results to return in SARIF output.saveResults (boolean, optional): Updates cumulative baseline statistics for Management Reports.
|
|---|---|
| Underlying REST Call | GET /api/projects/{id}/analyze?userId={user_id}&profile={profile_id}... |
Triggers asynchronous static analysis across all projects in the background and saves results. Returns an HTTP 202 JobStatus JSON containing a jobId that can be polled via get_job_status to track progress and retrieve the resulting list of SARIF AnalysisResult objects.
| Arguments |
profile (string, required): Analysis Profile ID.detail (string, optional, enum: ["brief", "full"], default: "brief"): Verbosity of defect output.maxResults (integer, optional): Maximum results per project.
|
|---|---|
| Underlying REST Call | POST /api/projects/analyze?userId={user_id}&profile={profile_id}... |
Triggers configured AST scanning tools asynchronously on a single project. Returns an HTTP 202 JobStatus JSON containing a jobId that can be polled via get_job_status until state is COMPLETED or FAILED.
| Arguments |
id (string, required): Project ID.sendMail (boolean, optional): Send email notification when scanning completes.
|
|---|---|
| Underlying REST Call | POST /api/projects/{id}/scan?userId={user_id}[&sendMail=true] |
Triggers configured AST scanning tools followed by SARIF static analysis asynchronously on a single project. Returns an HTTP 202 JobStatus JSON containing a jobId that can be polled via get_job_status; when state is COMPLETED, result contains the SARIF AnalysisResult.
| Arguments |
id (string, required): Project ID.profile (string, required): Target profile identifier.detail (string, optional, enum: ["brief", "full"], default: "brief"): Verbosity of defect output.maxResults (integer, optional): Maximum defect results to return in SARIF output.saveResults (boolean, optional): Save results on backend for Management Reports.sendMail (boolean, optional): Send email notification when scan and analysis complete.
|
|---|---|
| Underlying REST Call | POST /api/projects/{id}/scanAndAnalyze?userId={user_id}&profile={profile_id}... |
Synchronously pulls a remote Git repository if it already exists locally, or clones it if it does not, for a given project. Blocks until the pull or clone completes.
| Arguments |
id (string, required): Project ID.repoURL (string, required): Remote Git repository URL (starting with http:// or https://).
|
|---|---|
| Underlying REST Call | POST /api/projects/{id}/getSource?userId={user_id}&repoURL={URL_OF_REPO} |
Returns a JSON array of static analysis scanning tools applicable to a given project based on the source code languages detected in its configured source paths.
| Arguments | id (string, required): Project ID. |
|---|---|
| Underlying REST Call | GET /api/projects/{id}/suggestedTools?userId={user_id} |
Checks for an active asynchronous job (PENDING or RUNNING) for a given project by project ID. Returns the active JobStatus object if one is running (HTTP 200), or {"status": "success", "code": 204} if no active job exists.
| Arguments | id (string, required): Project ID. |
|---|---|
| Underlying REST Call | GET /api/projects/{id}/job?userId={user_id} |
Polls the status and progress of an asynchronous job (started by scan_project, scan_and_analyze_project, or analyze_all_projects) by jobId. Returns a JobStatus object with state, progress (0–100), message, and result once COMPLETED.
| Arguments | jobId (string, required): Job ID returned by scan_project, scan_and_analyze_project, or analyze_all_projects. |
|---|---|
| Underlying REST Call | GET /api/projects/jobs/{jobId}?userId={user_id} |
Lists all static analysis profiles available for the authenticated user.
| Arguments | None |
|---|---|
| Underlying REST Call | GET /api/profiles?userId={user_id} |
Retrieves configuration details and weighting rules for a single profile.
| Arguments | id (string, required): Profile identifier. |
|---|---|
| Underlying REST Call | GET /api/profiles/{id}?userId={user_id} |
Creates a new static analysis query profile.
| Arguments | profileData (object, required): Full Profile POJO payload. |
|---|---|
| Underlying REST Call | POST /api/profiles?userId={user_id} |
Updates an existing static analysis profile.
| Arguments |
id (string, required): Profile ID to update.profileData (object, required): Updated Profile POJO payload.
|
|---|---|
| Underlying REST Call | PUT /api/profiles/{id}?userId={user_id} |
Deletes a single analysis profile by ID.
| Arguments | id (string, required): Profile identifier. |
|---|---|
| Underlying REST Call | DELETE /api/profiles/{id}?userId={user_id} |
Lists all available static analysis scanning tools installed in this SATriage instance (e.g., bandit, PMD).
| Arguments | None |
|---|---|
| Underlying REST Call | GET /api/tools?userId={user_id} |