Kantata Kantata OX Knowledge Base
Release Notes
Status Page

User Group Memberships

A User Group Membership represents the connection of a user to a Workspace Group. You must be an Account Administrator to use these endpoints.

Fetching a list of User Group Memberships

This endpoint returns structured User Group Membership objects. As with all Kantata OX API endpoints, the returned data will be referenced in sorted order in the results array and will be indexed by ID in the user_group_memberships top-level JSON key. Please see our Response Format section for more information.

Request
query Parameters
group_ids
string

Return only memberships associated with the specified Workspace Group IDs. Provide a comma-separated list of Workspace Group IDs or an array of IDs. For example, 10,20.

include
string

Any of the below associations can be included in your request by providing the include param, e.g. include=association1,association2.

  • user (User) - Retrieves the associated user. The response will include user_id, which references the data in the users top-level key.
  • workspace_group (WorkspaceGroup) - Retrieves the associated Workspace Group. The response will include workspace_group_id, which references the data in the workspace_groups top-level key.
only
string

Allows you to request one or more resources directly by ID. Multiple IDs can be supplied in a comma separated list, like GET /api/v1/workspaces.json?only=5,6,7.

order
string
Default: "created_at:desc"

Supply order with the name of a valid sort field for the endpoint and a direction.

Valid values: created_at:asc and created_at:desc.

page
integer <int32>
Default: 1
per_page
integer <int32> <= 200
Default: 20
user_ids
string

Return only memberships associated with the specified user IDs. Provide a comma-separated list of user IDs or an array of IDs. For example, 10,20.

Responses
200

A list of User Group Memberships have been retrieved.

Response Schema: application/json
count
integer <int32>
object
Array of objects
object
object
object
400

Bad Request

401

Unauthorized request

403

Forbidden request

404

Page Not Found

422

Unprocessable Entity

503

Service is unavailable

get/user_group_memberships
Request samples
Response samples
application/json
{
  • "count": 0,
  • "meta": {
    },
  • "results": [
    ],
  • "user_group_memberships": {
    },
  • "users": {
    },
  • "workspace_groups": {
    }
}

Creating a new User Group Membership

Adds a user to a Workspace Group. Up to 100 User Group Memberships can be created at once.

This endpoint returns structured User Group Membership objects. As with all Kantata OX API endpoints, the returned data will be referenced in sorted order in the results array and will be indexed by ID in the user_group_memberships top-level JSON key. Please see our Response Format section for more information.

Request
query Parameters
include
string

Any of the below associations can be included in your request by providing the include param, e.g. include=association1,association2.

  • user (User) - Retrieves the associated user. The response will include user_id, which references the data in the users top-level key.
  • workspace_group (WorkspaceGroup) - Retrieves the associated Workspace Group. The response will include workspace_group_id, which references the data in the workspace_groups top-level key.
Request Body schema: application/json
required
object
user_id
required
integer <int32>

The ID of the user to add to the Workspace Group.

workspace_group_id
required
integer <int32>

The ID of the Workspace Group to add the user to.

Responses
200

User Group Membership has been created.

Response Schema: application/json
count
integer <int32>
object
Array of objects
object
object
object
400

Bad Request

401

Unauthorized request

403

Forbidden request

404

Page Not Found

422

Unprocessable Entity

503

Service is unavailable

post/user_group_memberships
Request samples
application/json
{
  • "user_group_membership": {
    }
}
Response samples
application/json
{
  • "count": 0,
  • "meta": {
    },
  • "results": [
    ],
  • "user_group_memberships": {
    },
  • "users": {
    },
  • "workspace_groups": {
    }
}

Deleting an existing User Group Membership

Removes a user from a Workspace Group.

The response will contain no content and an HTTP 204 status code if the request was successful, or a standard Kantata OX error message explaining why the object could not be deleted.

Request
path Parameters
id
required
integer

The ID of the Model.

Responses
204

User Group Membership has been deleted.

400

Bad Request

401

Unauthorized request

403

Forbidden request

404

Page Not Found

422

Unprocessable Entity

503

Service is unavailable

delete/user_group_memberships/{id}
Request samples
Response samples
application/json
{
  • "errors": [
    ]
}