Solution
In order to use the dashes in the system queries, end-users need to have into consideration that the language used in the HTTP API is Dynamic LINQ. Therefore, end users can follow the syntax rules for this language.
If end users need to use the query using dashes, the name of the package needs to be formatted as follows:
- Package name: Package-Example-1
- Package name with the proper syntax: [\"Package-Example-1\"]
The following is an example that has been tested with the Swagger tool in SystemLink Server:
{
"skip": 0,
"take": 100,
"filter": "connected.data.state==\"CONNECTED\"",
"projection": "new(packages.data[\"ni-package-manager-upgrader\"].version)",
"orderBy": "lastUpdatedTimestamp descending"
}The result is the following:
{
"count": 5,
"data": [
{
"version": "21.8.0.49275-0+f123"
},
{},
{},
{},
{}
]
}