Die Suche lädt erst bei Nutzung. Durchsuche unten alle Kategorien.

Analysen und Insights

Öffentliche Leistungsdaten lesen

Nicht offizielle öffentliche X-Kennzahlen eines verbundenen Kontos im Workspace lesen. Fehlende Kennzahlen bleiben nicht verfügbar; es werden weder die kostenpflichtige X API noch Zugangsdaten verwendet.

POST /analytics-api/public-performance/read

Vertrag geprüft: · sha256:6a53c6b98f970cf0

Überblick

Nicht offizielle öffentliche X-Kennzahlen eines verbundenen Kontos im Workspace lesen. Fehlende Kennzahlen bleiben nicht verfügbar; es werden weder die kostenpflichtige X API noch Zugangsdaten verwendet.

Eine erfolgreiche HTTP-Antwort kann Annahme statt Abschluss bedeuten. Speichere bei Hintergrundarbeit die ID und prüfe dieselbe Operation bis zum Abschluss. Geplante oder angenommene Beiträge gelten erst nach Plattformbestätigung als veröffentlicht; ein Client-Timeout klärt das Ergebnis nicht.

Authentifizierung und Berechtigungen

Akzeptierte Zugangsdatenklassen
user_session, delegated_oauth, personal_access_token
Delegierte Funktion
agent:operate
Minimale Workspace-Rolle
viewer
Zugriffsumfang
Ressourcen, auf die dieser Nutzer zugreifen darf
Zustimmung für alle Workspaces erforderlich
Nein
Ändert Zustand
Nein
Nach Abschluss der Operation
explicitly unofficial public counters or unavailable evidence; never official Insights

Ein Token nutzt nur Eigentümerrechte. Jede Anfrage prüft Workspace-Mitgliedschaft, Ressourceneigentum, gewählte Workspaces und Funktionen. core und full ändern sichtbare Tools; sie erteilen keinen Zugriff.

Anfragefelder

Erforderlich bedeutet innerhalb des übergeordneten Objekts und gewählten Zweigs erforderlich. Ein erforderliches Kind macht kein optionales Elternobjekt erforderlich. Regeln und Feldnamen unten stammen aus dem Vertrag.

Anfragefelder
Feld / VarianteTyp / erforderlichEinschränkungen
$objectIm Elternobjekt erforderlich
  • additionalProperties: false
workspace_idstringIm Elternobjekt erforderlich
  • format: "uuid"
  • pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
social_account_idstringIm Elternobjekt erforderlich
  • format: "uuid"
  • pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
cursorstringOptional / Element
  • minLength: 1
  • maxLength: 2048
refreshbooleanOptional / Element—
Vollständiges JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "workspace_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "social_account_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "cursor": {
      "type": "string",
      "minLength": 1,
      "maxLength": 2048
    },
    "refresh": {
      "type": "boolean"
    }
  },
  "required": [
    "workspace_id",
    "social_account_id"
  ],
  "additionalProperties": false
}

Antwort und Abschluss

HTTP-Erfolgsstatus: 200. Wenn die Operation abgeschlossen ist: explicitly unofficial public counters or unavailable evidence; never official Insights.

Eine erfolgreiche HTTP-Antwort kann Annahme statt Abschluss bedeuten. Speichere bei Hintergrundarbeit die ID und prüfe dieselbe Operation bis zum Abschluss. Geplante oder angenommene Beiträge gelten erst nach Plattformbestätigung als veröffentlicht; ein Client-Timeout klärt das Ergebnis nicht.

Erforderlich bedeutet innerhalb des übergeordneten Objekts und gewählten Zweigs erforderlich. Ein erforderliches Kind macht kein optionales Elternobjekt erforderlich. Regeln und Feldnamen unten stammen aus dem Vertrag.

Antwort und Abschluss
Feld / VarianteTyp / erforderlichEinschränkungen
$objectIm Elternobjekt erforderlich—
contract_versionstringIm Elternobjekt erforderlich
  • const: "public-performance/v1"
sourcestringIm Elternobjekt erforderlich
  • const: "fxtwitter"
