Customers

A customer is an organization or person that has a CMS license.  

URI Definition

Method               

URI and Fields

GET


/iap/customers/{customerId}                                                                                                     

Returns the specified customer, or all customers if no customer ID is specified.

Response

Parameter                            Description                                                                                                                
id[integer]
name[string]
shortName[string]
cid[integer] Customer ID. Unique identifier for a customer.
encryptionKey[string]
deviceSearchingRange[integer] This parameter is reserved for future use by Control-M devices.
deviceNumberLimitation[integer]
licensingEnhancement[string]
googleApiKey[string]
licenseTill[unix time]

Response Example:

{                                                                                                                                                                            
"id":63,
"name":"test",
"shortName":"tes",
"cid":1,
"encryptionKey":"6e7ac50baaf038b7b11f3e015e16236e",
"deviceSearchingRange":50,
"deviceNumberLimitation":255,
"licensingEnhancement":"STANDARD",
"googleApiKey":null,
"licenseTill":1847244546482
}
/iap/customers/current

Returns the customer associated with the current session.          

The response parameters and example are the same as for /iap/customers/{customerId}, above.


/iap/customers/generateKey

Returns a generated custom key for the customer.

Response

Parameter                            Description                                                                                                                 
value [string]

Response Example:

{                                                                                                                                                                            
"value": "a763fcfbd99b2c0208fb3cdee9bd4de"
}

PUT

/iap/customers

Updates the specified customer in the CMS.  See arguments under the GET method above.

Request payload:

{
"id" : [integer],
"name" : [string],
"shortName" : [string],
"cid": [integer],
"encryptionKey" : [string],
"deviceSearchingRange" : [integer],
"deviceNumberLimitation" : [integer],
"licenseTill" : [unix time],
"licensingEnhancement": [string],
"googleApiKey": [string]
}

Success Response:

{
"id" : [integer],
"name" : [string],
"shortName" : [string],
"cid": [integer],
"encryptionKey" : [string],
"deviceSearchingRange" : [integer],
"deviceNumberLimitation" : [integer],
"licensingEnhancement": [string],
"googleApiKey": [string],
"licenseTill" : [unix time]
}

Example

https://localhost/iap/customers                                                                                                            


Request body:

{
"id":515
"deviceSearchingRange":50,
"deviceNumberLimitation":255,
"encryptionKey":"715de4428eea10c1b852b8adb020c1ec",
"cid":5,
"name":"Customer 555",
"shortName":"rtr",
"licensingEnhancement":"PROFESSIONAL",
"googleApiKey":"dffref90808hfljjfggff",
"licenseTill":1868881019341
}

 

Response:

{
"id": 515,
"name": "Customer 555",
"shortName": "rtr",
"cid": 5,
"encryptionKey": "715de4428eea10c1b852b8adb020c1ec",
"deviceSearchingRange": 50,
"deviceNumberLimitation": 255,
"licensingEnhancement": "PROFESSIONAL",
"googleApiKey": "dffref90808hfljjfggff",
"licenseTill": 1868881019341
}


POST

/iap/customers

Adds a new customer to the CMS.  See arguments under the GET method above.

Request payload:

{
"name" : [string],
"shortName" : [string],
"cid": [integer],
"encryptionKey" : [string],
"deviceSearchingRange" : [integer],
"deviceNumberLimitation" : [integer],
"licenseTill" : [unix time],
"licensingEnhancement": [string],
"googleApiKey": [string]
}

Success Response:

{
"id" : [integer],
"name" : [string],
"shortName" : [string],
"cid": [integer],
"encryptionKey" : [string],
"deviceSearchingRange" : [integer],
"deviceNumberLimitation" : [integer],
"licensingEnhancement": [string],
"googleApiKey": [string],
"licenseTill" : [unix time]
}

Example

https://localhost/iap/customers                                                                                                            


Request body:

{
"deviceSearchingRange":50,
"deviceNumberLimitation":255,
"encryptionKey":"715de4428eea10c1b852b8adb020c1ec",
"cid":5,
"name":"Customer 5",
"shortName":"rtr",
"licensingEnhancement":"PROFESSIONAL",
"googleApiKey":"dffref90808hfljjfggff",
"licenseTill":1868881019341
}

Response:

{
"id": 515,
"name": "Customer 5",
"shortName": "rtr",
"cid": 5,
"encryptionKey": "715de4428eea10c1b852b8adb020c1ec",
"deviceSearchingRange": 50,
"deviceNumberLimitation": 255,
"licensingEnhancement": "PROFESSIONAL",
"googleApiKey": "dffref90808hfljjfggff",
"licenseTill": 1868881019341
}

DELETE

/iap/customers/{customerId}

Deletes the specified customer from the CMS.

Required Parameter

  • customerId - ID of the customer to delete

Response

A successful response is empty.


Query Parameters

Optional query parameters can be used with your REST request.  Specifying queries is described under Queries and ParametersPath Parameters, and Query Parameters.

Examples

Method: POST

Address: /iap/customers

JSON Payload:

{

    'id': 32001,
    'name': 'myCustomerName',
    'shortName': 'mcn',
    'deviceSearchingRange': 50,
    'encryptionKey': '273fbdb68d73d6b851ce1853c5ab377d',
    'deviceNumberLimitation': 330000, 
    'licenseTill': 1825034053575
}


Method: GET

Address: /iap/customers

Response:

[
{
"id":102,
"name":"EnOcean",
"shortName":"EnO",
"cid":1,
"encryptionKey":"466daa7dc1530d18cdebe6245abf43a6",
"deviceSearchingRange":50,
"deviceNumberLimitation":255,
"licensingEnhancement":"STANDARD",
"googleApiKey":null,
"licenseTill":1856319603519
}
]