Projects API
Create and manage projects to organize your scans and test results by app.
🎯 Not a Developer? Start Here
You don't need to write code yourself. Copy the prompts below and paste them into Claude, ChatGPT, Cursor, or any AI coding assistant. Your AI will read the docs and build what you need.
💡 Why This Matters
If you're building multiple apps or have different environments (staging, production), projects keep everything organized. Each project tracks its own scan history, so you can see security trends over time.
- →Track each app separately: Your SaaS, mobile app, and marketing site each get their own security history
- →Environment-specific scanning: Create projects for staging and production to compare security posture
- →Team organization: Give different teams access to different projects
Quick Start Prompts
Common tasks for managing projects.
🚀 Auto-Create Project on First Deploy
Automatically create a Bugrit project if it doesn't exist when you deploy.
Read the Bugrit Projects API at https://bugrit.com/docs/api-reference/projects Add logic to automatically create a Bugrit project if one doesn't exist: 1. On deploy, call GET /api/v1/projects to list existing projects 2. Search for project.name matching env.APP_NAME 3. If not found, POST /api/v1/projects with: - name: env.APP_NAME (required) - platforms: ["web"] (adjust for your app) - repositoryUrl: env.GITHUB_REPO_URL (optional) 4. Store the returned project.id in .bugrit-config.json 5. Use this project ID as applicationId when triggering scans Use BUGRIT_API_KEY from environment. Handle errors gracefully. My stack: [YOUR_STACK]
👩💻 Technical Details (for developers)
Create Project Example
curl -X POST https://bugrit.com/api/v1/projects \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "My App",
"platforms": ["web", "ios"],
"description": "Main web application",
"repositoryUrl": "https://github.com/org/repo"
}'📊 Project Dashboard Component
Build a dashboard showing all your projects and their security status.
Read these Bugrit API docs:
- Projects: https://bugrit.com/docs/api-reference/projects
- Scans: https://bugrit.com/docs/api-reference/scans
Create a React component that lists all Bugrit projects:
1. Fetch GET /api/v1/projects
2. For each project, display a card showing:
- project.name and project.description
- Platform icons (web/ios/android from project.platforms)
- Fetch latest scan: GET /api/v1/scans?applicationId={project.id}&limit=1
- Show scan status and issue counts (summary.critical + summary.high)
3. On click, navigate to project detail page
4. "New Project" button opens modal with form:
- name (required), platforms (checkbox), description, repositoryUrl
- Submit: POST /api/v1/projects
5. Include loading, error, and empty states
Use my existing component library.
My stack: [YOUR_STACK]🌍 Multi-Environment Setup
Create separate projects for staging and production environments.
Read the Bugrit Projects API at https://bugrit.com/docs/api-reference/projects Set up multi-environment Bugrit projects: 1. Create three projects via POST /api/v1/projects: - "MyApp - Development" (platforms: ["web"]) - "MyApp - Staging" (platforms: ["web"]) - "MyApp - Production" (platforms: ["web"]) 2. Store project IDs in environment variables: - BUGRIT_PROJECT_DEV, BUGRIT_PROJECT_STAGING, BUGRIT_PROJECT_PROD 3. In CI/CD, use the appropriate project ID based on branch: - develop → BUGRIT_PROJECT_DEV - staging → BUGRIT_PROJECT_STAGING - main → BUGRIT_PROJECT_PROD 4. Create a comparison dashboard showing security posture across environments My stack: [YOUR_STACK]
List Projects
Get All Your Projects
Fetch a list of all projects in your organization.
Read the Bugrit Projects API at https://bugrit.com/docs/api-reference/projects Create a function to list all projects: 1. Call GET /api/v1/projects 2. Response has data array with projects and pagination object 3. Each project has: id, name, description, platforms, repositoryUrl, createdAt 4. Return projects sorted by most recently updated 5. Handle pagination if needed (page, per_page params) My stack: [YOUR_STACK]
👩💻 Technical Reference
/api/v1/projectsQuery Parameters
| Parameter | Type | Description |
|---|---|---|
page | integer | Page number (default: 1) |
per_page | integer | Items per page (max: 100, default: 20) |
Example Response
{
"success": true,
"data": [
{
"id": "prj-abc123",
"name": "My App",
"description": "Main web application",
"platforms": ["web", "ios"],
"repositoryUrl": "https://github.com/org/repo",
"defaultBranch": "main",
"organizationId": "org-xyz789",
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z"
}
],
"pagination": {
"page": 1,
"perPage": 20,
"total": 1
}
}Create Project
Create a New Project
Add a new project to your organization.
Read the Bugrit Projects API at https://bugrit.com/docs/api-reference/projects Add a "Create Project" form to my app: 1. Form fields: - name (required): text input - platforms (required): checkbox group (web, ios, android, desktop) - description: textarea - repositoryUrl: URL input - defaultBranch: text input (default: "main") 2. On submit, POST /api/v1/projects with form data 3. Show success message with new project ID 4. Redirect to project detail page 5. Handle validation errors from API Use my existing form components. My stack: [YOUR_STACK]
👩💻 Technical Details (for developers)
/api/v1/projectsRequest Body
| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Project name |
platforms | string[] | Yes | Array of: web, ios, android, desktop |
description | string | No | Project description |
repositoryUrl | string | No | GitHub repository URL |
defaultBranch | string | No | Default branch name (default: main) |
Project Operations
/api/v1/projects/:projectIdReturns details for a specific project.
/api/v1/projects/:projectIdUpdates an existing project. Only include fields you want to update.
/api/v1/projects/:projectIdPermanently deletes a project and all associated scans and test results.
Platform Restrictions
Platform access is restricted by subscription tier:
| Tier | Platforms |
|---|---|
| Free | web only |
| Pro | web, ios, android |
| Business | web, ios, android, desktop |