source_kindstringIm Elternobjekt erforderlich
  • const: "unofficial_public"
platformstringIm Elternobjekt erforderlich
  • const: "x"
workspace_idstringIm Elternobjekt erforderlich
  • format: "uuid"
  • pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
social_account_idstringIm Elternobjekt erforderlich
  • format: "uuid"
  • pattern: "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
provider_account_idstringIm Elternobjekt erforderlich
  • pattern: "^\\d{2,20}$"
fetched_atstringIm Elternobjekt erforderlich
  • format: "date-time"
  • pattern: "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
upstream_updated_atnullIm Elternobjekt erforderlich—
expires_atstringIm Elternobjekt erforderlich
  • format: "date-time"
  • pattern: "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
cache_statusstringIm Elternobjekt erforderlich
  • enum: ["hit","stored","bypassed"]
statusstringIm Elternobjekt erforderlich
  • enum: ["available","partial","unavailable"]
profileobject | nullIm Elternobjekt erforderlich—
profileanyOf 1objectIm Elternobjekt erforderlich—
profile.nameanyOf 1stringIm Elternobjekt erforderlich
  • maxLength: 200
profile.handleanyOf 1stringIm Elternobjekt erforderlich
  • maxLength: 100
profile.followersanyOf 1integer | nullIm Elternobjekt erforderlich—
profile.followersanyOf 1 / anyOf 1integerIm Elternobjekt erforderlich
  • minimum: 0
  • maximum: 9007199254740991
profile.followersanyOf 1 / anyOf 2nullIm Elternobjekt erforderlich—
profileanyOf 2nullIm Elternobjekt erforderlich—
postsarrayIm Elternobjekt erforderlich
  • maxItems: 100
posts[]objectOptional / Element—
posts[].idstringIm Elternobjekt erforderlich
  • pattern: "^\\d{2,20}$"
posts[].urlstringIm Elternobjekt erforderlich
  • format: "uri"
posts[].textstringIm Elternobjekt erforderlich
  • maxLength: 30000
posts[].published_atstring | nullIm Elternobjekt erforderlich—
posts[].published_atanyOf 1stringIm Elternobjekt erforderlich
  • format: "date-time"
  • pattern: "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
posts[].published_atanyOf 2nullIm Elternobjekt erforderlich—
posts[].kindstringIm Elternobjekt erforderlich
  • enum: ["post","reply"]
posts[].media_kindstringIm Elternobjekt erforderlich
  • enum: ["text","image","video"]
posts[].metricsobjectIm Elternobjekt erforderlich—
posts[].metrics.viewsinteger | nullIm Elternobjekt erforderlich—
posts[].metrics.viewsanyOf 1integerIm Elternobjekt erforderlich
  • minimum: 0
  • maximum: 9007199254740991
posts[].metrics.viewsanyOf 2nullIm Elternobjekt erforderlich—
posts[].metrics.likesinteger | nullIm Elternobjekt erforderlich—
posts[].metrics.likesanyOf 1integerIm Elternobjekt erforderlich
  • minimum: 0
  • maximum: 9007199254740991
posts[].metrics.likesanyOf 2nullIm Elternobjekt erforderlich—
posts[].metrics.repliesinteger | nullIm Elternobjekt erforderlich—
posts[].metrics.repliesanyOf 1integerIm Elternobjekt erforderlich
  • minimum: 0
  • maximum: 9007199254740991
posts[].metrics.repliesanyOf 2nullIm Elternobjekt erforderlich—
posts[].metrics.repostsinteger | nullIm Elternobjekt erforderlich—
posts[].metrics.repostsanyOf 1integerIm Elternobjekt erforderlich
  • minimum: 0
  • maximum: 9007199254740991
posts[].metrics.repostsanyOf 2nullIm Elternobjekt erforderlich—
posts[].metrics.quotesinteger | nullIm Elternobjekt erforderlich—
posts[].metrics.quotesanyOf 1integerIm Elternobjekt erforderlich
  • minimum: 0
  • maximum: 9007199254740991
