I’m trying to use the REST API provided by DeployIt (v3.9) to list all the packages available on a given project.
Thus, I use the GET /repository/query service
So, I’m calling this service with the following URL:
http://[server]/deployit/repository/query?namePattern=my-app&type=udm.DeploymentPackage
Unfortunately, I don’t get anything (just an empty list).
If I remove the namePattern
from my URL, then I get a long list of all applications (not only the only I'm interested in).
So it appears that I don’t set correctly the namePattern
attribute. In the documentation, they say:
a search pattern for the name. This is like the SQL "LIKE" pattern: the character '%' represents any string of zero or more characters, and the character '_' (underscore) represents any single character. Any literal use of these two characters must be escaped with a backslash ('\'). Consequently, any literal instance of a backslash must also be escaped, resulting in a double backslash ('\').
So I tried the following URL:
- http://[server]/deployit/repository/query?type=udm.DeploymentPackage&namePattern=my-app : empty list
- http://[server]/deployit/repository/query?type=udm.DeploymentPackage&namePattern=%my-app%: error 400
- http://[server]/deployit/repository/query?type=udm.DeploymentPackage&namePattern=%25my-app%25 (trying to escape the % character): empty list
- http://[server]/deployit/repository/query?type=udm.DeploymentPackage&namePattern=Applications/my-app/2.0.0 (with a real version): error, character ‘/’ not allowed.
- http://[server]/deployit/repository/query?type=udm.DeploymentPackage&namePattern=2.0.0 : I get the list of all applications deployed with a version
2.0.0
(including mymy-app
), but that's not what I'm looking for (I want all versions available on DeployIt formy-app
).
So, what is the correct URL to retrieve the list of deployed applications?