[POST] Synchronize groupings of print queue users
This endpoint synchronizes user groupings, keeping the user grouping base in the NDD Orbix portal consistent with the source base from which the API is connected:
Non-existent groupings and/or users will be created in the portal.
Existing groupings and/or users will be updated in the portal.
Groupings missing from the source base will be deleted from the portal.
Users unlinked from the grouping in the source base will also be unlinked from the grouping in the portal.
If there is no grouping with the same GroupName
, a new grouping will be created. If there is already a grouping registered with the same GroupName
, but with different GroupDescription
information, the grouping will be updated.
If there is no user with the same Logon
and Domain
, a new user will be created. If there is already a user registered with the same Logon
and Domain
, but with different Name
and/or Email
information, the user will be updated.
Call
POST /v1/groups/users-sync
Header
Parameter | Description | Type | Mandatory |
---|---|---|---|
| Name of the provider. For this information, see the documentation: Portal menus. |
| Yes |
|
| Yes |
Body
Parameter | Description | Type | Mandatory |
---|---|---|---|
| Name of the customer, as registered in the NDD Orbix portal. |
| Yes |
| List of groupings. |
| Yes |
| Name that will identify the grouping. |
| Yes |
| Brief description of the purpose of the grouping. |
| No |
| List of users. |
| Yes |
| User access identification. Do not use accents, symbols or spaces. |
| Yes |
| Domain to which the user belongs. Do not use accents, symbols or spaces. |
| Yes |
| User's full name. |
| No |
| User's email address. Example: abc@abc.com. |
| No |
Example request
Synchronize two groupings with two users each:
curl -L -X POST 'https://developer.nddorbix.com/printqueue-external-integration-api/v1/groups/users-sync' \
-H 'Tenant: {tenant}' \
-H 'Authorization: Bearer {token}' \
-H 'Content-Type: application/json' \
--data-raw '{
"Client": "ABC",
"Groups": [
{
"GroupName": "Group 1",
"GroupDescription": "Group 1 description",
"Users": [
{
"Logon": "carlos.silva",
"Domain": "NDD",
"Name": "Carlos Silva",
"Email": "carlos.silva@ndd.tech"
},
{
"Logon": "joao.souza",
"Domain": "NDD",
"Name": "João Souza"
}
]
},
{
"GroupName": "Group 2",
"GroupDescription": "Group 2 description",
"Users": [
{
"Logon": "maria.oliveira",
"Domain": "NDD",
"Email": "maria.oliveira@ndd.tech"
},
{
"Logon": "joana.pereira",
"Domain": "NDD",
"Name": "Joana Pereira",
"Email": "joana.pereira@ndd.tech"
}
]
}
]
}'
In the same request, you can synchronize up to 5 groupings with 1,000 users each.
To synchronize more than 5 groupings, make more than one request.
Example response
The response code 201 indicates that:
all groupings have been successfully created, updated or deleted and will return the following JSON:
[]
or
there was a partial failure to create, update or delete some groupings, and will return the reason for the failure in JSON:
[
{
"groupName": "GroupTest GroupTest GroupTest GroupTest GroupTest GroupTest GroupTest GroupTest GroupTest GroupTest GroupTest GroupTest GroupTest GroupTest GroupTest GroupTest",
"users": [
{
"user": "NDD//João Souza",
"errorMessage": "Logon is not valid."
}
],
"errorMessage": "Group Name is too long."
},
{
"groupName": "Group 2",
"users": [
{
"user": "NDD//joana.pereira",
"errorMessage": "E-mail is not valid."
}
],
"errorMessage": ""
}
]
The code 400 response indicates that there was a failure to create, update or delete all groupings, and will return the following JSON:
{
"errors": {
"3400": [
"All groups are invalid."
]
},
"title": "BadRequest",
"status": 400,
"detail": "BusinessException",
"instance": "/v1/groups/users-sync"
}