Build Service/Curl
From openSUSE
Contents |
[edit]
How to use curl for build service development
| Note, the commandline client osc has a way to issue generic commands. So you may not need to resort to curl. See osc help req. |
Curl is a command line tool to transfer data from or to a server, using one of the supported protocols (HTTP, HTTPS, FTP, FTPS, TFTP, DICT, TELNET, LDAP or FILE).
The command is designed to work without user interaction.
It can help testing the openSUSE build service API a lot while development.
Here are the most commonly used commands:
[edit]
GET request
curl -u username:password -X GET http://some.host/any/path
[edit]
PUT request
curl -u username:password -X PUT -T /path/to/file/to/put http://some.host/any/path
[edit]
POST request
curl -u username:password -X POST -T /path/to/file/to/post http://some.host/any/path
[edit]
DELETE request
curl -u username:password -X DELETE http://some.host/any/path
[edit]
Examples for openSUSE build service
[edit]
Delete a pattern file
curl -u username:password -X DELETE https://api.opensuse.org/source/<project>/_pattern/<patternfile>
[edit]
Get metadata for a single package
curl -u username:password -X GET https://api.opensuse.org/source/<project>/<package>/_meta
[edit]
Get a specific version of a source file
curl -u username:password -X GET https://api.opensuse.org/source/<project>/<package>/<filename>?rev=<your_revision>
[edit]
Get a list of i586 binaries build in a project
curl -u username:password -X GET https://api.opensuse.org/build/<project>/i586/_binarylist
[edit]
Get a list of published i586 binaries for a project =
curl -u username:password -X GET https://api.opensuse.org/published/<project>/openSUSE_10.3/i586

