GET /katello/api/products
List products

GET /katello/api/subscriptions/:subscription_id/products
List of subscription products in a subscription

GET /katello/api/organizations/:organization_id/products
List of products in an organization

GET /katello/api/sync_plans/:sync_plan_id/products
List of Products for sync plan

GET /katello/api/organizations/:organization_id/sync_plans/:sync_plan_id/products
List of Products for sync plan

Examples

GET /katello/api/organizations/114267492/products
200
{
  "total": 10,
  "subtotal": 10,
  "selectable": 10,
  "page": 1,
  "per_page": 20,
  "error": null,
  "search": null,
  "sort": {
    "by": "name",
    "order": "asc"
  },
  "results": [
    {
      "id": 867224909,
      "cp_id": "123123123000",
      "name": "Debian",
      "label": "debian_label",
      "description": "The universal operating system",
      "provider_id": 36826545,
      "sync_plan_id": null,
      "sync_summary": {},
      "gpg_key_id": null,
      "ssl_ca_cert_id": null,
      "ssl_client_cert_id": null,
      "ssl_client_key_id": null,
      "sync_state": null,
      "last_sync": null,
      "last_sync_words": null,
      "organization_id": 114267492,
      "organization": {
        "name": "Empty Organization",
        "label": "Empty_Organization",
        "id": 114267492
      },
      "sync_plan": null,
      "repository_count": 5
    },
    {
      "id": 905280015,
      "cp_id": "123123123004",
      "name": "Empty Product",
      "label": "empty_product",
      "description": null,
      "provider_id": 36826545,
      "sync_plan_id": null,
      "sync_summary": {},
      "gpg_key_id": null,
      "ssl_ca_cert_id": null,
      "ssl_client_cert_id": null,
      "ssl_client_key_id": null,
      "sync_state": null,
      "last_sync": null,
      "last_sync_words": null,
      "organization_id": 114267492,
      "organization": {
        "name": "Empty Organization",
        "label": "Empty_Organization",
        "id": 114267492
      },
      "sync_plan": null,
      "repository_count": 0
    },
    {
      "id": 56996862,
      "cp_id": "123123123005",
      "name": "Empty Product_2",
      "label": "empty_product_2",
      "description": null,
      "provider_id": 36826545,
      "sync_plan_id": null,
      "sync_summary": {},
      "gpg_key_id": null,
      "ssl_ca_cert_id": null,
      "ssl_client_cert_id": null,
      "ssl_client_key_id": null,
      "sync_state": null,
      "last_sync": null,
      "last_sync_words": null,
      "organization_id": 114267492,
      "organization": {
        "name": "Empty Organization",
        "label": "Empty_Organization",
        "id": 114267492
      },
      "sync_plan": null,
      "repository_count": 0
    },
    {
      "id": 601244438,
      "cp_id": "redhat_empty",
      "name": "Empty Red Hat Linux",
      "label": "redhat_empty_label",
      "description": "A more Enterprisy but empty fedora",
      "provider_id": 1073012828,
      "sync_plan_id": null,
      "sync_summary": {},
      "gpg_key_id": null,
      "ssl_ca_cert_id": null,
      "ssl_client_cert_id": null,
      "ssl_client_key_id": null,
      "sync_state": null,
      "last_sync": null,
      "last_sync_words": null,
      "organization_id": 114267492,
      "organization": {
        "name": "Empty Organization",
        "label": "Empty_Organization",
        "id": 114267492
      },
      "sync_plan": null,
      "repository_count": 0
    },
    {
      "id": 785257261,
      "cp_id": "123123123001",
      "name": "Fedora",
      "label": "fedora_label",
      "description": "An open source Linux distribution.",
      "provider_id": 36826545,
      "sync_plan_id": null,
      "sync_summary": {},
      "gpg_key_id": null,
      "ssl_ca_cert_id": null,
      "ssl_client_cert_id": null,
      "ssl_client_key_id": null,
      "sync_state": null,
      "last_sync": null,
      "last_sync_words": null,
      "organization_id": 114267492,
      "organization": {
        "name": "Empty Organization",
        "label": "Empty_Organization",
        "id": 114267492
      },
      "sync_plan": null,
      "repository_count": 13
    },
    {
      "id": 921304035,
      "cp_id": "123123123006",
      "name": "Oracle",
      "label": "oracle_label",
      "description": "An open source Linux distribution.",
      "provider_id": 36826545,
      "sync_plan_id": null,
      "sync_summary": {},
      "gpg_key_id": null,
      "ssl_ca_cert_id": null,
      "ssl_client_cert_id": null,
      "ssl_client_key_id": null,
      "sync_state": null,
      "last_sync": null,
      "last_sync_words": null,
      "organization_id": 114267492,
      "organization": {
        "name": "Empty Organization",
        "label": "Empty_Organization",
        "id": 114267492
      },
      "sync_plan": null,
      "repository_count": 1
    },
    {
      "id": 785658510,
      "cp_id": "123123123003",
      "name": "OSTree Product",
      "label": "ostree_product",
      "description": "A product for ostree content",
      "provider_id": 36826545,
      "sync_plan_id": null,
      "sync_summary": {},
      "gpg_key_id": null,
      "ssl_ca_cert_id": null,
      "ssl_client_cert_id": null,
      "ssl_client_key_id": null,
      "sync_state": null,
      "last_sync": null,
      "last_sync_words": null,
      "organization_id": 114267492,
      "organization": {
        "name": "Empty Organization",
        "label": "Empty_Organization",
        "id": 114267492
      },
      "sync_plan": null,
      "repository_count": 0
    },
    {
      "id": 903632572,
      "cp_id": null,
      "name": "product_host_count",
      "label": "product_host_count_label",
      "description": "A dummy product for pool tests",
      "provider_id": 36826545,
      "sync_plan_id": null,
      "sync_summary": {},
      "gpg_key_id": null,
      "ssl_ca_cert_id": null,
      "ssl_client_cert_id": null,
      "ssl_client_key_id": null,
      "sync_state": null,
      "last_sync": null,
      "last_sync_words": null,
      "organization_id": 114267492,
      "organization": {
        "name": "Empty Organization",
        "label": "Empty_Organization",
        "id": 114267492
      },
      "sync_plan": null,
      "repository_count": 2
    },
    {
      "id": 516337990,
      "cp_id": "123123123002",
      "name": "Puppet Product",
      "label": "puppet_product",
      "description": "A product for puppet content",
      "provider_id": 36826545,
      "sync_plan_id": null,
      "sync_summary": {},
      "gpg_key_id": null,
      "ssl_ca_cert_id": null,
      "ssl_client_cert_id": null,
      "ssl_client_key_id": null,
      "sync_state": null,
      "last_sync": null,
      "last_sync_words": null,
      "organization_id": 114267492,
      "organization": {
        "name": "Empty Organization",
        "label": "Empty_Organization",
        "id": 114267492
      },
      "sync_plan": null,
      "repository_count": 4
    },
    {
      "id": 1073012828,
      "cp_id": "redhat",
      "name": "Red Hat Linux",
      "label": "redhat_label",
      "description": "A more Enterprisy fedora",
      "provider_id": 1073012828,
      "sync_plan_id": null,
      "sync_summary": {},
      "gpg_key_id": null,
      "ssl_ca_cert_id": null,
      "ssl_client_cert_id": null,
      "ssl_client_key_id": null,
      "sync_state": null,
      "last_sync": null,
      "last_sync_words": null,
      "organization_id": 114267492,
      "organization": {
        "name": "Empty Organization",
        "label": "Empty_Organization",
        "id": 114267492
      },
      "sync_plan": null,
      "repository_count": 3
    }
  ]
}

