Skip to content

Workspaces and files

39 endpoints. Every path below is served by contractide-backend behind the gateway at https://api.trilocore.ai.

GET /api/v1/ide/workspaces

List Workspaces

Property Value
Authentication Authorization: Bearer (jns_ key or SSO session)
Idempotency-Key not required
Success 200
Upstream contractide-backend
curl -X GET https://api.trilocore.ai/api/v1/ide/workspaces \
  -H "Authorization: Bearer $TRILOCORE_API_KEY"

POST /api/v1/ide/workspaces

Create Workspace

Property Value
Authentication Authorization: Bearer (jns_ key or SSO session)
Idempotency-Key not required
Success 200
Upstream contractide-backend

Request body

Field Type Required Constraints
name string yes
slug string yes
curl -X POST https://api.trilocore.ai/api/v1/ide/workspaces \
  -H "Authorization: Bearer $TRILOCORE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "…", "slug": "…"}'

DELETE /api/v1/ide/workspaces/{uuid}

Delete Workspace

Property Value
Authentication Authorization: Bearer (jns_ key or SSO session)
Idempotency-Key not required
Success 200
Upstream contractide-backend
curl -X DELETE https://api.trilocore.ai/api/v1/ide/workspaces/{uuid} \
  -H "Authorization: Bearer $TRILOCORE_API_KEY"

GET /api/v1/ide/workspaces/{uuid}

Get Workspace

Property Value
Authentication Authorization: Bearer (jns_ key or SSO session)
Idempotency-Key not required
Success 200
Upstream contractide-backend
curl -X GET https://api.trilocore.ai/api/v1/ide/workspaces/{uuid} \
  -H "Authorization: Bearer $TRILOCORE_API_KEY"

GET /api/v1/ide/workspaces/{uuid}/analyses

List Analyses

Property Value
Authentication Authorization: Bearer (jns_ key or SSO session)
Idempotency-Key not required
Success 200
Upstream contractide-backend
curl -X GET https://api.trilocore.ai/api/v1/ide/workspaces/{uuid}/analyses \
  -H "Authorization: Bearer $TRILOCORE_API_KEY"

POST /api/v1/ide/workspaces/{uuid}/analyses

Start Analysis

Property Value
Authentication Authorization: Bearer (jns_ key or SSO session)
Idempotency-Key not required
Success 200
Upstream contractide-backend

Request body

Field Type Required Constraints
analysis_type string yes
ref one of no
settings object no
tool_id one of no
tool_version one of no
curl -X POST https://api.trilocore.ai/api/v1/ide/workspaces/{uuid}/analyses \
  -H "Authorization: Bearer $TRILOCORE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"analysis_type": "…"}'

POST /api/v1/ide/workspaces/{uuid}/annotations

Create Dev Note

Property Value
Authentication Authorization: Bearer (jns_ key or SSO session)
Idempotency-Key not required
Success 200
Upstream contractide-backend

Request body

Field Type Required Constraints
body string no
category one of no
commit_oid string yes
end_line integer yes
kind string no
path string yes
severity one of no
start_line integer yes
curl -X POST https://api.trilocore.ai/api/v1/ide/workspaces/{uuid}/annotations \
  -H "Authorization: Bearer $TRILOCORE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"commit_oid": "…", "path": "…", "start_line": 0, "end_line": 0}'

GET /api/v1/ide/workspaces/{uuid}/audit-log

Get Workspace Audit Log

Property Value
Authentication Authorization: Bearer (jns_ key or SSO session)
Idempotency-Key not required
Success 200
Upstream contractide-backend
curl -X GET https://api.trilocore.ai/api/v1/ide/workspaces/{uuid}/audit-log \
  -H "Authorization: Bearer $TRILOCORE_API_KEY"

GET /api/v1/ide/workspaces/{uuid}/audits

List Engagements

Property Value
Authentication Authorization: Bearer (jns_ key or SSO session)
Idempotency-Key not required
Success 200
Upstream contractide-backend
curl -X GET https://api.trilocore.ai/api/v1/ide/workspaces/{uuid}/audits \
  -H "Authorization: Bearer $TRILOCORE_API_KEY"

POST /api/v1/ide/workspaces/{uuid}/audits

Open Engagement

Property Value
Authentication Authorization: Bearer (jns_ key or SSO session)
Idempotency-Key not required
Success 200
Upstream contractide-backend

Request body

Field Type Required Constraints
pinned_commit_oid string yes
title string yes
curl -X POST https://api.trilocore.ai/api/v1/ide/workspaces/{uuid}/audits \
  -H "Authorization: Bearer $TRILOCORE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"title": "…", "pinned_commit_oid": "…"}'

