Admin
Public Admin options
Operations
We expose the following operations listed below:
Delete and blacklist user
Deletes the user and if the request applies will put the user as blacklist.
-
Blacklist is an optional parameter. Default is false.
-
Identification is mandatory path parameter.
Resource URL
DELETE: /os-api/public-api/v1/users/{identification}/?blacklist={blacklist}
Header Parameters
| Parameter | Optional/Required | Description |
|---|---|---|
|
Required |
Community Token (You can get information on Authentication). |
URL Parameters
| Parameter | Optional/Required | Description |
|---|---|---|
|
Required |
String value with the user that need to be deleted. It’s the same identification you use to provision the user. |
|
Optional |
Default value is false. It defines if users need to be marked as blacklist. |
Response
HTTP/1.1 200 OK
Example:
Errors
HTTP/1.1 400 Bad Request, 401 Unauthorized, 403 Forbidden, 404 Not Found
Example:
{
"timestamp": "2019-06-26",
"message": "Internal Server Error",
"details": "The user wasn’t found",
"type": "uri=/os-api/public-api/v1/posts",
"title": "Internal Server Error",
"detail": "An unexpected or uncontrolled error has occurred in the application."
}
Create a user
Creates a new user.
-
identification, firstName and lastName are all mandatory fields. All other fields are optional. For now, we are supporting a limit of 30 custom fields. Below you will find an example payload.
-
Once created, if successful, the endpoint will answer using the http code 201, and the userId assigned to the new user, meaning that the user was created successfully. Otherwise, one of the errors listed below could be returned.
Resource URL
POST: /os-api/public-api/v1/users/
Header Parameters
| Parameter | Optional/Required | Description |
|---|---|---|
|
Required |
Community Token (You can get information on Authentication). |
Request Body
Example:
{
"firstName": "initial_firstName",
"lastName": "initial_lastName",
"identification": "random_user_identification",
"email": "initial_email@email.com",
"birthDate": "1990-01-01",
"orgEntryDate": "2009-01-01",
"area": "initial_area",
"account": "initial_account",
"job": "initial_job",
"phoneNumber": "initial123",
"project": "initial_project",
"seniority": "initial_seniority",
"customFields": {
"customField1": "custom1",
"customField2": "custom2",
"customField3": "custom3",
"customField4": "custom4",
"customField5": "custom5",
"customField6": "custom6",
"customField7": "custom7",
"customField8": "custom8",
"customField9": "custom9",
"customField10": "custom10",
"customField11": "custom11",
"customField12": "custom12",
"customField13": "custom13",
"customField14": "custom14",
"customField15": "custom15",
"customField16": "custom16",
"customField17": "custom17",
"customField18": "custom18",
"customField19": "custom19",
"customField20": "custom20",
"customField21": "custom21",
"customField22": "custom22",
"customField23": "custom23",
"customField24": "custom24",
"customField25": "custom25",
"customField26": "custom26",
"customField27": "custom27",
"customField28": "custom28",
"customField29": "custom29",
"customField30": "custom30",
"customField31": "custom31",
"customField32": "custom32",
"customField33": "custom33",
"customField34": "custom34",
"customField35": "custom35",
"customField36": "custom36",
"customField37": "custom37",
"customField38": "custom38",
"customField39": "custom39",
"customField40": "custom40",
"customField41": "custom41",
"customField42": "custom42",
"customField43": "custom43",
"customField44": "custom44",
"customField45": "custom45",
"customField46": "custom46",
"customField47": "custom47",
"customField48": "custom48",
"customField49": "custom49",
"customField50": "custom50",
"customField51": "custom51",
"customField52": "custom52",
"customField53": "custom53",
"customField54": "custom54",
"customField55": "custom55",
"customField56": "custom56",
"customField57": "custom57",
"customField58": "custom58",
"customField59": "custom59",
"customField60": "custom60"
}
}
Response
HTTP/1.1 201 CREATED
Example:
{
"userId": "123456"
}
Errors
HTTP/1.1 400 Bad Request, 401 Unauthorized, 403 Forbidden, 500 Internal Server Error
Update a user
Updates data for an existing user.
-
identification, firstName and lastName are all mandatory fields. All other fields are optional. For now, we are supporting a limit of 30 custom fields. Below you will find an example of the payload.
-
Once updated, if successful, the endpoint will answer using the http code 202, and a json representation of the user (see example below), meaning that the user was updated successfully. Otherwise, one of the errors listed below could be returned.
Resource URL
PUT: /os-api/public-api/v1/users/
Header Parameters
| Parameter | Optional/Required | Description |
|---|---|---|
|
Required |
Community Token (You can get information on Authentication). |
Request Body
Example:
{
"userId": "123456",
"firstName": "updated_firstName",
"lastName": "updated_lastName",
"identification": "random_user_identification",
"email": "updated_email@email.com",
"birthDate": "1990-01-01",
"orgEntryDate": "2009-01-01",
"area": "updated_area",
"account": "updated_account",
"job": "updated_job",
"phoneNumber": "updated123",
"project": "updated_project",
"seniority": "updated_seniority",
"customFields": {
"customField1": "ucustom1",
"customField2": "ucustom2",
"customField3": "ucustom3",
"customField4": "ucustom4",
"customField5": "ucustom5",
"customField6": "ucustom6",
"customField7": "ucustom7",
"customField8": "ucustom8",
"customField9": "ucustom9",
"customField10": "ucustom10",
"customField11": "ucustom11",
"customField12": "ucustom12",
"customField13": "ucustom13",
"customField14": "ucustom14",
"customField15": "ucustom15",
"customField16": "ucustom16",
"customField17": "ucustom17",
"customField18": "ucustom18",
"customField19": "ucustom19",
"customField20": "ucustom20",
"customField21": "ucustom21",
"customField22": "ucustom22",
"customField23": "ucustom23",
"customField24": "ucustom24",
"customField25": "ucustom25",
"customField26": "ucustom26",
"customField27": "ucustom27",
"customField28": "ucustom28",
"customField29": "ucustom29",
"customField30": "ucustom30"
}
}
Response
HTTP/1.1 202 ACCEPTED
Example:
{
"result": {
"userId": "123456",
"firstName": "updated_firstName",
"lastName": "updated_lastName",
"identification": "random_user_identification",
"email": "updated_email@email.com",
"birthDate": "1990-01-01",
"orgEntryDate": "2009-01-01",
"area": "updated_area",
"account": "updated_account",
"job": "updated_job",
"phoneNumber": "updated123",
"project": "updated_project",
"seniority": "updated_seniority",
"customFields": {
"customField1": "custom1",
"customField2": "custom2",
"customField3": "custom3",
"customField4": "custom4",
"customField5": "custom5",
"customField6": "custom6",
"customField7": "custom7",
"customField8": "custom8",
"customField9": "custom9",
"customField10": "custom10",
"customField11": "custom11",
"customField12": "custom12",
"customField13": "custom13",
"customField14": "custom14",
"customField15": "custom15",
"customField16": "custom16",
"customField17": "custom17",
"customField18": "custom18",
"customField19": "custom19",
"customField20": "custom20",
"customField21": "custom21",
"customField22": "custom22",
"customField23": "custom23",
"customField24": "custom24",
"customField25": "custom25",
"customField26": "custom26",
"customField27": "custom27",
"customField28": "custom28",
"customField29": "custom29",
"customField30": "custom30",
"customField31": "custom31",
"customField32": "custom32",
"customField33": "custom33",
"customField34": "custom34",
"customField35": "custom35",
"customField36": "custom36",
"customField37": "custom37",
"customField38": "custom38",
"customField39": "custom39",
"customField40": "custom40",
"customField41": "custom41",
"customField42": "custom42",
"customField43": "custom43",
"customField44": "custom44",
"customField45": "custom45",
"customField46": "custom46",
"customField47": "custom47",
"customField48": "custom48",
"customField49": "custom49",
"customField50": "custom50",
"customField51": "custom51",
"customField52": "custom52",
"customField53": "custom53",
"customField54": "custom54",
"customField55": "custom55",
"customField56": "custom56",
"customField57": "custom57",
"customField58": "custom58",
"customField59": "custom59",
"customField60": "custom60"
}
}
}
Errors
HTTP/1.1 400 Bad Request, 401 Unauthorized, 403 Forbidden, 500 Internal Server Error
Get a User
Gets a user by identification.
Resource URL
GET /os-api/public-api/v1/users/{identification}
Header Parameters
| Parameter | Optional/Required | Description |
|---|---|---|
|
Required |
Community Token (You can get information on Authentication). |
Response
HTTP/1.1 200 OK
Example:
{
"result": {
"id": 1274616,
"locale": "es",
"office": {
"name": "San Francisco"
},
"firstName": "Estefania",
"lastName": "Rodriguez",
"email": "estefania.rodriguez@acme.com",
"profileImageId": "1",
"profileImageCode": "avatar1",
"enabled": true,
"area": "Development",
"account": "Test",
"project": "SMU",
"birthDate": "1996-09-12",
"orgEntryDate": "Jul 17, 2018 12:00:00 AM",
"identification": "estefania.rodriguez@acme.com",
"customFields": {},
"externalId": "estefania.rodriguez@acme.com",
"uid": "6bb331fa85581c6d64263b2a7782d78c",
"loginId": "estefania.rodriguez@acme.com",
"createdDate": "2023-06-09T22:45:19",
"lastUpdate": "2023-11-27T12:44:48"
}
}
Errors
HTTP/1.1 400 Bad Request, 401 Unauthorized, 403 Forbidden, 500 Internal Server Error
Get Users
Get users by criteria
Resource URL
GET /os-api/public-api/v1/users
Header Parameters
| Parameter | Optional/Required | Description |
|---|---|---|
|
Required |
Community Token (You can get information on Authentication). |
Body Parameters
| Parameter | Optional/Required | Description |
|---|---|---|
|
Optional |
Refers to user’s information like name, identification or email. |
|
Optional |
Find only enabled or disabled users. By default true. When value is false will find enabled and disabled users. |
|
Optional |
Refers to page to be found. As default is 0. |
|
Optional |
Refers to page size. As default is 10. |
|
Optional |
Refers to sort field. As default is firstName. Allowed values: firstName, lastname, id, email |
|
Optional |
Refers to sort directions. Allowed values: ASC, DESC |
Response
HTTP/1.1 200 OK
Example:
{
"result": [
{
"id": 1069781,
"locale": "es",
"office": {},
"firstName": "Ash",
"lastName": "ketchum",
"email": "ash.ketchum@acme.com",
"profileImageId": "1",
"profileImageCode": "hlX2GTaXzr_png",
"enabled": true,
"account": "SMU",
"project": "SMU",
"birthDate": "2000-10-23",
"orgEntryDate": "Aug 30, 2018 12:00:00 AM",
"organizationName": "SMU1",
"identification": "ash.ketchum@acme.com",
"customFields": {
"customField1": "Colombia"
},
"externalId": "ash1",
"uid": "b319b1ce09024d4024bdaf02e95e94fc",
"loginId": "ash.ketchum@acme.com",
"createdDate": "2021-08-18T18:58:50",
"lastUpdate": "2023-12-11T11:38:21"
},
{
"id": 1133351,
"locale": "pt",
"office": {},
"firstName": "Ava",
"lastName": "Gardner",
"email": "ava.gardner@acme.com",
"profileImageId": "1",
"profileImageCode": "iILGlBHjSY_png",
"enabled": true,
"birthDate": "2000-09-05",
"orgEntryDate": "Jun 09, 2019 12:00:00 AM",
"organizationName": "SMU1",
"identification": "ava.gardner@acme.com",
"customFields": {},
"externalId": "Ava1",
"uid": "3b5351b5a05790bd32eb8e076eae65b4",
"loginId": "ava.gardner@acme.com",
"createdDate": "2022-05-29T18:00:17",
"lastUpdate": "2024-01-10T18:51:59"
},
{
"id": 1274616,
"locale": "es",
"office": {
"name": "San Francisco"
},
"firstName": "Estefania",
"lastName": "Rodriguez",
"email": "estefania.rodriguez@acme.com",
"profileImageId": "1",
"profileImageCode": "avatar1",
"enabled": true,
"area": "Development",
"account": "Test",
"project": "SMU",
"birthDate": "1996-09-12",
"orgEntryDate": "Jul 17, 2018 12:00:00 AM",
"identification": "estefania.rodriguez@acme.com",
"customFields": {},
"externalId": "estefania.rodriguez@acme.com",
"uid": "6bb331fa85581c6d64263b2a7782d78c",
"loginId": "estefania.rodriguez@acme.com",
"createdDate": "2023-06-09T22:45:19",
"lastUpdate": "2023-11-27T12:44:48"
}
],
"page": {
"totalElements": 84
}
}
Errors
HTTP/1.1 400 Bad Request, 401 Unauthorized, 403 Forbidden, 500 Internal Server Error
Bulk provisioning
Allows provisioning users in a massive way through a .csv file. There are two ways of doing so, full provisioning and partial provisioning.
Full provisioning is intended to be used when you want to affect all users of your community. Users present in the file are going to be updated if already exists or created if not, while users that are not present in the file are going to be disabled. (See an example below).
Partial provisioning, differently that full, is intended to be used when you want to affect some specific set of users. In order to do that you should provide for each row the command to be used (I = Insertion, U = Update, D = Disable). (See an example below).
Resource URL
POST: /os-api/public-api/v1/admin/userFiles/
Header Parameters
| Parameter | Optional/Required | Description |
|---|---|---|
|
Required |
Community Token (You can get information on Authentication). |
URL Parameters
| Parameter | Optional/Required | Description |
|---|---|---|
|
Optional |
Default value is false. Performs a fields mapping if previously configured. |
Request Body
You must provide the path of the csv file, and also the name using the keys file and fileName respectively.
Full file example:
Partial file example:
Response
HTTP/1.1 200 OK
Example:
{
"result": {
"id": 1948,
"fileName": "bulk.csv",
"communityId": 3512,
"uploaderId": 0,
"fileDate": "2023-07-11 14:38:02",
"fileStatus": "Processing",
"blocked": true
}
}
Errors
HTTP/1.1 400 Bad Request, 401 Unauthorized, 403 Forbidden, 500 Internal Server Error
Sync users process
Allows provisioning users getting data from defined source
Resource URL
PATCH: /os-api/public-api/v1/admin/import-users-job
Header Parameters
| Parameter | Optional/Required | Description |
|---|---|---|
|
Required |
Community Token (You can get information on Authentication). |
Response
HTTP/1.1 202 Accepted: accepted for processing, but the processing has not been finished yet.
Example:
{
}
Errors
HTTP/1.1 400 Bad Request, 401 Unauthorized, 403 Forbidden, 500 Internal Server Error
Modify leadership to Users
This api provides the way to manage the leader relationships in the platform. This api can manage the following operations:
-
Add and delete main leaders relationships with a collaborator
-
Add and delete secondary leaders relationships with a collaborator
POST
/public-api/v1/leaders
RequestBody
{
"collaboratorIdentification": "collaboratorIdentification",
"mainLeaderIdentification":"leader1identification",
"secondaryLeadersIdentifications": ["leader2identification", "leader3identification"]
}
-
collaboratorIdentification: The identification of the collaborator, Mandatory.
-
mainLeaderIdentification: The identification of the main leader, if you don’t want to set a main leader, you can let the field in null or not send it.
-
secondaryLeadersIdentifications: The identifications of the secondary leaders, as an array e.g. ["secondaryLeaderIdentification1", "secondaryLeaderIdentification2", …]. If you don’t want to set a secondary leaders, you can let the field in null or not send it.
Example Curl:
curl --request POST \
--url {qa-path}/os-api/public-api/v1/leaders \
--header 'Authorization: Bearer xxxxx' \
--header 'Content-Type: application/json' \
--header 'User-Agent: insomnia/2023.5.8' \
--data '{
"collaboratorIdentification": "CollaboratorIdentification",
"mainLeaderIdentification":"mainLeaderIdentification",
"secondaryLeadersIdentifications": ["secondaryLeaderIdentification1",
"secondaryLeaderIdentification2"]
}'
Responses
HTTP/1.1 201 Created
Errors
HTTP/1.1 400 Bad Request, 401 Unauthorized, 403 Forbidden, 404 Not Found, 406 Not Acceptable
DELETE
/public-api/v1/leaders
RequestBody
{
"collaboratorIdentification": "collaboratorIdentification",
"mainLeaderIdentification":"leader1identification",
"secondaryLeadersIdentifications": ["leader2identification", "leader3identification"]
}
-
collaboratorIdentification: The identification of the collaborator, Mandatory.
-
mainLeaderIdentification: The identification of the main leader, if you don’t want to delete a main leader relationship, you can let the field in null or not send it.
-
secondaryLeadersIdentifications: The identifications of the secondary leaders, as an array e.g. ["secondaryLeaderIdentification1", "secondaryLeaderIdentification2", …]. If you don’t want to delete secondary leader relationships, you can let the field in null or not send it.
Example Curl:
curl --request DELETE \
--url {qa-path}/os-api/public-api/v1/leaders \
--header 'Authorization: Bearer xxxxxxxxx' \
--header 'Content-Type: application/json' \
--header 'User-Agent: insomnia/2023.5.8' \
--data '{
"collaboratorIdentification": "CollaboratorIdentification",
"mainLeaderIdentification":"mainLeaderIdentification",
"secondaryLeadersIdentifications": ["secondaryLeaderIdentification1",
"secondaryLeaderIdentification2"]
}'
Responses
HTTP/1.1 200 OK
Errors
HTTP/1.1 400 Bad Request, 401 Unauthorized, 403 Forbidden, 404 Not Found, 406 Not Acceptable
