Jira Active Directory Group Sync REST API
This page has REST API details for Jira Active Directory Group Sync Plugin.
Get Auto Sync Configurations
GET http://localhost:8080/rest/adgroupsync/1.0/utility/list/admin/config
Response: [Status: 200]
$ curl -u superadmin -XGET http://localhost:8080/rest/adgroupsync/1.0/utility/list/admin/config Enter host password for user 'superadmin': [{"id":1,"adGroup":"engineering.systems.and.infrastructure","jiraGroup":"engineering.systems.and.infrastructure","actionType":0}] $
Add Auto Sync Configuration
POST http://localhost:8080/rest/adgroupsync/1.0/utility/add/admin/config
Response: [Status: 200]
Delete Auto Sync Configuration
DELETE http://localhost:8080/rest/adgroupsync/1.0/utility/remove/admin/config/id/{configId}
Perform Sync By Admin
POST http://localhost:8080/rest/adgroupsync/1.0/utility/run/admin/sync
Required Schema Fields:
- adGroup (String)
- jiraGroup (String)
- directoryType (Number)
- 0 - LDAP (Default)
- 1 - Azure AD
- 2 - Google
- 3 - Okta
- provisionUsers (Boolean)
- dryRun (Boolean)
Response: [Status: 200]
$ curl -u superadmin -XPOST -H "Content-Type: application/json" --data '{"adGroup":"engineering.systems.and.infrastructure",\ "jiraGroup":"engineering.systems.and.infrastructure","directoryType":1}' \ http://localhost:8080/rest/adgroupsync/1.0/utility/run/admin/sync Enter host password for user 'superadmin': {"message":"Sync Successful, Update Size ( 6 ). Took 2.84 Seconds","id":6} $
Perform Sync By User
POST http://localhost:8080/rest/adgroupsync/1.0/utility/run/user/sync
Same as above but this endpoint can execute any Jira user, it will create Jira group name same as ldap or Ad group name.
Required Schema Fields:
- adGroup (String)
- directoryType (Number)
- 0 - LDAP (Default)
- 1 - Azure AD
- 2 - Google
- 3 - Okta
- addAutoSync (Integer) ~ OPTIONAL
- Set 1 to add auto sync configuration
Response: [Status: 200]
$ curl -u superadmin -XPOST -H "Content-Type: application/json" --data '{"adGroup":"engineering.systems.and.infrastructure"}'\ http://localhost:8080/rest/adgroupsync/1.0/utility/run/user/sync Enter host password for user 'superadmin': {"message":"Sync Successful, Update Size ( 6 ). Took 2.84 Seconds","id":6} $
Perform Sync By Auto Sync Config ID
POST http://localhost:8080/rest/adgroupsync/1.0/utility/run/admin/config/id/{configId}
Query Parameters:
- configId (Number) - AD Auto Sync Config ID
Response: [Status: 200]
$ curl -u superadmin -XPOST http://localhost:8080/rest/adgroupsync/1.0/utility/run/admin/config/id/1 Enter host password for user 'superadmin': {"message":"Sync Successful, Update Size ( 6 ). Took 2.91 Seconds","id":6} $
Perform Sync for All Auto Sync Configurations
POST http://localhost:8080/rest/adgroupsync/1.0/utility/run/all/sync
Response: [Status: 200]