Params

Param name Description
organization_id
required

Filter products by organization

Validations:

  • Must be a number.

subscription_id
optional

Filter products by subscription

Validations:

  • Must be a number.

name
optional

Filter products by name

Validations:

  • String

enabled
optional

Return enabled products only

Validations:

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

custom
optional

Return custom products only

Validations:

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

redhat_only
optional

Return Red Hat (non-custom) products only

Validations:

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

include_available_content
optional

Whether to include available content attribute in results

Validations:

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

sync_plan_id
optional

Filter products by sync plan id

Validations:

  • Must be a number.

available_for
optional

Interpret specified object to return only Products that can be associated with specified object. Only ‘sync_plan’ is supported.

Validations:

  • String

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
description text
label string
name string
organization_id integer
redhat true, false

POST /katello/api/products
Create a product

Examples

POST /katello/api/products
{
  "product": {}
}
400
{
  "message": "Missing values for product.",
  "errors": [
    "param is missing or the value is empty: product"
  ]
}

Params

Param name Description
organization_id
required

ID of the organization

Validations:

  • Must be a number.

description
optional

Product description

Validations:

  • String

gpg_key_id
optional , nil allowed

Identifier of the GPG key

Validations:

  • Must be a number.

ssl_ca_cert_id
optional , nil allowed

Idenifier of the SSL CA Cert

Validations:

  • Must be a number.

ssl_client_cert_id
optional , nil allowed

Identifier of the SSL Client Cert

Validations:

  • Must be a number.

ssl_client_key_id
optional , nil allowed

Identifier of the SSL Client Key

Validations:

  • Must be a number.

sync_plan_id
optional , nil allowed

Plan numeric identifier

Validations:

  • Must be a number.

name
required

Product name

Validations:

  • String

label
optional

Validations:

  • String


GET /katello/api/products/:id
Show a product

Examples

GET /katello/api/products/785257261
204

Params

Param name Description
organization_id
optional

Organization ID

Validations:

  • Must be a number.

id
required

product numeric identifier

Validations:

  • Must be a number.


PUT /katello/api/products/:id
Updates a product

Examples

PUT /katello/api/products/785257261
{
  "product": {
    "name": "New Name"
  }
}
204

Params

Param name Description
id
required

product numeric identifier

Validations:

  • Must be a number.

description
optional

Product description

Validations:

  • String

gpg_key_id
optional , nil allowed

Identifier of the GPG key

Validations:

  • Must be a number.

ssl_ca_cert_id
optional , nil allowed

Idenifier of the SSL CA Cert

Validations:

  • Must be a number.

ssl_client_cert_id
optional , nil allowed

Identifier of the SSL Client Cert

Validations:

  • Must be a number.

ssl_client_key_id
optional , nil allowed

Identifier of the SSL Client Key

Validations:

  • Must be a number.

sync_plan_id
optional , nil allowed

Plan numeric identifier

Validations:

  • Must be a number.

name
optional

Product name

Validations:

  • String


DELETE /katello/api/products/:id
Destroy a product

Examples

DELETE /katello/api/products/785257261
{
  "product": {}
}
204

Params

Param name Description
id
optional

product numeric identifier

Validations:

  • Must be a number.


POST /katello/api/products/:id/sync
Sync all repositories for a product

Examples

POST /katello/api/products/785257261/sync
{
  "product": {}
}
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,
  "duration": null,
  "available_actions": {
    "cancellable": null,
    "resumable": null
  }
}

Params

Param name Description
id
required

product ID

Validations:

  • Must be a number.