Codev

Read records

get

Retrieves records from the specified Codev table with optional filtering and field selection. Features: - Select specific fields using comma-separated field names - Filter results using JSON-formatted query conditions - Returns all matching records as an array

Common use cases:
- Get all commits for a specific repository
- Find deployments within a date range
- List issues assigned to a user
- Track file changes across branches

Returns empty array if no records match the criteria.
Authorizations
Path parameters
tablestringRequired

The table to read from

Example: {"summary":"Commit Stream Table","value":"codev_commit_stream"}
Query parameters
selectstringOptional

Comma-separated list of fields to return (defaults to *)

Example: id,created_at,updated_at
filterstringOptional

JSON string of filter conditions

Example: {"author":"[email protected]","project":"my-project"}
Responses
200

Records retrieved successfully.

application/json
get
GET /sfp/api/codev/{table} HTTP/1.1
Host: 
Authorization: Bearer JWT
Accept: */*
200

Records retrieved successfully.

No content

Create a new record

post

Creates a new record in the specified Codev table. Codev tables store various development lifecycle data including: - codev_commit_stream: Git commit history and metadata - codev_deploy_stream: Deployment events and status - codev_file_stream: File change tracking - codev_user: Developer profiles and activity - codev_issue: Issue tracking and management - codev_review_stream: Code review activity - codev_tasks: Task management and tracking

The data structure varies by table type. See examples for each table's schema. Returns the created record with generated ID and timestamps.
Authorizations
Path parameters
tablestringRequired

The table to create the record in

Example: {"summary":"Commit Stream Table","value":"codev_commit_stream"}
Body
tablestringRequired

The table to create the record in

Example: codev_commit_stream
dataobjectRequired

The data to create

Example: {"commit":"abc123","author":"[email protected]"}
Responses
201

Record created successfully.

application/json
post
POST /sfp/api/codev/{table} HTTP/1.1
Host: 
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 138

{
  "table": "codev_commit_stream",
  "data": {
    "commit": "abc123def456",
    "key": "commit-123",
    "author": "[email protected]",
    "project": "my-project"
  }
}
{
  "table": "codev_commit_stream",
  "data": {
    "commit": "abc123",
    "author": "[email protected]"
  }
}

Update records

put

Updates existing records in the specified Codev table that match the filter conditions. This endpoint: - Updates all records matching the filter criteria - Supports partial updates (only specified fields are modified) - Automatically updates the updated_at timestamp - Returns all updated records with their new values

Common use cases:
- Update deployment status
- Mark issues as resolved
- Update task assignments
- Modify review states

The filter parameter is required to prevent accidental bulk updates. Use specific filters to target intended records.
Authorizations
Path parameters
tablestringRequired

The table to update records in

Example: {"summary":"Commit Stream Table","value":"codev_commit_stream"}
Query parameters
filterstringRequired

JSON string of query conditions to match records to update

Example: {"commit":"abc123def456"}
Body
dataobjectRequired

The data to update matched records with

Example: {"status":"completed","completed_at":"2025-01-21T05:42:24.862Z"}
Responses
200

Records updated successfully.

application/json
put
PUT /sfp/api/codev/{table}?filter={"commit"%3A"abc123def456"} HTTP/1.1
Host: 
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 73

{
  "data": {
    "status": "completed",
    "completed_at": "2025-01-21T05:42:24.862Z"
  }
}
200

Records updated successfully.

[
  {
    "data": {
      "status": "completed",
      "completed_at": "2025-01-21T05:42:24.862Z"
    }
  }
]

Delete records

delete

Permanently deletes records from the specified Codev table that match the query conditions. This operation: - Removes all records matching the query criteria - Cannot be undone - deleted data is permanently lost - Returns no content on successful deletion

Safety considerations:
- Always use specific query conditions to avoid mass deletion
- Consider archiving data instead of deletion for audit trails
- Some tables may have referential integrity constraints

Common use cases:
- Remove outdated deployment records
- Clean up resolved issues
- Delete test data
Authorizations
Path parameters
tablestringRequired

The table to delete records from

Example: {"summary":"Commit Stream Table","value":"codev_commit_stream"}
Body
queryobjectRequired

The query conditions to identify records to delete

Example: {"commit":"abc123def456"}
Responses
200

Records deleted successfully.

delete
DELETE /sfp/api/codev/{table} HTTP/1.1
Host: 
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 35

{
  "query": {
    "commit": "abc123def456"
  }
}
200

Records deleted successfully.

No content

Insert or update records

put

Performs an upsert operation (insert or update) on the specified Codev table. This endpoint: - Attempts to insert the provided data as a new record - If a conflict occurs on specified columns, updates the existing record instead - Useful for idempotent operations and syncing external data

The onConflict parameter specifies which columns to check for uniqueness:
- For commits: typically ['commit'] (commit hash)
- For deployments: ['deployment_id'] or ['repo', 'environment', 'timestamp']
- For users: ['email'] or ['username']

Returns the inserted or updated record(s). This is the preferred method for syncing data from external systems where you're unsure if the record already exists.
Authorizations
Path parameters
tablestringRequired

The table to insert/update records in

Example: {"summary":"Commit Stream Table","value":"codev_commit_stream"}
Body
dataobjectRequired

The data to insert. If a record with matching onConflict columns exists, this data will update that record instead.

Example: {"commit":"abc123def456","author":"[email protected]","project":"my-project"}
onConflictstring[]Optional

The columns to check for conflicts. If a record exists with the same values for these columns, it will be updated instead of inserted.

Example: ["commit"]
Responses
200

Record inserted or updated successfully.

put
PUT /sfp/api/codev/{table}/upsert HTTP/1.1
Host: 
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 165

{
  "data": {
    "commit": "abc123def456",
    "author": "[email protected]",
    "project": "my-project",
    "validate_result": {
      "status": "pending",
      "details": []
    }
  },
  "onConflict": [
    "commit"
  ]
}
200

Record inserted or updated successfully.

No content

Was this helpful?