> ## Documentation Index
> Fetch the complete documentation index at: https://docs.markifact.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get log

> Fetch a single Markifact operation log by ID.

Returns one log. The response is the same object [List logs](/api-reference/logs/list-logs) returns, so use this when you already have a log ID and do not want to page.

## Endpoint

```http theme={"dark"}
GET /v1/logs/{log_id}
```

## Path Parameters

| Parameter | Type   | Required | Description |
| --------- | ------ | -------- | ----------- |
| `log_id`  | string | Yes      | The log ID. |

## Example Request

```bash theme={"dark"}
curl "https://api.markifact.com/v1/logs/1e38c1c2-1d85-4094-ab55-1f35c78ab436" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

## Response

```json theme={"dark"}
{
  "id": "1e38c1c2-1d85-4094-ab55-1f35c78ab436",
  "operation_id": "gads_get_campaigns",
  "operation_version": 2,
  "status": "error",
  "source": {
    "type": "mcp",
    "id": "mcp_7f21c9",
    "run_id": null,
    "name": "Client A MCP"
  },
  "user": {
    "id": "Q8Wvn9gL8GUQ11SsJAnMfiyyGOA2",
    "email": "member@example.com"
  },
  "started_at": 1784874174,
  "completed_at": 1784874176,
  "credits_used": 0,
  "cache_hit": false,
  "input": { "customer_id": "123-456-7890", "date_range": "LAST_30_DAYS" },
  "output": {
    "error": true,
    "type": "NodeError",
    "message": "The Google Ads account is no longer accessible with this connection."
  },
  "metadata": { "tool_name": "run_operation" }
}
```

See [List logs](/api-reference/logs/list-logs#log-object) for the full field reference.

## Errors

| Status | Meaning                                                                                |
| ------ | -------------------------------------------------------------------------------------- |
| `401`  | Missing, invalid, or revoked API key.                                                  |
| `404`  | No log with that ID in your team, or the log is older than your plan's history window. |

A `404` for an aged-out log includes the window in the response so you can tell it apart from a genuinely unknown ID:

```json theme={"dark"}
{
  "detail": {
    "message": "Log not found",
    "history_days": 30
  }
}
```


## OpenAPI

````yaml GET /v1/logs/{log_id}
openapi: 3.1.0
info:
  title: Markifact API
  version: 1.0.0
  description: API for managing Markifact workspace connections.
servers:
  - url: https://api.markifact.com
security:
  - bearerAuth: []
paths:
  /v1/logs/{log_id}:
    get:
      tags:
        - Logs
      summary: Get log
      description: Fetch a single log by ID.
      operationId: getLog
      parameters:
        - name: log_id
          in: path
          required: true
          schema:
            type: string
          description: The log ID.
      responses:
        '200':
          description: Log returned.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Log'
        '401':
          description: Invalid API key.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Log not found, or older than your plan's history window.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Log:
      type: object
      properties:
        id:
          type: string
          description: Log ID.
        operation_id:
          type: string
          example: gads_get_campaigns
          description: Markifact operation that ran.
        operation_version:
          type:
            - integer
            - 'null'
        status:
          type: string
          enum:
            - success
            - error
            - skipped
            - stop
            - start
        source:
          $ref: '#/components/schemas/LogSource'
        user:
          $ref: '#/components/schemas/LogUser'
        started_at:
          type: integer
          format: int64
          example: 1784874174
          description: Start time in Unix seconds.
        completed_at:
          type:
            - integer
            - 'null'
          format: int64
          description: >-
            Completion time in Unix seconds. Null while the operation is still
            running.
        credits_used:
          type: integer
        cache_hit:
          type: boolean
          description: Whether the result came from cache instead of the provider.
        input:
          description: Input the operation ran with. Shape depends on the operation.
        output:
          description: >-
            Result the operation returned, or the error payload when status is
            error. Shape depends on the operation.
        metadata:
          type: object
          additionalProperties: true
          description: >-
            Extra context. Keys depend on the source: node_id, node_label, and
            retry_attempts for workflows, tool_name for MCP.
      required:
        - id
        - operation_id
        - status
        - source
        - user
        - started_at
        - credits_used
        - cache_hit
        - metadata
    Error:
      type: object
      properties:
        detail: {}
    LogSource:
      type: object
      properties:
        type:
          type: string
          enum:
            - mcp
            - agent
            - workflow
          description: What ran the operation.
        id:
          type:
            - string
            - 'null'
          description: 'Parent object ID: the MCP server, agent conversation, or workflow.'
        run_id:
          type:
            - string
            - 'null'
          description: Single execution ID. Set on workflow logs, null otherwise.
        name:
          type:
            - string
            - 'null'
          description: >-
            Current parent name, falling back to the name captured at log time
            if the parent was deleted.
      required:
        - type
    LogUser:
      type: object
      properties:
        id:
          type:
            - string
            - 'null'
          description: Markifact user ID.
        email:
          type:
            - string
            - 'null'
          description: Email of the team member who ran the operation.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````