Team Space Memberships

Group Team Space Memberships

Team space memberships are just like space memberships, except that while space memberships grant space access to a single user, team space memberships grant access to an entire team.

Get all team space memberships in a space

Get all team space memberships in a space

This endpoint returns a paginated collection of all team space memberships for this space.

Only organization admins, owners, and space admins can access this endpoint.

Query Parameters

NameDetailsDescription
skip, limit-Specify requested page of result set. See Pagination for more details.
orderSupported values: sys.updatedAt, sys.createdAtSpecify sort order of result set. See Sorting Results for more details.
includeSupported values: roles, sys.teamSpecify linked resources to include in response. See Including Related Resources for more details.
FiltersSee section belowSpecify a value to filter against for the provided attribute. See Filtering Results for more information, and below for details about supported attributes for this endpoint.

Filter Parameters

See Filtering Results for details about how to use attributes and operators to construct query filters.

AttributeSupported OperatorsSupported Values
sys.ideq, inString (id)

Response

1{
2 "total": 1,
3 "limit": 25,
4 "skip": 0,
5 "sys": {
6 "type": "Array"
7 },
8 "items": [
9 {
10 "sys": {
11 "type": "TeamSpaceMembership",
12 "id": "0xWanD4AZI2AR35wW9q51n",
13 "version": 0,
14 "createdAt": "2015-05-18T11:29:46.809Z",
15 "createdBy": {
16 "sys": {
17 "type": "Link",
18 "linkType": "User",
19 "id": "7BslKh9TdKGOK41VmLDjFZ"
20 }
21 },
22 "updatedAt": "2015-05-18T11:29:46.809Z",
23 "updatedBy": {
24 "sys": {
25 "type": "Link",
26 "linkType": "User",
27 "id": "4FLrUHftHW3v2BLi9fzfjU"
28 }
29 },
30 "team": {
31 "sys": {
32 "type": "Link",
33 "linkType": "Team",
34 "id": "7BslKh9TdKGOK41VmLDjFZ"
35 }
36 },
37 "space": {
38 "sys": {
39 "type": "Link",
40 "linkType": "Space",
41 "id": "jn066pnp3hgr"
42 }
43 }
44 },
45 "admin": false,
46 "roles": [
47 {
48 "sys": {
49 "type": "Link",
50 "linkType": "Role",
51 "id": "1ElgCn1mi1UHSBLTP2v4TD"
52 }
53 }
54 ]
55 }
56 ]
57}

Get all team space memberships in an organization

Get all team space memberships in an organization

This endpoint returns a paginated collection of all team space memberships across all spaces in the organization.

All organization members can access this endpoint.

Query Parameters

NameDetailsDescription
skip, limit-Specify requested page of result set. See Pagination for more details.
orderSupported values: sys.updatedAt, sys.createdAtSpecify sort order of result set. See Sorting Results for more details.
includeSupported values: roles, sys.createdBy, sys.updatedBy, sys.space, sys.teamSpecify linked resources to include in response. See Including Related Resources for more details.
FiltersSee section belowSpecify a value to filter against for the provided attribute. See Filtering Results for more information, and below for details about supported attributes for this endpoint.

Filter Parameters

See Filtering Results for details about how to use attributes and operators to construct query filters.

AttributeSupported OperatorsSupported Values
roles.nameeq, ne, in, ninString
roles.sys.ideq, inString (id)
sys.createdAtlt, lte, gt, gteDatetime string
sys.updatedAtlt, lte, gt, gteDatetime string
sys.team.sys.ideq, ne, in, ninString (id)
sys.space.nameeq, ne, in, nin, matchString
sys.space.sys.ideq, ne, in, ninString (id)

Response

1{
2 "total": 1,
3 "limit": 25,
4 "skip": 0,
5 "sys": {
6 "type": "Array"
7 },
8 "items": [
9 {
10 "sys": {
11 "type": "TeamSpaceMembership",
12 "id": "0xWanD4AZI2AR35wW9q51n",
13 "version": 0,
14 "createdAt": "2015-05-18T11:29:46.809Z",
15 "createdBy": {
16 "sys": {
17 "type": "Link",
18 "linkType": "User",
19 "id": "7BslKh9TdKGOK41VmLDjFZ"
20 }
21 },
22 "updatedAt": "2015-05-18T11:29:46.809Z",
23 "updatedBy": {
24 "sys": {
25 "type": "Link",
26 "linkType": "User",
27 "id": "4FLrUHftHW3v2BLi9fzfjU"
28 }
29 },
30 "team": {
31 "sys": {
32 "type": "Link",
33 "linkType": "Team",
34 "id": "7BslKh9TdKGOK41VmLDjFZ"
35 }
36 },
37 "space": {
38 "sys": {
39 "type": "Link",
40 "linkType": "Space",
41 "id": "jn066pnp3hgr"
42 }
43 }
44 },
45 "admin": false,
46 "roles": [
47 {
48 "sys": {
49 "type": "Link",
50 "linkType": "Role",
51 "id": "1ElgCn1mi1UHSBLTP2v4TD"
52 }
53 }
54 ]
55 }
56 ]
57}

Get a single team space membership

Get a single team space membership (space-scoped)

Get a single team space membership (organization-scoped)

