GET /katello/api/alternate_content_sources
List alternate content sources.

Examples

GET /katello/api/alternate_content_sources
200
{
  "total": 4,
  "subtotal": 4,
  "selectable": 4,
  "page": 1,
  "per_page": 20,
  "error": null,
  "search": null,
  "sort": {
    "by": "name",
    "order": "asc"
  },
  "results": [
    {
      "name": "File ACS",
      "alternate_content_source_type": "custom",
      "content_type": "file",
      "base_url": "https://fixtures.pulpproject.org/",
      "subpaths": [],
      "upstream_username": "admin",
      "smart_proxies": [],
      "verify_ssl": true,
      "use_http_proxies": null,
      "id": 175019167,
      "label": "file_acs_fixture",
      "description": null,
      "ssl_ca_cert": {
        "id": 70104267,
        "name": "Fedora CA"
      },
      "ssl_client_cert": {
        "id": 60750479,
        "name": "Fedora Cert"
      },
      "ssl_client_key": {
        "id": 81778079,
        "name": "Fedora Key"
      },
      "last_refresh": null
    },
    {
      "name": "File Simplified ACS",
      "alternate_content_source_type": "simplified",
      "content_type": "file",
      "products": [],
      "smart_proxies": [],
      "use_http_proxies": null,
      "id": 364480250,
      "label": "file_simplified_acs_fixture",
      "description": null,
      "last_refresh": null
    },
    {
      "name": "Yum ACS",
      "alternate_content_source_type": "custom",
      "content_type": "yum",
      "base_url": "https://fixtures.pulpproject.org/",
      "subpaths": [
        "content/",
        "isos/",
        "packages/"
      ],
      "upstream_username": "admin",
      "smart_proxies": [],
      "verify_ssl": true,
      "use_http_proxies": null,
      "id": 209079975,
      "label": "yum_acs_fixture",
      "description": null,
      "ssl_ca_cert": {
        "id": 70104267,
        "name": "Fedora CA"
      },
      "ssl_client_cert": {
        "id": 60750479,
        "name": "Fedora Cert"
      },
      "ssl_client_key": {
        "id": 81778079,
        "name": "Fedora Key"
      },
      "last_refresh": null
    },
    {
      "name": "Yum Simplified ACS",
      "alternate_content_source_type": "simplified",
      "content_type": "yum",
      "products": [],
      "smart_proxies": [],
      "use_http_proxies": null,
      "id": 508877521,
      "label": "yum_simplified_acs_fixture",
      "description": null,
      "last_refresh": null
    }
  ]
}

Params

Param name Description
search
optional

Search string

Validations:

  • String

page
optional

Page number, starting at 1

Validations:

  • Must be a number.

per_page
optional

Number of results per page to return

Validations:

  • Must be a number.

order
optional

Sort field and order, eg. 'id DESC'

Validations:

  • String

full_result
optional

Whether or not to show all results

Validations:

  • Must be one of: true, false, 1, 0.

sort_by
optional

Field to sort the results on

Validations:

  • String

sort_order
optional

How to order the sorted results (e.g. ASC for ascending)

Validations:

  • String

Search fields

Field name Type Possible values
alternate_content_source_type string
base_url string
content_type string
description text
label string
name string
product_id integer
product_name string
smart_proxy_id integer
smart_proxy_name string
subpath string
upstream_username string

GET /katello/api/alternate_content_sources/:id
Show an alternate content source.

Examples

GET /katello/api/alternate_content_sources/209079975
200
{
  "name": "Yum ACS",
  "alternate_content_source_type": "custom",
  "content_type": "yum",
  "base_url": "https://fixtures.pulpproject.org/",
  "subpaths": [
    "content/",
    "isos/",
    "packages/"
  ],
  "upstream_username": "admin",
  "smart_proxies": [],
  "verify_ssl": true,
  "use_http_proxies": null,
  "id": 209079975,
  "label": "yum_acs_fixture",
  "description": null,
  "ssl_ca_cert": {
    "id": 70104267,
    "name": "Fedora CA"
  },
  "ssl_client_cert": {
    "id": 60750479,
    "name": "Fedora Cert"
  },
  "ssl_client_key": {
    "id": 81778079,
    "name": "Fedora Key"
  },
  "last_refresh": null,
  "upstream_password_exists": true
}

