.wpb_animate_when_almost_visible { opacity: 1; }
Core Information - Documentation
Commercial and technical inventory for Customers of Orange Business Services (CMDB)
2.5

Core Information API resources --> please check the API reference tab

Table of Contents




Prerequisite before starting

  • For this "Getting started", we will use the command-line tool Curl.
  • The API requires also the generation of an API-Key
  • Your Orange Business Services representative will provide you this API key
  • The API key must be added to HTTP headers of each API call.
  • The header is X-Api-Key.

Authentication prerequisite

Access to this API is secured by the OAuth 2.0 framework with the Client Credentials grant type, which means that you will have to present an OAuth 2.0 access_token whenever you want to request this API.

It's easy to negotiate this access_token: just send a request to the proper token negotiation endpoint, with a Basic Authentication header valued with your own client_id and client_secret.

For this API, the token negotiation endpoint is:

https://api.orange.com/oauth/v3/token

A technical guide is available to learn how to negotiate and manage these access_token.

A guide for oAuth 2.0 authentication method is also available in "Getting started" with Postman document.

Get all my CIs

List all my CIs without filter, sort or paging

Request

  • Method & URL : GET , https://api.orange.com/core-information/b2b/v2/configurationItems
  • Authorization : OAuth 2.0 authentication to get the access token (see "Prerequisite before starting" section)
  • Header : add x-api-key => Value provided by your administrator
curl -X GET \
    -H "Authorization: {access_token}" \
    -H "X-API-key: {dev_key}" \
    https://api.orange.com/core-information/b2b/v2/configurationItems

Response

Header

you will receive 3 specific headers:

  • HTTP/1.1 200 OK for a successful answer
  • X-Result-Count , the number of CIs
  • X-Total-Count , the number of all CIs matching criteria.
HTTP/1.1 200 OK
X-Result-Count: 106
X-Total-Count: 25

Body

List of CIs in a json format

HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
[
    {
        "id": "10-CD0F04H15C",
        "reference": "0024941381",
        "type": "ROUTER",
        "category": "DEVICE",
        "state": "OPERATIONAL",
        "customer": {
            "id": "33-01257052",
            "name": "BULLES'O"
        },
        "location": {
            "id": "3-1613231",
            "name": "Test",
        ...
]

Filter the CIs list

You have the possibility to filter a collection by adding to the URI some attributes.

Example to retrieve all the routers located in France

Request

  • Add the following parameters to the URL :type=ROUTER&location.address.country=FR.
curl -X GET \
    -H "Authorization: {access_token}" \
    -H "X-API-key: {dev_key}" \
    https://api.orange.com/core-information/b2b/v2/configurationItems?type=ROUTERlocation.address.country=FR

Response

  • List of your filtered CIs in a json format

Pagination of the CIs list

The API provides a pagination mechanism with the following query parameters

  • offset: The index of the first element to retrieve. Zero is the first item of the collection.
  • limit: The maximum number of items to return.
  • sort: The comma-separated list of field names to sort the result. Prefixing a field name with a "-" sign will indicate a descending order.

Thanks to these 3 query parameters, you are able to retrieve CIs page per page.

Example: to get the next 20 CIs from the 10th CI of the global list and ordered by the priority:

Request

  • Add the following parameters to the URL :offset=10&limit=20&sort=-createdAt.
curl -X GET \
    -H "Authorization: {access_token}" \
    -H "X-API-key: {dev_key}" \
    https://api.orange.com/core-information/b2b/v2/configurationItems?offset=10&limit=20&sort=-createdAt

Response

  • List of 20 CIs in a json format

Get details of a CI

With the Core Information for Business API, you are able to retrieve all information about a specific CI.

You only need the id of the CI (you can retreive it from the CIs list).

Request

  • Add the the id of the CI (you can retreive it from the CIslist) to the URL :/{CI_id}.
curl -X GET \
    -H "Authorization: {access_token}" \
    -H "X-API-key: {dev_key}" \
    https://api.orange.com/core-information/b2b/v2/configurationItems/{CI_id}

Response

  • Your CI in a json format

Error handling

Orange APIs use appropriate HTTP status codes to indicate any request processing error. For more details, see Handling API errors.

Location contact update

It is possible to update the location contact using PATCH /locations/{location id}

This method consider contacts object as an entire object value, it means, that when you update the object, everything will updated.

Here some examples: Supposed a location have the primary and secondary defined

...
"contacts": {
    "primary": {
        "title": "Mr",
        "firstName": "",
        "lastName": "DOE",
        "phone": "0102030405",
        "email": "jonh.doe@nobody.com",
        "mobile": ""
    },
    "secondary": {
        "title": "Mr",
        "firstName": "",
        "lastName": "DUCK",
        "phone": "0602030405",
        "email": "donald.duck@nobody.com",
        "mobile": ""
    }
}
 ...

If you want to change the firstName of the primary contact, you need to send all the detail of the current contacts in the body:

curl -X PATCH https://api.orange.com/core-information/b2b/v2/locations/{Location_id}\
    -H "Authorization: {access_token}" \
    -H "X-API-key: {dev_key}" \
    -d '{"contacts": {"primary": {"title": "Mr", "firstName": "JOHN", "lastName": "DOE", "phone": "0102030405", "email": "jonh.doe@nobody.com" }, "secondary": { "title": "Mr", "firstName": "", "lastName": "DUCK", "phone": "0602030405", "email": "donald.duck@nobody.com" } } }'

The contacts will updated :

{
    "contacts": {
        "primary": {
            "title": "Mr",
            "firstName": "JOHN",
            "lastName": "DOE",
            "phone": "0102030405",
            "email": "jonh.doe@nobody.com",
            "mobile": ""
        },
        "secondary": {
            "title": "Mr",
            "firstName": "",
            "lastName": "DUCK",
            "phone": "0602030405",
            "email": "donald.duck@nobody.com",
            "mobile": ""
        }
    }
}

If you want to remove the secondary contact, you need to send all the detail of the primary contacts in the body and not the secondary:

curl -X PATCH https://api.orange.com/core-information/b2b/v2/locations/{Location_id}\
    -H "Authorization: {access_token}" \
    -H "X-API-key: {dev_key}" \
    -d '{"contacts": {"primary": {"title": "Mr", "firstName": "JOHN", "lastName": "DOE", "phone": "0102030405", "email": "jonh.doe@nobody.com" } } }'

The secondary contacts will removed :

{
    "contacts": {
        "primary": {
            "title": "Mr",
            "firstName": "JOHN",
            "lastName": "DOE",
            "phone": "0102030405",
            "email": "jonh.doe@nobody.com",
            "mobile": ""
        },
        "secondary": {}
    }
}

Go up