GET /katello/api/sync_plans
List sync plans

GET /katello/api/organizations/:organization_id/sync_plans

Examples

GET /katello/api/organizations/114267492/sync_plans
204

Params

Param name Description
organization_id
required

Organization ID

Validations:

  • Must be a number.

name
optional

filter by name

Validations:

  • String

sync_date
optional

filter by sync date

Validations:

  • String

interval
optional

filter by interval

Validations:

  • Must be one of: hourly, daily, weekly, custom cron.

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
enabled true, false
interval string
name string
organization_id integer

GET /katello/api/organizations/:organization_id/sync_plans/:id
Show a sync plan

GET /katello/api/sync_plans/:id
Show a sync plan

Examples

GET /katello/api/sync_plans/712395790
200
{
  "id": 712395790,
  "organization_id": 114267492,
  "name": "Sync Plan Hourly",
  "description": "An hourly sync plan",
  "interval": "hourly",
  "next_sync": "2026-11-12 11:46:00 UTC",
  "sync_date": "2014-01-09 17:46:00 +0000",
  "created_at": "2014-01-09 17:46:00 UTC",
  "updated_at": "2026-11-12 11:08:57 UTC",
  "enabled": true,
  "foreman_tasks_recurring_logic_id": 10,
  "cron_expression": null,
  "products": [],
  "permissions": {
    "view_sync_plans": true,
    "edit_sync_plans": true,
    "destroy_sync_plans": true
  }
}

Params

Param name Description
organization_id
optional

Organization ID

Validations:

  • Must be a number.

id
required

sync plan numeric identifier

Validations:

  • Must be a number.


POST /katello/api/organizations/:organization_id/sync_plans
Create a sync plan

Examples

POST /katello/api/organizations/114267492/sync_plans
{
  "sync_plan": {
    "name": "Hourly Sync Plan",
    "sync_date": "2014-01-09 17:46:00",
    "interval": "hourly"
  }
}
204

Params

Param name Description
organization_id
required

Organization ID

Validations:

  • Must be a number.

name
required

sync plan name

Validations:

  • String

interval
required

how often synchronization should run

Validations:

  • Must be one of: hourly, daily, weekly, custom cron.

sync_date
required

start datetime of synchronization

Validations:

  • String

description
optional

sync plan description

Validations:

  • String

enabled
required

enables or disables synchronization

Validations:

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

cron_expression
optional

Add custom cron logic for sync plan

Validations:

  • String


PUT /katello/api/organizations/:organization_id/sync_plans/:id
Update a sync plan

PUT /katello/api/sync_plans/:id
Update a sync plan

Examples

PUT /katello/api/organizations/114267492/sync_plans/712395790
{
  "sync_plan": {
    "interval": "weekly"
  }
}
200
{
  "id": 712395790,
  "organization_id": 114267492,
  "name": "Sync Plan Hourly",
  "description": "An hourly sync plan",
  "interval": "weekly",
  "next_sync": "2026-11-12 17:46:00 UTC",
  "sync_date": "2014-01-09 17:46:00 +0000",
  "created_at": "2014-01-09 17:46:00 UTC",
  "updated_at": "2026-11-12 11:08:57 UTC",
  "enabled": true,
  "foreman_tasks_recurring_logic_id": 8,
  "cron_expression": null,
  "products": [],
  "permissions": {
    "view_sync_plans": true,
    "edit_sync_plans": true,
    "destroy_sync_plans": true
  }
}

Params

Param name Description
organization_id
optional

Organization ID

Validations:

  • Must be a number.

id
required

sync plan numeric identifier

Validations:

  • Must be a number.

name
optional

sync plan name

Validations:

  • String

interval
optional

how often synchronization should run

Validations:

  • Must be one of: hourly, daily, weekly, custom cron.

sync_date
optional

start datetime of synchronization

Validations:

  • String

description
optional

sync plan description

Validations:

  • String

enabled
optional

enables or disables synchronization

Validations:

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

cron_expression
optional

Add custom cron logic for sync plan

Validations:

  • String


DELETE /katello/api/organizations/:organization_id/sync_plans/:id
Destroy a sync plan

DELETE /katello/api/sync_plans/:id
Destroy a sync plan

Examples

DELETE /katello/api/organizations/114267492/sync_plans/712395790
{
  "sync_plan": {}
}
204

Params

Param name Description
organization_id
optional

Organization ID

Validations:

  • Must be a number.

id
optional

sync plan numeric identifier

Validations:

  • Must be a number.


PUT /katello/api/organizations/:organization_id/sync_plans/:id/add_products
Add products to sync plan

Examples

PUT /katello/api/organizations/114267492/sync_plans/712395790/add_products
{
  "product_ids": [
    "785257261",
    "1073012828"
  ],
  "sync_plan": {}
}
200
{
  "id": 712395790,
  "organization_id": 114267492,
  "name": "Sync Plan Hourly",
  "description": "An hourly sync plan",
  "interval": "hourly",
  "next_sync": "2026-11-12 11:46:00 UTC",
  "sync_date": "2014-01-09 17:46:00 +0000",
  "created_at": "2014-01-09 17:46:00 UTC",
  "updated_at": "2026-11-12 11:09:01 UTC",
  "enabled": true,
  "foreman_tasks_recurring_logic_id": 41,
  "cron_expression": null,
  "products": [
    {
      "id": 785257261,
      "cp_id": "123123123001",
      "name": "Fedora",
      "label": "fedora_label",
      "description": "An open source Linux distribution.",
      "sync_state": null,
      "last_sync": null,
      "last_sync_words": null,
      "repository_count": 25
    },
    {
      "id": 1073012828,
      "cp_id": "redhat",
      "name": "Red Hat Linux",
      "label": "redhat_label",
      "description": "A more Enterprisy fedora",
      "sync_state": null,
      "last_sync": null,
      "last_sync_words": null,
      "repository_count": 9
    }
  ],
  "permissions": {
    "view_sync_plans": true,
    "edit_sync_plans": true,
    "destroy_sync_plans": true
  }
}

Params

Param name Description
organization_id
required

Organization ID

Validations:

  • Must be a number.

id
required

ID of the sync plan

Validations:

  • String

product_ids
required

List of product ids to add to the sync plan

Validations:

  • Must be an array of any type


PUT /katello/api/organizations/:organization_id/sync_plans/:id/remove_products
Remove products from sync plan

Examples

PUT /katello/api/organizations/114267492/sync_plans/712395790/remove_products
{
  "product_ids": [
    785257261,
    1073012828,
    905280015
  ],
  "sync_plan": {}
}
204

Params

Param name Description
organization_id
required

Organization ID

Validations:

  • Must be a number.

id
required

ID of the sync plan

Validations:

  • String

product_ids
required

List of product ids to remove from the sync plan

Validations:

  • Must be an array of any type


PUT /katello/api/sync_plans/:id/sync
Initiate a sync of the products attached to the sync plan

PUT /katello/api/organizations/:organization_id/sync_plans/:id/sync
Initiate a sync of the products attached to the sync plan

Examples

PUT /katello/api/organizations/114267492/sync_plans/712395790/sync
{
  "sync_plan": {}
}
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

ID of the sync plan

Validations:

  • String