REST API GDPR accountId inconsistencies

Hi,

Based on this ISSUE [JRACLOUD-69783] REST API /assignee does not set correctly when using accountId - Create and track feature requests for Atlassian products., it is mentioned that the “id” should be used for accountIds.

But if I’m sending an accountId as ‘id’ with ‘/rest/api/2/issue/{issueKey}/notify’ call then I’m getting an error, the only way it works if I’m explicitly saying ‘accountId’.

So looks like there are inconsistencies across the APIs.

Sample payload:

{  
   "subject":"subject",
   "textBody":"Message",
   "htmlBody":"<strong>Message1</strong>",
   "to":{  
      "reporter":false,
      "assignee":false,
      "watchers":false,
      "voters":false,
      "users":[  
         {  
            "accountId":"557051:113c8625-6eee-4927-b040-67697016c6b1"
         }
      ],
      "groups":[  

      ]
   }
}

Is this an expected behaviour, or is it going to break in the future?

2 Likes

JRACLOUD-69783 deals specifically with creating and updating issues. The substance of that ticket is “it seems like accountId works everywhere else, but not for creating issues.” You should use “accountId” here.

I appreciate that this is a bit confusing (including, as I just noticed, that the REST API documentation does not specify the attributes for UserDetails for sending notifications…), and so we are working to allow “accountId” to work for creating and updating issues as well.

1 Like

Thanks for clearing this up!