REST v.2 package instances
Package instances are created from packages. Existing package references and properties are added to the new instance upon its creation. If you change the package later by adding new or editing the existing properties and references, all previously created instances are not updated with these changes.
GET v2/requests/[request_id]/packages/[package_id]/package_instances
Returns a list of package instances of package for a specified request.
Common attributes
- format — Ensure to include an accept header or add .json to the last path element
- token — Your API Token for authentication
Errors caused
- ERROR 403 Forbidden — When the token is invalid
- ERROR 404 Not Found — When no records are found
Example
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:
curl command input
curl -i -H "accept: application/json" -X GET http://[rails_host]/v2/requests/[request_ID]/packages/[package_ID]/package_instances?token=[api_key]
Sample output
HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
X-UA-Compatible: IE=Edge,chrome=1
ETag: "cf05f0a5976b8a85f49338073a7c1183"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: 182f671ec1eacaa376dbe741b8d83fb1
X-Runtime: 0.015000
Date: Fri, 08 Dec 2017 20:35:58 GMT
X-Rack-Cache: miss
Vary: Origin
Referrer-Policy: origin-when-cross-origin
X-Content-Type-Options: nosniff
X-Download-Options: noopen
X-Frame-Options: DENY
X-Permitted-Cross-Domain-Policies: none
X-XSS-Protection: 1; mode=block
Content-Type: application/json;charset=utf-8
Transfer-Encoding: chunked
{
"data": [
{
"id": 3,
"name": "0.0.0.1"
}
],
"total_records": 0
}
Server: Apache-Coyote/1.1
X-UA-Compatible: IE=Edge,chrome=1
ETag: "cf05f0a5976b8a85f49338073a7c1183"
Cache-Control: max-age=0, private, must-revalidate
X-Request-Id: 182f671ec1eacaa376dbe741b8d83fb1
X-Runtime: 0.015000
Date: Fri, 08 Dec 2017 20:35:58 GMT
X-Rack-Cache: miss
Vary: Origin
Referrer-Policy: origin-when-cross-origin
X-Content-Type-Options: nosniff
X-Download-Options: noopen
X-Frame-Options: DENY
X-Permitted-Cross-Domain-Policies: none
X-XSS-Protection: 1; mode=block
Content-Type: application/json;charset=utf-8
Transfer-Encoding: chunked
{
"data": [
{
"id": 3,
"name": "0.0.0.1"
}
],
"total_records": 0
}
Related topic
Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*