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
SDK Method
files_sdk.certificate.list()
Return Object
ListObj[Certificate]
Authorization Requirement
Requires a Site-Wide API key, or a User API key or session from a Site Administrator.
Additional Arguments
Show Certificate
SDK Method
files_sdk.certificate.find()
Return Object
Certificate
Authorization Requirement
Requires a Site-Wide API key, or a User API key or session from a Site Administrator.
Method Arguments
| Argument | Description |
|---|---|
| id int64 Required | Certificate ID. |
Create CSR or import existing SSL Certificate
SDK Method
files_sdk.certificate.create()
Return Object
Certificate
Authorization Requirement
Requires a Site-Wide API key, or a User API key or session from a Site Administrator.
Method Arguments
| Argument | Description |
|---|---|
| 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. |
Activate SSL Certificate
SDK Method
certificate.activate()
Return Object
No return value.
Authorization Requirement
Requires a Site-Wide API key, or a User API key or session from a Site Administrator.
Method Arguments
| Argument | Description |
|---|---|
| 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. |
Deactivate SSL Certificate
SDK Method
certificate.deactivate()
Return Object
No return value.
Authorization Requirement
Requires a Site-Wide API key, or a User API key or session from a Site Administrator.
Replace this active custom SSL Certificate for the Primary Custom Domain with a Files.com SSL Certificate
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
SDK Method
certificate.replace_with_files()
Return Object
No return value.
Authorization Requirement
Requires a Site-Wide API key, or a User API key or session from a Site Administrator.
Update Certificate
SDK Method
certificate.update()
Return Object
Certificate
Authorization Requirement
Requires a Site-Wide API key, or a User API key or session from a Site Administrator.
Method Arguments
| Argument | Description |
|---|---|
| name string | Internal certificate name. |
| intermediates string | Any intermediate certificates. PEM or PKCS7 formats accepted. |
| certificate string | The certificate. PEM or PKCS7 formats accepted. |
Delete Certificate
SDK Method
certificate.delete()
Return Object
No return value.
Authorization Requirement
Requires a Site-Wide API key, or a User API key or session from a Site Administrator.
The Certificate Object
Some of the methods above return a Certificate object. The attributes of this object are listed below.
| Attribute | Description |
|---|---|
| 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 |