certificates
Creates, updates, deletes, gets or lists a certificates resource.
Overview
| Name | certificates |
| Type | Resource |
| Id | openai_admin.certificates.certificates |
Fields
The following fields are returned by SELECT queries:
- get
- list
Certificate retrieved successfully.
| Name | Datatype | Description |
|---|---|---|
id | string | The identifier, which can be referenced in API endpoints |
name | string | The name of the certificate. |
active | boolean | Whether the certificate is currently active at the specified scope. Not returned when getting details for a specific certificate. |
certificate_details | object | |
created_at | integer (unixtime) | The Unix timestamp (in seconds) of when the certificate was uploaded. |
object | string | The 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) |
Certificates listed successfully.
| Name | Datatype | Description |
|---|---|---|
id | string | The identifier, which can be referenced in API endpoints |
name | string | The name of the certificate. |
active | boolean | Whether the certificate is currently active at the organization level. |
certificate_details | object | |
created_at | integer (unixtime) | The Unix timestamp (in seconds) of when the certificate was uploaded. |
object | string | The object type, which is always organization.certificate. (organization.certificate) |
Methods
The following methods are available for this resource:
| Name | Accessible by | Required Params | Optional Params | Description |
|---|---|---|---|---|
get | select | certificate_id | include | |
list | select | limit, after, order | ||
upload | insert | certificate | ||
update | update | certificate_id | ||
delete | delete | certificate_id | ||
activate | exec | certificate_ids | ||
deactivate | exec | certificate_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.
| Name | Datatype | Description |
|---|---|---|
certificate_id | string | Unique ID of the certificate to delete. |
after | string | A 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. |
include | array | A list of additional fields to include in the response. Currently the only supported value is content to fetch the PEM content of the certificate. |
limit | integer | A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20. |
order | string | Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order. |
SELECT examples
- get
- list
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 }}'
;
Certificates listed successfully.
SELECT
id,
name,
active,
certificate_details,
created_at,
object
FROM openai_admin.certificates.certificates
WHERE limit = '{{ limit }}'
AND after = '{{ after }}'
AND order = '{{ order }}'
;
INSERT examples
- upload
- Manifest
No description available.
INSERT INTO openai_admin.certificates.certificates (
name,
certificate
)
SELECT
'{{ name }}',
'{{ certificate }}' /* required */
RETURNING
id,
name,
active,
certificate_details,
created_at,
object
;
# Description fields are for documentation purposes
- name: certificates
props:
- name: name
value: "{{ name }}"
description: |
An optional name for the certificate
- name: certificate
value: "{{ certificate }}"
description: |
The certificate content in PEM format
UPDATE examples
- update
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
- delete
No description available.
DELETE FROM openai_admin.certificates.certificates
WHERE certificate_id = '{{ certificate_id }}' --required
;
Lifecycle Methods
- activate
- deactivate
Certificates activated successfully.
EXEC openai_admin.certificates.certificates.activate
@@json=
'{
"certificate_ids": "{{ certificate_ids }}"
}'
;
Certificates deactivated successfully.
EXEC openai_admin.certificates.certificates.deactivate
@@json=
'{
"certificate_ids": "{{ certificate_ids }}"
}'
;