Skip to main content

certificates

Creates, updates, deletes, gets or lists a certificates resource.

Overview

Namecertificates
TypeResource
Idopenai_admin.certificates.certificates

Fields

The following fields are returned by SELECT queries:

Certificate retrieved successfully.

NameDatatypeDescription
idstringThe identifier, which can be referenced in API endpoints
namestringThe name of the certificate.
activebooleanWhether the certificate is currently active at the specified scope. Not returned when getting details for a specific certificate.
certificate_detailsobject
created_atinteger (unixtime)The Unix timestamp (in seconds) of when the certificate was uploaded.
objectstringThe object type. - If creating, updating, or getting a specific certificate, the object type is certificate. - If listing, activating, or deactivating certificates for the organization, the object type is organization.certificate. - If listing, activating, or deactivating certificates for a project, the object type is organization.project.certificate. (certificate, organization.certificate, organization.project.certificate)

Methods

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
getselectcertificate_idinclude
listselectlimit, after, order
uploadinsertcertificate
updateupdatecertificate_id
deletedeletecertificate_id
activateexeccertificate_ids
deactivateexeccertificate_ids

Parameters

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
certificate_idstringUnique ID of the certificate to delete.
afterstringA cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.
includearrayA list of additional fields to include in the response. Currently the only supported value is content to fetch the PEM content of the certificate.
limitintegerA limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.
orderstringSort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order.

SELECT examples

Certificate retrieved successfully.

SELECT
id,
name,
active,
certificate_details,
created_at,
object
FROM openai_admin.certificates.certificates
WHERE certificate_id = '{{ certificate_id }}' -- required
AND include = '{{ include }}'
;

INSERT examples

No description available.

INSERT INTO openai_admin.certificates.certificates (
name,
certificate
)
SELECT
'{{ name }}',
'{{ certificate }}' /* required */
RETURNING
id,
name,
active,
certificate_details,
created_at,
object
;

UPDATE examples

No description available.

UPDATE openai_admin.certificates.certificates
SET
name = '{{ name }}'
WHERE
certificate_id = '{{ certificate_id }}' --required
RETURNING
id,
name,
active,
certificate_details,
created_at,
object;

DELETE examples

No description available.

DELETE FROM openai_admin.certificates.certificates
WHERE certificate_id = '{{ certificate_id }}' --required
;

Lifecycle Methods

Certificates activated successfully.

EXEC openai_admin.certificates.certificates.activate
@@json=
'{
"certificate_ids": "{{ certificate_ids }}"
}'
;