Product Version List
API endpoint that allows product versions to be viewed or edited.
Product versions always refer to a product by means of a human readable
short
name. Similarly releases are referenced by release_id
. This
applies to both requests and responses.
Documents & examples
Method: GET
URL: /rest_api/v1/product-versions/
Query params:
active
(bool)allowed_push_targets
(string)name
(string)product_version_id
(string)short
(string)version
(string)ordering
(string) Comma separated list of fields for ordering results.- To sort by a field in descending order, prefix its name with minus (e.g.
-name
). - Use double underscores for nested field names (e.g.
parent__child
for{"parent": {"child": ...}}
).
- To sort by a field in descending order, prefix its name with minus (e.g.
Following filters can be used to show only specific fields. This can make
response time faster. Format is list or single value
(JSON: {"fields": ["a","b"]}
or {"fields": "a"}
, in URL: ?fields=a&fields=b
).
fields
(list | string) Fields to display (other fields will be hidden).exclude_fields
: (list | string) Fields NOT to display (overrulesfields
).
Response: a paged list of following objects
{
"active (read-only)": "boolean",
"allowed_push_targets (optional, default=[])": [
"name"
],
"name": "string",
"product": "Product.short",
"product_version_id (read-only)": "string",
"releases (read-only)": "[release_id]",
"short": "string",
"version": "string"
}
The list of releases for each product version is ordered by short and version.
Method: GET
URL: /rest_api/v1/product-versions/{product_version_id}/
Response:
{
"active (read-only)": "boolean",
"allowed_push_targets (optional, default=[])": [
"name"
],
"name": "string",
"product": "Product.short",
"product_version_id (read-only)": "string",
"releases (read-only)": "[release_id]",
"short": "string",
"version": "string"
}
The list of releases is ordered by short and version.
Method: POST
URL: /rest_api/v1/product-versions/
Data:
{
"allowed_push_targets (optional, default=[])": [
"name"
],
"name": "string",
"product": "Product.short",
"short": "string",
"version": "string"
}
If short
is not specified, the short name of associated product will
be used.
Field allowed_push_targets
must be subset of parent product.
Response:
{
"active (read-only)": "boolean",
"allowed_push_targets (optional, default=[])": [
"name"
],
"name": "string",
"product": "Product.short",
"product_version_id (read-only)": "string",
"releases (read-only)": "[release_id]",
"short": "string",
"version": "string"
}
It is possible to create this resource in bulk. To do so, use the same procedure as when creating a single instance, only the request body should contain a list of JSON objects. The response you get back will also contain a list of values which you would obtain by submitting the request data separately.
Method: PUT, PATCH
URL: /rest_api/v1/product-versions/{product_version_id}/
Data:
{
"allowed_push_targets (optional, default=[])": [
"name"
],
"name": "string",
"product": "Product.short",
"short": "string",
"version": "string"
}
Please note that if you change the short
or version
field, the
product_version_id
will be modified accordingly, and the URL of the
object will be changed. All changes are local to the updated model and
are not propagated to associated releases.
Field allowed_push_targets
must be subset of parent product.
Changing allowed_push_targets
field also affects this field in
child releases and variants.
Response:
{
"active (read-only)": "boolean",
"allowed_push_targets (optional, default=[])": [
"name"
],
"name": "string",
"product": "Product.short",
"product_version_id (read-only)": "string",
"releases (read-only)": "[release_id]",
"short": "string",
"version": "string"
}
It is possible to update multiple objects in one request. Use the PUT
or
PATCH
method with the same url as for listing/creating objects. The
request body should contain an object, where keys are identifiers of
objects to be modified and their values use the same format as normal
update.
Browsable GET
GET /rest_api/v1/product-versions/
https://pdc.fedoraproject.org/rest_api/v1/product-versions/?page=2", "previous": null, "results": [ { "name": "epel 6", "short": "epel", "version": "6", "active": true, "product_version_id": "epel-6", "product": "epel", "releases": [ "epel-6-updates" ], "allowed_push_targets": [] }, { "name": "epel 7", "short": "epel", "version": "7", "active": true, "product_version_id": "epel-7", "product": "epel", "releases": [ "epel-7-updates", "fedora-epel7-updates" ], "allowed_push_targets": [] }, { "name": "epel 8", "short": "epel", "version": "8", "active": true, "product_version_id": "epel-8", "product": "epel", "releases": [ "epel-8" ], "allowed_push_targets": [] }, { "name": "epel 9", "short": "epel", "version": "9", "active": true, "product_version_id": "epel-9", "product": "epel", "releases": [ "epel-9" ], "allowed_push_targets": [] }, { "name": "fedora 24", "short": "fedora", "version": "24", "active": false, "product_version_id": "fedora-24", "product": "fedora", "releases": [ "fedora-24", "fedora-24-updates", "fedora-atomic-24", "fedora-cloud-24" ], "allowed_push_targets": [] }, { "name": "fedora 25", "short": "fedora", "version": "25", "active": false, "product_version_id": "fedora-25", "product": "fedora", "releases": [ "fedora-25", "fedora-25-updates", "fedora-atomic-25", "fedora-cloud-25", "fedora-docker-25" ], "allowed_push_targets": [] }, { "name": "fedora 26", "short": "fedora", "version": "26", "active": false, "product_version_id": "fedora-26", "product": "fedora", "releases": [ "fedora-26", "fedora-26-updates", "fedora-atomic-26", "fedora-docker-26", "fedora-modular-26" ], "allowed_push_targets": [] }, { "name": "fedora 27", "short": "fedora", "version": "27", "active": false, "product_version_id": "fedora-27", "product": "fedora", "releases": [ "fedora-27", "fedora-27-updates", "fedora-modular-27" ], "allowed_push_targets": [] }, { "name": "fedora 28", "short": "fedora", "version": "28", "active": false, "product_version_id": "fedora-28", "product": "fedora", "releases": [ "fedora-28" ], "allowed_push_targets": [] }, { "name": "fedora 29", "short": "fedora", "version": "29", "active": false, "product_version_id": "fedora-29", "product": "fedora", "releases": [ "fedora-29" ], "allowed_push_targets": [] }, { "name": "fedora 30", "short": "fedora", "version": "30", "active": false, "product_version_id": "fedora-30", "product": "fedora", "releases": [ "fedora-30" ], "allowed_push_targets": [] }, { "name": "fedora 31", "short": "fedora", "version": "31", "active": false, "product_version_id": "fedora-31", "product": "fedora", "releases": [ "fedora-31" ], "allowed_push_targets": [] }, { "name": "fedora 32", "short": "fedora", "version": "32", "active": false, "product_version_id": "fedora-32", "product": "fedora", "releases": [ "fedora-32" ], "allowed_push_targets": [] }, { "name": "fedora 33", "short": "fedora", "version": "33", "active": false, "product_version_id": "fedora-33", "product": "fedora", "releases": [ "fedora-33" ], "allowed_push_targets": [] }, { "name": "fedora 34", "short": "fedora", "version": "34", "active": false, "product_version_id": "fedora-34", "product": "fedora", "releases": [ "fedora-34" ], "allowed_push_targets": [] }, { "name": "fedora 35", "short": "fedora", "version": "35", "active": false, "product_version_id": "fedora-35", "product": "fedora", "releases": [ "fedora-35" ], "allowed_push_targets": [] }, { "name": "fedora 36", "short": "fedora", "version": "36", "active": false, "product_version_id": "fedora-36", "product": "fedora", "releases": [ "fedora-36" ], "allowed_push_targets": [] }, { "name": "fedora 37", "short": "fedora", "version": "37", "active": true, "product_version_id": "fedora-37", "product": "fedora", "releases": [ "fedora-37" ], "allowed_push_targets": [] }, { "name": "Fedora 38", "short": "fedora", "version": "38", "active": true, "product_version_id": "fedora-38", "product": "fedora", "releases": [ "fedora-38", "fedora-38-updates", "fedora-38-updates-testing" ], "allowed_push_targets": [] }, { "name": "Fedora 39", "short": "fedora", "version": "39", "active": true, "product_version_id": "fedora-39", "product": "fedora", "releases": [ "fedora-39" ], "allowed_push_targets": [] } ] }{ "count": 22, "next": "