Release Component Relationship Type List
API endpoint that allows release_component_relationship_types to be viewed or edited.
Documents & examples
Method: GET
URL: /rest_api/v1/component-relationship-types/
Response: a paged list of following objects
{
"id (read-only)": "int",
"name": "string"
}
Method: GET
URL: /rest_api/v1/component-relationship-types/{instance_pk}/
Response:
{
"id (read-only)": "int",
"name": "string"
}
Method: POST
URL: /rest_api/v1/component-relationship-types/
Data:
{
"name": "string", # required
}
type: /rest_api/v1/component-relationship-types/
Response:
{
"id (read-only)": "int",
"name": "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/component-relationship-types/{instance_pk}/
Data:
{
"name": "string", # required
}
Response:
{
"id (read-only)": "int",
"name": "string"
}
Method: DELETE
URL: /rest_api/v1/component-relationship-types/{instance_pk}/
Response:
On success, HTTP status code is 204 and the response has no content.
It is possible to delete multiple items in one request. Use the DELETE
method with the same url as for listing/creating objects. The request body
should contain a list with identifiers for objects to be deleted. The
identifier is usually the last part of the URL for deleting a single
object.
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/component-relationship-types/
{
"count": 6,
"next": null,
"previous": null,
"results": [
{
"id": 1,
"name": "bundles"
},
{
"id": 2,
"name": "executes"
},
{
"id": 3,
"name": "RPMRequires"
},
{
"id": 4,
"name": "RPMBuildRequires"
},
{
"id": 5,
"name": "RPMBuildRoot"
},
{
"id": 6,
"name": "ContainerIncludesRPM"
}
]
}