Logs API
Create and manage product logs with the Logs API. Logs are daily entries for tracking product development progress.
Endpoints
GET
/v1/products/:id_or_slug/logsList logs
Returns a paginated list of logs for a product.
POST
/v1/products/:id_or_slug/logsCreate log
Creates a new log entry.
GET
/v1/products/:id_or_slug/logs/:idRetrieve a log
Retrieves the details of a log entry.
DELETE
/v1/products/:id_or_slug/logs/:idDelete log
Deletes a log entry.
Log Object
The log object represents a daily entry for tracking product development progress.
| Attribute | Type | Description |
|---|---|---|
id | string | Unique identifier for the log (e.g., log_abc123) |
productId | string | ID of the associated product |
content | string | The log content |
logDate | string | Date of the log entry in YYYY-MM-DD format |
createdAt | string | ISO 8601 timestamp of creation |
updatedAt | string | ISO 8601 timestamp of last update |
GET
List Logs
Returns a paginated list of logs for a specific product. Results are ordered by log date (newest first).
Request
Bash
curl https://api.myopcs.com/api/v1/products/prod_abc123/logs \
-H "Authorization: Bearer YOUR_API_KEY"Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
page | integer | No | Page number (default: 1) |
pageSize | integer | No | Items per page (default: 10, max: 100) |
Response
{}JSON
{
"data": [
{
"id": "log_abc123",
"productId": "prod_abc123",
"content": "Fixed the authentication bug and deployed to production.",
"logDate": "2024-01-15",
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z"
},
{
"id": "log_def456",
"productId": "prod_abc123",
"content": "Started working on the new dashboard feature.",
"logDate": "2024-01-14",
"createdAt": "2024-01-14T09:00:00Z",
"updatedAt": "2024-01-14T09:00:00Z"
}
],
"pagination": {
"page": 1,
"pageSize": 10,
"total": 25,
"totalPages": 3
}
}POST
Create Log
Creates a new log entry for a product. Each log entry is associated with a specific date.
Request
Bash
curl -X POST https://api.myopcs.com/api/v1/products/prod_abc123/logs \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"content": "Implemented the new search feature and wrote unit tests.",
"logDate": "2024-01-16"
}'Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
content | string | Yes | The log content |
logDate | string | Yes | Date of the log entry in YYYY-MM-DD format |
Response
{}JSON
{
"data": {
"id": "log_new123",
"productId": "prod_abc123",
"content": "Implemented the new search feature and wrote unit tests.",
"logDate": "2024-01-16",
"createdAt": "2024-01-16T14:00:00Z",
"updatedAt": "2024-01-16T14:00:00Z"
}
}GET
Retrieve a Log
Retrieves the details of an existing log entry by its ID.
Request
Bash
curl https://api.myopcs.com/api/v1/products/prod_abc123/logs/log_abc123 \
-H "Authorization: Bearer YOUR_API_KEY"Response
{}JSON
{
"data": {
"id": "log_abc123",
"productId": "prod_abc123",
"content": "Fixed the authentication bug and deployed to production.",
"logDate": "2024-01-15",
"createdAt": "2024-01-15T10:30:00Z",
"updatedAt": "2024-01-15T10:30:00Z"
}
}DELETE
Delete Log
Deletes a log entry permanently.
Request
Bash
curl -X DELETE https://api.myopcs.com/api/v1/products/prod_abc123/logs/log_abc123 \
-H "Authorization: Bearer YOUR_API_KEY"Response
{}JSON
{
"success": true
}