Certificate API Reference¶
Methods¶
- 
cert.change_dcv(apikey, operation[, dcv_method=nil])¶
- Ask the provider to change the DCV method for that operation. - New in version 3.2.8. - Parameters: - apikey (string) – API connection key
- operation (int) – ID of the operation.
- dcv_method (string) – The new DCV method
 - Returns: - boolean – - 1on success
- 
cert.count(apikey[, opts=nil])¶
- Counts certificates handled by this account. - New in version 3.2.8. - Parameters: - apikey (string) – API connection key
- opts (struct) – Filtering options
 - Returns: - int – number of certificate 
- 
cert.create(apikey, params)¶
- Create a certificate. - New in version 3.2.8. - Warning - This is not a free operation. Please ensure your prepaid account has enough credit. Look at the - catalog listingsto get the price.- Parameters: - apikey (string) – API connection key
- params (struct) – Parameters
 - Returns: - struct – - Operation- certificate_create
- 
cert.delete(apikey, cert[, params=nil])¶
- Delete a certificate. - New in version 3.2.8. - Parameters: - apikey (string) – API connection key
- cert (int) – Id of the certificate
- params (struct) – Parameters
 - Returns: - struct – - Operation- certificate_delete
- 
cert.get_dcv_params(apikey, params)¶
- Get params for DCV (Domain Control Validation). DCV is a security control that validate/grant access to the registred domain name. - Warning Take the params from this call, not from the linked operation. If you need to get a dns DCV, pass the params {“dcv_method”: “dns”} - New in version 3.2.8. - Parameters: - apikey (string) – API connection key
- params (struct) – Parameters
 - Returns: - struct – - The parameters to help configure the DCV for this Certificate
- 
cert.info(apikey, cert)¶
- Get certificate information. - New in version 3.2.8. - Parameters: - apikey (string) – API connection key
- cert (int) – Id of the certificate
 - Returns: - struct – - Informations about the certificate.
- 
cert.list(apikey[, opts=nil])¶
- Lists certificates handled by this account. - New in version 3.2.8. - Parameters: - apikey (string) – API connection key
- opts (struct) – Filtering options
 - Returns: - struct – - list of certificates
- 
cert.recheck_caa(apikey, uuid)¶
- Ask the provider recheck the CAA record for this operation - New in version 3.2.8. - Parameters: - apikey (string) – API connection key
- uuid (string) – ID of the certicate.
 - Returns: - boolean – - 1on success
- 
cert.renew(apikey, cert, params)¶
- Renew a certificate. You must pass a new CSR, the end date will be current end_date + duration. - New in version 3.2.8. - Warning - This is not a free operation. Please ensure your prepaid account has enough credit. Look at the - catalog listingsto get the price.- Parameters: - apikey (string) – API connection key
- cert (int) – Id of the certificate
- params (struct) – Parameters
 - Returns: - struct – - Operation- certificate_renew
- 
cert.resend_dcv(apikey, operation)¶
- Ask the provider to resend the DCV for that operation. - New in version 3.2.8. - Parameters: - apikey (string) – API connection key
- operation (int) – ID of the operation.
 - Returns: - boolean – - 1on success
- 
cert.update(apikey, cert, params)¶
- Replace the certificate CSR. - New in version 3.2.8. - Parameters: - apikey (string) – API connection key
- cert (int) – Id of the certificate
- params (struct) – Parameters
 - Returns: - struct – - Operation- certificate_update
- 
cert.package.list(apikey[, opts=nil])¶
- Lists certificate packages. - Parameters: - apikey (string) – API connection key
- opts (struct) – Filtering options
 - Returns: - struct – - list of certificate packages
- 
cert.hosted.count(apikey[, opts=nil])¶
- Count SSL instances associated to the contact represented by apikey. - New in version 3.3.28. - Parameters: - apikey (string) – API connection key
- opts (struct) – Filtering options
 - Returns: - int – Number of found instances 
- 
cert.hosted.create(apikey, params)¶
- Create a SSL certificate to be used by Paas and Iaas rproxy services - New in version 3.3.28. - Parameters: - apikey (string) – API connection key
- params (struct) – Parameters to create a SSL certificate
 - Returns: - struct – - newly created SSL instance
- 
cert.hosted.delete(apikey, ssl)¶
- Delete a certificate - New in version 3.3.28. - Parameters: - apikey (string) – API connection key
- ssl (struct) – id of SSL instance to look up
 - Returns: - boolean – - 1if succeed
