Skip to content
Start here

Create a job

r2.super_slurper.jobs.create(JobCreateParams**kwargs) -> JobCreateResponse
POST/accounts/{account_id}/slurper/jobs

Creates a new R2 Super Slurper migration job to transfer objects from a source bucket (e.g. S3, GCS, R2) to R2.

Security
API Token

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example:Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY
API Email + API Key

The previous authorization scheme for interacting with the Cloudflare API, used in conjunction with a Global API key.

Example:X-Auth-Email: user@example.com

The previous authorization scheme for interacting with the Cloudflare API. When possible, use API tokens instead of Global API keys.

Example:X-Auth-Key: 144c9defac04969c7bfad8efaa8ea194
ParametersExpand Collapse
account_id: str
overwrite: Optional[bool]
source: Optional[Source]
One of the following:
class SourceR2SlurperS3SourceSchema:
bucket: str
secret: SourceR2SlurperS3SourceSchemaSecret
access_key_id: str
secret_access_key: str
vendor: Literal["s3"]
endpoint: Optional[str]
keys: Optional[SequenceNotStr[str]]
path_prefix: Optional[str]
region: Optional[str]
class SourceR2SlurperGcsSourceSchema:
bucket: str
secret: SourceR2SlurperGcsSourceSchemaSecret
client_email: str
private_key: str
vendor: Literal["gcs"]
keys: Optional[SequenceNotStr[str]]
path_prefix: Optional[str]
class SourceR2SlurperR2SourceSchema:
bucket: str
secret: SourceR2SlurperR2SourceSchemaSecret
access_key_id: str
secret_access_key: str
vendor: Provider
jurisdiction: Optional[Literal["default", "eu", "fedramp"]]
One of the following:
"default"
"eu"
"fedramp"
keys: Optional[SequenceNotStr[str]]
path_prefix: Optional[str]
target: Optional[Target]
bucket: str
secret: TargetSecret
access_key_id: str
secret_access_key: str
vendor: Provider
jurisdiction: Optional[Literal["default", "eu", "fedramp"]]
One of the following:
"default"
"eu"
"fedramp"
ReturnsExpand Collapse
class JobCreateResponse:
id: Optional[str]

Create a job

import os
from cloudflare import Cloudflare

client = Cloudflare(
    api_token=os.environ.get("CLOUDFLARE_API_TOKEN"),  # This is the default and can be omitted
)
job = client.r2.super_slurper.jobs.create(
    account_id="account_id",
)
print(job.id)
{
  "errors": [
    {
      "code": 7003,
      "message": "No route for the URI",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    "string"
  ],
  "result": {
    "id": "id"
  },
  "success": true
}
Returns Examples
{
  "errors": [
    {
      "code": 7003,
      "message": "No route for the URI",
      "documentation_url": "documentation_url",
      "source": {
        "pointer": "pointer"
      }
    }
  ],
  "messages": [
    "string"
  ],
  "result": {
    "id": "id"
  },
  "success": true
}