Update a team with the APC API

The examples on this page show common ways to use the APC API — they’re not a complete API reference. For the full, interactive API documentation for your installation, including every available query, mutation, and type, go to https://houston.<your-base-domain>/v1, and click on the Docs tab. See Develop and test APC API queries for more on using the built-in GraphQL explorer.

Update team details

1mutation {
2 updateTeam(
3 id: "<team-uuid>"
4 newName: "Platform Engineering"
5 description: "Updated description"
6 ) {
7 team {
8 id
9 name
10 description
11 }
12 message
13 }
14}

Add users to local team

1mutation {
2 updateTeam(
3 id: "<team-uuid>"
4 addUserIds: ["<user-uuid-3>", "<user-uuid-4>"]
5 ) {
6 team {
7 id
8 users {
9 id
10 username
11 }
12 }
13 }
14}

Remove users from local team

1mutation {
2 updateTeam(
3 id: "<team-uuid>"
4 removeUserIds: ["<user-uuid-1>"]
5 ) {
6 team {
7 id
8 users {
9 id
10 username
11 }
12 }
13 }
14}

Replace all users

1mutation {
2 updateTeam(
3 id: "<team-uuid>"
4 teamUserIds: ["<user-uuid-5>", "<user-uuid-6>"]
5 ) {
6 team {
7 users {
8 id
9 username
10 }
11 }
12 }
13}

Update by name (alternative)

Team names are unique per provider, not globally. You must include provider alongside name to uniquely identify a team.

1mutation {
2 updateTeam(
3 name: "Data Engineering"
4 provider: "local"
5 newName: "Data Platform"
6 ) {
7 team {
8 id
9 name
10 }
11 }
12}

For the full teams model, roles, and error reference, see team management reference.