Codev
sfp server API reference for Codev: 5 endpoints.
/sfp/api/codev/{table}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.Authorization
access-token In: header
Path Parameters
The table to create the record in
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X POST "https://example.com/sfp/api/codev/codev_commit_stream" \ -H "Content-Type: application/json" \ -d '{ "table": "codev_commit_stream", "data": { "commit": "abc123def456", "key": "commit-123", "author": "john.doe@example.com", "project": "my-project" } }'{ "table": "codev_commit_stream", "data": { "commit": "abc123", "author": "john.doe@example.com" }, "fetchAll": false}/sfp/api/codev/{table}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 branchesReturns empty array if no records match the criteria.Authorization
access-token In: header
Path Parameters
The table to read from
Query Parameters
Comma-separated list of fields to return (defaults to *)
JSON string of filter conditions
Response Body
application/json
curl -X GET "https://example.com/sfp/api/codev/codev_commit_stream"{ "table": "codev_commit_stream", "filter": "{\"author\":\"john.doe@example.com\"}"}/sfp/api/codev/{table}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 statesThe filter parameter is required to prevent accidental bulk updates. Use specific filters to target intended records.Authorization
access-token In: header
Path Parameters
The table to update records in
Query Parameters
JSON string of query conditions to match records to update
Request Body
application/json
The data to update matched records with
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
curl -X PUT "https://example.com/sfp/api/codev/codev_commit_stream?filter=%7B%22commit%22%3A%22abc123def456%22%7D" \ -H "Content-Type: application/json" \ -d '{ "data": { "status": "completed", "completed_at": "2025-01-21T05:42:24.862Z" } }'[ { "data": { "status": "completed", "completed_at": "2025-01-21T05:42:24.862Z" } }]/sfp/api/codev/{table}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 constraintsCommon use cases:- Remove outdated deployment records- Clean up resolved issues- Delete test dataAuthorization
access-token In: header
Path Parameters
The table to delete records from
Request Body
application/json
The key and value to identify which records to delete.
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
curl -X DELETE "https://example.com/sfp/api/codev/codev_commit_stream" \ -H "Content-Type: application/json" \ -d '{ "key": "id", "value": "123e4567-e89b-12d3-a456-426614174000" }'/sfp/api/codev/{table}/upsertPerforms 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.Authorization
access-token In: header
Path Parameters
The table to insert/update records in
Request Body
application/json
The data to insert/update and optional conflict columns. If onConflict is specified and a record matches those columns, it will be updated instead of inserted.
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
curl -X PUT "https://example.com/sfp/api/codev/codev_commit_stream/upsert" \ -H "Content-Type: application/json" \ -d '{ "data": { "commit": "abc123def456", "author": "john.doe@example.com", "project": "my-project", "validate_result": { "status": "pending", "details": [] } }, "onConflict": [ "commit" ] }'