posts[].metrics.quotesanyOf 2nullIm Elternobjekt erforderlich—
posts[].metrics.bookmarksinteger | nullIm Elternobjekt erforderlich—
posts[].metrics.bookmarksanyOf 1integerIm Elternobjekt erforderlich
  • minimum: 0
  • maximum: 9007199254740991
posts[].metrics.bookmarksanyOf 2nullIm Elternobjekt erforderlich—
coverageobjectIm Elternobjekt erforderlich—
coverage.completebooleanIm Elternobjekt erforderlich—
coverage.next_cursorstring | nullIm Elternobjekt erforderlich—
coverage.next_cursoranyOf 1stringIm Elternobjekt erforderlich
  • maxLength: 2048
coverage.next_cursoranyOf 2nullIm Elternobjekt erforderlich—
coverage.views_available_postsintegerIm Elternobjekt erforderlich
  • minimum: 0
  • maximum: 9007199254740991
coverage.omitted_rowsintegerIm Elternobjekt erforderlich
  • minimum: 0
  • maximum: 9007199254740991
coverage.reasonsarrayIm Elternobjekt erforderlich
  • maxItems: 8
coverage.reasons[]stringOptional / Element
  • maxLength: 300
Vollständiges JSON Schema
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "contract_version": {
      "type": "string",
      "const": "public-performance/v1"
    },
    "source": {
      "type": "string",
      "const": "fxtwitter"
    },
    "source_kind": {
      "type": "string",
      "const": "unofficial_public"
    },
    "platform": {
      "type": "string",
      "const": "x"
    },
    "workspace_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "social_account_id": {
      "type": "string",
      "format": "uuid",
      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
    },
    "provider_account_id": {
      "type": "string",
      "pattern": "^\\d{2,20}$"
    },
    "fetched_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
    },
    "upstream_updated_at": {
      "type": "null"
    },
    "expires_at": {
      "type": "string",
      "format": "date-time",
      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
    },
    "cache_status": {
      "type": "string",
      "enum": [
        "hit",
        "stored",
        "bypassed"
      ]
    },
    "status": {
      "type": "string",
      "enum": [
        "available",
        "partial",
        "unavailable"
      ]
    },
    "profile": {
      "anyOf": [
        {
          "type": "object",
          "properties": {
            "name": {
              "type": "string",
              "maxLength": 200
            },
            "handle": {
              "type": "string",
              "maxLength": 100
            },
            "followers": {
              "anyOf": [
                {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 9007199254740991
                },
                {
                  "type": "null"
                }
              ]
            }
          },
          "required": [
            "name",
            "handle",
            "followers"
          ]
        },
        {
          "type": "null"
        }
      ]
    },
    "posts": {
      "maxItems": 100,
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^\\d{2,20}$"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "text": {
            "type": "string",
            "maxLength": 30000
          },
          "published_at": {
            "anyOf": [
              {
                "type": "string",
                "format": "date-time",
                "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"
              },
              {
                "type": "null"
              }
            ]
          },
          "kind": {
            "type": "string",
            "enum": [
              "post",
              "reply"
            ]
          },
          "media_kind": {
            "type": "string",
            "enum": [
              "text",
              "image",
              "video"
            ]
          },
          "metrics": {
            "type": "object",
            "properties": {
              "views": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "likes": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "replies": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "reposts": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "quotes": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "bookmarks": {
                "anyOf": [
                  {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 9007199254740991
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            },
            "required": [
              "views",
              "likes",
              "replies",
              "reposts",
              "quotes",
              "bookmarks"
            ]
          }
        },
        "required": [
          "id",
          "url",
          "text",
          "published_at",
          "kind",
          "media_kind",
          "metrics"
        ]
      }
    },
    "coverage": {
      "type": "object",
      "properties": {
        "complete": {
          "type": "boolean"
        },
        "next_cursor": {
          "anyOf": [
            {
              "type": "string",
              "maxLength": 2048
            },
            {
              "type": "null"
            }
          ]
        },
        "views_available_posts": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "omitted_rows": {
          "type": "integer",
          "minimum": 0,
          "maximum": 9007199254740991
        },
        "reasons": {
          "maxItems": 8,
          "type": "array",
          "items": {
            "type": "string",
            "maxLength": 300
          }
        }
      },
      "required": [
        "complete",
        "next_cursor",
        "views_available_posts",
        "omitted_rows",
        "reasons"
      ]
    }
  },
  "required": [
    "contract_version",
    "source",
    "source_kind",
    "platform",
    "workspace_id",
    "social_account_id",
    "provider_account_id",
    "fetched_at",
    "upstream_updated_at",
    "expires_at",
    "cache_status",
    "status",
    "profile",
    "posts",
    "coverage"
  ]
}

