# Description

Content Credentials are used to store credentials like GPG Keys and Certificates for the authentication to Products / Repositories.


GET /katello/api/content_credentials
List Content Credentials

Examples

GET /katello/api/content_credentials
204

Params

Param name Description
organization_id
required

Organization identifier

Validations:

  • Must be a number.

name
optional

Name of the Content Credential

Validations:

  • String

content_type
optional

Type of content

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


POST /katello/api/content_credentials
Create a Content Credential

Examples

POST /katello/api/content_credentials
{
  "content": "asdf",
  "content_type": "gpg_key",
  "name": "foo",
  "organization_id": 114267492,
  "content_credential": {
    "name": "foo",
    "organization_id": 114267492,
    "content": "asdf",
    "content_type": "gpg_key"
  }
}
201
{
  "name": "foo",
  "content_type": "gpg_key",
  "content": "asdf",
  "id": 591165714,
  "organization_id": 114267492,
  "organization": {
    "name": "Empty Organization",
    "label": "Empty_Organization",
    "id": 114267492
  },
  "created_at": "2022-11-08 19:26:07 UTC",
  "updated_at": "2022-11-08 19:26:07 UTC",
  "gpg_key_products": [],
  "gpg_key_repos": [],
  "ssl_ca_alternate_content_sources": [],
  "ssl_client_alternate_content_sources": [],
  "ssl_client_key_alternate_content_sources": {},
  "ssl_ca_products": [],
  "ssl_ca_root_repos": [],
  "ssl_client_products": [],
  "ssl_client_root_repos": [],
  "ssl_key_products": [],
  "ssl_key_root_repos": [],
  "permissions": {
    "view_content_credenials": false,
    "edit_content_credenials": false,
    "destroy_content_credenials": false
  }
}

Params

Param name Description
organization_id
required

Organization identifier

Validations:

  • Must be a number.

name
required

Name of the Content Credential

Validations:

  • string from 2 to 128 characters containing only alphanumeric characters, space, '_', '-' with no leading or trailing space..

content_type
required

Type of content: “cert”, “gpg_key”

Validations:

  • String

content
required

Public key block in DER encoding or certificate content

Validations:

  • String


GET /katello/api/content_credentials/:id
Show a Content Credential

Examples

