Application Packaging Standard

Last updated 18-Mar-2019

Operations on Content Resources

Content resource is an APS Catalog resource that is not a feed, index, or search description. The following types of content resources are available:

  • Package bits
  • Package resources
  • Package metadata

You can perform the following operations on the content resources:

  • ADD operation. This operation adds a resource to APS Catalog by using an HTTP POST request;

Note

Package bits, package metadata, and package resources are added to APS Catalog only on adding a package.

  • RETRIEVE operation. This operation retrieves a resource using an HTTP GET request;

This section describes request arguments and possible response codes for these operations.

In this document:

ADD Package

Two methods of adding content resources to APS Catalog are available:

  • using the APS Catalog form;
  • using the Packager Administration service.

APS Catalog Form Arguments

Action URL

This URL is fetched from a certain Repository index. XPath expression: /html/body/form[@id=’packageSubmitForm’]/@action/text().

Request Arguments

Argument name Description Type Required
package Package bits file yes(*)
meta Package meta file yes(*)
url Package bits URL text yes(*)
commercialName Package commercial name text no
packageType Package type (APS for standard APS package, PVT for container template packaged as APS) enum. Allowed values: APS | PVT yes

* - Either package or both meta and url are required.

Response Codes

Code Description
201 Created The package has been successfully uploaded to the repository. The Location header indicates the URL of the newly created Package index document (see Package Index).
400 Bad request The submitted package did not pass validation and cannot be accepted. The body of the response may contain detailed reason of failure.
401 Unauthorized Authorization required. The WWW-Authenticate header will specify the expected authentication scheme.
403 Forbidden The credentials specified are not valid for this operation.
405 Method not allowed The handler does not accept the request method. Only GET and POST methods are accepted.

Packager Administration Panel Request Arguments

Action URL

<ROOT_URL>/packager/upload/

Request Arguments

Argument name Description Type Required
aps_upload_param_prefix Prefix for upload parameters, could be empty string yes(*)
<PREFIX>username Packager login string yes(*)
<PREFIX>password Packager password string yes(*)
<PREFIX>approve Request for automatic package approvement; packager should have permission to complete automatic approvement boolean yes(*)
<PREFIX>publish Request for automatic publishing (enabling) of new package; packager should have permission to complete automatic publishing. boolean yes(*)
<PREFIX>commercialName Package commercial name string no
<PREFIX>file package archive itself file yes

Response Codes

Code Description
200 Ok The package has been successfully uploaded to the repository.
400 Bad request The submitted request did not pass validation and cannot be accepted. The body of the response may contain detailed reason of failure.
401 Unauthorized Authorization failed, provided credentials are not valid. The WWW-Authenticate header will specify the expected authentication scheme.
403 Forbidden The credentials specified are not valid for this operation.
405 Method not allowed The handler does not accept the request method. Only POST method is accepted.
500 Server Error The submitted package did not pass validation with APSLint and cannot be accepted; or the submitted package already exists in APS Catalog; or an internal framework error occurred.

RETRIEVE Operations

Resource locations

Resource Location
Package bits URL /<APSver>/<VendorName>/<AppName>/<AppVer> .aps
Package metadata URL /<APSver>/<VendorName>/<AppName>/<AppVer> .meta
Package certificate URL /<APSver>/<VendorName>/<AppName>/<AppVer> .certificate

The placeholder strings have the following meaning:

  • <ROOT_URL> - the APS Catalog URL
  • <APSver> - the APS version. Allowed values: 1, 1.1, 1.2, 2.0, all
  • <VendorName> - the name of a specific vendor
  • <AppName> - the name of a specific application
  • <AppVer> - the version of a specific application

Request Arguments

Argument name Description Type Required Example
packager Packager name string yes www.example.com
arch Target architecture enum**. Default value: undefined no x86
type Package type. One of PVT or APS enum**. Default value: APS no APS
platform Case-insensitive target platform enum**. Default value: undefined no linux
os Case-insensitive target operating system enum**. Default value: undefined no undefined

Response Codes

Code Description
300 Multiple Choices Multiple resources for this request. Client should retrieve a list of available resources (either through feed or index resources) and choose the appropriate one.
302 Found  
303 See Other Resource is available at other URL. Typically, this is used to redirect a client to an URL which includes all request arguments with specific values. The client must follow the URL specified in Location header.
404 Not Found Requested resource is not found.