API Reference

Complete API documentation for integrating with opsinit. Build powerful applications and automate your deployment workflows.

RESTful API

Simple and powerful integration

Our RESTful API provides programmatic access to all opsinit features. Use standard HTTP methods and JSON for all requests and responses.

RESTful Design

Standard HTTP methods (GET, POST, PUT, DELETE) with consistent JSON request/response formats.

Authentication

Bearer token authentication with secure API keys for programmatic access.

Rate Limiting

Generous rate limits with proper headers for monitoring your API usage.

API Endpoints

Complete endpoint reference

All available API endpoints organized by category with detailed descriptions and usage examples.

Projects

GET/api/projects

List all projects for the authenticated user

POST/api/projects

Create a new project

GET/api/projects/{id}

Get project details by ID

PUT/api/projects/{id}

Update project configuration

DELETE/api/projects/{id}

Delete a project

Analysis

POST/api/analysis

Start code analysis for a repository

GET/api/analysis/{id}

Get analysis results by ID

GET/api/analysis/{id}/status

Check analysis status

Deployments

POST/api/deployments

Create a new deployment

GET/api/deployments

List all deployments

GET/api/deployments/{id}

Get deployment details

POST/api/deployments/{id}/rollback

Rollback deployment to previous version

GitHub Integration

GET/api/github/repositories

List connected GitHub repositories

POST/api/github/connect

Connect a GitHub repository

DELETE/api/github/disconnect/{id}

Disconnect a GitHub repository

Code Examples

Get started quickly

Practical examples in multiple programming languages to help you integrate with our API.

Create a new project

JavaScript
const response = await fetch('/api/projects', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer YOUR_API_TOKEN'
  },
  body: JSON.stringify({
    name: 'My Project',
    description: 'A new project',
    repositoryUrl: 'https://github.com/user/repo'
  })
});

const project = await response.json();

Start code analysis

Python
import requests

response = requests.post(
    'https://api.opsinit.com/api/analysis',
    headers={
        'Authorization': 'Bearer YOUR_API_TOKEN',
        'Content-Type': 'application/json'
    },
    json={
        'projectId': 'project-id',
        'repositoryUrl': 'https://github.com/user/repo'
    }
)

analysis = response.json()

Get deployment status

cURL
curl -X GET \
  https://api.opsinit.com/api/deployments/deployment-id \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json"

Ready to integrate?

Start building with our API today. Get your API key and begin integrating opsinit into your applications.