These endpoints return details about an existing team space membership.

The first endpoint (scoped to a space) is accessible to all space members; the second (scoped to an organization) is accessible to all organization members.

Response

1{
2 "sys": {
3 "type": "TeamSpaceMembership",
4 "id": "0xWanD4AZI2AR35wW9q51n",
5 "version": 0,
6 "createdAt": "2015-05-18T11:29:46.809Z",
7 "createdBy": {
8 "sys": {
9 "type": "Link",
10 "linkType": "User",
11 "id": "7BslKh9TdKGOK41VmLDjFZ"
12 }
13 },
14 "updatedAt": "2015-05-18T11:29:46.809Z",
15 "updatedBy": {
16 "sys": {
17 "type": "Link",
18 "linkType": "User",
19 "id": "4FLrUHftHW3v2BLi9fzfjU"
20 }
21 },
22 "team": {
23 "sys": {
24 "type": "Link",
25 "linkType": "Team",
26 "id": "7BslKh9TdKGOK41VmLDjFZ"
27 }
28 },
29 "space": {
30 "sys": {
31 "type": "Link",
32 "linkType": "Space",
33 "id": "jn066pnp3hgr"
34 }
35 }
36 },
37 "admin": false,
38 "roles": [
39 {
40 "sys": {
41 "type": "Link",
42 "linkType": "Role",
43 "id": "1ElgCn1mi1UHSBLTP2v4TD"
44 }
45 }
46 ]
47}

Create a team space membership

Create a team space membership

Use this endpoint to create a team space membership. A team can either be designated as an admin or assigned to one or more roles. All active members of the team will inherit these permissions.

Only organization admins, owners, and space admins can access this endpoint.

Request Headers

ParameterTypeUsage
X-Contentful-Teamstringrequired; the id of the team for this membership

Request Body

ParameterTypeUsage
adminbooleanrequired
rolesarray(Role)required; must contain at least one role if admin is false (see also Roles)

Response

1{
2 "sys": {
3 "type": "TeamSpaceMembership",
4 "id": "0xWanD4AZI2AR35wW9q51n",
5 "version": 0,
6 "createdAt": "2015-05-18T11:29:46.809Z",
7 "createdBy": {
8 "sys": {
9 "type": "Link",
10 "linkType": "User",
11 "id": "7BslKh9TdKGOK41VmLDjFZ"
12 }
13 },
14 "updatedAt": "2015-05-18T11:29:46.809Z",
15 "updatedBy": {
16 "sys": {
17 "type": "Link",
18 "linkType": "User",
19 "id": "4FLrUHftHW3v2BLi9fzfjU"
20 }
21 },
22 "team": {
23 "sys": {
24 "type": "Link",
25 "linkType": "Team",
26 "id": "7BslKh9TdKGOK41VmLDjFZ"
27 }
28 },
29 "space": {
30 "sys": {
31 "type": "Link",
32 "linkType": "Space",
33 "id": "jn066pnp3hgr"
34 }
35 }
36 },
37 "admin": false,
38 "roles": [
39 {
40 "sys": {
41 "type": "Link",
42 "linkType": "Role",
43 "id": "1ElgCn1mi1UHSBLTP2v4TD"
44 }
45 }
46 ]
47}

Update a team space membership

Update a team space membership

This endpoint updates a team space membership. Use this to change the roles for a team or make the team an admin within the space.

Only organization admins, owners, and space admins can access this endpoint.

Request Body

ParameterTypeUsage
adminbooleanrequired
rolesarray(Role)required; must contain at least one role if admin is false (see also Roles)

Response

1{
2 "sys": {
3 "type": "TeamSpaceMembership",
4 "id": "362gCn1mi1UHSBLTP2v4TD",
5 "version": 0,
6 "createdAt": "3899-05-25T21:00:34.690Z",
7 "createdBy": {
8 "sys": {
9 "type": "Link",
10 "linkType": "User",
11 "id": "1ElgCn1mi1UHSBLTP2v4TD"
12 }
13 },
14 "updatedAt": "3089-09-11T13:51:59.504Z",
15 "updatedBy": {
16 "sys": {
17 "type": "Link",
18 "linkType": "User",
19 "id": "1ElgCn1mi1UHSBLTP2v4TD"
20 }
21 },
22 "team": {
23 "sys": {
24 "type": "Link",
25 "linkType": "Team",
26 "id": "gCn1mi1El1UHSBLTP2v4TD"
27 }
28 },
29 "space": {
30 "sys": {
31 "type": "Link",
32 "linkType": "Space",
33 "id": "5ae45h2qifno"
34 }
35 }
36 },
37 "admin": false,
38 "roles": [
39 {
40 "sys": {
41 "type": "Link",
42 "linkType": "Role",
43 "id": "1ElgCn1mi1UHSBLTP2v4TD"
44 }
45 },
46 {
47 "sys": {
48 "type": "Link",
49 "linkType": "Role",
50 "id": "54gtw51mi1UHSBLTP2v4TD"
51 }
52 }
53 ]
54}

Delete a team space membership

Delete a team space membership

This endpoint deletes a team space membership.

Only organization admins, owners, and space admins can access this endpoint.

Response

Status: 204 No Content