You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # The GITHUB_TOKEN is there by default so you just need to keep it like it is and not necessarily need to add it as secret as it will throw an error. [More Details](https://docs.github.com/en/actions/security-guides/automatic-token-authentication#about-the-github_token-secret)
Copy file name to clipboardExpand all lines: README.md
+31Lines changed: 31 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -83,3 +83,34 @@ For a read-only scope M2M token, use:
83
83
84
84
- then you can use Postman to test all apis
85
85
- Swagger docs are accessible at `http://localhost:3000/api-docs`
86
+
87
+
**Downstream Usage**
88
+
89
+
- This service is consumed by multiple Topcoder apps. Below is a quick map of where and how it’s called to help with debugging.
90
+
91
+
**platform-ui**
92
+
93
+
- Admin pages manage groups and memberships using v6 endpoints:
94
+
- List/search groups: `GET /v6/groups?page=1&perPage=10000` (optionally filter by `name`, or by `memberId` + `membershipType=user`). See platform-ui/src/apps/admin/src/lib/services/groups.service.ts.
95
+
- Fetch group by id: `GET /v6/groups/{id}` (optional `fields` query). See platform-ui/src/apps/admin/src/lib/services/groups.service.ts.
96
+
- List group members: `GET /v6/groups/{id}/members?page&perPage`. See platform-ui/src/apps/admin/src/lib/services/groups.service.ts.
97
+
- Create group: `POST /v6/groups`. See platform-ui/src/apps/admin/src/lib/services/groups.service.ts.
98
+
- Add member: `POST /v6/groups/{id}/members` with `{ membershipType: 'user'|'group', memberId }`. See platform-ui/src/apps/admin/src/lib/services/groups.service.ts.
99
+
- Remove member: `DELETE /v6/groups/{id}/members/{memberId}`. See platform-ui/src/apps/admin/src/lib/services/groups.service.ts.
100
+
- Local dev proxy maps both `/v5/groups` and `/v6/groups` to this service on port 3001. See platform-ui/src/config/environments/local.env.ts.
101
+
102
+
**community-app**
103
+
104
+
- Used server-side to expand community metadata group IDs to include descendants (group trees). The code acquires an M2M token and calls the groups service helper, which in turn queries the Groups API for a group’s tree of IDs. See community-app/src/server/services/communities.js and community-app/src/server/services/communities.js.
105
+
- Community App requires M2M credentials with access to Groups API for this logic. See community-app/README.md.
106
+
- Equivalent v6 endpoint for tree expansion is: `GET /v6/groups/{id}?flattenGroupIdTree=true` (also supports `includeSubGroups`, `includeParentGroup`, `oneLevel`).
107
+
108
+
**work-manager**
109
+
110
+
- Populates group selectors and filters challenge visibility:
111
+
- Search groups by name for autocomplete: `GET /v6/groups?name={query}&perPage={large}`. See work-manager/src/components/ChallengeEditor/Groups-Field/index.js.
112
+
- Load current user’s groups when creating/editing a challenge: `GET /v6/groups?membershipType=user&memberId={tcUserId}&perPage={large}`. See work-manager/src/actions/challenges.js.
113
+
- Fetch group detail by id: `GET /v6/groups/{id}`. See work-manager/src/services/challenges.js.
114
+
- API base configuration points to v6 in dev/local and v5 in prod (for backward compatibility):
0 commit comments