POST /katello/api/repositories/:repository_id/content_uploads
Create an upload request

Examples

POST /katello/api/repositories/367202338/content_uploads
{
  "size": 100,
  "checksum": "test_checksum",
  "content_type": null,
  "repository": {
    "id": 367202338,
    "pulp_id": "Fedora_17",
    "library_instance_id": null,
    "content_view_version_id": 840492357,
    "relative_path": "ACME_Corporation/library/fedora_17_label",
    "environment_id": 562075838,
    "saved_checksum_type": null,
    "distribution_version": "2.1",
    "distribution_arch": "x86_64",
    "distribution_bootable": true,
    "distribution_family": "Red Hat Enterprise Linux",
    "distribution_variant": "TestVariant",
    "container_repository_name": null,
    "root_id": 184622981,
    "remote_href": null,
    "publication_href": null,
    "version_href": null,
    "last_contents_changed": "1970-01-01T00:00:00.000Z",
    "last_applicability_regen": "1970-01-01T00:00:00.000Z",
    "last_indexed": "1970-01-01T00:00:00.000Z"
  },
  "content_upload": {
    "size": 100,
    "checksum": "test_checksum",
    "content_type": null,
    "repository": {
      "id": 367202338,
      "pulp_id": "Fedora_17",
      "library_instance_id": null,
      "content_view_version_id": 840492357,
      "relative_path": "ACME_Corporation/library/fedora_17_label",
      "environment_id": 562075838,
      "saved_checksum_type": null,
      "distribution_version": "2.1",
      "distribution_arch": "x86_64",
      "distribution_bootable": true,
      "distribution_family": "Red Hat Enterprise Linux",
      "distribution_variant": "TestVariant",
      "container_repository_name": null,
      "root_id": 184622981,
      "remote_href": null,
      "publication_href": null,
      "version_href": null,
      "last_contents_changed": "1970-01-01T00:00:00.000Z",
      "last_applicability_regen": "1970-01-01T00:00:00.000Z",
      "last_indexed": "1970-01-01T00:00:00.000Z"
    }
  }
}
200

Params

Param name Description
repository_id
required

repository id

Validations:

  • Must be a number.

size
required

Size of file to upload

Validations:

  • Must be a number.

checksum
optional

Checksum of file to upload

Validations:

  • String

content_type
optional

content type ('deb', 'docker_manifest', 'file', 'ostree_ref', 'rpm', 'srpm')

Validations:

  • Must be one of: deb, docker_manifest, file, ostree_ref, python_package, rpm, srpm.


PUT /katello/api/repositories/:repository_id/content_uploads/:id
Upload a chunk of the file's content

Examples

PUT /katello/api/repositories/367202338/content_uploads/1
{
  "offset": "0",
  "content": "/tmp/my_file.rpm",
  "content_upload": {
    "offset": "0",
    "content": "/tmp/my_file.rpm"
  }
}
204

Params

Param name Description
repository_id
required

Repository id

Validations:

  • Must be a number.

id
required

Upload request id

Validations:

  • String

size
required

Size of file to upload

Validations:

  • Must be a number.

offset
required

The offset in the file where the content starts

Validations:

  • Must be a number.

content
required

The actual file contents

Validations:

  • File


DELETE /katello/api/repositories/:repository_id/content_uploads/:id
Delete an upload request

Examples

DELETE /katello/api/repositories/367202338/content_uploads/1
{
  "content_upload": {}
}
204

Params

Param name Description
repository_id
required

Repository id

Validations:

  • Must be a number.

id
required

Upload request id

Validations:

  • String