add the latest serviceaccount rAPI functionalities
Closed this issue · 0 comments
noredistribution commented
we shipped new rAPI for service accounts and would be good to add the GetAll and Delete functions amongs the others
examples:
GetAll:
curl -sS -kX POST --header 'Accept: application/json' -b access_token=`cat token.tok` 'https://192.0.2.100/api/v3/services/arista.serviceaccount.v1.TokenService/GetAll' -d {} | jq
[
{
"value": {
"key": {
"id": "0058a4144377f3cd51cef11ff5ae8037e46b8456"
},
"user": "cvpadmin",
"description": "Event",
"valid_until": "2022-02-23T15:41:05Z",
"created_by": "cvpadmin",
"last_used": null
},
"time": "2022-01-24T15:41:22.779652056Z",
"type": "INITIAL"
},
{
"value": {
"key": {
"id": "8c91c0f3961e193a22ad8456c8ae254a357dd25f"
},
"user": "cvpadmin",
"description": "test12",
"valid_until": "2022-04-01T13:24:33Z",
"created_by": "cvpadmin",
"last_used": null
},
"time": "2022-04-01T13:23:02.361160199Z",
"type": "INITIAL"
}
]
Delete:
curl -kX POST --header 'Accept: application/json' -b access_token=`cat token` 'https://192.0.2.100/api/v3/services/arista.serviceaccount.v1.TokenConfigService/Delete' -d '{"key":{"id":"e430b11b639e1abe0fccd78f40d30922abc65fa6"}}'
[{"key":{"id":"e430b11b639e1abe0fccd78f40d30922abc65fa6"},"time":"2022-04-01T13:29:43.767335495Z"}]