View Source OpenAi.Certificates (OpenAI REST API Client v1.0.0)
Provides API endpoints related to certificates
Summary
Functions
Activate certificates at the organization level.
Activate certificates at the project level.
Deactivate certificates at the organization level.
Deactivate certificates at the project level.
Delete a certificate from the organization.
Get a certificate that has been uploaded to the organization.
List uploaded certificates for this organization.
List certificates for this project.
Modify a certificate. Note that only the name can be modified.
Upload a certificate to the organization. This does not automatically activate the certificate.
Functions
@spec activate_organization_certificates( body :: OpenAi.Certificate.ToggleRequest.t(), opts :: keyword() ) :: {:ok, OpenAi.Certificate.ListResponse.t()} | {:error, OpenAi.Error.error()}
Activate certificates at the organization level.
You can atomically and idempotently activate up to 10 certificates at a time.
@spec activate_project_certificates( project_id :: String.t(), body :: OpenAi.Certificate.ToggleRequest.t(), opts :: keyword() ) :: {:ok, OpenAi.Certificate.ListResponse.t()} | {:error, OpenAi.Error.error()}
Activate certificates at the project level.
You can atomically and idempotently activate up to 10 certificates at a time.
@spec deactivate_organization_certificates( body :: OpenAi.Certificate.ToggleRequest.t(), opts :: keyword() ) :: {:ok, OpenAi.Certificate.ListResponse.t()} | {:error, OpenAi.Error.error()}
Deactivate certificates at the organization level.
You can atomically and idempotently deactivate up to 10 certificates at a time.
@spec deactivate_project_certificates( project_id :: String.t(), body :: OpenAi.Certificate.ToggleRequest.t(), opts :: keyword() ) :: {:ok, OpenAi.Certificate.ListResponse.t()} | {:error, OpenAi.Error.error()}
Deactivate certificates at the project level.
You can atomically and idempotently deactivate up to 10 certificates at a time.
@spec delete_certificate(certificate_id :: String.t(), opts :: keyword()) :: {:ok, OpenAi.Certificate.DeleteResponse.t()} | {:error, OpenAi.Error.error()}
Delete a certificate from the organization.
The certificate must be inactive for the organization and all projects.
@spec get_certificate(certificate_id :: String.t(), opts :: keyword()) :: {:ok, OpenAi.Certificate.t()} | {:error, OpenAi.Error.error()}
Get a certificate that has been uploaded to the organization.
You can get a certificate regardless of whether it is active or not.
Options
include: A list of additional fields to include in the response. Currently the only supported value iscontentto fetch the PEM content of the certificate.
@spec list_organization_certificates(opts :: keyword()) :: {:ok, OpenAi.Certificate.ListResponse.t()} | {:error, OpenAi.Error.error()}
List uploaded certificates for this organization.
Options
limit: A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.after: A cursor for use in pagination.afteris 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.order: Sort order by thecreated_attimestamp of the objects.ascfor ascending order anddescfor descending order.
@spec list_project_certificates(project_id :: String.t(), opts :: keyword()) :: {:ok, OpenAi.Certificate.ListResponse.t()} | {:error, OpenAi.Error.error()}
List certificates for this project.
Options
limit: A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.after: A cursor for use in pagination.afteris 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.order: Sort order by thecreated_attimestamp of the objects.ascfor ascending order anddescfor descending order.
@spec modify_certificate( certificate_id :: String.t(), body :: OpenAi.Certificate.UpdateRequest.t(), opts :: keyword() ) :: {:ok, OpenAi.Certificate.t()} | {:error, OpenAi.Error.error()}
Modify a certificate. Note that only the name can be modified.
@spec upload_certificate( body :: OpenAi.Certificate.UploadRequest.t(), opts :: keyword() ) :: {:ok, OpenAi.Certificate.t()} | {:error, OpenAi.Error.error()}
Upload a certificate to the organization. This does not automatically activate the certificate.
Organizations can upload up to 50 certificates.