REST package references
A package reference represents a link to the content (file, directory, archive and so on) that you use for the deployment process.To deploy a package, you must create at least one reference in the package. You cannot deploy a package without a reference.
POST /v1/package_references
Creates a new package reference.
Required attributes
- name — String name of the package reference
- server_id — String ID of the associated server
- package_id — String ID of the parent package
uri — String of the URI to the reference
Filters
property — Special property setting accessor that takes key value pairs and attaches them to the reference
properties_with_values — Hash of key value pairs such as:
{ 'server_url' => 'localhost', 'user_name' => 'admin' }- include_except—Comma-separated strings of the top-level associated items to exclude from the response. You can remove only top-level associated items from the response and these associated items should be a collection (zero to many) of other objects (not a simple property—string, numeric, boolean, and so on). For example, you can remove components from an application but you cannot remove route gates (it is not a top-level associated item) or app_version (it is a simple property). If you provide an incorrect associated item name (for example, the associated item does not exist, is not at the top level, or is a property), the name is ignored. See the table below for the items and their associated items.
- alone—Boolean value to return only the item or the associated items as well along with the item. If set to false (default), item and associated item details are returned; if set to true, only item details are returned. See the table below for the items and their associated items. See the table below for the items and their associated items.
Item | Associated items |
---|---|
package_references | property_values |
Common attributes
- format — Ensure to include an accept header or add .xml or .json to the last path element
- token — Your API Token for authentication
Errors caused
- ERROR 403 Forbidden — Occurs when the token is invalid.
- ERROR 422 Unprocessable entity — Occurs when validation fails; objects and errors are returned.
Examples
To test this method, insert this URL or your valid API key and application host into a browser or HTTP client like wget or curl. For example:
Filter example:
PUT /v1/package_references/[id]
Updates an existing package reference with values from a posted document.
Required attributes
- name — String name of the package reference
- server_id — String ID of the associated server
- package_id — String ID of the parent package
uri — String of the URI to the reference
Filters
property — Special property setting accessor that takes key value pairs and attaches them to the reference
properties_with_values — Hash of key value pairs such as:
{ 'server_url' => 'localhost', 'user_name' => 'admin' }- include_except—Comma-separated strings of the top-level associated items to exclude from the response. You can remove only top-level associated items from the response and these associated items should be a collection (zero to many) of other objects (not a simple property—string, numeric, boolean, and so on). For example, you can remove components from an application but you cannot remove route gates (it is not a top-level associated item) or app_version (it is a simple property). If you provide an incorrect associated item name (for example, the associated item does not exist, is not at the top level, or is a property), the name is ignored. See the table below for the items and their associated items.
- alone—Boolean value to return only the item or the associated items as well along with the item. If set to false (default), item and associated item details are returned; if set to true, only item details are returned. See the table below for the items and their associated items. See the table below for the items and their associated items.
Item | Associated items |
---|---|
package_references | property_values |
Common attributes
- format — Ensure to include an accept header or add .xml or .json to the last path element
- token — Your API Token for authentication
Errors caused
- ERROR 403 Forbidden — Occurs when the token is invalid.
- ERROR 422 Unprocessable entity — Occurs when validation fails; objects and errors are returned.
Examples
To test this method, insert this URL or your valid API key and application host into a browser or HTTP client like wget or curl. For example:
Filter example:
DELETE /v1/package_references/[id]
Deletes a package reference by deactivating it.
Common attributes
- id — Numerical unique ID for the record
- format — Ensure to include an accept header or add .xml or .json to the last path element
- token — Your API Token for authentication
Errors caused
- ERROR 403 Forbidden — Occurs when the token is invalid.
- ERROR 404 Not found — Occurs when no records are found.
Examples
To test this method, insert this URL or your valid API key and application host into a browser or HTTP client like wget or curl. For example:
Related topics