Get on a single content source
>> rpm -qa pulp-server
pulp-server-2.7.0-0.3.beta.el7.noarch
>> curl -H "Accept: application/json" -H "WebFrameworkSwitch: webpy" -X GET -k -u admin:admin "https://localhost/pulp/api/v2/content/sources/content-world/"|python -m json.tool
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 325 100 325 0 0 664 0 --:--:-- --:--:-- --:--:-- 663
{
"_href": "/pulp/api/v2/content/sources/content-world/",
"base_url": "https://repos.fedorapeople.org/repos/pulp/pulp/demo_repos/zoo/",
"enabled": "1",
"expires": "3d",
"max_concurrent": "10",
"max_speed": "1000",
"name": "Content World",
"priority": "0",
"source_id": "content-world",
"ssl_validation": "true",
"type": "yum"
}
Get on all content sources:
>> curl -H "Accept: application/json" -H "WebFrameworkSwitch: webpy" -X GET -k -u admin:admin "https://localhost/pulp/api/v2/content/sources/"|python -m json.tool
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 327 100 327 0 0 672 0 --:--:-- --:--:-- --:--:-- 672
[
{
"_href": "/pulp/api/v2/content/sources/content-world/",
"base_url": "https://repos.fedorapeople.org/repos/pulp/pulp/demo_repos/zoo/",
"enabled": "1",
"expires": "3d",
"max_concurrent": "10",
"max_speed": "1000",
"name": "Content World",
"priority": "0",
"source_id": "content-world",
"ssl_validation": "true",
"type": "yum"
}
]
Get on non-existing content source:
curl -H "Accept: application/json" -H "WebFrameworkSwitch: webpy" -X GET -k -u admin:admin "https://localhost/pulp/api/v2/content/sources/content-world/"|python -m json.tool
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 420 100 420 0 0 837 0 --:--:-- --:--:-- --:--:-- 836
{
"_href": "/pulp/api/v2/content/sources/content-world/",
"error": {
"code": "PLP0009",
"data": {
"resources": {
"source_id": "content-world"
}
},
"description": "Missing resource(s): source_id=content-world",
"sub_errors": []
},
"error_message": "Missing resource(s): source_id=content-world",
"exception": null,
"http_request_method": "GET",
"http_status": 404,
"resources": {
"source_id": "content-world"
},
"traceback": null
}