Codev
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.
The table to read from
{"summary":"Commit Stream Table","value":"codev_commit_stream"}
Comma-separated list of fields to return (defaults to *)
id,created_at,updated_at
JSON string of filter conditions
{"author":"[email protected]","project":"my-project"}
Records retrieved successfully.
GET /sfp/api/codev/{table} HTTP/1.1
Host:
Authorization: Bearer JWT
Accept: */*
Records retrieved successfully.
No content
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.
The table to create the record in
{"summary":"Commit Stream Table","value":"codev_commit_stream"}
The table to create the record in
codev_commit_stream
Record created successfully.
Conflict error.
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]"
}
}
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.
The table to update records in
{"summary":"Commit Stream Table","value":"codev_commit_stream"}
JSON string of query conditions to match records to update
{"commit":"abc123def456"}
The data to update matched records with
{"status":"completed","completed_at":"2025-01-21T05:42:24.862Z"}
Records updated successfully.
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"
}
}
Records updated successfully.
[
{
"data": {
"status": "completed",
"completed_at": "2025-01-21T05:42:24.862Z"
}
}
]
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
The table to delete records from
{"summary":"Commit Stream Table","value":"codev_commit_stream"}
The query conditions to identify records to delete
{"commit":"abc123def456"}
Records deleted successfully.
DELETE /sfp/api/codev/{table} HTTP/1.1
Host:
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 35
{
"query": {
"commit": "abc123def456"
}
}
Records deleted successfully.
No content
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.
The table to insert/update records in
{"summary":"Commit Stream Table","value":"codev_commit_stream"}
The data to insert. If a record with matching onConflict columns exists, this data will update that record instead.
{"commit":"abc123def456","author":"[email protected]","project":"my-project"}
The columns to check for conflicts. If a record exists with the same values for these columns, it will be updated instead of inserted.
["commit"]
Record inserted or updated successfully.
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"
]
}
Record inserted or updated successfully.
No content
Was this helpful?