GET /api/v1/ide/workspaces/{uuid}/bindings

Get Bindings

Property Value
Authentication Authorization: Bearer (jns_ key or SSO session)
Idempotency-Key not required
Success 200
Upstream contractide-backend
curl -X GET https://api.trilocore.ai/api/v1/ide/workspaces/{uuid}/bindings \
  -H "Authorization: Bearer $TRILOCORE_API_KEY"

PUT /api/v1/ide/workspaces/{uuid}/bindings

Put Binding

Property Value
Authentication Authorization: Bearer (jns_ key or SSO session)
Idempotency-Key not required
Success 200
Upstream contractide-backend

Request body

Field Type Required Constraints
default_branch string no
external_full_name string yes
external_repository_id string yes
integration_id string yes
sync_mode string yes
curl -X PUT https://api.trilocore.ai/api/v1/ide/workspaces/{uuid}/bindings \
  -H "Authorization: Bearer $TRILOCORE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"integration_id": "…", "external_repository_id": "…", "external_full_name": "…", "sync_mode": "…"}'

POST /api/v1/ide/workspaces/{uuid}/bindings/push

Push Binding

Property Value
Authentication Authorization: Bearer (jns_ key or SSO session)
Idempotency-Key required
Success 200
Upstream contractide-backend

Request body

Field Type Required Constraints
commit_oid one of no
force boolean no
provider string yes
target_ref one of no
curl -X POST https://api.trilocore.ai/api/v1/ide/workspaces/{uuid}/bindings/push \
  -H "Authorization: Bearer $TRILOCORE_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"provider": "…"}'

GET /api/v1/ide/workspaces/{uuid}/branch-protection

List Branch Protection

Property Value
Authentication Authorization: Bearer (jns_ key or SSO session)
Idempotency-Key not required
Success 200
Upstream contractide-backend
curl -X GET https://api.trilocore.ai/api/v1/ide/workspaces/{uuid}/branch-protection \
  -H "Authorization: Bearer $TRILOCORE_API_KEY"

PUT /api/v1/ide/workspaces/{uuid}/branch-protection

Put Branch Protection

Property Value
Authentication Authorization: Bearer (jns_ key or SSO session)
Idempotency-Key not required
Success 200
Upstream contractide-backend

Request body

Field Type Required Constraints
linear_history boolean no
min_approvals integer no
no_deletion boolean no
no_force_push boolean no
ref_pattern string yes
require_code_owner_review boolean no
require_security_approval boolean no
required_status_checks array no
curl -X PUT https://api.trilocore.ai/api/v1/ide/workspaces/{uuid}/branch-protection \
  -H "Authorization: Bearer $TRILOCORE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"ref_pattern": "…"}'

GET /api/v1/ide/workspaces/{uuid}/branches

List Branches

Property Value
Authentication Authorization: Bearer (jns_ key or SSO session)
Idempotency-Key not required
Success 200
Upstream contractide-backend
curl -X GET https://api.trilocore.ai/api/v1/ide/workspaces/{uuid}/branches \
  -H "Authorization: Bearer $TRILOCORE_API_KEY"

POST /api/v1/ide/workspaces/{uuid}/branches

Create Branch

Property Value
Authentication Authorization: Bearer (jns_ key or SSO session)
Idempotency-Key not required
Success 200
Upstream contractide-backend

Request body

Field Type Required Constraints
from_oid one of no
name string yes
curl -X POST https://api.trilocore.ai/api/v1/ide/workspaces/{uuid}/branches \
  -H "Authorization: Bearer $TRILOCORE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "…"}'

DELETE /api/v1/ide/workspaces/{uuid}/branches/{id}

Delete Branch

Property Value
Authentication Authorization: Bearer (jns_ key or SSO session)
Idempotency-Key not required
Success 200
Upstream contractide-backend
curl -X DELETE https://api.trilocore.ai/api/v1/ide/workspaces/{uuid}/branches/{id} \
  -H "Authorization: Bearer $TRILOCORE_API_KEY"

PATCH /api/v1/ide/workspaces/{uuid}/branches/{id}/protection

Set Branch Protection

Property Value
Authentication Authorization: Bearer (jns_ key or SSO session)
Idempotency-Key not required
Success 200
Upstream contractide-backend

Request body

Field Type Required Constraints
protected boolean yes
curl -X PATCH https://api.trilocore.ai/api/v1/ide/workspaces/{uuid}/branches/{id}/protection \
  -H "Authorization: Bearer $TRILOCORE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"protected": false}'

GET /api/v1/ide/workspaces/{uuid}/draft

Get Draft

