Certificates

A Certificate is a way to store your custom SSL certificate for your Files.com site. Files.com is also capable of registering SSL certificates itself, so this is only required if you have specific security requirements to use your own certificate.

List Certificates

Command

files-cli certificates list

Output

Outputs a list of Certificate objects according to the output format.

Authorization Requirement

Requires a Site-Wide API key, or a User API key or session from a Site Administrator.

Additional Arguments

Example Request

files-cli certificates list

Show Certificate

Command

files-cli certificates find

Output

Outputs a Certificate object according to the output format.

Authorization Requirement

Requires a Site-Wide API key, or a User API key or session from a Site Administrator.

Flags

FlagDescription
--id=
int64
Required
Certificate ID.

Example Request

files-cli certificates find \
  --id=1

Create CSR or import existing SSL Certificate

Command

files-cli certificates create

Output

Outputs a Certificate object according to the output format.

Authorization Requirement

Requires a Site-Wide API key, or a User API key or session from a Site Administrator.

Flags

FlagDescription
--name=
string
Required
Internal name of the SSL certificate.
--certificate-domain=
string
Domain for certificate.
--certificate-extra-domains=
array(string)
Additional domains for the certificate CSR.
--certificate-country=
string
Country.
--certificate-state-or-province=
string
State or province.
--certificate-city-or-locale=
string
City or locale.
--certificate-company-name=
string
Company name.
--csr-ou1=
string
Department name or organization unit 1
--csr-ou2=
string
Department name or organization unit 2
--csr-ou3=
string
Department name or organization unit 3
--certificate-email-address=
string
Email address for the certificate owner.
--key-type=
string
Any supported key type. Defaults to RSA-4096.
--certificate=
string
The certificate. PEM or PKCS7 formats accepted.
--private-key=
string
Certificate private key.
--password=
string
Certificate password.
--intermediates=
string
Intermediate certificates. PEM or PKCS7 formats accepted.

Example Request

files-cli certificates create \
  --name="Name"

Activate SSL Certificate

Command

files-cli certificates activate

Output

No output is returned.

Authorization Requirement

Requires a Site-Wide API key, or a User API key or session from a Site Administrator.

Flags

FlagDescription
--id=
int64
Required
Certificate ID.
--replace-cert=
string
Leave blank or set to any to replace any currently active certificate, if applicable. Set to new_ips to activate this certificate as an additional certificate on your Site by allocating a new set of Dedicated IPs (may require a Plan upgrade). Set to the ID of a currently active certificate to replace that certificate on its set of dedicated IPs. A certificate belonging to a Custom Domain activates only for that domain: leave blank, use any, or specify that domain's current certificate ID.

Example Request

files-cli certificates activate \
  --id=1

Deactivate SSL Certificate

Command

files-cli certificates deactivate

Output

No output is returned.

Authorization Requirement

Requires a Site-Wide API key, or a User API key or session from a Site Administrator.

Flags

FlagDescription
--id=
int64
Required
Certificate ID.

Example Request

files-cli certificates deactivate \
  --id=1

Replace this active custom SSL Certificate for the Primary Custom Domain with a Files.com SSL Certificate. The Primary Custom Domain's CNAME record must point at the Site's subdomain. The Files.com certificate is issued and activated in the background

Command

files-cli certificates replace-with-files

Output

No output is returned.

Authorization Requirement

Requires a Site-Wide API key, or a User API key or session from a Site Administrator.

Flags

FlagDescription
--id=
int64
Required
Certificate ID.

Example Request

files-cli certificates replace-with-files \
  --id=1

Update Certificate

Command

files-cli certificates update

Output

Outputs a Certificate object according to the output format.

Authorization Requirement

Requires a Site-Wide API key, or a User API key or session from a Site Administrator.

Flags

FlagDescription
--id=
int64
Required
Certificate ID.
--name=
string
Internal certificate name.
--intermediates=
string
Any intermediate certificates. PEM or PKCS7 formats accepted.
--certificate=
string
The certificate. PEM or PKCS7 formats accepted.

Example Request

files-cli certificates update \
  --id=1 \
  --name="My Certificate"

Delete Certificate

Command

files-cli certificates delete

Output

No output is returned.

Authorization Requirement

Requires a Site-Wide API key, or a User API key or session from a Site Administrator.

Flags

FlagDescription
--id=
int64
Required
Certificate ID.

Example Request

files-cli certificates delete \
  --id=1

The Certificate Object

Some of the commands above return a Certificate object. The attributes of this object are listed below.

AttributeDescription
id
int64
Certificate ID
name
string
Descriptive name of certificate
custom_domain_id
int64
Custom Domain that owns this certificate, including while the certificate is inactive.
certificate
string
Full text of SSL certificate
created_at
date-time
Certificate created at
display_status
string
Certificate status. (One of Request Generated, New, Active, Active/Expired, Expired, or Available)
domains
array(string)
Domains on this certificate other than files.com domains
expires_at
date-time
Certificate expiration date/time
brick_managed
boolean
Is this certificate automatically managed and renewed by Files.com?
intermediates
string
Intermediate certificates
ip_addresses
array(string)
A list of IP addresses associated with this SSL Certificate
issuer
string
X509 issuer
key_type
string
Type of key
request
string
Certificate signing request text
status
string
Certificate status (Request Generated, New, Active, Active/Expired, Expired, or Available)
subject
string
X509 Subject name