Copyright © 2013 Novell, Inc.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or (at your option) version 1.3; with the Invariant Section being this copyright notice and license. A copy of the license version 1.2 is included in the section entitled "GNU Free Documentation License".
Only authenticated users are allowed to access the API. Authentication is done by sending a Basic HTTP Authorisation header, authentication cookie or using token authentication.
The software REST service supports only XML and JSON input/output formats.
This module provides functionality to install software updates and manage software repositories.
The following PolicyKit permissions are needed to perform the actions:
org.opensuse.yast.modules.yapi.patches.read
org.opensuse.yast.modules.yapi.patches.install
org.opensuse.yast.modules.yapi.repositories.read
org.opensuse.yast.modules.yapi.repositories.write
Return all available and recently installed patches (the status is set in "installed" value)
CURL Example: curl -u <user> https://<hostname>:4984/patches.xml
Result: Example
Return information about patch with given ID.
CURL Example: curl -u <user> 'https://<hostname>:4984/patches/slessp2-PackageKit;7256;noarch;nu_novell_com:SLES11-SP2-Updates.xml'
Result: Example
POST /patches/install/patch_id.xml
Install the patch with given ID. Patch installation runs in background, the response code is 202 Accepted when patch installation started. Then the patch index has to be queried to get the actual patch installation result.
CURL example: curl -u <user> -X POST 'https://<hostname>:4984/patches/install/slessp2-PackageKit;7256;noarch;nu_novell_com:SLES11-SP2-Updates.xml'
Return all configured software repositories
CURL Example: curl -u <user> https://<hostname>:4984/repositories.xml
Result: Example
Return details of the specified repository
CURL Example: curl -u <user> 'https://<hostname>:4984/nu_novell_com:SLES11-SP2-Updates.xml'
Result: Example
Update repository properties
CURL Example: curl -u <user> -X PUT -H 'Content-type: text/xml' -d @repository.xml 'https://<hostname>:4984/repositories/nu_novell_com:SLES11-SP2-Updates.xml'
Body: Example
Create a new repository
CURL Example: curl -u <user> -X POST -H 'Content-type: text/xml' -d @repository.xml https://<hostname>:4984/repositories.xml
Body: Example
Delete an existing repository.
CURL Example: curl -u <user> -X DELETE 'https://<hostname>:4984/repositories/nu_novell_com:SLES11-SP2-Updates.xml'