v1

latestOpenAPI 3.1.02026-07-261690320.7 KB

Manage private registry

Add or update your private package registry connection, such as a private NPM or Maven package registry.

post/repositories/code/private-registries

Request body

type'maven' | 'npm_rc' required

The type of the private registry

payloadstring required

The payload of the private registry or .npmrc content

Example request

{
  "type": "maven",
  "payload": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<settings xmlns=\"http://maven.apache.org/SETTINGS/1.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xsi:schemaLocation=\"http://maven.apache.org/SETTINGS/1.0.0 https://maven.apache.org/xsd/settings-1.0.0.xsd\">\n  <servers>\n    <server>\n      <id>your-repository-id</id>\n      <username>your-username</username>\n      <password>ACCESS_TOKEN</password>\n    </server>\n  </servers>\n</settings>"
}

Response

The private registry has been added.

successinteger

The integer 1 indicating success

tokenstring

The token of the private registry

Example response

{
  "success": 1
}