Skip to main content
PATCH
/
v2
/
repos
/
{id}
Update repository
curl --request PATCH \
  --url https://api.ghostsecurity.ai/v2/repos/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "enabled": true,
  "posture": "internal",
  "review_minimum_severity": "high",
  "review_mode": "auto",
  "scan_branch": "main"
}'
{
  "archived": true,
  "cast_scan_enabled": true,
  "clone_url": "<string>",
  "created_at": "<string>",
  "default_branch_name": "<string>",
  "description": "<string>",
  "full_name": "<string>",
  "id": "<string>",
  "installation_id": "<string>",
  "languages": {},
  "last_commit_hash": "<string>",
  "last_commit_hash_link": "<string>",
  "last_committed_at": "<string>",
  "name": "<string>",
  "organization_id": "<string>",
  "private": true,
  "projects": [
    {
      "business_criticality": "<string>",
      "cast_scan_enabled": true,
      "components": [
        {
          "criticality": 123,
          "description": "<string>",
          "folder_name": "<string>",
          "type": "<string>"
        }
      ],
      "created_at": "<string>",
      "dependencies_file": "<string>",
      "deployments": {},
      "enabled": true,
      "evidence": "<string>",
      "exposure": "<string>",
      "file_extensions": [
        "<string>"
      ],
      "findings_count": 123,
      "frameworks": [
        "<string>"
      ],
      "has_custom_metadata": true,
      "id": "<string>",
      "languages": [
        "<string>"
      ],
      "last_committed_at": "<string>",
      "last_scan_id": "<string>",
      "last_scan_status": "<string>",
      "last_scanned_at": "<string>",
      "organization_id": "<string>",
      "owner": "<string>",
      "primary_framework": "<string>",
      "primary_language": "<string>",
      "provider": "<string>",
      "purpose": "<string>",
      "relative_path": "<string>",
      "repo": {
        "id": "<string>",
        "name": "<string>",
        "url": "<string>"
      },
      "scanner_business_criticality": "<string>",
      "scanner_exposure": "<string>",
      "scanner_summary": "<string>",
      "sensitive_data_types": [
        "<string>"
      ],
      "size": 123,
      "summary": "<string>",
      "updated_at": "<string>",
      "user_business_criticality": "<string>",
      "user_exposure": "<string>",
      "user_summary": "<string>"
    }
  ],
  "provider": "<string>",
  "provider_id": "<string>",
  "scan_branch": "<string>",
  "size": 123,
  "summary": "<string>",
  "updated_at": "<string>",
  "url": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Repository ID

Body

application/json

Repository update data

Repository update request

enabled
boolean

Whether to enable Exorcist scanning for this repository and any projects within it

Example:

true

posture
enum<string>

Security posture of the apps in this repository

Available options:
internal,
external,
hybrid
Example:

"internal"

review_minimum_severity
enum<string>

Review minimum severity to use for this repository

Available options:
high,
medium,
low
Example:

"high"

review_mode
enum<string>

Whether to run code reviews for this repository

Available options:
auto,
manual,
none
Example:

"auto"

scan_branch
string

Branch to scan (if different from default branch)

Required string length: 3 - 128
Example:

"main"

Response

OK

archived
boolean
cast_scan_enabled
boolean
clone_url
string
created_at
string
default_branch_name
string
description
string
full_name
string
id
string
installation_id
string
languages
object
last_commit_hash
string
last_committed_at
string
name
string
organization_id
string
private
boolean
projects
object[]
provider
string
provider_id
string
scan_branch
string
size
integer
summary
string
updated_at
string
url
string