RWS Logo
Show / Hide Table of Contents

Groups Management

The purpose of this set of API calls is to enable groups management for a specific account. Groups are used for organizing users. See how to add user to groups.

Create group

This call creates a new group within a specific account.

Linux

curl -XPOST -H 'Authorization: Bearer asd0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsI' -H 'Trace-ID: 2c0c4dda-8333-4538-983e-e098de7cf555' -H "Content-type: application/json" -d '{
   "name": "project"
}' 'https://api.languageweaver.com/v4/accounts/12/groups'
Windows

curl -XPOST -H "Authorization: Bearer asd0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsI" -H "Trace-ID: 2c0c4dda-8333-4538-983e-e098de7cf555" -H "Content-type: application/json" -d ^
"{^
  \"name\": \"project\"^
}" https://api.languageweaver.com/v4/accounts/12/groups

Access token type
User credentials - Allowed User Roles: Admin
API credentials

HTTP Request
POST /v4/accounts/{accountId}/groups

Headers

Name Value (example) Description
Authorization Bearer asd0eXAi... Bearer token
Trace-ID 2c0c4dda-8333-4538-983e-e098de7cf555 Optional unique request identifier (UUID) provided by client

Request Parameters

Request JSON:

{
  "name": "project"
}

Format
JSON

Name Type Mandatory Default value Description
name string yes String specifying the name of the group. Must be below 225 characters and unique within the specified account (case insensitive).

Response JSON:

{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "name": "project",
  "active": "yes"
}

Response

Headers

Name Value (example) Description
BeGlobal-Request-ID dbbbc062-88a7-4783-8d52-dea795e517f4 Unique request identifier (UUID)
Trace-ID 2c0c4dda-8333-4538-983e-e098de7cf555 The identifier provided in the request (UUID)

Format
JSON

Name Type Description
id string Unique string identifier (UUID) for the group
name string String representing the group
active string String representing the group's state

Error JSON:

{
  "errors": [
    {
      "code": 1100,
      "description": "Group project already exists"
    }
  ]
}

Error Response

Format
JSON

Name Type Description
errors list A list with the errors that occurred
code integer The code of the error
description string The description of the error

Returned HTTP Codes:

Http Code Description
200 When the group is successfully created
400 When the input data is not valid
401 When the authentication process failed or the access token is not valid
403 Forbidden to access resource
500 Application internal error

Update group

This call should be used to update a group in the account. The unique identifier of the group must be specified as a path parameter. The value of the new group will be provided in the json body.

Linux

curl -XPUT -H 'Authorization: Bearer asd0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsI' -H 'Trace-ID: 2c0c4dda-8333-4538-983e-e098de7cf555' -H "Content-type: application/json" -d '{
    "name": "project"
}' 'https://api.languageweaver.com/v4/accounts/12/groups/123e4567-e89b-12d3-a456-426614174000'
Windows

curl -XPUT -H "Authorization: Bearer asd0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsI" -H "Trace-ID: 2c0c4dda-8333-4538-983e-e098de7cf555" -H "Content-type: application/json" -d ^
"{^
    \"name\": \"project\"^
}" https://api.languageweaver.com/v4/accounts/12/groups/123e4567-e89b-12d3-a456-426614174000

Access token type
User credentials - Allowed User Roles: Admin
API credentials

HTTP Request
PUT /v4/accounts/{accountId}/groups/{groupId}

Headers

Name Value (example) Description
Authorization Bearer asd0eXAi... Bearer token
Trace-ID 2c0c4dda-8333-4538-983e-e098de7cf555 Optional unique request identifier (UUID) provided by client

Request Parameters

Request JSON:

{
  "name": "project"
}

Format
JSON

Name Type Mandatory Description
name string yes String specifying the name of the group. Must be below 225 characters and unique within the specified account (case insensitive).

Response JSON:

{
  "id": "123e4567-e89b-12d3-a456-426614174000",
  "name": "project",
  "active": "yes"
}

Response

Headers

Name Value (example) Description
BeGlobal-Request-ID dbbbc062-88a7-4783-8d52-dea795e517f4 Unique request identifier (UUID)
Trace-ID 2c0c4dda-8333-4538-983e-e098de7cf555 The identifier provided in the request (UUID)

Format
JSON

Name Type Description
id string Unique string identifier (UUID) for the group
name string String representing the group
active string String representing the group's state

Error JSON:

{
  "errors": [
    {
      "code": 1002,
      "description": "group with id 123e4567-e89b-12d3-a456-426614174000 does not exist"
    }
  ]
}

Error Response

Format
JSON

Name Type Description
errors list A list with the errors that occurred
code integer The code of the error
description string The description of the error

Returned HTTP Codes:

Http Code Description
200 When the group is successfully updated
400 When the input data is not valid
401 When the authentication process failed or the access token is not valid
403 Forbidden to access resource
500 Application internal error

Delete group

This call is used to delete a group based on its unique identifier, provided as a path parameter.

Linux