GET /katello/api/content_credentials/591165711
200
{
  "name": "Fedora GPG Key",
  "content_type": "gpg_key",
  "content": "ADF#FCSFASDF$@$@ZFDDSG$#%#%ADS",
  "id": 591165711,
  "organization_id": 114267492,
  "organization": {
    "name": "Empty Organization",
    "label": "Empty_Organization",
    "id": 114267492
  },
  "created_at": "2022-11-08 19:09:32 UTC",
  "updated_at": "2022-11-08 19:09:32 UTC",
  "gpg_key_products": [],
  "gpg_key_repos": [
    {
      "id": 184622981,
      "name": "Fedora 17 x86_64",
      "content_type": "yum",
      "product": {
        "id": 785257261,
        "cp_id": "fedora",
        "name": "Fedora"
      },
      "library_instance_id": 367202338
    },
    {
      "id": 945499925,
      "name": "Fedora 17 x86_64 duplicate",
      "content_type": "yum",
      "product": {
        "id": 785257261,
        "cp_id": "fedora",
        "name": "Fedora"
      },
      "library_instance_id": 792129035
    },
    {
      "id": 480815168,
      "name": "Feedless Fedora 17 x86_64",
      "content_type": "yum",
      "product": {
        "id": 785257261,
        "cp_id": "fedora",
        "name": "Fedora"
      },
      "library_instance_id": 643402541
    },
    {
      "id": 146294567,
      "name": "RHEL 7 x86_64",
      "content_type": "yum",
      "product": {
        "id": 1073012828,
        "cp_id": "redhat",
        "name": "Red Hat Linux"
      },
      "library_instance_id": 177000827
    },
    {
      "id": 355376805,
      "name": "RHEL 6 x86_64",
      "content_type": "yum",
      "product": {
        "id": 1073012828,
        "cp_id": "redhat",
        "name": "Red Hat Linux"
      },
      "library_instance_id": 103207400
    },
    {
      "id": 675266109,
      "name": "Fedora 17 no arch",
      "content_type": "yum",
      "product": {
        "id": 785257261,
        "cp_id": "fedora",
        "name": "Fedora"
      },
      "library_instance_id": 242028598
    },
    {
      "id": 956784787,
      "name": "RHEL 7 no_arch",
      "content_type": "yum",
      "product": {
        "id": 1073012828,
        "cp_id": "redhat",
        "name": "Red Hat Linux"
      },
      "library_instance_id": 721593910
    },
    {
      "id": 467542934,
      "name": "Fedora 17 x86_64 unpublished",
      "content_type": "yum",
      "product": {
        "id": 785257261,
        "cp_id": "fedora",
        "name": "Fedora"
      },
      "library_instance_id": 841753487
    },
    {
      "id": 279368446,
      "name": "Fedora 17 x86_64 2",
      "content_type": "yum",
      "product": {
        "id": 785257261,
        "cp_id": "fedora",
        "name": "Fedora"
      },
      "library_instance_id": 860533889
    },
    {
      "id": 218652542,
      "name": "redis",
      "content_type": "docker",
      "product": {
        "id": 516337990,
        "cp_id": "puppet",
        "name": "Puppet Product"
      },
      "library_instance_id": 992333848
    },
    {
      "id": 872803178,
      "name": "busybox",
      "content_type": "docker",
      "product": {
        "id": 516337990,
        "cp_id": "puppet",
        "name": "Puppet Product"
      },
      "library_instance_id": 84409059
    },
    {
      "id": 271980628,
      "name": "busybox",
      "content_type": "docker",
      "product": {
        "id": 516337990,
        "cp_id": "puppet",
        "name": "Puppet Product"
      },
      "library_instance_id": 224226076
    },
    {
      "id": 700973453,
      "name": "My Files",
      "content_type": "file",
      "product": {
        "id": 785257261,
        "cp_id": "fedora",
        "name": "Fedora"
      },
      "library_instance_id": 921033349
    },
    {
      "id": 839276226,
      "name": "Pulp3 File 1",
      "content_type": "file",
      "product": {
        "id": 785257261,
        "cp_id": "fedora",
        "name": "Fedora"
      },
      "library_instance_id": 752069227
    },
    {
      "id": 790240675,
      "name": "Pulp3 Ansible Collection 1",
      "content_type": "ansible_collection",
      "product": {
        "id": 785257261,
        "cp_id": "fedora",
        "name": "Fedora"
      },
      "library_instance_id": 269989997
    },
    {
      "id": 129517803,
      "name": "Pulp3 Python 1",
      "content_type": "python",
      "product": {
        "id": 785257261,
        "cp_id": "fedora",
        "name": "Fedora"
      },
      "library_instance_id": 16447009
    },
    {
      "id": 103830670,
      "name": "Pulp3 OSTree 1",
      "content_type": "ostree",
      "product": {
        "id": 785257261,
        "cp_id": "fedora",
        "name": "Fedora"
      },
      "library_instance_id": 145295987
    }
  ],
  "ssl_ca_alternate_content_sources": [],
  "ssl_client_alternate_content_sources": [],
  "ssl_client_key_alternate_content_sources": {},
  "ssl_ca_products": [],
  "ssl_ca_root_repos": [],
  "ssl_client_products": [],
  "ssl_client_root_repos": [],
  "ssl_key_products": [],
  "ssl_key_root_repos": [],
  "permissions": {
    "view_content_credenials": true,
    "edit_content_credenials": true,
    "destroy_content_credenials": true
  }
}

Params

Param name Description
id
required

Content Credential numeric identifier

Validations:

  • Must be a number.


PUT /katello/api/content_credentials/:id
Update a Content Credential

Examples

