Logs API

Create and manage product logs with the Logs API. Logs are daily entries for tracking product development progress.

Endpoints

Log Object

The log object represents a daily entry for tracking product development progress.

AttributeTypeDescription
idstringUnique identifier for the log (e.g., log_abc123)
productIdstringID of the associated product
contentstringThe log content
logDatestringDate of the log entry in YYYY-MM-DD format
createdAtstringISO 8601 timestamp of creation
updatedAtstringISO 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

ParameterTypeRequiredDescription
pageintegerNoPage number (default: 1)
pageSizeintegerNoItems 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

ParameterTypeRequiredDescription
contentstringYesThe log content
logDatestringYesDate 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
}