Subscriptions management.


GET /katello/api/organizations/:organization_id/subscriptions
List organization subscriptions

GET /katello/api/activation_keys/:activation_key_id/subscriptions
List an activation key's subscriptions

GET /katello/api/subscriptions
List subscriptions

Examples

GET /katello/api/organizations/114267492/subscriptions
200
{
  "organization": {
    "name": "organization"
  },
  "total": 3,
  "subtotal": 3,
  "selectable": 3,
  "page": 1,
  "per_page": 20,
  "error": null,
  "search": null,
  "sort": {
    "by": "name",
    "order": "asc"
  },
  "can_manage_subscription_allocations": true,
  "can_import_manifest": true,
  "can_delete_manifest": true,
  "can_edit_organizations": true,
  "results": [
    {
      "id": 128914721,
      "cp_id": "abc123",
      "subscription_id": 904941504,
      "name": "basic subscription",
      "start_date": "2011-10-11 04:00:00 UTC",
      "end_date": "2040-01-01 04:59:59 UTC",
      "available": 9,
      "quantity": 10,
      "consumed": 1,
      "account_number": 12400203,
      "contract_number": 123403949,
      "support_level": "all hands on deck",
      "product_id": null,
      "sockets": 2,
      "cores": 2,
      "ram": 2,
      "instance_multiplier": 1,
      "stacking_id": "stack8473",
      "multi_entitlement": true,
      "type": "normal",
      "product_name": "basic subscription",
      "unmapped_guest": false,
      "virt_only": false,
      "virt_who": true,
      "upstream": true,
      "upstream_pool_id": "100",
      "hypervisor": {
        "id": 980190962,
        "name": "host1.example.com"
      }
    },
    {
      "id": 786915709,
      "cp_id": "xyz1234",
      "subscription_id": 406942667,
      "name": "custom subscription",
      "start_date": "2011-10-11 04:00:00 UTC",
      "end_date": "2040-01-01 04:59:59 UTC",
      "available": 90,
      "quantity": 100,
      "consumed": 10,
      "account_number": 84390203,
      "contract_number": 38943940,
      "support_level": "all hands on deck",
      "product_id": null,
      "sockets": 3,
      "cores": 4,
      "ram": null,
      "instance_multiplier": null,
      "stacking_id": null,
      "multi_entitlement": false,
      "type": null,
      "product_name": "custom subscription",
      "unmapped_guest": false,
      "virt_only": false,
      "virt_who": false,
      "upstream": false,
      "upstream_pool_id": null
    },
    {
      "id": 738793911,
      "cp_id": "xyz123",
      "subscription_id": 655398011,
      "name": "other subscription",
      "start_date": "2011-10-11 04:00:00 UTC",
      "end_date": "2040-01-01 04:59:59 UTC",
      "available": 90,
      "quantity": 100,
      "consumed": 10,
      "account_number": 84390203,
      "contract_number": 38943940,
      "support_level": "all hands on deck",
      "product_id": null,
      "sockets": 3,
      "cores": 4,
      "ram": null,
      "instance_multiplier": null,
      "stacking_id": "stack8473",
      "multi_entitlement": false,
      "type": null,
      "product_name": "other subscription",
      "unmapped_guest": false,
      "virt_only": false,
      "virt_who": false,
      "upstream": true,
      "upstream_pool_id": "101"
    }
  ]
}

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

organization_id
required

Organization ID

Validations:

  • Must be a number.

host_id
optional

id of a host

Validations:

  • String

activation_key_id
optional

Activation key ID

Validations:

  • String

name
optional

name of the subscription

Validations:

  • String

available_for
optional

Object to show subscriptions available for, either 'host' or 'activation_key'

Validations:

  • String

match_host
optional

Ignore subscriptions that are unavailable to the specified host

Validations:

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

match_installed
optional

Return subscriptions that match installed products of the specified host

Validations:

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

no_overlap
optional

Return subscriptions which do not overlap with a currently-attached subscription

Validations:

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


GET /katello/api/organizations/:organization_id/subscriptions/:id
Show a subscription

GET /katello/api/subscriptions/:id
Show a subscription

Examples

GET /katello/api/organizations/114267492/subscriptions/128914721
200
{
  "arch": null,
  "description": null,
  "support_type": null,
  "roles": null,
  "usage": null,
  "addons": null,
  "id": 128914721,
  "cp_id": "abc123",
  "subscription_id": 904941504,
  "name": "basic subscription",
  "start_date": "2011-10-11 04:00:00 UTC",
  "end_date": "2040-01-01 04:59:59 UTC",
  "available": 9,
  "quantity": 10,
  "consumed": 1,
  "account_number": 12400203,
  "contract_number": 123403949,
  "support_level": "all hands on deck",
  "product_id": null,
  "sockets": 2,
  "cores": 2,
  "ram": 2,
  "instance_multiplier": 1,
  "stacking_id": "stack8473",
  "multi_entitlement": true,
  "type": "normal",
  "product_name": "basic subscription",
  "unmapped_guest": false,
  "virt_only": false,
  "virt_who": true,
  "upstream": true,
  "upstream_pool_id": "100",
  "hypervisor": {
    "id": 980190962,
    "name": "host1.example.com"
  },
  "host_count": 1,
  "provided_products": [
    {
      "id": 785257261,
      "name": "Fedora"
    },
    {
      "id": 1073012828,
      "name": "Red Hat Linux"
    }
  ],
  "activation_keys": [
    {
      "id": 713118017,
      "name": "DevKey",
      "release_version": null,
      "service_level": null,
      "environment": {
        "id": 292811013,
        "name": "Dev"
      },
      "content_view": {
        "id": null,
        "name": null
      }
    }
  ]
}

Params

Param name Description
organization_id
optional

Organization identifier

Validations:

  • Must be a number.

id
required

Subscription identifier

Validations:

  • Must be a number.


POST /katello/api/organizations/:organization_id/subscriptions/upload
Upload a subscription manifest

Examples

POST /katello/api/organizations/114267492/subscriptions/upload
Content-Type: multipart/form-data; boundary=APIPIE_RECORDER_EXAMPLE_BOUNDARY

--APIPIE_RECORDER_EXAMPLE_BOUNDARY
Content-Disposition: form-data; name="content"; filename="puppet_module.tar.gz"
Content-Length: 0
Content-Type: 
Content-Transfer-Encoding: binary

... contents of "content" ...
--APIPIE_RECORDER_EXAMPLE_BOUNDARY--
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
organization_id
required

Organization id

Validations:

  • Must be a number.

content
required

Subscription manifest file

Validations:

  • File


PUT /katello/api/organizations/:organization_id/subscriptions/refresh_manifest
Refresh previously imported manifest for Red Hat provider

Examples

PUT /katello/api/organizations/114267492/subscriptions/refresh_manifest
{
  "subscription": {}
}
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
organization_id
required

Organization id

Validations:

  • Must be a number.


POST /katello/api/organizations/:organization_id/subscriptions/delete_manifest
Delete manifest from Red Hat provider

Examples

POST /katello/api/organizations/114267492/subscriptions/delete_manifest
{
  "subscription": {}
}
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
organization_id
required

Organization id

Validations:

  • Must be a number.


GET /katello/api/organizations/:organization_id/subscriptions/manifest_history
obtain manifest history for subscriptions

Examples

GET /katello/api/organizations/114267492/subscriptions/manifest_history
204

Params

Param name Description
organization_id
required

Organization ID

Validations:

  • Must be a number.