Fehler und sichere Wiederholungen

Prüfe HTTP-Status und Antwortinhalt. Ein 400-Validierungsfehler kann einen ZodError enthalten; Handler-Fehler verwenden die Felder error, message und code. Bewahre request_id oder x-request-id zur Diagnose ohne Zugangsdaten auf. Behebe 401/403-Zugriffsfehler vor einem erneuten Versuch und beachte Retry-After bei 429. Ist ein Schreibvorgang ungewiss oder liefert 5xx, lies zuerst das bestehende Ergebnis. Verwende einen Idempotenzschlüssel nur wieder, wo dies unterstützt wird; Wiederholungen unterscheiden sich je nach Operation und garantieren keine genau einmalige Zustellung.

Anleitung zur Fehlerbehebung

Beispiele

Diese Beispiele nutzen anhand der Schemas geprüfte fiktive Werte. Ersetze IDs durch autorisierte IDs, Medien durch bereite Assets und Daten durch bestätigte Veröffentlichungszeiten. Prüfe Kontoeignung vor Schreibvorgängen. Diese Seite sendet keine API-Anfragen.

Setze SOSOAPI_ACCESS_TOKEN auf deinem Server auf akzeptierte Zugangsdaten dieser Operation und halte es aus Browsercode heraus. Für Agenten nutze sosoapi auth login zur Browseranmeldung und lass die CLI Zugangsdaten erneuern.

request.json

{
  "workspace_id": "11111111-1111-4111-8111-111111111111",
  "social_account_id": "22222222-2222-4222-8222-222222222222"
}

cURL

curl --request POST \
  "https://gqeshlawtcexsapabaui.supabase.co/functions/v1/analytics-api/public-performance/read" \
  -H "Authorization: Bearer $SOSOAPI_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  --data-binary @request.json

JavaScript

// Server-side JavaScript. Do not print tokens or credential-bearing responses.
const token = process.env.SOSOAPI_ACCESS_TOKEN;
if (!token) throw new Error("Set an accepted credential for this operation");
const response = await fetch("https://gqeshlawtcexsapabaui.supabase.co/functions/v1/analytics-api/public-performance/read", {
  method: "POST",
  headers: { "Content-Type": "application/json", Authorization: "Bearer " + token },
  body: JSON.stringify({
  "workspace_id": "11111111-1111-4111-8111-111111111111",
  "social_account_id": "22222222-2222-4222-8222-222222222222"
})
});
const result = await response.json();
// Check response.ok, the operation-specific body and completion state before continuing.

CLI

npx sosoapi api post /analytics-api/public-performance/read < request.json

Synthetisches Antwortbeispiel

{
  "workspace_id": "11111111-1111-4111-8111-111111111111",
  "social_account_id": "22222222-2222-4222-8222-222222222222",
  "contract_version": "public-performance/v1",
  "source": "fxtwitter",
  "source_kind": "unofficial_public",
  "platform": "x",
  "provider_account_id": "12345",
  "fetched_at": "2099-01-15T09:00:00Z",
  "upstream_updated_at": null,
  "expires_at": "2099-01-15T09:05:00Z",
  "cache_status": "stored",
  "status": "unavailable",
  "profile": null,
  "posts": [],
  "coverage": {
    "complete": false,
    "next_cursor": null,
    "views_available_posts": 0,
    "omitted_rows": 0,
    "reasons": [
      "Fictional public source unavailable; no account data was read."
    ]
  }
}

MCP: sosoapi_read_public_performance