Playground Admin

mock

Enables developers to prototype and validate various use cases in real-time, without impacting live systems

Network API
Camara
Playground

Getting Started with Playground API - Admin

The Playground API allows you to test the Camara API by modifying the data used in responses.

What are Playground APIs?

It contains two types of APIs:

  • Admin APIs: With these API, you can to create, read, update, delete and list fake data associated with a fake phone number.
  • Camara APIs: These standard APIs use the data you manage with the Admin API to respond to calls. They allow you to easily create scenarios, integrate with your service, test, and switch to real Camara APIs. They will respond just like the real Camara APIs.

Let's get started

To manage your phone numbers, there is only one API with which you can CREATE, READ, UPDATE and DELETE them.

The process is in two steps, first obtain a token to call the Admin APIs.

1. Obtain an Admin API Token

Make a POST request to /oauth/v3/token with your credentials to get a token for admin operations.

Example:

POST https://api.orange.com/oauth/v3/token
Authorization: Basic {YourCredentials}
Content-Type: application/x-www-form-urlencoded

grant_type=client_credentials

Response:

{
  "token_type": "Bearer",
  "access_token": "eyJaW9uL...FvC1BO1owNdw",
  "expires_in": 3600
}

The access_token is called admin_access_token in the following steps.

2. Manage the phone numbers

Use the admin API to create or modify phone number data, which will influence the responses from the Camara API.

2.1 List the phone number of your playground

List your phone numbers :

Example:

POST https://api.orange.com/camara/playground/admin/v1.0/action
Authorization: Bearer {admin_access_token}
Content-Type: application/json
{
  "action": "LIST",
}

Getting started, there should be no phone number available, but some predefined ones may be available but not listed there.

2.2 Create a new phone number

Example:

POST https://api.orange.com/camara/playground/admin/v1.0/action
Authorization: Bearer {admin_access_token}
Content-Type: application/json
{
  "action": "CREATE",
  "phoneNumber": "+33612345678",
}

This request creates a new fake phoneNumber +33612345678 with default associated data.

This new phone number should be displayed in the LIST

2.3 Display the phone number data

This command display the internal data of the playground used to answer the Camara API.

Example:

POST https://api.orange.com/camara/playground/admin/v1.0/action
Authorization: Bearer {admin_access_token}
Content-Type: application/json
{
  "action": "READ",
  "phoneNumber": "+33612345678",
}

All those data are mutable to allow you to tune the phone number of your Playground according to your needs.

2.4 Update the phone number

To modify the data, use the UPDATE command.

Keep the format of the data you received from the READ command and modify the value.

All the fields of the data are not required, you can update it partially.

Example:

POST https://api.orange.com/camara/playground/admin/v1.0/action
Authorization: Bearer {admin_access_token}
Content-Type: application/json
{
  "action": "UPDATE",
  "phoneNumber": "+33789103023",
  "data": {
    "location": {
      "lastLocationTime": "2025-01-01T18:30:00.000Z",
      "available": true,
      "latitude": 48.800408,
      "longitude":  2.294889,
      "radius": 800
    }
  }
}

2.5 Delete deprecated phone number

You can delete deprecated entries of your Playground

Example:

POST https://api.orange.com/camara/playground/admin/v1.0/action
Authorization: Bearer {admin_access_token}
Content-Type: application/json
{
  "action": "DELETE",
  "phoneNumber": "+33612345678",
}

Be careful, the deletion cannot be undone.

3. Use the phone number

Now you have phone numbers on your Playground, you can use the Camara APIs with those phone number.