[OPENAM-10866] Create Audit Service example creates a service named "{id}" by default Created: 13/Mar/17  Updated: 11/Dec/18

Status: Open
Project: OpenAM
Component/s: API descriptor, audit logging
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Trivial
Reporter: Andrew Vinall Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: AME, Backlog
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

OpenAM 14.0.0-M30 Build 847682095e (2017-March-06 19:13)


Issue Links:
Relates
Rank: 1|hzt39b:

 Description   

When creating an audit service the default value for id is blank. Using this results in a poorly named service.

curl -X PUT --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{ \ 
   "commonHandler": { \ 
     "enabled": true, \ 
     "topics": [ \ 
       "authentication", "access" \ 
     ] \ 
   }, \ 
   "commonHandlerPlugin": { \ 
     "handlerFactory": "string" \ 
   }, \ 
   "jsonConfig": { \ 
     "location": "string", \ 
     "elasticsearchCompatible": true, \ 
     "rotationRetentionCheckInterval": "string" \ 
   }, \ 
   "jsonFileRotation": { \ 
     "rotationEnabled": true, \ 
     "rotationMaxFileSize": "string", \ 
     "rotationFilePrefix": "string", \ 
     "rotationFileSuffix": "string", \ 
     "rotationInterval": "string", \ 
     "rotationTimes": [ \ 
       "string" \ 
     ] \ 
   }, \ 
   "jsonFileRetention": { \ 
     "retentionMaxNumberOfHistoryFiles": "string", \ 
     "retentionMaxDiskSpaceToUse": "string", \ 
     "retentionMinFreeSpaceRequired": "string" \ 
   }, \ 
   "jsonBuffering": { \ 
     "bufferingMaxSize": "string", \ 
     "bufferingWriteInterval": "string" \ 
   } \ 
 }' 'http://openam.test.forgerock.com/openam/json/global-config/services/audit/JSON/{id}'

results in a audit service named

Unknown macro: {id}

{
  "_id": "{id}",
  "_rev": "-1317273412",
  "commonHandler": {
    "enabled": true,
    "topics": [
      "authentication",
      "access"
    ]
  },
  "jsonFileRotation": {
    "rotationFileSuffix": "string",
    "rotationFilePrefix": "string",
    "rotationEnabled": true,
    "rotationTimes": [
      "string"
    ],
    "rotationMaxFileSize": "string",
    "rotationInterval": "string"
  },
  "jsonFileRetention": {
    "retentionMinFreeSpaceRequired": "string",
    "retentionMaxDiskSpaceToUse": "string",
    "retentionMaxNumberOfHistoryFiles": "string"
  },
  "jsonConfig": {
    "location": "string",
    "elasticsearchCompatible": true,
    "rotationRetentionCheckInterval": "string"
  },
  "jsonBuffering": {
    "bufferingWriteInterval": "string",
    "bufferingMaxSize": "string"
  },
  "commonHandlerPlugin": {
    "handlerFactory": "string"
  },
  "_type": {
    "_id": "JSON",
    "name": "JSON",
    "collection": true
  }
}

Generated at Sat Feb 27 21:44:22 UTC 2021 using Jira 7.13.12#713012-sha1:6e07c38070d5191bbf7353952ed38f111754533a.