# Overview

## Getting started with the ITCare API <a href="#apiitcare-gettingstartedwiththeitcare-api" id="apiitcare-gettingstartedwiththeitcare-api"></a>

The ITCare REST API complies with the OpenAPI standard specifications.\
The online documentation is available at this address: [https://api.cegedim.cloud/](https://api.cegedim.cloud/itcare-console/swagger-ui/index.html)

Example:

<pre class="language-bash" data-title="Get ITCare status"><code class="lang-bash"><strong>curl -X GET "https://api.cegedim.cloud/itcare/health"
</strong></code></pre>

## ITCare API structure <a href="#apiitcare-philosiphy" id="apiitcare-philosiphy"></a>

Each resource belongs to one of these 3 levels of hierarchy : Category, Type, Family. An overview of the categorization is described as follows :

| Category           | Type          | family |
| ------------------ | ------------- | ------ |
| Application server | Tomcat        |        |
|                    | Wildfly       |        |
| Container          | Kubernetes    |        |
| Instance           | Linux         | CentOS |
|                    |               | Debian |
|                    |               | Oracle |
|                    |               | RHEL   |
|                    |               | Ubuntu |
|                    | Windows       |        |
|                    | Unix          |        |
| Load balancer      | Load Balancer |        |
| Managed database   | MariaDB       |        |
|                    | OpenSearch    |        |
|                    | PostgreSQL    |        |
|                    | Redis         |        |
|                    | SQL Server    |        |
| Message broker     | Apache Kafka  |        |
|                    | RabbitMQ      |        |
| Storage            | GlusterFS     |        |

When getting a resource an attribut named `path` is available in the output to inform about which category-type-family to navigate in order to get details about the resource.

The API is resource centric : the main entry point of the API could be `/compute/resources`. It can be used to explore basic informations and navigate to the proper category and get the details.

## What date/time format is used by the API? <a href="#apiitcare-whatdate-timeformatisusedbytheapi" id="apiitcare-whatdate-timeformatisusedbytheapi"></a>

JSON does not natively support the Date/Time format.\
All parameters tagged as Date by the API are therefore strings in ISO8601 format.

```
YYYY-MM-DDTHH:MM:SS.sssZ
```

Z corresponds to the time zone: +0200 for example.

```
2016-06-01T12:27:19.000+0200
```

For GET requests, do not forget to URL-Encode these parameters.

## Can I run blank actions via the API? <a href="#apiitcare-canirunblankactionsviatheapi" id="apiitcare-canirunblankactionsviatheapi"></a>

Some methods allow testing of API calls without actually triggering the action in ITCare. However, the validation is still done. To activate the Dry Run mode, simply add a custom header to your HTTP requests:

```
ITCare-DryRun: true
```

Once the server processes your request, the same custom header will be included in the response.

## How do asynchronous actions work? <a href="#apiitcare-howdoasynchronousactionswork" id="apiitcare-howdoasynchronousactionswork"></a>

Some methods are asynchronous and require a delay after their invocation.\
This applies to time-consuming transactions such as resource administration or reporting.\
Methods that operate asynchronously will respond:

* an HTTP return code 202
* a body containing a tracking ID for the current asynchronous operation

Here is an example of code in Python that explains the asynchronous operation:

{% code overflow="wrap" %}

```</div>

The status of the actions can be :

* IN\_PROGRESS
* SUCCESS
* ERROR
```

{% endcode %}


---

# 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://academy.cegedim.cloud/itcare-api/overview.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.
