...
The following examples make use of the GET method.
Example 1
If you want to get The following example shows a command that gets the list of all License Statistics features, type the following from a command line.
Code Block | ||||
---|---|---|---|---|
| ||||
curl -H "X-Auth-token: token" "http://yourdomain/api/v1/feature/json" |
Example 2
If you want to obtain The following example shows a command that obtains feature information filtered by name and version in and output to CSV format, enter the following command.
Code Block | ||||
---|---|---|---|---|
| ||||
curl --data "filter=[{\"type\"=\"string\", \"field\"=\"fn\", \"value\"=\"abc\"}, {\"type\"=\"string\", \"field\"=\"fv\", \"value\"=\"2.1\"}]" -H "X-Auth-token: token" "http://yourdomain/api/v1/feature/csv" |
Example 3
To get The following example shows a command that gets information about a feature with an ID of "1, enter the following command."
Code Block | ||||
---|---|---|---|---|
| ||||
curl --data-urlencode "filter=[{\"type\"=\"numeric\", \"field\"=\"fid\", \"comparison\"=\"eq\" \"value\"=\"1\"}]" -H "X-Auth-token: token" "http://yourdomain/api/v1/feature/json" |
...