# CertificatesApi

## CertificatesApi

All URIs are relative to *<https://api.ionos.com>*

| Method                                                   | HTTP request                                                | Description                     |
| -------------------------------------------------------- | ----------------------------------------------------------- | ------------------------------- |
| [**certificates\_delete**](#certificates_delete)         | **DELETE** /certificatemanager/certificates/{certificateId} | Delete a Certificate by ID      |
| [**certificates\_get**](#certificates_get)               | **GET** /certificatemanager/certificates                    | Get Certificates                |
| [**certificates\_get\_by\_id**](#certificates_get_by_id) | **GET** /certificatemanager/certificates/{certificateId}    | Get a Certificate by ID         |
| [**certificates\_patch**](#certificates_patch)           | **PATCH** /certificatemanager/certificates/{certificateId}  | Update a Certificate Name by ID |
| [**certificates\_post**](#certificates_post)             | **POST** /certificatemanager/certificates                   | Add a New Certificate           |

## **certificates\_delete**

> certificates\_delete(certificate\_id)

Delete a Certificate by ID

Deletes a certificate specified by its ID.

#### Example

```python
from __future__ import print_function
import time
import ionoscloud_cert_manager
from ionoscloud_cert_manager.rest import ApiException

# Defining the host is optional and defaults to https://api.ionos.com
configuration = ionoscloud_cert_manager.Configuration(
    host = 'https://api.ionos.com',
)

# Example of configuring HTTP Basic Authorization
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

with ionoscloud_cert_manager.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud_cert_manager.CertificatesApi(api_client)
    certificate_id = 'certificate_id_example' # str | 
    try:
        # Delete a Certificate by ID
        api_instance.certificates_delete(certificate_id)
    except ApiException as e:
        print('Exception when calling CertificatesApi.certificates_delete: %s\n' % e)
```

#### Parameters

| Name                | Type    | Description | Notes |
| ------------------- | ------- | ----------- | ----- |
| **certificate\_id** | **str** |             |       |

#### Return type

void (empty response body)

#### Authorization

basicAuth, tokenAuth

#### HTTP request headers

* **Content-Type**: Not defined
* **Accept**: Not defined

## **certificates\_get**

> CertificateCollectionDto certificates\_get(offset=offset, limit=limit)

Get Certificates

Retrieves all available certificates.

#### Example

```python
from __future__ import print_function
import time
import ionoscloud_cert_manager
from ionoscloud_cert_manager.rest import ApiException

# Defining the host is optional and defaults to https://api.ionos.com
configuration = ionoscloud_cert_manager.Configuration(
    host = 'https://api.ionos.com',
)

# Example of configuring HTTP Basic Authorization
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

with ionoscloud_cert_manager.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud_cert_manager.CertificatesApi(api_client)
    try:
        # Get Certificates
        api_response = api_instance.certificates_get()
        print(api_response)
    except ApiException as e:
        print('Exception when calling CertificatesApi.certificates_get: %s\n' % e)
```

#### Parameters

| Name       | Type    | Description                                                                                                                                                                                                                               | Notes       |
| ---------- | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------- |
| **offset** | **str** | 'Limit' and 'Offset' are optional; you can use these filter parameters to retrieve only part of the results obtained by a request. Offset is the first element (from the complete list of elements) to be included in the response.       | \[optional] |
| **limit**  | **str** | 'Limit' and 'Offset' are optional; you can use these filter parameters to retrieve only part of the results of a query. If both 'Offset' and 'Limit'are specified, the offset lines are skipped before counting the returned limit lines. | \[optional] |

#### Return type

[**CertificateCollectionDto**](/cert-manager-sdk-python/models/certificatecollectiondto.md)

#### Authorization

basicAuth, tokenAuth

#### HTTP request headers

* **Content-Type**: Not defined
* **Accept**: application/json

## **certificates\_get\_by\_id**

> CertificateDto certificates\_get\_by\_id(certificate\_id)

Get a Certificate by ID

Retrieves a certificate specified by its ID.

#### Example

```python
from __future__ import print_function
import time
import ionoscloud_cert_manager
from ionoscloud_cert_manager.rest import ApiException

# Defining the host is optional and defaults to https://api.ionos.com
configuration = ionoscloud_cert_manager.Configuration(
    host = 'https://api.ionos.com',
)

# Example of configuring HTTP Basic Authorization
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

with ionoscloud_cert_manager.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud_cert_manager.CertificatesApi(api_client)
    certificate_id = 'certificate_id_example' # str | 
    try:
        # Get a Certificate by ID
        api_response = api_instance.certificates_get_by_id(certificate_id)
        print(api_response)
    except ApiException as e:
        print('Exception when calling CertificatesApi.certificates_get_by_id: %s\n' % e)
```

#### Parameters

| Name                | Type    | Description | Notes |
| ------------------- | ------- | ----------- | ----- |
| **certificate\_id** | **str** |             |       |

#### Return type

[**CertificateDto**](/cert-manager-sdk-python/models/certificatedto.md)

#### Authorization

basicAuth, tokenAuth

#### HTTP request headers

* **Content-Type**: Not defined
* **Accept**: application/json

## **certificates\_patch**

> CertificateDto certificates\_patch(certificate\_id, certificate\_patch\_dto)

Update a Certificate Name by ID

Updates the name of the specified certificate.

#### Example

```python
from __future__ import print_function
import time
import ionoscloud_cert_manager
from ionoscloud_cert_manager.rest import ApiException

# Defining the host is optional and defaults to https://api.ionos.com
configuration = ionoscloud_cert_manager.Configuration(
    host = 'https://api.ionos.com',
)

# Example of configuring HTTP Basic Authorization
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

with ionoscloud_cert_manager.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud_cert_manager.CertificatesApi(api_client)
    certificate_id = 'certificate_id_example' # str | 
    certificate_patch_dto = ionoscloud_cert_manager.CertificatePatchDto() # CertificatePatchDto | 
    try:
        # Update a Certificate Name by ID
        api_response = api_instance.certificates_patch(certificate_id, certificate_patch_dto)
        print(api_response)
    except ApiException as e:
        print('Exception when calling CertificatesApi.certificates_patch: %s\n' % e)
```

#### Parameters

| Name                        | Type                                                                                                                          | Description | Notes |
| --------------------------- | ----------------------------------------------------------------------------------------------------------------------------- | ----------- | ----- |
| **certificate\_id**         | **str**                                                                                                                       |             |       |
| **certificate\_patch\_dto** | [**CertificatePatchDto**](https://github.com/ionos-cloud/sdk-python-cert-manager/blob/master/docs/api/CertificatePatchDto.md) |             |       |

#### Return type

[**CertificateDto**](/cert-manager-sdk-python/models/certificatedto.md)

#### Authorization

basicAuth, tokenAuth

#### HTTP request headers

* **Content-Type**: application/json
* **Accept**: application/json

## **certificates\_post**

> CertificateDto certificates\_post(certificate\_post\_dto)

Add a New Certificate

Adds a new PEM (Privacy Enhanced Mail) file that is used to store SSL certificates and their associated private keys.

#### Example

```python
from __future__ import print_function
import time
import ionoscloud_cert_manager
from ionoscloud_cert_manager.rest import ApiException

# Defining the host is optional and defaults to https://api.ionos.com
configuration = ionoscloud_cert_manager.Configuration(
    host = 'https://api.ionos.com',
)

# Example of configuring HTTP Basic Authorization
configuration.username = 'YOUR_USERNAME'
configuration.password = 'YOUR_PASSWORD'

with ionoscloud_cert_manager.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = ionoscloud_cert_manager.CertificatesApi(api_client)
    certificate_post_dto = ionoscloud_cert_manager.CertificatePostDto() # CertificatePostDto | 
    try:
        # Add a New Certificate
        api_response = api_instance.certificates_post(certificate_post_dto)
        print(api_response)
    except ApiException as e:
        print('Exception when calling CertificatesApi.certificates_post: %s\n' % e)
```

#### Parameters

| Name                       | Type                                                                                                                        | Description | Notes |
| -------------------------- | --------------------------------------------------------------------------------------------------------------------------- | ----------- | ----- |
| **certificate\_post\_dto** | [**CertificatePostDto**](https://github.com/ionos-cloud/sdk-python-cert-manager/blob/master/docs/api/CertificatePostDto.md) |             |       |

#### Return type

[**CertificateDto**](/cert-manager-sdk-python/models/certificatedto.md)

#### Authorization

basicAuth, tokenAuth

#### HTTP request headers

* **Content-Type**: application/json
* **Accept**: application/json


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ionos.com/cert-manager-sdk-python/api/certificatesapi.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
