Overview

Getting started with the ITCare API

The ITCare REST API complies with the OpenAPI standard specifications. The online documentation is available at this address: https://api.cegedim.cloud/

Example:

Get ITCare status
curl -X GET "https://api.cegedim.cloud/itcare/health"

ITCare API structure

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

MongoDB

MongoDB

MongoDB NodeJS

OpenSearch

Oracle

PostgreSQL

Redis

SQLServer

Message broker

Apache Kafka

Rabbit MQ

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?

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?

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?

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:

"""
Launch action and get its descriptor
"""
action = itcare.post('/api/resource', payload=my_payload)
  
"""
Loop on getting its status
"""
while action['status']=='IN_PROGRESS':
    time.sleep(1)
    action = itcare.get('/api/actions/{}'.format(action['id']))
  
"""
Print its status
"""
print action['status']

The status of the actions can be :

  • IN_PROGRESS

  • SUCCESS

  • ERROR

Last updated