This page provides REST API methods for Active Directory Attributes Sync app.
Active Directory Attributes Sync app exposes a REST API that provides two methods (GET and PUT) mapped to CRUD operations.
For more information on using REST API in Jira, see official Atlassian documentation.
We have added the possibility to enter a list of users for whom we do not check permissions when using the public REST API.
Such a list must be added in {jira_home}/jira-config.properties under the deviniti.adas.rest.whitelist as comma-separated usernames. See an example below:
deviniti.adas.rest.whitelist=jsmith,jdoe
After changing the jira-config.properties, restart Jira for the change to take effect.
Get all enabled connections
GET /rest/intenso/ad/1.0/public/connection
{
"LDAP_server_23":
[
"title",
"telephoneNumber",
"l",
"company",
"mobile",
"streetAddress",
"manager",
"description",
"department",
"mail",
"wWWHomePage"
]
}
Get all fields for user for enable connection
GET /rest/intenso/ad/1.0/public/connection/{idOrName}/user/{userKeyOrName}
{
"title": "Jira AD Sync Expert",
"telephoneNumber": "111 222 333",
"l": "Wroclaw",
"company": "Deviniti",
"mobile": "111 222 333",
"streetAddress": "Jira LDAP Connection Square",
"physicalDeliveryOfficeName": "Jira User Management Zone",
"manager": "Jirard Serverin",
"description": "Jira Active Directory Sync Expert",
"department": "Jira AD Integration",
"mail": "jira-ad-expert@deviniti.com"
}
Get value for field for user
GET /rest/intenso/ad/1.0/public/connection/{idOrName}/user/{userKeyOrName}/field/{idFromAD}
{
"title": "Software developer"
}
Get all user’s values for all enabled connections
GET /rest/intenso/ad/1.0/public/user/{userKeyOrName}
{
"LDAP_server_23":
{
"title": "Jira AD Sync Expert",
"telephoneNumber": "111 222 333",
"l": "Wroclaw",
"company": "Deviniti",
"mobile": "111 222 333",
"streetAddress": "Jira LDAP Connection Square",
"physicalDeliveryOfficeName": "Jira User Management Zone",
"manager": "Jirard Serverin",
"description": "Jira Active Directory Sync Expert",
"department": "Jira AD Integration",
"mail": "jira-ad-expert@deviniti.com"
}
}
Update user’s data or connection details
PUT /rest/intenso/ad/1.0/public/update
Keep in mind this method will update data in Jira. The data will be overwritten during next synchronization.
{
"connectionId":"2",
"update": [{
"connection": [{
"name" : "new name",
"userDn":"new user DN"
}],
"data":[{
"userKey":"JIRAUSER10119",
"fields":[{
"departmentNumber":"124567"
}]
},{
"userKey":"JIRAUSER10000",
"fields":[{
"departmentNumber":"123456"
}]
}]
}]
}
To easily find a userKey you can send one of the following requests to the Jira REST API:
GET /rest/api/2/group/member?groupname=jira-software-users
GET /rest/api/2/user?username=jsmith
Return all users without additional filters.
GET /rest/intenso/ad/1.0/public/user
The results are paged - the default is 25 results per page, this can be controlled by the ?size= parameter. Additional pages can be retrieved with the addition of ?page= parameter.
Example: GET /rest/intenso/ad/1.0/public/user?size=5 returns:
{
"elements": [
{
"username": "sophie2",
"configurationName": "Active_Directory_server",
"fields": {
"whenCreated": "08/Jun/21 11:33 PM",
"mail": "sopie2@test123.com",
"displayName": "Sophie2"
}
},
{
"username": "luserion14",
"configurationName": "Active_Directory_server",
"fields": {
"whenCreated": "11/Jun/21 11:01 AM",
"mail": "test",
"displayName": "Ldapion Userion XIV",
"company": "test",
"title": "test",
"department": "test"
}
},
{
"username": "John",
"configurationName": "Active_Directory_server",
"fields": {
"whenCreated": "14/Jun/21 8:15 AM",
"mail": "john@test.com",
"displayName": "John Doe"
}
},
{
"username": "Mario",
"configurationName": "Active_Directory_server",
"fields": {
"whenCreated": "14/Jun/21 9:13 AM",
"mail": "mario@test.com",
"displayName": "Mario Testelli"
}
},
{
"username": "Todd",
"configurationName": "Active_Directory_server",
"fields": {
"whenCreated": "14/Jun/21 9:27 AM",
"mail": "todd@test.com",
"displayName": "Todd Chavez"
}
}
],
"page": {
"current": 1,
"pageSize": 5,
"totalPages": 114,
"totalElements": 570
}
}
Returns all users within a given connection configuration.
GET /rest/intenso/ad/1.0/public/connection/{idOrName}/user
Both /rest/intenso/ad/1.0/public/user and /rest/intenso/ad/1.0/public/connection/{idOrName}/user endpoints have the following filters applicable:
Users:
Fields:
Example: GET /rest/intenso/ad/1.0/public/connection/Active_Directory_server/user?usernames=luserion13&userkeys=JIRAUSER10605&page=1&size=40 returns:
{
"elements": [
{
"username": "luserion13",
"configurationName": "Active_Directory_server",
"fields": {
"whenCreated": "07/Jun/21 2:48 PM",
"mail": "luserion9@one.com",
"displayName": "Ldapion Userion XIII"
}
},
{
"username": "nwalters",
"configurationName": "Active_Directory_server",
"fields": {
"whenCreated": "10/Oct/22 12:14 PM",
"mail": "nellie.walters@dtest.com",
"directReports": "JIRAUSER10173",
"displayName": "Nellie Walters",
"company": "Cool.com",
"department": "HR",
"title": "Recruitment Specialist"
}
}
],
"page": {
"current": 1,
"pageSize": 40,
"totalPages": 1,
"totalElements": 2
}
}
If you can’t find the answer you need in our documentation, raise a support request.