- 
cert.hosted.info(apikey, ssl)¶
- Info about a SSL instance associated to the contact represented by apikey. - New in version 3.3.28. - Parameters: - apikey (string) – API connection key
- ssl (struct) – id of SSL instance to look up
 - Returns: - struct – - Instance information
- 
cert.hosted.list(apikey[, opts=nil])¶
- List SSL instances associated to the contact represented by apikey. - New in version 3.3.28. - Parameters: - apikey (string) – API connection key
- opts (struct) – Filtering options
 - Returns: - list of struct – - Instance information
Parameters¶
SudoableIdent¶
parameter of
cert.change_dcv(),cert.count(),cert.create(),cert.delete(),cert.get_dcv_params(),cert.hosted.count(),cert.hosted.create(),cert.hosted.delete(),cert.hosted.info(),cert.hosted.list(),cert.info(),cert.list(),cert.package.list(),cert.recheck_caa(),cert.renew(),cert.resend_dcv(),cert.update(),changeowner.create(),contact.balance(),contact.can_associate_domain(),contact.can_associate(),contact.count(),contact.delete(),contact.info(),contact.list(),contact.reachability.info(),contact.reachability.resend(),contact.release(),contact.update(),datacenter.list(),domain.authinfo.reset(),domain.autorenew.activate(),domain.autorenew.deactivate(),domain.available(),domain.claims.accept(),domain.claims.check(),domain.claims.info(),domain.contacts.set(),domain.count(),domain.create(),domain.delete.available(),domain.delete.proceed(),domain.delete.send_foa_email(),domain.dnssec.create(),domain.dnssec.delete(),domain.dnssec.list(),domain.dnssec.set(),domain.eoi.count(),domain.eoi.create(),domain.eoi.delete(),domain.eoi.info(),domain.eoi.list(),domain.forward.count(),domain.forward.create(),domain.forward.delete(),domain.forward.list(),domain.forward.update(),domain.gandimail.activate(),domain.gandimail.deactivate(),domain.gandimail.info(),domain.host.count(),domain.host.create(),domain.host.delete(),domain.host.info(),domain.host.list(),domain.host.update(),domain.info(),domain.list(),domain.mailbox.alias.set(),domain.mailbox.count(),domain.mailbox.create(),domain.mailbox.delete(),domain.mailbox.info(),domain.mailbox.list(),domain.mailbox.purge(),domain.mailbox.responder.activate(),domain.mailbox.responder.deactivate(),domain.mailbox.update(),domain.misc.check_au_eligibility_name(),domain.misc.ukrights(),domain.nameservers.set(),domain.owner.set(),domain.packmail.autorenew(),domain.packmail.create(),domain.packmail.delete(),domain.packmail.info(),domain.packmail.renew(),domain.packmail.update(),domain.price.list(),domain.price(),domain.push(),domain.release(),domain.renew(),domain.reseller.set(),domain.restore(),domain.smd.count(),domain.smd.create(),domain.smd.delete(),domain.smd.info(),domain.smd.list(),domain.status.lock(),domain.status.unlock(),domain.suggest.list_fo(),domain.tag.add(),domain.tag.list(),domain.tag.remove(),domain.tag.set(),domain.tld.list(),domain.tld.region(),domain.transferin.available(),domain.transferin.proceed(),domain.transferin.resend_foa(),domain.transferin.update_authinfo(),domain.transferout.proceed(),domain.webredir.count(),domain.webredir.create(),domain.webredir.delete(),domain.webredir.list(),domain.webredir.update(),domain.zone.clone(),domain.zone.count(),domain.zone.create(),domain.zone.delete(),domain.zone.info(),domain.zone.list(),domain.zone.record.add(),domain.zone.record.count(),domain.zone.record.delete(),domain.zone.record.list(),domain.zone.record.set(),domain.zone.record.update(),domain.zone.set(),domain.zone.update(),domain.zone.version.count(),domain.zone.version.delete(),domain.zone.version.list(),domain.zone.version.new(),domain.zone.version.set(),hosting.catalog.list(),hosting.catalog.price(),hosting.datacenter.list(),hosting.image.info(),hosting.image.list(),hosting.metric.available(),hosting.metric.query(),hosting.package.count(),hosting.package.list(),hosting.rproxy.count(),hosting.rproxy.create(),hosting.rproxy.delete(),hosting.rproxy.info(),hosting.rproxy.list(),hosting.rproxy.probe.check_server(),hosting.rproxy.probe.disable(),hosting.rproxy.probe.enable(),hosting.rproxy.probe.test(),hosting.rproxy.probe.update(),hosting.rproxy.server.count(),hosting.rproxy.server.create(),hosting.rproxy.server.delete(),hosting.rproxy.server.disable(),hosting.rproxy.server.enable(),hosting.rproxy.server.list(),hosting.rproxy.update(),hosting.rproxy.vhost.alter_zone(),hosting.snapshotprofile.count(),hosting.snapshotprofile.list(),hosting.ssh.count(),hosting.ssh.create(),hosting.ssh.delete(),hosting.ssh.info(),hosting.ssh.list(),image.info(),image.list(),internal.domain.transferin.resend_foa(),notification.count(),notification.list(),notification.subscription.count(),notification.subscription.list(),operation.cancel(),operation.count(),operation.info(),operation.list(),operation.relaunch(),paas.count(),paas.info(),paas.list(),paas.snapshot.count(),paas.snapshot.info(),paas.snapshot.list(),paas.snapshotprofile.count(),paas.snapshotprofile.list(),paas.type.count(),paas.type.list(),paas.vhost.count(),paas.vhost.get_dns_entries(),paas.vhost.info(),paas.vhost.list(),site.alter_zone(),site.autorenew.activate(),site.autorenew.deactivate(),site.count(),site.create(),site.delete(),site.get_dns_entries(),site.info(),site.key.create(),site.key.delete(),site.key.list(),site.key.update(),site.list(),site.package.list(),site.renew(),site.update(),snapshotprofile.count()andsnapshotprofile.list()
Name Default Type Mandatory apikey string yes handle string yes no_useraccess False boolean no 
BusinessCategory¶
used by
CertificateReturn
Name Description b Private Organization. c Government Entity. d Business Entity. 
CertListOptions¶
parameter of
cert.count()andcert.list()
Name Default Type Mandatory <date_created string no <date_end string no <date_start string no <date_updated string no >date_created string no >date_end string no >date_start string no >date_updated string no altname string no category string no cn array of string or string no date_created string no date_end string no date_start string no date_updated string no domain.fqdn string no items_per_page 100 int no number of items returned for the pagination package string no page 0 int no page number for pagination offset sharing_id string no sort_by string no used to sort returned items: altname, category, cn, date_created, date_end, date_start, date_updated, domain.fqdn, package, sharing_id, status statusstring no ~cn string no ~domain.fqdn string no 
CertPackage¶
used by
CertificateCreateandDcvMethodParamsGet more details on https://www.gandi.net/ssl
Name Description cert_std_1_0_0 Standard certificate with 1 fqdn cert_std_3_0_0 Standard certificate with 3 fqdn cert_std_w_0_0 Standard certificate with fqdn with wildcard cert_pro_1_10_0 Pro certificate with 1 fqdn cert_pro_1_100_0 Pro certificate with 1 fqdn cert_pro_1_100_SGC Pro certificate with 1 fqdn cert_pro_1_250_0 Pro certificate with 1 fqdn cert_pro_w_250_0 Pro certificate with fqdn with wildcard cert_pro_w_250_SGC Pro certificate with fqdn with wildcard cert_bus_1_250_0 Business certificate with 1 fqdn cert_bus_1_250_SGC Business certificate with 1 fqdn cert_std_5_0_0 Standard certificate with 5 fqdn cert_std_10_0_0 Standard certificate with 10 fqdn cert_std_20_0_0 Standard certificate with 20 fqdn cert_bus_3_250_0 Business certificate with 3 fqdn cert_bus_5_250_0 Business certificate with 5 fqdn cert_bus_10_250_0 Business certificate with 10 fqdn cert_bus_20_250_0 Business certificate with 20 fqdn cert_std_1_10_0_digicert - cert_std_w_10_0_digicert - cert_pro_1_250_0_digicert - cert_pro_w_125_0_digicert - cert_bus_1_1500_0_digicert - cert_std_3_10_0_digicert - cert_std_5_10_0_digicert - cert_std_10_10_0_digicert - cert_std_20_10_0_digicert - cert_bus_3_1500_0_digicert - cert_bus_5_1500_0_digicert - cert_bus_10_1500_0_digicert - cert_bus_20_1500_0_digicert - 
CertificateCreate¶
parameter of
cert.create()Changed in version 3.3.36: key
thehas been added.
thecreate method can be given CSR or CN.
Name Default Type Mandatory packagestring yes Name of the Cert package accept_contract True boolean no altnamesarray of string no Alt Name when the cert package permit it backend-version3 string no cn string no Certificate CN csr string no Certificate Signing Request dcv_methodstring no Chosen DCV method duration 1 int no Certificate duration handle array of string or string no Domain owner if not the same contact as the one making the call (can’t be set with resellee_id) resellee_id string no The resellee id (can’t be set with handle) software2 int no 
CertificateDelete¶
parameter of
cert.delete()
Name Default Type Mandatory backend-version3 string no reason string no the deletion reason 
CertificateRenew¶
parameter of
cert.renew()
Name Default Type Mandatory backend-version3 string no csr string no Certificate Signing Request dcv_methodstring no the chosen DCV method (default to email) duration 1 int no The certificate duration 
CertificateStatus¶
used by
CertListOptionsandCertificateReturn
Name Description pending Certificate is curently emited valid Certificate is valid revoked Certificate has been revoked replaced Certifcate was replaced by another one expired Certificate expired 
CertificateUpdate¶
parameter of
cert.update()
Name Default Type Mandatory altnamesarray of string no Alt Name when the cert package permit it backend-version3 string no csr string no Certificate Signing Request dcv_methodstring no The chosen DCV method (default to email) 
ChangeDCVMethod¶
parameter of
cert.change_dcv()
Name Description Send a mail to admin@ dns Check a dns record file Check a file on http:// https Check a file on https:// 
DCVMethod¶
used by
CertificateCreate,CertificateRenew,CertificateUpdateandDcvMethodParams
Name Description Send a mail to admin@ dns Check a dns record file Check a file on http:// auto Automatically alter zone and does a dns DCV, or put a file on rproxy https Check a file on https:// 
DcvMethodParams¶
parameter of
cert.get_dcv_params()
Name Default Type Mandatory accept_contract True boolean no altnamesarray of string no apex_only boolean no backend-version3 string no cert_id int no cn string no csr string no dcv_methodstring no duration 1 int no handle array of string or string no is_webredir boolean no migration_uuid string no packagecert_std_1_0_0 string no resellee_id string no software2 int no uuid string no 
ErrorTypeReturn¶
used by
CertificateOperationReturn,ChangeOwnerOperationReturn,DomainCreateOperationReturn,DomainDeleteOperationReturn,DomainDnssecOperationReturn,DomainReleaseOperationReturn,DomainRenewOperationReturn,DomainRestoreOperationReturn,DomainStatusUpdateOperationReturn,HostCreateOperationReturn,HostDeleteOperationReturn,HostUpdateOperationReturn,NsSetOperationReturn,OperationListReturn,OperationReturn,SiteOperationReturn,TransferInOperationReturnandTransferinReturn
Name Type name string refundable boolean type string 
CertPackageListOptions¶
parameter of
cert.package.list()
Name Default Type Mandatory <max_domains int no <min_domains int no >max_domains int no >min_domains int no category string no items_per_page 100 int no number of items returned for the pagination max_domains int no min_domains int no name string no page 0 int no page number for pagination offset sort_by string no used to sort returned items: category, max_domains, min_domains, name, trustlogo, warranty, wildcard trustlogo boolean no warranty int no wildcard boolean no ~category string no ~name string no 
SSLCreateParams¶
parameter of
cert.hosted.create()
Name Default Type Mandatory crt string yes key string yes 
SSLListOptions¶
parameter of
cert.hosted.count()andcert.hosted.list()
Name Default Type Mandatory fqdns array of string or string no id int or array of int no items_per_page 100 int no number of items returned for the pagination page 0 int no page number for pagination offset sharing_id string no sort_by string no used to sort returned items: fqdns, id, sharing_id, state statestring no ~fqdns string no 
SSLState¶
used by
SSLListOptions
Name Description created - deleted - expired - revoked - 
Returns¶
AltnameReturn¶
used by
CertificateReturn
Name Type value string 
CertificateReturn¶
returned by
cert.info()andcert.list()Changed in version 3.3.38: key
uuidhas been added.
uuidparameter.Changed in version 3.3.22: key
sha_versionhas been added.
sha_versionparameter.
Name Type altnamesarray of struct Alt Name when the cert package permit it assumed_name string Does business as name business_categorystring Business Category (see Clause 5 of the EV Guidelines) card_pay_trustlogo boolean cert string cn string comodo_id string contact string The certificate’s owner csr string Certificate Signing Request date_created dateTime.iso8601 date_end dateTime.iso8601 date_incorporation dateTime.iso8601 Date of Incorporation date_start dateTime.iso8601 date_updated dateTime.iso8601 id int ida_email string IdAuthority email address ida_fax string IdAuthority fax number ida_tel string IdAuthority telephone number joi_country string Jurisdiction of Incorporation: Country joi_locality string Jurisdiction of Incorporation: Locality joi_state string Jurisdiction of Incorporation: State middleman string The contact who bought the certificate order_number string package string Name of the Cert package provider_cert_id string sha_version int SHA version 1 or 2 software int Software in which you will use the cert statusstring trustlogo boolean Add COMODO SSL TrustLogo to this package trustlogo_token struct uuid string UUID of the certificate (used in V5 API) 
DcvParamsReturn¶
returned by
cert.get_dcv_params()
Name Type altnames array dcv_fqdns array dcv_method string dns_records array fqdns array md5 string message array package string sha1 string sha256 string unique_value string urls array 
CertificateOperationReturn¶
returned by
cert.create(),cert.delete(),cert.renew()andcert.update()
Name Type date_created dateTime.iso8601 date_start dateTime.iso8601 date_updated dateTime.iso8601 errortypestruct classification of the error cause if the operation is in error (possible values for errortype defined behind) eta int estimated time of processing the operation id int infosarray of struct last_error string last error of the operation last_support_error string last “support” error of the operation (that should be handled manually by the support team) params struct session_id int session number for the operation source string contact who create the operation stepstring current step of the operation typestring Possible Errors
Error identifier Type authorization_error support_recoverable An authorization error happened certificate:already_expired fatal Certificate has already expired. certificate:backend_error fatal The certificate request is in error. certificate:backend_other support_recoverable An error happened during the backend API call. certificate:bad_request support_recoverable No error code in return. certificate:cert_revoked fatal This certificate has been revoked. certificate:comomdo_unkonwn support_recoverable An unknown error occurred. certificate:connection_error client_recoverable Connection error. certificate:forbidden_country fatal Country is part of the banned country list. certificate:free_email_dcv fatal An error occured, please retry to create your certificate. You can contact the support to delete the failed order certificate:invalid_arg support_recoverable The value of one argument is invalid. certificate:invalid_email client_recoverable Your email is still not validated. certificate:missing_arg support_recoverable One arguement is missing. certificate:req_rejected fatal This certificate request has been rejected. certificate:request_not_done client_recoverable The operation is still being treated. certificate:timeout_error support_recoverable Timeout error. certificate:unrecognised_arg support_recoverable Unrecognised argument! certificate:wait_for_revoke client_recoverable Waiting 48 hours before we revoke the replaced cert. certificate:waiting_payement support_recoverable Waiting payment. certificate:wrong_url support_recoverable Wrong url. duplicate fatal The wanted object is duplicate ged_refused fatal The document were refused. ged_still_not_valid client_recoverable The document are still not validated. internal_error fatal Internal error. invalid_address client_recoverable The contact postal address is not valid. invalid_email client_recoverable The contact email address is not valid. missing_parameter client_recoverable There is a missing parameter ratelimit temporary The query was ratelimited timeout temporary The query timeout unknown unknown Unknown 
CategoryReturn¶
used by
CertPackageReturn
Name Type id int name string 
CertPackageReturn¶
returned by
cert.package.list()
Name Type categorystruct comodo_id string id int max_domains int min_domains int name string provider string provider_cert_id string sgc int trustlogo int warranty int wildcard int 
SSLListReturn¶
returned by
cert.hosted.list()
Name Type date_created dateTime.iso8601 date_expire dateTime.iso8601 id int state string subject string 
SSLReturn¶
returned by
cert.hosted.create()andcert.hosted.info()
Name Type date_created dateTime.iso8601 date_expire dateTime.iso8601 fqdnsarray of struct id int related_vhosts array state string subject string