TeamApp Admin API
Use this skill for TeamApp admin operations against JSON endpoints discovered from the web app.
Quick Workflow
- 1. Resolve IDs first.
- 2. Read form schemas before writing.
- - Open
new.json or edit.json endpoint for the target resource. - Use the embedded
onSubmit controller and URL as source of truth for method and endpoint.
- 3. Create or update content.
- - Submit payload fields exactly as named in the schema.
- For visibility-scoped content, set
...access_level_ids_csv only when visibility is access_groups.
- 4. Verify by reloading list endpoints.
- - Re-read list JSON and confirm returned object IDs, titles, and action URLs.
Auth and Session Requirements
MANDATORY: All interactions with the TeamApp API via this skill must use the provided wrapper script bin/api-wrapper.sh.
This wrapper automatically handles:
- - Session bootstrapping (fetching the dashboard to establish a session).
- CSRF token extraction and caching.
- Cookie management (
ta_auth_token and _teamapp_session). - Session refreshing on expiration (401/422 errors).
Required Environment Variables
The wrapper requires the following variables to be set in your shell environment:
- -
TA_AUTH_TOKEN: The ta_auth_token cookie value (extracted from a browser session).
Usage
Call the wrapper with the HTTP method, the full URL, and any curl options (like data payloads).
CODEBLOCK0
Example: Read Articles
CODEBLOCK1
Example: Create Article
CODEBLOCK2
Scheduling and Notifications
All News and Events support scheduling and configurable notification delivery.
Scheduling (Release Control)
- -
...[release_pending]: Set to 0 for immediate release, or 1 to schedule for later. - INLINECODE17 : When
release_pending is 1, provide an ISO 8601 timestamp (e.g., 2026-03-25 10:00).
Notification Delivery
The send_notifications parameter controls how users are alerted:
- -
0: None (Silent release) - INLINECODE23 : Push OR Email (Default: sends push if enabled on device, falls back to email if notifications are disabled)
- INLINECODE24 : Push AND Email (Sends both regardless of app notification status)
Event Reminders
Events include an additional event[reminder] field for automated alerts:
- -
-1: None - INLINECODE27 : At starting time
- INLINECODE28 : 30 minutes before
- INLINECODE29 : 1 hour before
- INLINECODE30 : 1 day before (and other standard intervals in seconds)
- INLINECODE31 : Custom (requires
event[reminder_datetime])
Operations
News Articles (create/read/update)
Required baseline fields for create:
- - INLINECODE33
- INLINECODE34
- INLINECODE35 (
public|approved_members|access_groups) - INLINECODE37 (
0|1) - INLINECODE39 (
0|1) - INLINECODE41 (
0|1) - INLINECODE43 (
0|1) - INLINECODE45 (
0|1|2)
Schedule Events (create/read/update)
Key fields:
- -
event[team_id], INLINECODE48 - INLINECODE49 ,
event[datetime_end] or all-day fields - INLINECODE51 / html variant fields
- INLINECODE52 , INLINECODE53
- INLINECODE54 , INLINECODE55
- INLINECODE56 ,
event[reminder], INLINECODE58
Teams and Access Groups (ID resolution + targeting)
Use list endpoints to resolve IDs before posting news/events:
Use team/access-group IDs in:
- - INLINECODE59
- INLINECODE60
- INLINECODE61
- INLINECODE62
- INLINECODE63
References
TeamApp 管理 API
使用此技能对从 Web 应用发现的 JSON 端点执行 TeamApp 管理操作。
快速工作流程
- 1. 首先解析 ID。
- 加载
references/api-map.md 并从列表端点获取 clubid、team
id 和 accesslevel_id 值。
- 2. 在写入前读取表单架构。
- 打开目标资源的 new.json 或 edit.json 端点。
- 使用嵌入的 onSubmit 控制器和 URL 作为方法和端点的真实来源。
- 3. 创建或更新内容。
- 完全按照架构中的名称提交负载字段。
- 对于可见性范围的内容,仅在可见性为 access
groups 时设置 ...accesslevel
idscsv。
- 4. 通过重新加载列表端点进行验证。
- 重新读取列表 JSON 并确认返回的对象 ID、标题和操作 URL。
认证和会话要求
强制要求: 通过此技能与 TeamApp API 的所有交互必须使用提供的包装脚本 bin/api-wrapper.sh。
此包装器自动处理:
- - 会话引导(获取仪表板以建立会话)。
- CSRF 令牌提取和缓存。
- Cookie 管理(taauthtoken 和 teamappsession)。
- 过期会话刷新(401/422 错误)。
所需环境变量
包装器需要在您的 shell 环境中设置以下变量:
- - TAAUTHTOKEN:taauthtoken cookie 值(从浏览器会话中提取)。
使用方法
使用 HTTP 方法、完整 URL 和任何 curl 选项(如数据负载)调用包装器。
bash
通用语法
./bin/api-wrapper.sh [方法] [URL] [CURL_选项...]
示例:读取文章
bash
./bin/api-wrapper.sh GET https://examplesite.teamapp.com/clubs/$TACLUBID/articles.json?_detail=v1
示例:创建文章
bash
./bin/api-wrapper.sh POST https://examplesite.teamapp.com/clubs/$TACLUBID/articles.json?postresponse=v1 \
--data-urlencode article[subject]=我的标题 \
--data-urlencode article[body]=我的正文 \
--data-urlencode article[visibility]=public \
--data-urlencode article[comments_enabled]=1 \
--data-urlencode article[feature]=0 \
--data-urlencode article[html_body]=0 \
--data-urlencode article[release_pending]=0 \
--data-urlencode send_notifications=0
排期和通知
所有新闻和活动均支持排期和可配置的通知投递。
排期(发布控制)
- - ...[releasepending]:设置为 0 表示立即发布,或 1 表示稍后排期。
- ...[releaseat]:当 release_pending 为 1 时,提供 ISO 8601 时间戳(例如 2026-03-25 10:00)。
通知投递
send_notifications 参数控制如何提醒用户:
- - 0:无(静默发布)
- 1:推送或电子邮件(默认:如果设备上启用了推送则发送推送,如果通知被禁用则回退到电子邮件)
- 2:推送和电子邮件(无论应用通知状态如何,两者都发送)
活动提醒
活动包含一个额外的 event[reminder] 字段用于自动提醒:
- - -1:无
- 0:开始时间
- 1800:提前 30 分钟
- 3600:提前 1 小时
- 86400:提前 1 天(以及其他标准时间间隔,以秒为单位)
- -2:自定义(需要 event[reminder_datetime])
操作
新闻文章(创建/读取/更新)
创建所需的基线字段:
- - article[subject]
- article[body]
- article[visibility](public|approvedmembers|accessgroups)
- article[commentsenabled](0|1)
- article[feature](0|1)
- article[htmlbody](0|1)
- article[releasepending](0|1)
- sendnotifications(0|1|2)
排期活动(创建/读取/更新)
关键字段:
- - event[teamid]、event[title]
- event[datetime]、event[datetimeend] 或全天字段
- event[details] / HTML 变体字段
- event[visibility]、event[accesslevelidscsv]
- event[releasepending]、event[releaseat]
- sendnotifications、event[reminder]、event[reminder_datetime]
团队和访问组(ID 解析 + 定位)
在发布新闻/活动前使用列表端点解析 ID:
在以下位置使用团队/访问组 ID:
- - event[teamid]
- article[accesslevelidscsv]
- event[accesslevelidscsv]
- team[accesslevelidscsv]
- rosteraccesslevel_id
参考