Property Value
Authentication Authorization: Bearer (jns_ key or SSO session)
Idempotency-Key not required
Success 200
Upstream contractide-backend
curl -X GET https://api.trilocore.ai/api/v1/ide/workspaces/{uuid}/draft \
  -H "Authorization: Bearer $TRILOCORE_API_KEY"

PUT /api/v1/ide/workspaces/{uuid}/draft/files/{rest}

Autosave Draft

Property Value
Authentication Authorization: Bearer (jns_ key or SSO session)
Idempotency-Key not required
Success 200
Upstream contractide-backend

Request body not published

This endpoint accepts a body, but no machine-readable schema for it is published yet, so none is shown. The example below is therefore incomplete — do not read it as "send no body".

curl -X PUT https://api.trilocore.ai/api/v1/ide/workspaces/{uuid}/draft/files/{rest} \
  -H "Authorization: Bearer $TRILOCORE_API_KEY"

GET /api/v1/ide/workspaces/{uuid}/files

List Files

Property Value
Authentication Authorization: Bearer (jns_ key or SSO session)
Idempotency-Key not required
Success 200
Upstream contractide-backend
curl -X GET https://api.trilocore.ai/api/v1/ide/workspaces/{uuid}/files \
  -H "Authorization: Bearer $TRILOCORE_API_KEY"

GET /api/v1/ide/workspaces/{uuid}/files/{rest}

Get File

Property Value
Authentication Authorization: Bearer (jns_ key or SSO session)
Idempotency-Key not required
Success 200
Upstream contractide-backend
curl -X GET https://api.trilocore.ai/api/v1/ide/workspaces/{uuid}/files/{rest} \
  -H "Authorization: Bearer $TRILOCORE_API_KEY"

PUT /api/v1/ide/workspaces/{uuid}/files/{rest}

Update File

Property Value
Authentication Authorization: Bearer (jns_ key or SSO session)
Idempotency-Key not required
Success 200
Upstream contractide-backend

Request body not published

This endpoint accepts a body, but no machine-readable schema for it is published yet, so none is shown. The example below is therefore incomplete — do not read it as "send no body".

curl -X PUT https://api.trilocore.ai/api/v1/ide/workspaces/{uuid}/files/{rest} \
  -H "Authorization: Bearer $TRILOCORE_API_KEY"

GET /api/v1/ide/workspaces/{uuid}/findings.sarif

Workspace Findings Sarif

Property Value
Authentication Authorization: Bearer (jns_ key or SSO session)
Idempotency-Key not required
Success 200
Upstream contractide-backend
curl -X GET https://api.trilocore.ai/api/v1/ide/workspaces/{uuid}/findings.sarif \
  -H "Authorization: Bearer $TRILOCORE_API_KEY"

POST /api/v1/ide/workspaces/{uuid}/findings/ingest

Ingest Findings

Property Value
Authentication Authorization: Bearer (jns_ key or SSO session)
Idempotency-Key not required
Success 200
Upstream contractide-backend

Request body

Field Type Required Constraints
analyzer string no
commit_oid string yes
engagement_id one of no
findings array of RawFinding yes
curl -X POST https://api.trilocore.ai/api/v1/ide/workspaces/{uuid}/findings/ingest \
  -H "Authorization: Bearer $TRILOCORE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"commit_oid": "…", "findings": []}'

DELETE /api/v1/ide/workspaces/{uuid}/github

Disconnect Github

Property Value
Authentication Authorization: Bearer (jns_ key or SSO session)
Idempotency-Key not required
Success 200
Upstream contractide-backend
curl -X DELETE https://api.trilocore.ai/api/v1/ide/workspaces/{uuid}/github \
  -H "Authorization: Bearer $TRILOCORE_API_KEY"

GET /api/v1/ide/workspaces/{uuid}/github

Github Status

Property Value
Authentication Authorization: Bearer (jns_ key or SSO session)
Idempotency-Key not required
Success 200
Upstream contractide-backend
curl -X GET https://api.trilocore.ai/api/v1/ide/workspaces/{uuid}/github \
  -H "Authorization: Bearer $TRILOCORE_API_KEY"

PUT /api/v1/ide/workspaces/{uuid}/github

Connect Github

Property Value
Authentication Authorization: Bearer (jns_ key or SSO session)
Idempotency-Key not required
Success 200
Upstream contractide-backend

Request body

Field Type Required Constraints
branch string no
repo string yes
token string yes
curl -X PUT https://api.trilocore.ai/api/v1/ide/workspaces/{uuid}/github \
  -H "Authorization: Bearer $TRILOCORE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"repo": "…", "token": "…"}'

