Skip to content

Commit

Permalink
Add active_only flag to Get API Key REST spec (#103621) (#103644)
Browse files Browse the repository at this point in the history
#98259 added a new flag for
the Get API key API. I missed adding it to the REST API spec originally.


This PR corrects the REST spec.

Co-authored-by: Elastic Machine <[email protected]>
  • Loading branch information
n1v0lg and elasticmachine authored Dec 21, 2023
1 parent f737e81 commit 4b41e8e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@
"type":"boolean",
"default":false,
"description": "flag to show the limited-by role descriptors of API Keys"
},
"active_only":{
"type":"boolean",
"default":false,
"description": "flag to limit response to only active (not invalidated or expired) API keys"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ teardown:
Authorization: "Basic YXBpX2tleV91c2VyOngtcGFjay10ZXN0LXBhc3N3b3Jk" # api_key_user
security.get_api_key:
owner: true
active_only: true
- length: { "api_keys" : 1 }
- match: { "api_keys.0.username": "api_key_user" }
- match: { "api_keys.0.invalidated": false }
Expand Down

0 comments on commit 4b41e8e

Please sign in to comment.