Finding duplicate user accounts
Get the total number of duplicate user accounts
count
メソッドを呼び出すことで重複したユーザー アカウントの合計数を取得できます。ここで <BASE_URL>
は Jira インスタンスの URL で <USERNAME>:<PASSWORD>
は Jira のユーザー名とパスワードです。
curl -X GET "<BASE_URL>/rest/api/2/user/duplicated/count" \
-u "<USERNAME>:<PASSWORD>"
The response is a dictionary with a count
property that stores the total number of duplicate user accounts. For example:
{
"count": 1
}
Get a detailed list of duplicate accounts
You can get a list of all the duplicate user accounts by calling the list method, where <BASE_URL>
is the URL of your Jira instance and <USERNAME>:<PASSWORD>
are your Jira username and password:
curl -X GET "<BASE_URL>/rest/api/2/user/duplicated/list" \
-u "<USERNAME>:<PASSWORD>"
The response is a dictionary listing each duplicate user account as a separate property that stores an array of objects. Each object in the array contains the user directory ID, the directory name, and a boolean flag indicating whether the account is active. For example:
{
"johndoe": [
{
"directoryId": 1,
"directoryName": "Jira Internal Directory",
"userActive": true
},
{
"directoryId": 10000,
"directoryName": "Crowd Server",
"userActive": true
}
]
}
Response cache
The responses returned by the count
and list
methods are stored in the cache for 10 minutes. The cache is flushed automatically every time a directory is added, deleted, enabled, disabled, reordered, or synchronized.
Jira システム管理者は、リソースの URL に flush=true
クエリ文字列パラメーターを追加することで、キャッシュを主導でフラッシュすることもできます。例:
curl -X GET "<BASE_URL>/rest/api/2/user/duplicated/list?flush=true" \
-u "<USERNAME>:<PASSWORD>"