= SUSE Studio User API Version: v1 SUSE Studio offers a RESTful API which can be accessed entirely via HTTP.

Changes:

== Authentication The Studio API supports two different authentication methods:

HTTP Basic authentication

The credentials for this authentication method are the username and an API key as password, which the user can create and change at any time.

OAuth authentication

Note: OAuth authentication has been disabled until the security flaw in OAuth Core 1.0 has been addressed. == Table of Contents Contents == Account information GET /user/show_api_key Returns an HTML page which contains the API key flagged as:

<span class="studio:api_key">ksdjfu93r</span>. GET /api/v1/user/account Returns information about the account, such as username, email address and disk quota. XmlResult: account == Template sets : Name of template GET /api/v1/user/template_sets List all template sets.
Template sets are used to group available templates by topic. The 'default'
template set contains all vanilla SUSE templates, 'mono' contains those that
are optimized to be used for mono applications, for example. XmlResult: template_sets GET /api/v1/user/template_sets/ Show template set name. XmlResult: template_set == Appliances GET /api/v1/user/appliances List all appliances of the current user. XmlResult: appliances GET /api/v1/user/appliances/ : Id of the appliance Show details of appliance with id id. XmlResult: appliance GET /api/v1/user/appliances//status : Id of the appliance Show information on the status of the appliance with id id. XmlResult: appliance_status POST /api/v1/user/appliances?=&=&= : The template the new appliance should be based on. : The name of appliance : The architecture of the appliance (x86_64 or i686) Create a new appliance by cloning a template or another appliance with the id appliance_id.
If name is left out, a name will be generated. If arch is left out a i686 appliance will be created. DELETE /api/v1/user/appliances/ : Id of the appliance Delete appliance with id id. === Repositories : Id of the appliance GET /api/v1/user/appliances//repositories List all repositories of the appliance with id id. XmlResult: repositories PUT /api/v1/user/appliances//repositories Update the list of repositories of the appliance with id id.

