OpenSocialDocumentation

analytics_publication_counts

Read current views, likes and comment totals for a published post.

REST · POST /api/v1/operations/analytics_publication_counts · MCP · analytics_publication_counts

Required scope · analytics. This operation reads data.

Example request body

{
  "publicationId": "PUBLICATION_ID"
}

REST returns the output below directly. In MCP read structuredContent.result. Check the current installation at /api/v1/openapi.json.

For 401 check credential validity. For 403 inspect the role, scopes and selected accounts. For 409 reread the record before retrying.

JSON Schema · Input

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "publicationId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 128
    }
  },
  "required": [
    "publicationId"
  ],
  "additionalProperties": false
}

JSON Schema · Output

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "views": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        {
          "type": "null"
        }
      ]
    },
    "likes": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        {
          "type": "null"
        }
      ]
    },
    "comments": {
      "anyOf": [
        {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        {
          "type": "null"
        }
      ]
    },
    "state": {
      "type": "string",
      "enum": [
        "available",
        "unavailable",
        "authorization_required",
        "not_published"
      ]
    },
    "savedAt": {
      "type": "string"
    }
  },
  "required": [
    "views",
    "likes",
    "comments",
    "state"
  ],
  "additionalProperties": false
}