api-referenceGET
GET
https://analytics.flowsery.com/analytics/api/v1/workspacesElenca i workspace in cui questa credenziale può operare. Invia un id restituito nell'header X-Workspace-Id per eseguire qualsiasi altra richiesta in quel workspace.
Bearer token (token API del workspace o accesso OAuth)
Chi vede quali workspace
Un accesso OAuth, come il connettore di Claude o ChatGPT, raggiunge tutti i workspace a cui appartiene il membro, anche in organizzazioni diverse. Un token API del workspaceflow_ws_ raggiunge solo il proprio workspace, quindi l'elenco ha una sola voce. current indica il workspace in cui è finita questa chiamata. Sono elencati solo i workspace in cui hai flowsery.write, cioè i ruoli Amministratore ed Editor.Le chiavi del sito rispondono 400
Una chiave API del sitoflow_ è limitata a un sito e non ha un membro dietro, quindi questo endpoint risponde 400 Bad Request. Usa un token API del workspace o un accesso OAuth.Campi della risposta
| Parametro | Tipo | Descrizione |
|---|---|---|
id | string | ID del workspace. Invialo nell'header X-Workspace-Id per operare in questo workspace. |
name | string | Nome del workspace. |
organization.id | string | ID dell'organizzazione proprietaria del workspace. |
organization.name | string | Nome dell'organizzazione proprietaria del workspace. |
role.key | string | Il tuo ruolo in questo workspace: admin o editor, i ruoli che possono usare Flowsery. |
role.name | string | Nome visualizzato del ruolo. |
permissions | string[] | Le chiavi dei permessi che hai in questo workspace, come flowsery.write. |
isDefault | boolean | True per il workspace in cui finisce una chiamata quando non invii l'header X-Workspace-Id. |
current | boolean | True per il workspace in cui è finita questa chiamata. |
Esempio di richiesta (curl)
curl --request GET \
--url https://analytics.flowsery.com/analytics/api/v1/workspaces \
--header 'Authorization: Bearer <workspace-api-token>'200
{
"status": "success",
"data": [
{
"id": "cm8ws1a2b3",
"name": "Acme marketing",
"organization": { "id": "org_01J8ZK4M2Q", "name": "Acme" },
"role": { "key": "editor", "name": "Editor" },
"permissions": [
"workspace.read",
"posts.read",
"accounts.read",
"posts.draft",
"media.upload",
"analytics.read",
"ai.generate",
"members.read",
"tokens.own",
"posts.others",
"posts.schedule",
"posts.publish",
"posts.delete",
"analytics.sync",
"webhooks.read",
"webhooks.manage",
"signature.manage",
"flowsery.write",
"redreplier.write",
"claw.use"
],
"isDefault": true,
"current": true
},
{
"id": "cm8ws4c5d6",
"name": "Northwind",
"organization": { "id": "org_01J9P7T3XB", "name": "Northwind Studio" },
"role": { "key": "admin", "name": "Admin" },
"permissions": [
"workspace.read",
"workspace.manage",
"posts.read",
"posts.draft",
"posts.others",
"posts.schedule",
"posts.publish",
"posts.delete",
"media.upload",
"accounts.read",
"accounts.manage",
"analytics.read",
"analytics.sync",
"ai.generate",
"members.read",
"members.manage",
"tokens.own",
"tokens.manage",
"webhooks.read",
"webhooks.manage",
"signature.manage",
"flowsery.write",
"redreplier.write",
"claw.use"
],
"isDefault": false,
"current": false
}
]
}