Note: Only the repository ids of the put xml are considered. XmlResult: repositories POST /api/v1/user/appliances//cmd/add_repository?= : Id of the repository. Add the specified repository to the appliance with id id. XmlResult: repositories POST /api/v1/user/appliances//cmd/remove_repository?= : Id of the repository. Remove the specified repository from the appliance with id id. XmlResult: repositories POST /api/v1/user/appliances//cmd/add_user_repository Adds the according user repository (the one containing the uploaded RPMs) to the appliance. === Software Selection : Id of the appliance. : Id of the build. : Id of the appliance GET /api/v1/user/appliances//software List all selected packages and patterns of the appliance with id id. XmlResult: software PUT /api/v1/user/appliances//software Update the list of selected packages and patterns of the appliance with id id. XmlResult: software GET /api/v1/user/appliances//software/installed?= List all packages and patterns that are installed. You can either specify the
appliance with the appliance_id parameter, which will list the software
that will installed with the next build or via an build id. That makes it possible
to retrieve the installed software for older builds. XmlResult: software_map POST /api/v1/user/appliances//cmd/add_package?=&=&= : Name of the package. : Version of the package. : Repository to pick the package from. Add the specified package to the appliance with id id. XmlResult: software_change POST /api/v1/user/appliances//cmd/remove_package?= : Id of the appliance : Name of the package. Remove the specified package from the appliance with id id. XmlResult: software_change POST /api/v1/user/appliances//cmd/add_pattern?=&=&= : Id of the appliance : Name of the pattern. : Version of the pattern. : Repository to pick the pattern from. Add the specified pattern to the appliance with id id. XmlResult: software_change POST /api/v1/user/appliances//cmd/remove_pattern?= : Id of the appliance : Name of the pattern. Remove the specified pattern from the appliance with id id. XmlResult: software_change GET /api/v1/user/appliances//software/search?=&=&= : Id of the appliance : The search string : Option to perform the search on all fields. Default is 'false'. : Option to perform the search on all repositories. Default is 'false'. Search all software that matches the given search_string. If the all_fields
parameter is set to true all fields are considered, otherwise only the name of the package
or pattern is matched against the search_string.
By default only software that is available to the appliance is considered, e.g. the search is limited to the
repositories of this appliances. If you want to search in all repositories set the all_repos parameter to true. XmlResult: software_map === Image files : Id of the build. : Id of the appliance. GET /api/v1/user/appliances//image_files?=&= : Path to the file in the built appliance. Returns the file with the given path from an image. == Overlay files : Id of the appliance. : Id of the file. GET /api/v1/user/files?= List all overlay files of appliance with id id. XmlResult: files POST /api/v1/user/files?=&=&=&=&=&=&= : The name of the file in the filesystem. : The path where the file will be stored. : The owner of the file. : The group of the file. : The permissions of the file. : Used to enable/disable this file for the builds. Adds a file to the appliance with id id.
Optionally, one or more metadata settings can be specified. If those are left out, they
can also be change later (see below).
The file is expected to be wrapped as with form-based file uploads in HTML (RFC 1867) in the body of the POST request. XmlResult: file GET /api/v1/user/files//data Returns the file with id file_id. PUT /api/v1/user/files//data Writes the content of the file with id file_id.
The file is expected to be wrapped as with form-based file uploads in HTML (RFC 1867) in the body of the PUT request. XmlResult: file GET /api/v1/user/files/ Returns the meta data of the file with id file_id. XmlResult: file PUT /api/v1/user/files/ Writes the meta data of the file with id file_id. XmlResult: file DELETE /api/v1/user/files/ Delete the file with id file_id and its meta data. == Running builds : Id of the appliance. : Id of the build. GET /api/v1/user/running_builds?= List all running builds for the appliance with id id. XmlResult: running_builds GET /api/v1/user/running_builds/ Show status of the build with id build_id. XmlResult: running_build POST /api/v1/user/running_builds?=&=&=&= : Force a build even if it overwrites an already existing build. : The version of the appliance. : The format of the build. Supported are 'xen','oem','vmx' and 'iso'. Start a new build for the appliance with id id.
If there already is a build with the same appliance settings (build type and version)
an error is returned. In this case a build can be enforced by setting the optional
force parameter to true.
Optionally the appliance version and build type can be set with the version and image_type parameters. DELETE /api/v1/user/running_builds/ Cancel build with id build_id. == Finished builds : Id of the appliance. : Id of the build. GET /api/v1/user/builds?= List all completed builds for the appliance with id id. XmlResult: builds GET /api/v1/user/builds/ Show build info of the build with id build_id. XmlResult: build DELETE /api/v1/user/builds/ Delete build with id build_id. == RPM Uploads : Base system of the RPM or archive, e.g. 11.1 or SLED11. : ID of the uploaded RPM. GET /api/v1/user/rpms?= List all uploaded RPMs for the base system base. XmlResult: rpms GET /api/v1/user/rpms/ Show information on the uploaded RPM with id rpm_id. XmlResult: rpm GET /api/v1/user/rpms//data Returns the RPM with id rpm_id. POST /api/v1/user/rpms?= Adds an RPM or archive to the user repository for appliances base on base.
The file is expected to be wrapped as with form-based file uploads in HTML (RFC 1867) in the body of the POST request. XmlResult: rpm PUT /api/v1/user/rpms/ Update the content of the RPM or archive with the id rpm_id.
The file is expected to be wrapped as with form-based file uploads in HTML (RFC 1867) in the body of the POST request. XmlResult: rpm DELETE /api/v1/user/rpms/ Deletes the RPM or archive with the id rpm_id from the user repository. == Repositories GET /api/v1/user/repositories?=&= : Limit the results to repositories with this base system. : Only show repositories matching this search string. Returns a list of repositories. If neither base_system nor filter are specified all available repositories are returned.
When filtering the results with the filter parameter, the repository name, repository url and repository packages are searched. XmlResult: repositories POST /api/v1/user/repositories?=&= : Base url of the repository. : Name for the repository. Imports a new repository into Studio. Returns the metadata for the created repository. XmlResult: repository GET /api/v1/user/repositories/ : Id of the repository. Show information on the repository with the id id. XmlResult: repository