Configure PTC routing for a package type

Configures PTC to route package manager traffic for the specified package type through a specific Artifactory remote repository. This call does three things: it tells PTC which Artifactory remote repository to use for each package type, creates the _package-reroute system user that handles redirected traffic, and (by default) auto-enrolls the repository in Curation. PTC does not work for a package type until this step completes for that type.

The repo_key is required and must reference an existing Artifactory remote repository (virtual repositories are not supported and will be rejected by the API in a future release; max 64 characters; must not be ".", "..", or "&"; must not contain / \ : | ? * " < >).

When linked_curation is true (the default), the target remote repository is auto-enrolled in Curation (curated=true) if not already enabled. This requires that Curation is enabled in Artifactory and that the package type is supported by Curation. Set linked_curation: false to skip Curation enrollment entirely.

Security: Requires admin role.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
enum
required

The registry/package type. One of npm, pypi, docker, huggingfaceml, gems, cargo.

Allowed:
Body Params
string
required

The Artifactory repository key to use for this registry type. Must reference an existing remote repository.

boolean
Defaults to true

Whether to auto-enroll the target remote repository in Curation (curated=true). Defaults to true. Set to false to skip Curation enrollment (suppresses 422 for unsupported package types).

Responses

400

Bad Request - Unsupported package type, repo_key is required, or the assigned repo should be an existing remote repo.

401

Bad Credentials - Authentication failed. A valid token is required.

403

Forbidden — package reroute is not available under the current license or entitlement.

422

Unprocessable Entity - Curation is not supported for package type. Only returned when linked_curation is true (the default).

Language
Credentials
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json