curl -XDELETE -H 'Authorization: Bearer asd0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsI' -H 'Trace-ID: 2c0c4dda-8333-4538-983e-e098de7cf555' \
'https://api.languageweaver.com/v4/accounts/12/groups/123e4567-e89b-12d3-a456-426614174000'
Windows

curl -XDELETE -H "Authorization: Bearer asd0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsI" -H "Trace-ID: 2c0c4dda-8333-4538-983e-e098de7cf555" ^
https://api.languageweaver.com/v4/accounts/12/groups/123e4567-e89b-12d3-a456-426614174000

Access token type
User credentials - Allowed User Roles: Admin
API credentials

HTTP Request
DELETE /v4/accounts/{accountId}/groups/{groupId}

Headers

Name Value (example) Description
Authorization Bearer asd0eXAi... Bearer token
Trace-ID 2c0c4dda-8333-4538-983e-e098de7cf555 Optional unique request identifier (UUID) provided by client

Response

Headers

Name Value (example) Description
BeGlobal-Request-ID dbbbc062-88a7-4783-8d52-dea795e517f4 Unique request identifier (UUID)
Trace-ID 2c0c4dda-8333-4538-983e-e098de7cf555 The identifier provided in the request (UUID)

When the group is deleted successfully, no content is returned.

Error JSON:

{
  "errors": [
    {
      "code": 1002,
      "description": "group with id 123e4567-e89b-12d3-a456-426614174000 does not exist"
    }
  ]
}

Error Response

Format
JSON

Name Type Description
errors list A list with the errors that occurred
code integer The code of the error
description string The description of the error

Returned HTTP Codes:

Http Code Description
204 When the group is deleted
400 When the input data is not valid
401 When the authentication process failed or the access token is not valid
403 Forbidden to access resource
500 Application internal error

Search groups

This call should be used in order to search specific groups for an account. The account id must be provided as path parameter.
The search term should be specified in the request body, as below. Groups containing the search term as part of the name will be returned. Searching with a missing/empty term will yield an error.
In addition, a page number and a page size parameter should be provided. Both parameters are optional, but a default value will be set.

Linux

curl -XPOST -H 'Authorization: Bearer asd0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsI' -H 'Trace-ID: 2c0c4dda-8333-4538-983e-e098de7cf555' -H "Content-type: application/json" -d '{
   "searchTerm": "Project"
}' 'https://api.languageweaver.com/v4/accounts/12/groups/search'
Windows

curl -XPOST -H "Authorization: Bearer asd0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsI" -H "Trace-ID: 2c0c4dda-8333-4538-983e-e098de7cf555" -H "Content-type: application/json" -d ^
"{^
  \"searchTerm\": \"Project\"^
}" https://api.languageweaver.com/v4/accounts/12/groups/search

Access token type
User credentials - Allowed User Roles: Admin, Linguist, Translator
API credentials

HTTP Request
POST /v4/accounts/{accountId}/groups/search?pageNumber={pageNumber}&pageSize={pageSize}

Headers

Name Value (example) Description
Authorization Bearer asd0eXAi... Bearer token
Trace-ID 2c0c4dda-8333-4538-983e-e098de7cf555 Optional unique request identifier (UUID) provided by client

Query Parameters

Name Type Mandatory Default value Description
pageNumber int no 1 Integer specifying the requested page number
pageSize int no 10 Integer specifying the requested page size, limited to 100

Request Parameters

Request JSON:

{
  "searchTerm": "Project"
}

Format
JSON

Name Type Mandatory Default value Description
searchTerm string no Empty string String specifying the text to be matched by the search (case insensitive). The length must be below 225 characters.

Response JSON:

{
  "accountId": 12,
  "groups": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "name": "Project A",
      "active": "yes"
    },
    {
      "id": "73ec4912-e89b-12d3-a456-426614174000",
      "name": "Project B",
      "active": "yes"
    }
  ],
  "totalCount": 2,
  "pageNumber": 1,
  "pageSize": 10
}

Response

Headers

Name Value (example) Description
BeGlobal-Request-ID dbbbc062-88a7-4783-8d52-dea795e517f4 Unique request identifier (UUID)
Trace-ID 2c0c4dda-8333-4538-983e-e098de7cf555 The identifier provided in the request (UUID)

Format
JSON

Name Type Description
groups list List of matched groups
id string Unique string identifier (UUID) for the group
name string String representing the group
active string String representing the group's state
totalCount integer Total number of groups that matched the search
pageNumber integer Requested page number
pageSize integer Requested page size

Error JSON:

{
  "errors": [
    {
      "code": 18,
      "description": "searchTerm parameter is missing or is empty."
    }
  ]
}

Error Response

Format
JSON

Name Type Description
errors list A list with the errors that occurred
code integer The code of the error
description string The description of the error

Returned HTTP Codes:

Http Code Description
200 When the search was successfully processed
400 When the input data is not valid
401 When the authentication process failed or the access token is not valid
403 Forbidden to access resource
500 Application internal error

Add user to group

This call should be used to add a user to one or more groups.

