REST API endpoint to create audit records does not accept Atlassian Account ID in "accountId" field

XMLWordPrintable

    • Severity 3 - Minor

      Issue Summary

      As per this Deprecation notice, username and userKey are deprecated and we need to pass an Atlassian Account ID instead. However, the Create audit record (/wiki/rest/api/audit) REST API endpoint does not work when passing Atlassian Account ID in the accountId field.

      Steps to Reproduce

      1. Make a POST request to endpoint /wiki/rest/api/audit with below payload.
        { "author": {
            "type": "user",
            "displayName": “”,
            "operations": null,
            "username": "",
            "userKey": "",
             "accountId": "6284ef7aca7********"
          },
        "remoteAddress": "",
          "creationDate": 1719289971054,
          "summary": "Testing",
          "description": "test",
          "category": "",
          "sysAdmin": false,
          "affectedObject": {
            "name": "",
            "objectType": ""
          },
          "changedValues": [
            {
              "name": "test",
              "oldValue": "test",
              "hiddenOldValue": "test",
              "newValue": "Test1",
              "hiddenNewValue": "Test1"
            }
          ]
        }
      2. Passing the Atlassian account ID against userKey in payload works for some Atlassian account ID and not for all.
        "author": {
            "type": "user",
            "displayName": “”,
            "operations": null,
            "username": "",
            "userKey": "6284ef7aca7********",
             "accountId": ""
          }

      Expected Results

      An audit record is created having the desired user (the one for which we provided the AAID) as the author.

      Actual Results

      The REST API endpoint does not work correctly when Atlassian account ID is mentioned against accountId and this results in the audit record being created with empty/missing author.

      Workaround

      Currently there is no known workaround for this behavior. A workaround will be added here when available

            Assignee:
            Unassigned
            Reporter:
            Ramchandra Kudtarkar
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: