Content Sources

Pulp’s Content Sources represent external sources of content.

List All Sources

Get all content sources.

Method: GET
Path: /pulp/api/v2/content/sources/
Permission: read
Query Parameters: None
Response Codes:
  • 200 - on success
Return: a list of content source objects; empty array if there are none

Sample 200 Response Body:

[
  {
    "paths": "el7-x86_64/ pulp-el7-x86_64/",
    "name": "Local Content",
    "type": "yum",
    "ssl_validation": "true",
    "expires": "3d",
    "enabled": "1",
    "base_url": "file:///opt/content/disk/",
    "priority": "0",
    "source_id": "disk",
    "max_concurrent": "2",
    "_href": "/pulp/api/v2/content/sources/disk/"
  }
]

Get Source By ID

Get a content source by ID.

Method: GET
Path: /pulp/api/v2/content/sources/<source-id>/
Permission: read
Query Parameters: None
Response Codes:
  • 200 - on success
  • 404 - if source-id does not exist
Return: the requested content source object

Sample 200 Response Body:

{
"paths": "el7-x86_64/ pulp-el7-x86_64/",
"name": "Local Content",
"type": "yum",
"ssl_validation": "true",
"expires": "3d",
"enabled": "1",
"base_url": "file:///opt/content/disk/",
"priority": "0",
"source_id": "disk",
"max_concurrent": "2",
"_href": "/pulp/api/v2/content/sources/disk/"
}

Refresh All Sources

Get all content sources.

Method: POST
Path: /pulp/api/v2/content/sources/action/refresh/
Permission: update
Query Parameters: None
Response Codes:
  • 202 - on success
Return: a Call Report

Sample 202 Response Body:

[
  {
    "spawned_tasks": [
      {
        "_href": "/pulp/api/v2/tasks/1d893293-5849-47d8-830d-f6f888d347e6/",
        "task_id": "1d893293-5849-47d8-830d-f6f888d347e6"
      }
    ],
    "result": null,
    "error": null
  }
]

Refresh Single Source

Get all content sources.

Method: POST
Path: /pulp/api/v2/content/sources/<source-id>/action/refresh/
Permission: update
Query Parameters: None
Response Codes:
  • 202 - on success
Return: a Call Report

Sample 202 Response Body:

[
  {
    "spawned_tasks": [
      {
        "_href": "/pulp/api/v2/tasks/7066c9f0-8606-4842-893a-297d435fe11a/",
        "task_id": "7066c9f0-8606-4842-893a-297d435fe11a"
      }
    ],
    "result": null,
    "error": null
  }
]