getUserProperty method
Returns the value of a user's property. If no property key is provided Get user property keys is called.
Note: This operation does not access the user properties created and maintained in Jira.
Permissions required:
- Administer Jira global permission, to get a property from any user.
- Access to Jira, to get a property from the calling user's record.
Implementation
Future<EntityProperty> getUserProperty(
{String? accountId,
String? userKey,
String? username,
required String propertyKey}) async {
return EntityProperty.fromJson(await _client.send(
'get',
'rest/api/3/user/properties/{propertyKey}',
pathParameters: {
'propertyKey': propertyKey,
},
queryParameters: {
if (accountId != null) 'accountId': accountId,
if (userKey != null) 'userKey': userKey,
if (username != null) 'username': username,
},
));
}