# Get logs topic backlog

`GET /lag`



[Logs API guide](https://docs.contextual.io/legacy/tenants/tenant-apis/logs-api.md)

```json
{
  "openapi": "3.0.3",
  "info": {
    "title": "Contextual Logs Api",
    "description": " ",
    "version": "1.16.0"
  },
  "security": [
    {
      "jwt": []
    }
  ],
  "servers": [
    {
      "url": "https://logs.{tenantId}.my.contextual.io/api/v1",
      "variables": {
        "tenantId": {
          "default": "YOUR-TENANT-ID"
        }
      }
    }
  ],
  "paths": {
    "/lag": {
      "get": {
        "tags": [
          "Logs"
        ],
        "summary": "Get logs topic backlog",
        "parameters": [
          {
            "name": "x-org-id",
            "in": "header",
            "required": true,
            "schema": {
              "type": "string"
            }
          }
        ],
        "deprecated": false,
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "lag": {
                      "type": "number"
                    },
                    "partitions": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "partition": {
                            "type": "number"
                          },
                          "lag": {
                            "type": "number"
                          }
                        },
                        "required": [
                          "partition",
                          "lag"
                        ],
                        "additionalProperties": false
                      }
                    }
                  },
                  "required": [
                    "lag",
                    "partitions"
                  ],
                  "additionalProperties": false
                }
              }
            }
          },
          "401": {
            "description": "Missing or invalid authorization header",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          },
          "403": {
            "description": "Invalid permissions",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/$ErrorResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "jwt": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    },
    "schemas": {
      "$ErrorResponse": {
        "type": "object",
        "properties": {
          "code": {
            "type": [
              "string",
              "number"
            ]
          },
          "message": {
            "type": "string"
          },
          "errors": {
            "type": "array",
            "items": {}
          }
        },
        "required": [
          "code",
          "message"
        ],
        "additionalProperties": false
      }
    }
  }
}
```