Params

Param name Description
id
required

Alternate content source ID

Validations:

  • Must be a number.


POST /katello/api/alternate_content_sources
Create an alternate content source to download content from during repository syncing. Note: alternate content sources are global and affect ALL sync actions on their smart proxies regardless of organization.

Examples

POST /katello/api/alternate_content_sources
{
  "name": "Yum ACS",
  "smart_proxy_ids": [
    767380118
  ],
  "http_proxy_id": 1022235461,
  "ssl_ca_cert_id": 70104267,
  "ssl_client_cert_id": 60750479,
  "ssl_client_key_id": 81778079,
  "content_type": "yum",
  "base_url": "https://fixtures.pulpproject.org/",
  "subpaths": [
    "content/",
    "isos/",
    "packages/"
  ],
  "alternate_content_source_type": "custom",
  "verify_ssl": true,
  "use_http_proxies": null,
  "upstream_username": "admin",
  "upstream_password": "changeme",
  "alternate_content_source": {
    "name": "Yum ACS",
    "ssl_ca_cert_id": 70104267,
    "ssl_client_cert_id": 60750479,
    "ssl_client_key_id": 81778079,
    "base_url": "https://fixtures.pulpproject.org/",
    "subpaths": [
      "content/",
      "isos/",
      "packages/"
    ],
    "content_type": "yum",
    "alternate_content_source_type": "custom",
    "verify_ssl": true,
    "upstream_username": "admin",
    "upstream_password": "changeme",
    "use_http_proxies": null,
    "smart_proxy_ids": [
      767380118
    ]
  }
}
201
{
  "name": "Yum ACS",
  "alternate_content_source_type": "custom",
  "content_type": "yum",
  "base_url": "https://fixtures.pulpproject.org/",
  "subpaths": [
    "content/",
    "isos/",
    "packages/"
  ],
  "upstream_username": "admin",
  "smart_proxies": [],
  "verify_ssl": true,
  "use_http_proxies": null,
  "id": null,
  "label": null,
  "description": null,
  "ssl_ca_cert": {
    "id": 70104267,
    "name": "Fedora CA"
  },
  "ssl_client_cert": {
    "id": 60750479,
    "name": "Fedora Cert"
  },
  "ssl_client_key": {
    "id": 81778079,
    "name": "Fedora Key"
  },
  "last_refresh": null,
  "upstream_password_exists": true
}

Params

Param name Description
content_type
optional

The content type for the Alternate Content Source

Validations:

  • Must be one of: file, yum.

alternate_content_source_type
optional

The Alternate Content Source type

Validations:

  • Must be one of: custom, simplified, rhui.

name
optional

Name of the alternate content source

Validations:

  • String

description
optional

Description for the alternate content source

Validations:

  • String

base_url
optional

Base URL for finding alternate content

Validations:

  • String

subpaths
optional

Path suffixes for finding alternate content

Validations:

  • Must be an array of any type

smart_proxy_ids
optional

Ids of smart proxies to associate

Validations:

  • Must be an array of any type

smart_proxy_names
optional

Names of smart proxies to associate

Validations:

  • Must be an array of any type

upstream_username
optional

Basic authentication username

Validations:

  • String

upstream_password
optional

Basic authentication password

Validations:

  • String

ssl_ca_cert_id
optional

Identifier of the content credential containing the SSL CA Cert

Validations:

  • Must be a number.

ssl_client_cert_id
optional

Identifier of the content credential containing the SSL Client Cert

Validations:

  • Must be a number.

ssl_client_key_id
optional

Identifier of the content credential containing the SSL Client Key

Validations:

  • Must be a number.

verify_ssl
optional

If SSL should be verified for the upstream URL

Validations:

  • Must be one of: true, false, 1, 0.

use_http_proxies
optional

If the smart proxies' assigned HTTP proxies should be used

Validations:

  • Must be one of: true, false, 1, 0.

product_ids
optional

IDs of products to copy repository information from into a Simplified Alternate Content Source. Products must include at least one repository of the chosen content type.

