> For the complete documentation index, see [llms.txt](https://docs.ionos.com/cert-manager-sdk-nodejs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ionos.com/cert-manager-sdk-nodejs/api/certificatesapi.md).

# CertificatesApi

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

| Method                                          | HTTP request                                                | Description                     |
| ----------------------------------------------- | ----------------------------------------------------------- | ------------------------------- |
| [**certificatesDelete**](#certificatesdelete)   | **DELETE** /certificatemanager/certificates/{certificateId} | Delete a Certificate by ID      |
| [**certificatesGet**](#certificatesget)         | **GET** /certificatemanager/certificates                    | Get Certificates                |
| [**certificatesGetById**](#certificatesgetbyid) | **GET** /certificatemanager/certificates/{certificateId}    | Get a Certificate by ID         |
| [**certificatesPatch**](#certificatespatch)     | **PATCH** /certificatemanager/certificates/{certificateId}  | Update a Certificate Name by ID |
| [**certificatesPost**](#certificatespost)       | **POST** /certificatemanager/certificates                   | Add a New Certificate           |

## certificatesDelete

> certificatesDelete(certificateId)

Delete a Certificate by ID

Deletes a certificate specified by its ID.

### Examples

```javascript
const ionoscloud = require('@ionos-cloud/sdk-nodejs-cert-manager');
// setup authorization
const config = new ionoscloud.Configuration({
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD',
    apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.CertificatesApi(config);
// Delete a Certificate by ID
api_instance
  .certificatesDelete({
    certificateId: certificateId_example
  })
  .then((response) => console.log(response.data))
  .catch((error) => console.log(error.response.data));
```

### Parameters

| Name              | Type       | Description | Notes                   |
| ----------------- | ---------- | ----------- | ----------------------- |
| **certificateId** | **string** |             | \[default to undefined] |

### Return type

nil (empty response body)

### Authorization

basicAuth, tokenAuth

### HTTP request headers

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

## certificatesGet

> certificatesGet(opts)

Get Certificates

Retrieves all available certificates.

### Examples

```javascript
const ionoscloud = require('@ionos-cloud/sdk-nodejs-cert-manager');
// setup authorization
const config = new ionoscloud.Configuration({
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD',
    apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.CertificatesApi(config);
// Get Certificates
api_instance
  .certificatesGet({
    offset: offset_example,
    limit: limit_example
    options: {}
  })
  .then((response) => console.log(response.data))
  .catch((error) => console.log(error.response.data));
```

### Parameters

| Name       | Type       | Description                                                                                                                                                                                                                                                                       | Notes                              |
| ---------- | ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------- |
| **offset** | **string** | \&#39;Limit\&#39; and \&#39;Offset\&#39; 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]\[default to undefined] |
| **limit**  | **string** | \&#39;Limit\&#39; and \&#39;Offset\&#39; are optional; you can use these filter parameters to retrieve only part of the results of a query. If both \&#39;Offset\&#39; and \&#39;Limit\&#39;are specified, the offset lines are skipped before counting the returned limit lines. | \[optional]\[default to undefined] |

### Return type

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

### Authorization

basicAuth, tokenAuth

### HTTP request headers

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

## certificatesGetById

> certificatesGetById(certificateId)

Get a Certificate by ID

Retrieves a certificate specified by its ID.

### Examples

```javascript
const ionoscloud = require('@ionos-cloud/sdk-nodejs-cert-manager');
// setup authorization
const config = new ionoscloud.Configuration({
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD',
    apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.CertificatesApi(config);
// Get a Certificate by ID
api_instance
  .certificatesGetById({
    certificateId: certificateId_example
  })
  .then((response) => console.log(response.data))
  .catch((error) => console.log(error.response.data));
```

### Parameters

| Name              | Type       | Description | Notes                   |
| ----------------- | ---------- | ----------- | ----------------------- |
| **certificateId** | **string** |             | \[default to undefined] |

### Return type

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

### Authorization

basicAuth, tokenAuth

### HTTP request headers

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

## certificatesPatch

> certificatesPatch(certificateId, certificatePatchDto)

Update a Certificate Name by ID

Updates the name of the specified certificate.

### Examples

```javascript
const ionoscloud = require('@ionos-cloud/sdk-nodejs-cert-manager');
// setup authorization
const config = new ionoscloud.Configuration({
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD',
    apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.CertificatesApi(config);
// Update a Certificate Name by ID
api_instance
  .certificatesPatch({
    certificateId: certificateId_example,
    certificatePatchDto: certificatePatchDto_example
  })
  .then((response) => console.log(response.data))
  .catch((error) => console.log(error.response.data));
```

### Parameters

| Name                    | Type                                                                              | Description | Notes                   |
| ----------------------- | --------------------------------------------------------------------------------- | ----------- | ----------------------- |
| **certificateId**       | **string**                                                                        |             | \[default to undefined] |
| **certificatePatchDto** | [**CertificatePatchDto**](/cert-manager-sdk-nodejs/models/certificatepatchdto.md) |             |                         |

### Return type

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

### Authorization

basicAuth, tokenAuth

### HTTP request headers

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

## certificatesPost

> certificatesPost(certificatePostDto)

Add a New Certificate

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

### Examples

```javascript
const ionoscloud = require('@ionos-cloud/sdk-nodejs-cert-manager');
// setup authorization
const config = new ionoscloud.Configuration({
    username: 'YOUR_USERNAME',
    password: 'YOUR_PASSWORD',
    apiKey: 'YOUR_API_KEY'
});
const api_instance = new ionoscloud.CertificatesApi(config);
// Add a New Certificate
api_instance
  .certificatesPost({
    certificatePostDto: certificatePostDto_example
  })
  .then((response) => console.log(response.data))
  .catch((error) => console.log(error.response.data));
```

### Parameters

| Name                   | Type                                                                            | Description | Notes |
| ---------------------- | ------------------------------------------------------------------------------- | ----------- | ----- |
| **certificatePostDto** | [**CertificatePostDto**](/cert-manager-sdk-nodejs/models/certificatepostdto.md) |             |       |

### Return type

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

### Authorization

basicAuth, tokenAuth

### HTTP request headers

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


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
