API Endpoints
Overview
Vulcan provides JSON API endpoints for programmatic access to projects, components, STIGs, and SRGs. All endpoints require authentication.
Authentication
See Authentication for details on API authentication methods.
Base URL
https://your-vulcan-instance.comEndpoints
Projects
List Projects
GET /projects.jsonReturns a list of projects accessible to the authenticated user.
Get Project
GET /projects/:id.jsonReturns details for a specific project.
Create Project
POST /projects.jsonCreates a new project.
Update Project
PUT /projects/:id.jsonUpdates an existing project.
Delete Project
DELETE /projects/:id.jsonDeletes a project (admin only).
Components
List Components
GET /components.json
GET /projects/:project_id/components.jsonReturns components, optionally filtered by project.
Get Component
GET /components/:id.jsonReturns details for a specific component.
Create Component
POST /components.jsonCreates a new component.
Update Component
PUT /components/:id.jsonUpdates an existing component.
Export Component
GET /components/:id/export.jsonExports component as InSpec profile or XCCDF.
Rules
List Rules
GET /components/:component_id/rules.jsonReturns rules for a component.
Get Rule
GET /rules/:id.jsonReturns details for a specific rule.
Update Rule
PUT /rules/:id.jsonUpdates a rule's content.
STIGs
List STIGs
GET /stigs.jsonReturns available STIGs.
Get STIG
GET /stigs/:id.jsonReturns details for a specific STIG.
Upload STIG
POST /stigs.jsonUploads a new STIG file (admin only).
Security Requirements Guides (SRGs)
List SRGs
GET /security_requirements_guides.jsonReturns available SRGs.
Get SRG
GET /security_requirements_guides/:id.jsonReturns details for a specific SRG.
Upload SRG
POST /security_requirements_guides.jsonUploads a new SRG file (admin only).
Response Format
All JSON responses follow this structure:
Success Response
{
"data": {
// Response data
},
"status": "success"
}Error Response
{
"error": "Error message",
"status": "error"
}Pagination
List endpoints support pagination:
GET /projects.json?page=2&per_page=25Filtering
Some endpoints support filtering:
GET /components.json?project_id=123
GET /rules.json?status=openRate Limiting
API requests are limited to:
- 100 requests per minute for authenticated users
- 10 requests per minute for unauthenticated requests
Examples
cURL Example
curl -H "Authorization: Bearer YOUR_TOKEN" \
-H "Accept: application/json" \
https://vulcan.example.com/projects.jsonRuby Example
require 'net/http'
require 'json'
uri = URI('https://vulcan.example.com/projects.json')
req = Net::HTTP::Get.new(uri)
req['Authorization'] = 'Bearer YOUR_TOKEN'
req['Accept'] = 'application/json'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
http.request(req)
end
projects = JSON.parse(res.body)Status Codes
200 OK- Request successful201 Created- Resource created204 No Content- Resource deleted400 Bad Request- Invalid request401 Unauthorized- Authentication required403 Forbidden- Access denied404 Not Found- Resource not found422 Unprocessable Entity- Validation errors500 Internal Server Error- Server error
Support
For API support, contact: saf@mitre.org