Validations:

  • Must be an array of any type


PUT /katello/api/alternate_content_sources/:id
Update an alternate content source.

Examples

PUT /katello/api/alternate_content_sources/209079975
{
  "name": "Yum ACS",
  "smart_proxy_ids": [
    767380118
  ],
  "http_proxy_id": 1022235465,
  "ssl_ca_cert_id": 70104267,
  "ssl_client_cert_id": 60750479,
  "ssl_client_key_id": 81778079,
  "content_type": "yum",
  "base_url": "https://fixtures.pulpproject.org/",
  "subpaths": [
    "not a path",
    "/not a path"
  ],
  "alternate_content_source_type": "custom",
  "verify_ssl": true,
  "upstream_username": "admin",
  "upstream_password": "changeme",
  "alternate_content_source": {
    "name": "Yum ACS",
    "ssl_ca_cert_id": 70104267,
    "ssl_client_cert_id": 60750479,
    "ssl_client_key_id": 81778079,
    "base_url": "https://fixtures.pulpproject.org/",
    "subpaths": [
      "not a path",
      "/not a path"
    ],
    "content_type": "yum",
    "alternate_content_source_type": "custom",
    "verify_ssl": true,
    "upstream_username": "admin",
    "upstream_password": "changeme",
    "smart_proxy_ids": [
      767380118
    ]
  }
}
422
{
  "displayMessage": "Validation failed: Subpaths All subpaths must have a slash at the end and none at the front",
  "errors": {
    "subpaths": [
      "All subpaths must have a slash at the end and none at the front"
    ]
  }
}

Params

Param name Description
name
optional

Name of the alternate content source

Validations:

  • String

description
optional

Description for the alternate content source

Validations:

  • String

base_url
optional

Base URL for finding alternate content

Validations:

  • String

subpaths
optional

Path suffixes for finding alternate content

Validations:

  • Must be an array of any type

smart_proxy_ids
optional

Ids of smart proxies to associate

Validations:

  • Must be an array of any type

smart_proxy_names
optional

Names of smart proxies to associate

Validations:

  • Must be an array of any type

upstream_username
optional

Basic authentication username

Validations:

  • String

upstream_password
optional

Basic authentication password

Validations:

  • String

ssl_ca_cert_id
optional

Identifier of the content credential containing the SSL CA Cert

Validations:

  • Must be a number.

ssl_client_cert_id
optional

Identifier of the content credential containing the SSL Client Cert

Validations:

  • Must be a number.

ssl_client_key_id
optional

Identifier of the content credential containing the SSL Client Key

Validations:

  • Must be a number.

verify_ssl
optional

If SSL should be verified for the upstream URL

Validations:

  • Must be one of: true, false, 1, 0.

use_http_proxies
optional

If the smart proxies' assigned HTTP proxies should be used

Validations:

  • Must be one of: true, false, 1, 0.

product_ids
optional

IDs of products to copy repository information from into a Simplified Alternate Content Source. Products must include at least one repository of the chosen content type.

Validations:

  • Must be an array of any type

id
required

Alternate content source ID

Validations:

  • Must be a number.


DELETE /katello/api/alternate_content_sources/:id
Destroy an alternate content source.

Examples

DELETE /katello/api/alternate_content_sources/209079975
{
  "alternate_content_source": {}
}
200
{}

Params

Param name Description
id
required

Alternate content source ID

Validations:

  • Must be a number.


POST /katello/api/alternate_content_sources/:id/refresh
Refresh an alternate content source. Refreshing, like repository syncing, is required before using an alternate content source.

Examples

POST /katello/api/alternate_content_sources/209079975/refresh
{
  "alternate_content_source": {}
}
202
{
  "id": null,
  "label": null,
  "pending": null,
  "username": null,
  "started_at": null,
  "ended_at": null,
  "state": null,
  "result": null,
  "progress": null,
  "input": null,
  "output": {},
  "humanized": null,
  "cli_example": null,
  "available_actions": {
    "cancellable": null,
    "resumable": null
  }
}

Params

Param name Description
id
required

Alternate content source ID

Validations:

  • Must be a number.