PUT /katello/api/content_credentials/591165711
{
  "name": "foo2",
  "content_credential": {
    "name": "foo2"
  }
}
200
{
  "name": "foo2",
  "content_type": "gpg_key",
  "content": "ADF#FCSFASDF$@$@ZFDDSG$#%#%ADS",
  "id": 591165711,
  "organization_id": 114267492,
  "organization": {
    "name": "Empty Organization",
    "label": "Empty_Organization",
    "id": 114267492
  },
  "created_at": "2022-11-08 19:09:32 UTC",
  "updated_at": "2022-11-08 19:26:05 UTC",
  "gpg_key_products": [],
  "gpg_key_repos": [
    {
      "id": 184622981,
      "name": "Fedora 17 x86_64",
      "content_type": "yum",
      "product": {
        "id": 785257261,
        "cp_id": "fedora",
        "name": "Fedora"
      },
      "library_instance_id": 367202338
    },
    {
      "id": 945499925,
      "name": "Fedora 17 x86_64 duplicate",
      "content_type": "yum",
      "product": {
        "id": 785257261,
        "cp_id": "fedora",
        "name": "Fedora"
      },
      "library_instance_id": 792129035
    },
    {
      "id": 480815168,
      "name": "Feedless Fedora 17 x86_64",
      "content_type": "yum",
      "product": {
        "id": 785257261,
        "cp_id": "fedora",
        "name": "Fedora"
      },
      "library_instance_id": 643402541
    },
    {
      "id": 146294567,
      "name": "RHEL 7 x86_64",
      "content_type": "yum",
      "product": {
        "id": 1073012828,
        "cp_id": "redhat",
        "name": "Red Hat Linux"
      },
      "library_instance_id": 177000827
    },
    {
      "id": 355376805,
      "name": "RHEL 6 x86_64",
      "content_type": "yum",
      "product": {
        "id": 1073012828,
        "cp_id": "redhat",
        "name": "Red Hat Linux"
      },
      "library_instance_id": 103207400
    },
    {
      "id": 675266109,
      "name": "Fedora 17 no arch",
      "content_type": "yum",
      "product": {
        "id": 785257261,
        "cp_id": "fedora",
        "name": "Fedora"
      },
      "library_instance_id": 242028598
    },
    {
      "id": 956784787,
      "name": "RHEL 7 no_arch",
      "content_type": "yum",
      "product": {
        "id": 1073012828,
        "cp_id": "redhat",
        "name": "Red Hat Linux"
      },
      "library_instance_id": 721593910
    },
    {
      "id": 467542934,
      "name": "Fedora 17 x86_64 unpublished",
      "content_type": "yum",
      "product": {
        "id": 785257261,
        "cp_id": "fedora",
        "name": "Fedora"
      },
      "library_instance_id": 841753487
    },
    {
      "id": 279368446,
      "name": "Fedora 17 x86_64 2",
      "content_type": "yum",
      "product": {
        "id": 785257261,
        "cp_id": "fedora",
        "name": "Fedora"
      },
      "library_instance_id": 860533889
    },
    {
      "id": 218652542,
      "name": "redis",
      "content_type": "docker",
      "product": {
        "id": 516337990,
        "cp_id": "puppet",
        "name": "Puppet Product"
      },
      "library_instance_id": 992333848
    },
    {
      "id": 872803178,
      "name": "busybox",
      "content_type": "docker",
      "product": {
        "id": 516337990,
        "cp_id": "puppet",
        "name": "Puppet Product"
      },
      "library_instance_id": 84409059
    },
    {
      "id": 271980628,
      "name": "busybox",
      "content_type": "docker",
      "product": {
        "id": 516337990,
        "cp_id": "puppet",
        "name": "Puppet Product"
      },
      "library_instance_id": 224226076
    },
    {
      "id": 700973453,
      "name": "My Files",
      "content_type": "file",
      "product": {
        "id": 785257261,
        "cp_id": "fedora",
        "name": "Fedora"
      },
      "library_instance_id": 921033349
    },
    {
      "id": 839276226,
      "name": "Pulp3 File 1",
      "content_type": "file",
      "product": {
        "id": 785257261,
        "cp_id": "fedora",
        "name": "Fedora"
      },
      "library_instance_id": 752069227
    },
    {
      "id": 790240675,
      "name": "Pulp3 Ansible Collection 1",
      "content_type": "ansible_collection",
      "product": {
        "id": 785257261,
        "cp_id": "fedora",
        "name": "Fedora"
      },
      "library_instance_id": 269989997
    },
    {
      "id": 129517803,
      "name": "Pulp3 Python 1",
      "content_type": "python",
      "product": {
        "id": 785257261,
        "cp_id": "fedora",
        "name": "Fedora"
      },
      "library_instance_id": 16447009
    },
    {
      "id": 103830670,
      "name": "Pulp3 OSTree 1",
      "content_type": "ostree",
      "product": {
        "id": 785257261,
        "cp_id": "fedora",
        "name": "Fedora"
      },
      "library_instance_id": 145295987
    }
  ],
  "ssl_ca_alternate_content_sources": [],
  "ssl_client_alternate_content_sources": [],
  "ssl_client_key_alternate_content_sources": {},
  "ssl_ca_products": [],
  "ssl_ca_root_repos": [],
  "ssl_client_products": [],
  "ssl_client_root_repos": [],
  "ssl_key_products": [],
  "ssl_key_root_repos": [],
  "permissions": {
    "view_content_credenials": false,
    "edit_content_credenials": true,
    "destroy_content_credenials": false
  }
}

Params

Param name Description
id
required

Content Credential ID

Validations:

  • Must be a number.

name
optional

Name of the Content Credential

Validations:

  • string from 2 to 128 characters containing only alphanumeric characters, space, '_', '-' with no leading or trailing space..

content_type
optional

Type of content: “cert”, “gpg_key”

Validations:

  • String

content
optional

Public key block in DER encoding or certificate content

Validations:

  • String


DELETE /katello/api/content_credentials/:id
Destroy a Content Credential

Params

Param name Description
id
required

Content Credential ID

Validations:

  • Must be a number.


GET /katello/api/content_credentials/:id/content
Return the content of a Content Credential, used directly by yum

Examples

GET /katello/api/content_credentials/591165711/content
200
ADF#FCSFASDF$@$@ZFDDSG$#%#%ADS

Params

Param name Description
id
required

Validations:

  • Must be a number.


POST /katello/api/content_credentials/:id/content
Upload Content Credential contents

Examples

POST /katello/api/content_credentials/591165711/content
{
  "content_type": "gpg_key",
  "content": "<FILE CONTENT 'abc12320221108-3739-z0of7j'>"
}
200
{
  "status": "success"
}

Params

Param name Description
id
required

Content Credential ID

Validations:

  • Must be a number.

content
required

File contents

Validations:

  • File