POST /api/v1/ide/workspaces/{uuid}/github/publish

Publish To Github

Property Value
Authentication Authorization: Bearer (jns_ key or SSO session)
Idempotency-Key required
Success 200
Upstream contractide-backend

Request body

Field Type Required Constraints
force boolean no
ref one of no
remote_branch one of no
curl -X POST https://api.trilocore.ai/api/v1/ide/workspaces/{uuid}/github/publish \
  -H "Authorization: Bearer $TRILOCORE_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"ref": "…", "remote_branch": "…", "force": false}'

GET /api/v1/ide/workspaces/{uuid}/languages

Workspace Languages

Property Value
Authentication Authorization: Bearer (jns_ key or SSO session)
Idempotency-Key not required
Success 200
Upstream contractide-backend
curl -X GET https://api.trilocore.ai/api/v1/ide/workspaces/{uuid}/languages \
  -H "Authorization: Bearer $TRILOCORE_API_KEY"

GET /api/v1/ide/workspaces/{uuid}/members

List Members

Property Value
Authentication Authorization: Bearer (jns_ key or SSO session)
Idempotency-Key not required
Success 200
Upstream contractide-backend
curl -X GET https://api.trilocore.ai/api/v1/ide/workspaces/{uuid}/members \
  -H "Authorization: Bearer $TRILOCORE_API_KEY"

POST /api/v1/ide/workspaces/{uuid}/members

Invite Member

Property Value
Authentication Authorization: Bearer (jns_ key or SSO session)
Idempotency-Key not required
Success 200
Upstream contractide-backend

Request body

Field Type Required Constraints
engagement_id one of no
expires_at one of no
role string yes
user_id string yes
curl -X POST https://api.trilocore.ai/api/v1/ide/workspaces/{uuid}/members \
  -H "Authorization: Bearer $TRILOCORE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"user_id": "…", "role": "…"}'

DELETE /api/v1/ide/workspaces/{uuid}/members/{id}

Remove Member

Property Value
Authentication Authorization: Bearer (jns_ key or SSO session)
Idempotency-Key not required
Success 200
Upstream contractide-backend
curl -X DELETE https://api.trilocore.ai/api/v1/ide/workspaces/{uuid}/members/{id} \
  -H "Authorization: Bearer $TRILOCORE_API_KEY"

GET /api/v1/ide/workspaces/{uuid}/merge-requests

List Merge Requests

Property Value
Authentication Authorization: Bearer (jns_ key or SSO session)
Idempotency-Key not required
Success 200
Upstream contractide-backend
curl -X GET https://api.trilocore.ai/api/v1/ide/workspaces/{uuid}/merge-requests \
  -H "Authorization: Bearer $TRILOCORE_API_KEY"

POST /api/v1/ide/workspaces/{uuid}/merge-requests

Create Merge Request

Property Value
Authentication Authorization: Bearer (jns_ key or SSO session)
Idempotency-Key not required
Success 200
Upstream contractide-backend

Request body

Field Type Required Constraints
description one of no
source_ref string yes
status string no
target_ref string yes
title string yes
curl -X POST https://api.trilocore.ai/api/v1/ide/workspaces/{uuid}/merge-requests \
  -H "Authorization: Bearer $TRILOCORE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"source_ref": "…", "target_ref": "…", "title": "…"}'

POST /api/v1/ide/workspaces/{uuid}/scaffold

Scaffold Workspace

Property Value
Authentication Authorization: Bearer (jns_ key or SSO session)
Idempotency-Key not required
Success 200
Upstream contractide-backend

Request body

Field Type Required Constraints
force boolean no
template string yes
curl -X POST https://api.trilocore.ai/api/v1/ide/workspaces/{uuid}/scaffold \
  -H "Authorization: Bearer $TRILOCORE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"template": "…"}'

GET /api/v1/ide/workspaces/{uuid}/tags

List Tags

Property Value
Authentication Authorization: Bearer (jns_ key or SSO session)
Idempotency-Key not required
Success 200
Upstream contractide-backend
curl -X GET https://api.trilocore.ai/api/v1/ide/workspaces/{uuid}/tags \
  -H "Authorization: Bearer $TRILOCORE_API_KEY"

POST /api/v1/ide/workspaces/{uuid}/tags

Create Tag

Property Value
Authentication Authorization: Bearer (jns_ key or SSO session)
Idempotency-Key not required
Success 200
Upstream contractide-backend

Request body

Field Type Required Constraints
name string yes
oid one of no
protected boolean no
curl -X POST https://api.trilocore.ai/api/v1/ide/workspaces/{uuid}/tags \
  -H "Authorization: Bearer $TRILOCORE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "…"}'