CUSTOM DOMAIN NAME REST APIS

JFrog REST APIs

Content Type
REST API
ft:sourceType
Paligo

Notice

Subscription Information 

This feature is supported on Cloud (SaaS) platform, with an Enterprise X or Enterprise+ license.

The MyJFrog Portal REST APIs provide a set of interfaces for interacting with the MyJFrog Portal. This page focuses on the CNAME REST API, which is used for managing the domains under your certificate. You can add SSL certificates, remove SSL certificates, or edit existing domains smoothly and independently.

For the WebUI documentation, see Managing Custom Domain Name.Manage Custom Domain Names in MyJFrog

Prerequisites for using Custom Domain Name REST APIs
  • Before using the MyJFrog REST APIs, you need an access token.

  • Verify that your SSL certificate is in a valid PEM format and that the private key is generated using the RSA algorithm.

    • If your private key is not already in RSA format (RSA PKCS#1), you can convert it to RSA using the following OpenSSL command:

      -traditional may be omitted depending on the OpenSSL client

      openssl rsa -in private.key -out private_rsa.key -traditional
  • The certificate must have the following extended key usages (EKUs): TLS Web Client Authentication and TLS Web Server Authentication.

  • The certificate is currently valid and expires in more than 30 days.

  • Make sure the certificate body is associated with the private key (same public key on both).

  • Domain names are assessed against the standards outlined in RFC1034, Section 3, and RFC1123, Section 2.1. Any domain names that do not adhere to these standards will be deemed invalid and therefore unusable.

Field types

Field name

Description

server_name 

The server_name field in your request refers to the designated JFrog server where you intend to configure a CNAME (Canonical Name).

For instance, if your JFrog server URL is myserver.jfrog.io, and you wish to set up a CNAME for this server, you should enter "myserver" in the server_name field.

Type 

The 'Type' parameter offers two valid options:

  • Platform_base_url: Use this option when configuring the base URL for accessing the JPD (JFrog Platform Distribution) User Interface. You can also employ this URL as the base for API calls.

  • Docker_sub_domain: Use this option when configuring the base URL for Docker-related operations, such as login, pull, and push actions, within the JPD. Please note that this parameter is exclusively available for JPD instances that have the Docker Subdomain method configured.

    For more detailed information on the various Docker methods available in Artifactory, please refer to Get Started With Artifactory as a Docker Registry.Get Started With Artifactory as a Docker Registry

Docker_repository_name_override 

Optional, only available for docker subdomain (when configuring the base URL for Docker-related operations). 

Use this option when you wish to define an explicit repository name (not derived from the domain name) -  please notice this is not best practice.