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
url — String of the URL 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' }
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:
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
url — String of the URL 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' }
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:
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 topic