.wpb_animate_when_almost_visible { opacity: 1; }
Network
Manage, monitor and automate your Orange Business Services Network and SD-WAN Services
2.0

API Reference with the available methods and resources: swagger

Table of Contents



Prerequisite before starting

  • For this "Getting started", we will use the command-line tool Curl.
  • An other "Getting started" with Postman is available: postman.
  • The API requires 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 devices

List all my Devices without filter, sort or paging

Request

  • Method & URL : GET , https://api.orange.com/network/b2b/v2/devices
  • 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/network/b2b/v2/devices

Response

Header

you will receive 3 specific headers:

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

Body

List of devices in a json format

    HTTP/1.1 200 OK
    Content-Type: application/json; charset=UTF-8
      {
         {
        "id": "10-FI01N2QED6",
        "name": "PARS446",
        "type": "ROUTER",
        "category": "WAN_DEVICE",
        "isVirtual": false,
        "state": "TERMINATED",
        "customer": {
        ...

Filter the device list

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

Example : retrieve active routers

Request

  • Add the following parameters to the URL :state=OPERATIONAL&TYPE=ROUTER.
curl -X GET \
    -H "Authorization: {access_token}" \
    -H "X-API-key: {dev_key}" \
    https://api.orange.com/network/b2b/v2/devices?state=OPERATIONAL&TYPE=ROUTER

Response

  • List of your filtered Devices in a json format

Pagination of the devices 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 Devices page per page.

Example: to get the next 20 Devices from the 10th Devices of the global list and ordered by the creation date :

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/network/b2b/v2/devices?offset=10&limit=20&sort=-createdAt

Response

  • List of 20 devices in a json format

Get details of an Device

With the Network API, you are able to retrieve all information about a specific device.

You only need the id of the device (you can retrieve it from the device list).

Request

  • Add the the id of the device method such as :/devices/{device_id}.
curl -X GET \
    -H "Authorization: {access_token}" \
    -H "X-API-key: {dev_key}" \
    https://api.orange.com/network/b2b/v2/devices/{device_id}

Response

  • Your device 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.

Go up