Linux

curl -XPOST -H 'Authorization: Bearer asd0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsI' -H 'Trace-ID: 2c0c4dda-8333-4538-983e-e098de7cf555' -H "Content-type: application/json" -d '{
    "groupIds": "1bdbc39f-83df-4199-96ea-954b386ebbc9"
}' 'https://api.languageweaver.com/v4/accounts/12/users/119870/groups'
Windows

curl -XPOST -H "Authorization: Bearer asd0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsI" -H "Trace-ID: 2c0c4dda-8333-4538-983e-e098de7cf555" -H "Content-type: application/json" -d ^
"{^
    \"groupIds\": \"1bdbc39f-83df-4199-96ea-954b386ebbc9\"^
}" https://api.languageweaver.com/v4/accounts/12/users/119870/groups

Access token type
User credentials - Allowed User Roles: Admin
API credentials

HTTP Request
POST /v4/accounts/{accountId}/users/{userId}/groups

Headers

Name Value (example) Description
Authorization Bearer asd0eXAi... Bearer token
Trace-ID 2c0c4dda-8333-4538-983e-e098de7cf555 Optional unique request identifier (UUID) provided by client

Request Parameters

Request JSON:

{
  "groupIds": "1bdbc39f-83df-4199-96ea-954b386ebbc9"
}

Format
JSON

Name Type Mandatory Description
groupIds list yes List of UUIDs representing the groups that the request user will be added to. Max number of groups: 10.

Response JSON:

{
  "accountId": 12,
  "userId": 119870,
  "groupIds": [
    "1bdbc39f-83df-4199-96ea-954b386ebbc9"
  ]
}

Response

Headers

Name Value (example) Description
BeGlobal-Request-ID dbbbc062-88a7-4783-8d52-dea795e517f4 Unique request identifier (UUID)
Trace-ID 2c0c4dda-8333-4538-983e-e098de7cf555 The identifier provided in the request (UUID)

Format
JSON

Name Type Description
accountId int Account identifier
userId int User identifier
groupIds list List of UUIDs representing the groups that the request user was be added to

Error JSON:

{
  "errors": [
    {
      "code": 1002,
      "description": "group with id 123e4567-e89b-12d3-a456-426614174000 does not exist"
    }
  ]
}

Error Response

Format
JSON

Name Type Description
errors list A list with the errors that occurred
code integer The code of the error
description string The description of the error

Returned HTTP Codes:

Http Code Description
200 When the user is successfully added to the given groups
400 When the input data is not valid
401 When the authentication process failed or the access token is not valid
403 Forbidden to access resource
500 Application internal error

Remove user from group

This call should be used to remove a user from one or more groups.

Linux

curl -XDELETE -H 'Authorization: Bearer asd0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsI' -H 'Trace-ID: 2c0c4dda-8333-4538-983e-e098de7cf555' -H "Content-type: application/json" -d '{
    "groupIds": "1bdbc39f-83df-4199-96ea-954b386ebbc9"
}' 'https://api.languageweaver.com/v4/accounts/12/users/119870/groups'
Windows

curl -XDELETE -H "Authorization: Bearer asd0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiIsI" -H "Trace-ID: 2c0c4dda-8333-4538-983e-e098de7cf555" -H "Content-type: application/json" -d ^
"{^
    \"groupIds\": \"1bdbc39f-83df-4199-96ea-954b386ebbc9\"^
}" https://api.languageweaver.com/v4/accounts/12/users/119870/groups

Access token type
User credentials - Allowed User Roles: Admin
API credentials

HTTP Request
DELETE /v4/accounts/{accountId}/users/{userId}/groups

Headers

Name Value (example) Description
Authorization Bearer asd0eXAi... Bearer token
Trace-ID 2c0c4dda-8333-4538-983e-e098de7cf555 Optional unique request identifier (UUID) provided by client

Request Parameters

Request JSON:

{
  "groupIds": "1bdbc39f-83df-4199-96ea-954b386ebbc9"
}

Format
JSON

Name Type Mandatory Description
groupIds list yes List of UUIDs representing the groups that the request user will be removed from. Max number of groups: 10.

Response

Headers

Name Value (example) Description
BeGlobal-Request-ID dbbbc062-88a7-4783-8d52-dea795e517f4 Unique request identifier (UUID)
Trace-ID 2c0c4dda-8333-4538-983e-e098de7cf555 The identifier provided in the request (UUID)

When the user is successfully removed from the request groups, no content is returned.

Error JSON:

{
  "errors": [
    {
      "code": 1002,
      "description": "group with id 123e4567-e89b-12d3-a456-426614174000 does not exist"
    }
  ]
}

Error Response

Format
JSON

Name Type Description
errors list A list with the errors that occurred
code integer The code of the error
description string The description of the error

Returned HTTP Codes:

Http Code Description
204 When the user is removed from the given groups
400 When the input data is not valid
401 When the authentication process failed or the access token is not valid
403 Forbidden to access resource
500 Application internal error





In this page
Back to top