DelineaXPM / tss-sdk-go

A Golang SDK for Delinea Secret Server
https://delinea.com/products/secret-server
MIT License
2 stars 9 forks source link

API to query secrets by name? #5

Closed 200sc closed 2 years ago

200sc commented 2 years ago

The browser interface appears to make a call like this:

https://<tenant>.secretservercloud.com/api/v1/secrets?paging.filter.includeRestricted=true&paging.filter.searchText=<text>&paging.filter.extendedFields=Machine&paging.filter.extendedFields=Notes&paging.filter.extendedFields=Username&paging.filter.doNotCalculateTotal=true&paging.sortBy[0].name=Name&paging.sortBy[0].direction=Asc&paging.take=30&&paging.skip=0

When filling in this field: image

And this returns apparently parsable json.

Is this API stable? If it is, can the SDK be extended to support querying by secret name?

tylerezimmerman commented 2 years ago

@200sc We are looking into this. Technically, we are treating this as a feature request rather than a bug.

delineaKrehl commented 2 years ago

@200sc You can see there is now a PR to fulfill your request. Instead of creating a single Query By Name interface, I implemented two more generic ones.

  1. An API endpoint to do the full text search as you provided in your screen shot.
  2. An API endpoint to do an exact search on a given field

If you want to search for an exact name you can use the second endpoint mentioned