rstudio / connectapi

An R package for interacting with the RStudio Connect Server API
https://pkgs.rstudio.com/connectapi/
Other
43 stars 25 forks source link

Audit Vanities #265

Closed kellobri closed 4 months ago

kellobri commented 4 months ago

The audit_vanity_urls function returns all content paths instead of just the vanity paths as one might expect. It looks like this was left as a TODO item in the code: https://github.com/rstudio/connectapi/blob/15f49bcba389b616c4ec51717dca993f65fc24bf/R/audits.R#L42

The code sample in the API reference documentation suggests just calling client$GET on the vanities endpoint. This returns the expected result.

library(connectapi)

# Assumes CONNECT_SERVER and CONNECT_API_KEY are set in the environment

client <- connect()

result <- client$GET("/v1/vanities")
nealrichardson commented 4 months ago

I don't understand why this function exists. https://github.com/rstudio/connectapi/commit/0c100366e3bf71a45507afb121d09a6b1a7ec1d1#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5R41-R44 is as best as I can figure.