Set upstream credentials

PUT
/v1/{namespace}/config/{firewall}/upstreams/{id}/credentials

Sets the credentials the firewall uses for the upstream. Credentials are write-only.

Authorization

headerAuthorizationBearer <token>

A personal or service access token, sent as Authorization: Bearer <token>. See access tokens.

Path Parameters

namespace*string

The namespace id.

firewall*string

The firewall id.

id*string

The upstream id.

Request Body

application/json
  1. body

Write-only. In responses every value that is set is replaced by a redaction placeholder.

password?string

Password for HTTP Basic authentication.

token?string

Access token, usually sent as a bearer token. Used instead of the username and password when both are set.

username?string

Username for HTTP Basic authentication.

Response Body

The upstream, with its credentials redacted.

application/json
  1. response

A registry the firewall fetches packages from.

id*string

The upstream id, unique within the firewall.

endpoint*string

The registry's base URL.

credentials*

Credentials the firewall sends to the registry. Write-only: responses show a redaction placeholder for each value that is set. Change them with the set-credentials operation.

internal*boolean

Whether the registry hosts your own packages rather than public ones. Rules can target internal or external upstreams.

cached*boolean

Whether package metadata from this upstream is cached. Only internal upstreams can be cached.

artifactCredentials?array<>

Credentials for hosts the upstream's artifacts are downloaded from, when that is not the registry's own host.

curl -X PUT 'https://eu-sov-1.bytesafecloud.eu/v1/my-namespace-id/config/my-firewall-id/upstreams/string/credentials' \  -H 'Content-Type: application/json' \  -d '{  "token": "upstream-registry-token"}'
{  "id": "npmjs",  "endpoint": "https://registry.npmjs.org",  "credentials": {    "token": "1F56ED4E-D401-49E4-B40C-0B7B8411BAD6"  },  "internal": false,  "cached": false}