Product Documentation

XenMobile REST API reference

Sep 23, 2015

You can call REST services by using any REST client and the XenMobile REST API to call services that are exposed through the XenMobile console. The API does not require you to sign on to the XenMobile console to call any service described in this article.

You need one of the following permissions to access the REST API:

  • Public API access permission set as part of role-based access configuration (for more information on setting role-based access, see Configuring roles with RBAC)
  • Super user permission

You can invoke REST API services by using REST client.

To invoke REST API services

The following are examples of how to invoke the REST API using each of the preceding methods.

注意

In the following examples, change the host name and port number to match your environment.

Using a REST client

This example uses the Advanced REST client for Chrome.

Login

URL: https://<host-name>:<port-number>/xenmobile/api/v1/authentication/login

Request: { "login":"administrator", "password":"password" }

Method type: POST

Content type: application/json

localized image

Get Delivery Groups by filter

URL: /xenmobile/api/v1/deliverygroups/filter

Request 複製

{

        "start": 1,

        "sortOrder": "DESC",

        "deliveryGroupSortColumn":"id",

        "search":"add"

}

Method type: POST

Content type: application/json

localized image

Public API REST services

The following table lists the available REST services.

Function

REST service

URL

Login

Login

/xenmobile/api/v1/authentication/login

 

Logout

/xenmobile/api/v1/authentication/logout

Certificates

Get all certificates

xenmobile/api/v1/certificates

 

Delete certificates

xenmobile/api/v1/certificates/

 

Import certificate as SAML

xenmobile/api/v1/certificates/import/certificate/saml

 

Import certificate as server

xenmobile/api/v1/certificates/import/certificate/server

 

Import certificate as listener

xenmobile/api/v1/certificates/import/certificate/listener

 

Create certificate

xenmobile/api/v1/certificates/csr

 

Export certificate

xenmobile/api/v1/certificates/export

Keystore

Import keystore as server

xenmobile/api/v1/certificates /import/keystore/server

 

Import keystore as SAML

xenmobile/api/v1/certificates /import/ keystore/saml

 

Import keystore as APNS

xenmobile/api/v1/certificates /import/ keystore/apns

 

Import keystore as listener

xenmobile/api/v1/certificates /import/ keystore/listener

Licenses

Get License Info

xenmobile/api/v1/licenses

 

Save License Info

xenmobile/api/v1/licenses

 

Upload License

xenmobile/api/v1/licenses/upload

 

Delete Licenses

xenmobile/api/v1/licenses/remove

 

Activate License

xenmobile/api/v1/licenses/activate/{licenseType}

 

Test Server

xenmobile/api/v1/licenses/testserver

 

Get Expiration Date

xenmobile/api/v1/licenses/getexpirationdate

LDAP

Get LDAP configuration list

xenmobile/api/v1/ldap

 

Add a new LDAP

xenmobile/api/v1/ldap/msactivedirectory

 

Edit a new LDAP

xenmobile/api/v1/ldap/msactivedirectory/{name}

 

Set default LDAP

xenmobile/api/v1/ldap/default/{name}

 

Delete LDAP

configxenmobile/api/v1/ldap/{name}

NetScaler

Get NetScaler Gateway

xenmobile/api/v1/netscaler

 

Add NetScaler Gateway

xenmobile/api/v1/netscaler

 

Update NetScaler Gateway

xenmobile/api/v1/netscaler/{id}

 

Set Default NetScaler Gateway

xenmobile/api/v1/netscaler/default/{id}

 

Delete NetScaler Gateways

xenmobile/api/v1/netscaler

Notification

Get Notification Servers

xenmobile/api/v1/notificationserver

 

Get Notification Server by Id

xenmobile/api/v1/notificationserver/{id}

 

Add/Edit SMTP Server

xenmobile/api/v1/notificationserver/smtp

 

Add/Edit SMS Gateway

xenmobile/api/v1/notificationserver/sms

 

Set SMTP server as default (activate)

xenmobile/api/v1/notificationserver/activate/smtp/{id}

 

Delete notification server

xenmobile/api/v1/notificationserver/{id}

 

Set SMS Gateway as default (activate)

xenmobile/api/v1/notificationserver/activate/sms/{id}

Local Users and Groups

Get Local Users

xenmobile/api/v1/localusersgroups

 

Get Specific User

xenmobile/api/v1/localusersgroups/{name}

 

Add User

xenmobile/api/v1/localusersgroups

 

Import Provisioning File

xenmobile/api/v1/localusersgroups/importprovisioningfile

 

Update User

xenmobile/api/v1/localusersgroups

 

Delete Users

xenmobile/api/v1/localusersgroups/deletelocalusers

 

Delete User

xenmobile/api/v1/localusersgroups/{name}

 

Get Local Users By Filter

xenmobile/api/v1/localusersgroups/filter

 

Reset User Password

xenmobile/api/v1/localusersgroups/password

App Management

Delete Application Container

xenmobile/api/v1/application/{container id}

 

Delete Application Containers

xenmobile/api/v1/application

 

Get App Containers by Filter

xenmobile/api/v1/application/filter

 

Get Weblink Apps Container by Container ID

xenmobile/api/v1/application/weblink/{container id}

 

Get Web and SAAS Apps Container by Container ID

xenmobile/api/v1/application/saas/{container id}

 

Get Appstore Apps Container by Container ID

xenmobile/api/v1/application/appstore/{container id}

 

Get Mobile Apps Container by Container ID

xenmobile/api/v1/application/mobile/{container id}

Delivery Groups

Add Delivery Groups

xenmobile/api/v1/deliverygroups

 

Edit Delivery Groups

xenmobile/api/v1/deliverygroups

 

Get Delivery Group Specific

xenmobile/api/v1/deliverygroups/{role name}

 

Get Delivery Groups by Filter

xenmobile/api/v1/deliverygroups/filter

 

Get Delivery Groups All

xenmobile/api/v1/deliverygroups

 

Delete Delivery Groups

xenmobile/api/v1/deliverygroups

 

Get Deployment Status

xenmobile/api/v1/deliverygroups/getdeploymentstatus/{name}

Server Properties

Get Server Properties

xenmobile/api/v1/serverproperties/

 

Get Server Properties by Filter

xenmobile/api/v1/serverproperties/filter/

 

Add Server Properties

xenmobile/api/v1/serverproperties/

 

Edit Server Properties

xenmobile/api/v1/serverproperties/

 

Reset Server Properties

xenmobile/api/v1/serverproperties/reset

 

Delete Server Properties

xenmobile/api/v1/serverproperties/

REST API definitions

The following sections describe the APIs listed in the preceding table.

Remember: In the following examples, change the host name and port number to match your environment.

To log on to the public API

Accepts user credentials and uses the existing AuthenticationManager to authenticate the user. The first time the AuthenticationManager authenticates a user, it generates an authentication token that is placed in the request header.

URL: https://<host-name>:<port-number>/xenmobile/api/v1/authentication/login

Request type: POST

Request Parameters 複製

{ "login":"administrator", "password":"password" }

Example Response 複製

{

      "auth-token":"q483409eu82mkfrcdiv90iv0gc:q483409eu82mkfrcdiv90iv0gc"

}

To log out of the public API

Removes the authentication token issued when the user logged on and logs out the current user. Requires the user name and the authentication token.

URL: https://<host-name>:<port-number>/xenmobile/api/v1/authentication/logout

Request type: POST

Request header: auth_token – the authentication token obtained when the user logged on

Request Parameters 複製

{“login”:”administrator”}

Example Response 複製

{"Status":"user administrator logged out successfully."}

To manage certificates

With certificate management operations, you can view, delete, import, and add certificates through the public API.

Get all certificates

Returns all certificates in the database.

URL: https://<host-name>:<port-number>/xenmobile/api/v1/certificates

Request type: GET

Request header: auth_token – the authentication token obtained when the user logged on

Request Parameters: None

Example Response 複製

 

{

      "status": 0,

      "message": "Success",

      "csrRequest": null,

      "apnsCheck": null,

      "certificate": [

              {

                      "name": "ent-root-ca",

                      "description": "test description server 1",

                      "validFrom": "2012-02-22",

                      "validTo": "2017-02-21",

                      "type": "chain",

                      "isActive": false,

                      "privateKey": "false",

                      "ca": null,

                      "id": 4656,

                      "certDetails": {

                             "signatureAlgo": "SHA1WithRSAEncryption",

                             "version": null,

                             "serialNum": "34823788180011841845726834648368716413",

                             "issuerName": {

                                     "certString": "DC=com,DC=example,CN=ent-root-ca",

                                     "emailAddress": null,

                                     "commonName": "ent-root-ca",

                                     "orgUnit": null,

                                     "org": null,

                                     "locality": null,

                                     "state": null,

                                     "country": null,

                                     "description": null

                             },

                             "subjectName": {

                                     "certString": "DC=com,DC=example,CN=ent-root-ca",

                                     "emailAddress": null,

                                     "commonName": "ent-root-ca",

                                     "orgUnit": null,

                                     "org": null,

                                     "locality": null,

                                     "state": null,

                                     "country": null,

                                     "description": null

                             }

                      }

              }

      ],

      "apnsCheckObj": {

              "topicNameMismatch": false,

              "certExpired": false,

              "certNotYetValid": false,

              "malformed": false

      }

}

 

Delete certificates

Deletes the specified certificates. Requires the certificate ID for each certificate to be deleted.

URL: https://<host-name>:<port-number>/xenmobile/api/v1/publicapi/certificates

Request type: DELETE

Request header: auth_token – the authentication token obtained when the user logged on

Request Parameters 複製

{“certificateIds”:[“<certificate_id_1>”,”<certificate_id_2>”, ..., "<certificate_id_n>"]}

Import certificate as SAML certificate

Imports the specified certificate as a SAML certificate.

URL: https://<host-name>:<port-number>/xenmobile/api/v1/certificates/import/certificate/saml

Request type: POST

Request header: auth_token – the authentication token obtained when the user logged on

           Content type – Multipart/form-data

Request Parameters 複製

certImportData = {

      'type':'cert',

      'checkTopicName':true,

      'password':'1111',

      'alias':'',

      'useAs':'saml',

      'keystoreType':'PKCS12',

      'uploadType':'certificate',

      'description':'test description'

}

uploadFile = <the actual file to be uploaded>

Example Response 複製

{

      "status": 0,

      "message": "Success",

      "csrRequest": null,

      "apnsCheck": {

              "topicNameMismatch": false,

              "certExpired": false,

              "certNotYetValid": false,

              "malformed": false

      },

      "certificate": null,

      "apnsCheckObj": {

              "topicNameMismatch": false,

              "certExpired": false,

              "certNotYetValid": false,

              "malformed": false

      }

}

Import certificate as server certificate

Imports the specified certificate as a server certificate.

URL: https://<host-name>:<port-number>/xenmobile/api/v1/certificates/import/certificate/server

Request type: POST

Request header: auth_token – the authentication token obtained when the user logged on

                               Content type – Multipart/form-data

Request Parameters 複製

certImportData = {

      'type':'cert',

      'checkTopicName':true,

      'password':'1111',

      'alias':'',

      'useAs':'none',

      'keystoreType':'PKCS12',

      'uploadType':'certificate',

      'description':'test description'

}

uploadFile = <the actual file to be uploaded>

Example Response 複製

{

      "status": 0,

      "message": "Success",

      "csrRequest": null,

      "apnsCheck": {

              "topicNameMismatch": false,

              "certExpired": false,

              "certNotYetValid": false,

              "malformed": false

      },

      "certificate": null,

      "apnsCheckObj": {

              "topicNameMismatch": false,

              "certExpired": false,

              "certNotYetValid": false,

              "malformed": false

      }

}

Import certificate as listener certificate

Imports the specified certificate as an SSL listener certificate.

URL: https://<host-name>:<port-number>/xenmobile/api/v1/certificates/import/certificate/listener

Request type: POST

Request header: auth_token – the authentication token obtained when the user logged on

                               Content type – Multipart/form-data

Request Parameters 複製

 

certImportData = { 

      'type':'cert',

      'checkTopicName':true,

      'password':'1111',

      'alias':'',

      'useAs':'listener',

      'keystoreType':'PKCS12',

      'uploadType':'certificate',

      'description':'test description'

}

uploadFile = <the actual file to be uploaded>

 

Example Response 複製

{

      "status": 0,

      "message": "Success",

      "csrRequest": null,

      "apnsCheck": {

              "topicNameMismatch": false,

              "certExpired": false,

              "certNotYetValid": false,

              "malformed": false

      },

      "certificate": null,

      "apnsCheckObj": {

              "topicNameMismatch": false,

              "certExpired": false,

              "certNotYetValid": false,

              "malformed": false

      }

}

Create certificate

Creates a self-signed certificate or a CSR request that requires a CA signature.

URL: https://<host-name>:<port-number>/xenmobile/api/v1/certificates/csr

Request type: POST

Request header: auth_token – the authentication token obtained when the user logged on

                               Content type – Application/form_url_encoded

Request Parameters 複製

{

      "isSelfSign":true,

      "csrRequest":{

      "commonName":"your certificate name",

      "description":"certificate description",

      "org":"organization",

      "orgUnit":"organization unit",

      "locality":"location",

      "state":"CA",

      "country":"US",

      "isSelfSign":true

      },

"validDays":"60",

"keyLength":"1024",

"useAs":"none"

}

Example Response 複製

{

      status: 0

      message: "Success"

      csrRequest: ""

      apnsCheck: null

      certificate: null

      apnsCheckObj:

      {

      topicNameMismatch: false

      certExpired: false

      certNotYetValid: false

      malformed: false

      }

}

Export certificate

Downloads the specified certificate. The following table lists the parameters for this operation.

Parameter

Required

Description

id

Yes

The numeric certificate ID

password

 

Password associated with the certificate being exported.

exportPrivateKey

 

Flag indicating whether to export the private key.

URL: https://<host-name>:<port-number>/xenmobile/api/v1/certificates/export

Request type: POST

Request header: auth_token – the authentication token obtained when the user logged on

                               Content type – application/json

Request Parameters 複製

{

      "id": "300",

      "password": "1111",

      "exportPrivateKey": true

}

Example response: Displays the certificate string on successful request.

To manage keystores

You can import keystores through the public API.

Import a server keystore

Imports a server keystore.

URL: https://<host-name>:<port-number>/xenmobile/api/v1/certificates/import/keystore/server

Request type: POST

Request header: auth_token – the authentication token obtained when the user logged on

                               Content type – Multipart/form-data

Request Parameters 複製

certImportData = {

      'type':'cert',

      'checkTopicName':true,

      'password':'1111',

      'alias':'',

      'useAs':'none',

      'keystoreType':'PKCS12',

      'uploadType':'keystore',

      'description':'test description'

      }

      uploadFile = <certificate file>

      uploadFile = <private key file>

Example Response 複製

{

      "status": 0,

      "message": "Success",

      "csrRequest": null,

      "apnsCheck": {

              "topicNameMismatch": false,

              "certExpired": false,

              "certNotYetValid": false,

              "malformed": false

      },

      "certificate": null,

      "apnsCheckObj": {

              "topicNameMismatch": false,

              "certExpired": false,

              "certNotYetValid": false,

              "malformed": false

      }

}

Import SAML keystore

Imports a SAML keystore.

URL: https://<host-name>:<port-number>/xenmobile/api/v1/certificates/import/keystore/saml

Request type: POST

Request header: auth_token – the authentication token obtained when the user logged on

                               Content type – Multipart/form-data

Request Paramaters 複製

certImportData = {

      'type':'cert',

      'checkTopicName':true,

      'password':'1111',

      'alias':'',

      'useAs':'none',

      'keystoreType':'PKCS12',

      'uploadType':'keystore',

      'description':'test description'

 }

      uploadFile = <certificate file>

      uploadFile = <private key file>

Example Response 複製

{

      "status": 0,

      "message": "Success",

      "csrRequest": null,

      "apnsCheck": {

              "topicNameMismatch": false,

              "certExpired": false,

              "certNotYetValid": false,

              "malformed": false

      },

      "certificate": null,

      "apnsCheckObj": {

              "topicNameMismatch": false,

              "certExpired": false,

              "certNotYetValid": false,

              "malformed": false

      }

}

Import APNs keystore

Imports an APNS keystore.

URL: https://<host-name>:<port-number>/xenmobile/api/v1/certificates/import/keystore/apns

Request type: POST

Request header: auth_token – the authentication token obtained when the user logged on

                               Content type – Multipart/form-data

Request Parameters 複製

certImportData = {

      'type':'cert',

      'checkTopicName':true,

      'password':'1111',

      'alias':'',

      'useAs':apns,

      'keystoreType':'PKCS12',

      'uploadType':'keystore',

      'description':'test description'

      }

uploadFile = <certificate file>

uploadFile = <private key file>

Example Response 複製

{

      "status": 0,

      "message": "Success",

      "csrRequest": null,

      "apnsCheck": {

                     "topicNameMismatch": false,

                     "certExpired": false,

                     "certNotYetValid": false,

                     "malformed": false

      },

      "certificate": null,

      "apnsCheckObj": {

              "topicNameMismatch": false,

              "certExpired": false,

              "certNotYetValid": false,

              "malformed": false

      }

}

Import SSL listener keystore

Imports an SSL listener keystore.

URL: https://<host-name>:<port-number>/xenmobile/api/v1/certificates/import/keystore/listener

Request type: POST

Request header: auth_token – the authentication token obtained when the user logged on

                               Content type – Multipart/form-data

Request Parameters 複製

certImportData = {

      'type':'cert',

      'checkTopicName':true,

      'password':'1111',

      'alias':'',

      'useAs':”listener”,

      'keystoreType':'PKCS12',

      'uploadType':'keystore',

      'description':'test description'

      }

 uploadFile = <certificate file>

 uploadFile = <private key file>

Example Response 複製

{

      "status": 0,

      "message": "Success",

      "csrRequest": null,

      "apnsCheck": {

              "topicNameMismatch": false,

              "certExpired": false,

              "certNotYetValid": false,

              "malformed": false

      },

"certificate": null,

"apnsCheckObj": {

              "topicNameMismatch": false,

              "certExpired": false,

              "certNotYetValid": false,

              "malformed": false

      }

}

To manage licenses

Lets you manage licenses through the public API.

Get license information

Lists information about all licenses.

URL: https://<host-name>:<port-number>/xenmobile/api/v1/licenses

Request type: GET

Request header: auth_token – the authentication token obtained when the user logged on

                               Content type – application/json

Example Response 複製

{

      status: 0

      message: "Success"

      cpLicenseServer: {

              serverAddress: "192.0.2.20"

              localPort: 0

              remotePort: 27000

              serverType: "remote"

              licenseType: "none"

              isServerConfigured: true

              gracePeriodLeft: 0

              isRestartLpeNeeded: null

              isScheduleNotificationNeeded: null

                      licenseList: []

              {

                      sadate: "2015.1210"

                      notice: "Example Systems Inc."

                      vendorString: ";LT=Retail;GP=720;UDM=U;LP=90;CL=STD,ADV,ENT;SA=1;ODP=0"

                      licensesInUse: 0

                      licensesAvailable: 102

                      overdraftLicenseCount: 2

                      p_E_M: "CXM_ENTU_UD"

                      serialNumber: "cxmretailent1000user"

                      licenseType: "Retail"

                      expirationDate: "01-DEC-2015"

              }

              licenseNotification:

              {

                      id: 1

                      notificationEnabled: false

                      notifyFrequency: 7

                      notifyNumberDaysBeforeExpire: 60

                      recepientList: ""

                      emailContent: "License expiry notice"

              }

      }

}

Save license information

Saves all license information.

URL: https://<host-name>:<port-number>/xenmobile/api/v1/licenses

Request type: POST

Request header: auth_token – the authentication token obtained when the user logged on

                               Content type – application/json

Request Parameters 複製

{

      "serverAddress": "192.0.2.20",

      "localPort": 0,

      "remotePort": 27000,

      "serverType": "remote",

      "licenseType": "none",

      "isServerConfigured": true,

      "gracePeriodLeft": 0,

      "isRestartLpeNeeded": true,

      "isScheduleNotificationNeeded": true,

      "licenseList": [],

      "licenseNotification": {

              "id": 1,

              "notificationEnabled": true,

              "notifyFrequency": 20,

              "notifyNumberDaysBeforeExpire": 60,

              "recepientList": "justa.name123@example.com",

              "emailContent": "Licenseexpirynotice"

      }

}

Example Response 複製

{

      "status": 0,

      "message": "Success"

}

Upload license file

Uploads the specified license file.

URL: https://<host-name>:<port-number>/xenmobile/api/v1/licenses/upload

Request type: POST

Request header: auth_token – the authentication token obtained when the user logged on

                               Content type – Multipart/form-data

Request Parameters: uploadFile = <license file to be uploaded>

Example Response 複製

{

      "status": 0,

      "message": "Success"

}

Activate license

Activates the specified license.

URL: https://<host-name>:<port-number>/xenmobile/api/v1/licenses/activate/{license type}

Request type: GET

Request header: auth_token – the authentication token obtained when the user logged on

                               Content type – application/json

Request Parameters: Append the license type to the activate license URL.

Example Response 複製

{

      "status": 0,

      "message": "Success"

      "cpLicenseServer": null

}

Remove all licenses

Removes all licenses.

URL: https://<host-name>:<port-number>/xenmobile/api/v1/licenses/remove

Request type: POST

Request header: auth_token – the authentication token obtained when the user logged on

                               Content type – application/json

Example Response 複製

{

      "status": 0,

      "message": "Success",

      "isConnected": null

}

Test license server

Performs a connectivity check on the license server.

URL: https://<host-name>:<port-number>/xenmobile/api/v1/licenses/testserver/

Request type: POST

Request header: auth_token – the authentication token obtained when the user logged on

                               Content type – application/json

Request Parameters 複製

{

      "serverAddress": "192.0.2.7",

      "localPort": 0,

      "remotePort": 27000,

      "serverType": null,

      "licenseType": null,

      "isServerConfigured": null,

      "gracePeriodLeft": 0,

      "isRestartLpeNeeded": null,

      "isScheduleNotificationNeeded": null,

      "licenseList": [],

      "licenseNotification": null

}

Example Response 複製

{

      "status": 0,

      "message": "Success",

      "isConnected": true

}

Get earliest expiration date

Finds the license with the earliest expiration date.

URL: https://<host-name>:<port-number>/xenmobile/api/v1/licenses/getexpirationdate

Request type: GET

Request header: auth_token – the authentication token obtained when the user logged on

                               Content type – application/json

Example Response 複製

{

      "status": 0,

      "message": "Success",

      "expiredDate": 1448956800000,

      "daysBeforeExpire": 229,

      "daysInPOC": 0

}

To manage LDAP configurations

The following table lists the parameters used in LDAP configuration operations.

Parameter

Required

Description

primaryHost

Yes

Primary LDAP server IP address or host name. Input as IP address or FQDN.

secondaryHost

No

Secondary LDAP server IP address or host name. Input as IP address or FQDN.

port

Yes

LDAP server port number

username

Yes

Valid LDAP server user name

password

Yes

Password for username

userBaseDN

Yes

 

lockoutLimit

No

 

lockoutTime

No

 

useSecure

No

 

userSearchBy

Yes

Search for users by upn or samaccount

domain

Yes

Unique LDAP server domain name

domainAlias

Yes

Alias for the LDAP domain

globalCatalogPort

No

 

gcRootContext

No

 

groupBaseDN

Yes

 

isDefault

No

Part of the GET response that indicates whether the LDAP configuration is the default.

name

No

Part of the GET response that is a unique identifier used to update or delete the LDAP configuration.

List LDAP configuration

Lists the entire LDAP configuration in XenMobile.

URL: https://<host-name>:<port-number>/xenmobile/api/v1/ldap

Request type: GET

Request header: auth_token – the authentication token obtained when the user logged on

                               Content type – application/json

Example Response 複製

{

      “result”: [

      { "primaryHost":"192.0.2.7","secondaryHost":"","port":"389","username":"aaa@example.com","password":"1.pwd","userBaseDN":"dc=example,dc=com","groupBaseDN":"dc=example,dc=com","lockoutLimit":"0","lockoutTime":"1","useSecure":"false","userSearchBy":"upn","domain":"example.com","domainAlias":"exampleAlias","globalCatalogPort":"0","gcRootContext":"",“name”:”activeDirectory1”,”isDefault”:true },

      { "primaryHost":"192.0.2.7","secondaryHost":"","port":"389","username":"test@xmexample.com","password":"1.pwd","userBaseDN":"dc=xmexample,dc=com","groupBaseDN":"dc=xmexample,dc=com","lockoutLimit":"0","lockoutTime":"1","useSecure":"false","userSearchBy":"upn","domain":"xmexample.com","domainAlias":"xmexampleAlias","globalCatalogPort":"0","gcRootContext":"",“name”:”activeDirectory2”,”isDefault”:false }

      ]

}

Add new LDAP configuration

Adds a new LDAP configuration. The domain name must be unique and cannot be the same as any other LDAP configuration.

URL: https://<host-name>:<port-number>/xenmobile/api/v1/ldap/msactivedirectory

Request type: POST

Request header: auth_token – the authentication token obtained when the user logged on

                               Content type – application/json

Request Parameters 複製

{

      "primaryHost":"192.0.2.7",

      "secondaryHost":"",

      "port":"389",

      "username":"aaa@example.com",

      "password":"1.pwd",

      "userBaseDN":"dc=example,dc=com",

      "groupBaseDN":"dc=example,dc=com",

      "lockoutLimit":"0",

      "lockoutTime":"1",

      "useSecure":"false",

      "userSearchBy":"upn",

      "domain":"example.com",

      "domainAlias":"exampleAlias",

      "globalCatalogPort":"0",

      "gcRootContext":""

}

Example Response 複製

{

      “status”: 0,

      “message”: “LDAP configuration created”

}

Edit LDAP configuration

Edits an existing LDAP configuration with the exception that you cannot change the domain with the edit operation.

URL: https://<host-name>:<port-number>/xenmobile/api/v1/ldap/msactivedirectory/{name}

Request type: PUT

Request header: auth_token – the authentication token obtained when the user logged on

                               Content type – application/json

Request Parameters 複製

{

      "primaryHost":"192.0.2.7",

      "secondaryHost":"",

      "port":"389",

      "username":"aaa@example.com",

      "password":"1.pwd",

      "userBaseDN":"dc=example,dc=com",

      "groupBaseDN":"dc=example,dc=com",

      "lockoutLimit":"0",

      "lockoutTime":"1",

      "useSecure":"false",

      "userSearchBy":"upn",

      "domain":"example.com",

      "domainAlias":"exampleAlias",

      "globalCatalogPort":"0",

      "gcRootContext":""

}

Set default LDAP configuration

Sets the specified LDAP configuration as the default.

URL: https://<host-name>:<port-number>/xenmobile/api/v1/ldap/default/{name}

Request type: PUT

Request header: auth_token – the authentication token obtained when the user logged on

                               Content type – application/json

Delete LDAP configuration

Deletes the specified LDAP configuration.

URL: https://<host-name>:<port-number>/xenmobile/api/v1/ldap/{name}

Request type: DELETE

Request header: auth_token – the authentication token obtained when the user logged on

                               Content type – application/json

To manage NetScaler Gateway configurations

Lets you manage NetScaler Gateway configurations. The following table lists the parameters used in NetScaler Gateway operations.

Parameter

Required

Description

name

Yes

Unique NetScaler Gateway name

alias

No

 

url

Yes

Publicly accessible URL for NetScaler Gateway

passwordRequired

Yes

 

logonType

Yes

Valid values: domain-only, domain-token, domain-certificate, certificate-only, certificate-token, and token-only

callback

No

 

default

Yes

Set to true or false when adding or editing a NetScaler Gateway configuration. If this parameter is not passed, the default is set to false.

id

No

Part of the GET response that is a unique identifier used to update or delete the NetScaler Gateway configuration.

List all NetScaler Gateway configurations

Lists the entire NetScaler Gateway configuration in XenMobile.

URL: https://<host-name>:<port-number>/xenmobile/api/v1/netscaler

Request type: GET

Request header: auth_token – the authentication token obtained when the user logged on

                               Content type – application/json

Example Response 複製

{

      “result”: [

              { "name":"displayName",

              "alias":"",

              "url":"https://externalURl.com",

              "passwordRequired":"false",

              "logonType":"domain",

              "default":"false","id":"",

              “callback”: [{“callbackUrl”:http://example.com,

              “ip”:”192.0.2.8”}]

              },

              { "name":"displayName",

              "alias":"",

              "url":"https://externalURl.com",

              "passwordRequired":"false",

              "logonType":"domain",

              "default":"false",

              "id":"",

              “callback”: [{“callbackUrl”:http://example.com,

              “ip”:”192.0.2.8”}]

              }

      ]

}

Add new NetScaler Gateway configuration

Adds a new NetScaler Gateway configuration.

URL: https://<host-name>:<port-number>/xenmobile/api/v1/netscaler

Request type: POST

Request header: auth_token – the authentication token obtained when the user logged on

                               Content type – application/json

Request Parameters 複製

{

      "name":"displayName",

      "alias":"",

      “default”:true, "url":"https://externalURl.com",

      "passwordRequired":"false",

      "logonType":"domain”,

      “callback”: [{“callbackUrl”:http://example.com,

      “ip”:”192.0.2.8”}]

}

Edit NetScaler Gateway configuration

Edit the specified NetScaler Gateway configuration.

URL: https://<host-name>:<port-number>/xenmobile/api/v1/netscaler/{id}

Request type: PUT

Request header: auth_token – the authentication token obtained when the user logged on

                               Content type – application/json

Request Parameters 複製

{

      "name":"displayName",

      "alias":"",

      "url":"https://externalURl.com",

      "passwordRequired":"false",

      "logonType":"domain”,

      “default”: true,

      “callback”: [{“callbackUrl”:http://ag.com,

      “ip”:”192.0.2.8”}]

}

Delete NetScaler Gateway configuration

Delete the specified NetScaler Gateway configuration.

URL: https://<host-name>:<port-number>/xenmobile/api/v1/netscaler/{id}

Request type: DELETE

Request header: auth_token – the authentication token obtained when the user logged on

                               Content type – application/json

Set default NetScaler Gateway configuration

Set the specified NetScaler Gateway configuration as the default.

URL: https://<host-name>:<port-number>/xenmobile/api/v1/netscaler/default/{id}

Request type: PUT

Request header: auth_token – the authentication token obtained when the user logged on

                               Content type – application/json

To manage SMS and SMTP notification server configurations

You can add, edit, activate (set as default), and delete the SMS server and SMTP server configurations. The following table lists the parameters used with  SMS server and SMTP server configuration operations.

Parameter

Required

Description

name

Yes

Unique SMS/SMTP configuration name.

serverType

No

Notification server type (SMS or SMTP) sent by the server in the GET request.

active

No

Indicates whether server is being used for notifications. Only one server can be active for each type.

id

No

Unique identifier used to update, delete, or activate the server.

description

No

Description of the server.

SMS parameters

key

Yes

 

secret

Yes

 

virtualPhoneNumber

Yes

Must be in phone number format.

https

Yes

Default is false.

country

Yes

 

carrierGateway

Yes

Default is false.

SMTP parameters

secureChannelProtocol

Yes

The type of security protocol to use. Valid values are: None, SSL, and TLS. Default is none.

port

Yes

 

authentication

Yes

Whether to use authentication. Valid values are true and false.

username

Yes, if authentication is true.

 

password

Yes, if authentication is true.

 

msSecurePasswordAuth

Yes

Default is false.

fromName

Yes

 

fromEmail

Yes

 

numOfRetries

No

An integer. Default is 5.

timeout

No

An integer. Default is 30.

maxRecipients

No

An integer. Default is 100.

List all SMS and SMTP servers

Lists all SMS and SMTP servers in XenMobile.

URL: https://<host-name>:<port-number>/xenmobile/api/v1/notificationserver

Request type: GET

Request header: auth_token – the authentication token obtained when the user logged on

                               Content type – application/json

                               Accept – application/json

Example Response 複製

{

      “result”: [

              { "name":"serverName","serverType":"SMS,"active":"true","id":"10"},

              { "name":"serverName2","serverType":"SMTP,"active":"true","id":"10"},

              { "name":"serverName3","serverType":"SMS,"active":"false","id":"10"}

      ]

}

Get server details

Get details about the server by server ID.

URL: https://<host-name>:<port-number>/xenmobile/api/v1/notificationserver/{id}

Request type: GET

Request header: auth_token – the authentication token obtained when the user logged on

                               Content type – application/json

                               Accept – application/json

Example SMS Response 複製

{

      "name":"displayName",

      "description":"",

      "server":"192.0.2.9",

      "carrierGateway":"true",

      "country":"+93",

      "https":"false”,

      “key”: “123456”,

      "secret":"secretKey",

      "virtualPhoneNumber":"4085552222",

      "carrierGateway":"true"

}

Example SMTP Response 複製

{

      name":"displayName",

      "description":"",

      "server":"192.0.2.12",

      "secureChannelProtocol":"true",

      "port":"345",

      "authentication":"false”,

      “username”: “test”,

      “password”: “testPassword”,

      "msSecurePasswordAuth":"true",

      "fromName":"Email name",

      "fromEmail":test@example.com,

      "numOfRetries":5,

      "timeout":30,

      "maxRecipients":100

}

Add SMS server configuration

Add an SMS server configuration.

URL: https://<host-name>:<port-number>/xenmobile/api/v1/notificationserver/sms

Request type: POST

Request header: auth_token – the authentication token obtained when the user logged on

                               Content type – application/json

Request Parameters 複製

{

      "name":"displayName",

      "description":"",

      "server":"192.0.2.9",

      "carrierGateway":"true",

      "country":"+93",

      "https":"false”,

      “key”: “123456”,

      "secret":"secretKey",

      "virtualPhoneNumber":"4085552222",

      "carrierGateway":"true"

}

Edit SMS server configuration

Edit the specified SMS server configuration.

URL: https://<host-name>:<port-number>/xenmobile/api/v1/notificationserver/sms/{id}

Request type: PUT

Request header: auth_token – the authentication token obtained when the user logged on

                               Content type – application/json

Request Parameters 複製

{

      "name":"displayName",

      "description":"",

      "server":"192.0.2.9",

      "carrierGateway":"true",

      "country":"+93",

      "https":"false”,

      “key”: “123456”,

      "secret":"secretKey",

      "virtualPhoneNumber":"4085552222",

      "carrierGateway":"true"

}

Add SMTP server configuration

Adds an SMTP server configuration.

URL: https://<host-name>:<port-number>/xenmobile/api/v1/notificationserver/smtp

Request type: POST

Request header: auth_token – the authentication token obtained when the user logged on

                               Content type – application/json

Request Parameters 複製

{

      name":"displayName",

      "description":"",

      "server":"192.0.2.9"

      "secureChannelProtocol":"true",

      "port":"345",

      "authentication":"false”,

      “username”: “test”,

      “password”: “testPassword”,

      "msSecurePasswordAuth":"true",

      "fromName":"Email name",

      "fromEmail":test@example.com,

      "numOfRetries":5,

      "timeout":30,

      "maxRecipients":100

}

Edit SMTP configuration

Edit the specified SMTP configuration.

URL: https://<host-name>:<port-number>/xenmobile/api/v1/notificationserver/smtp/{id}

Request type: POST

Request header: auth_token – the authentication token obtained when the user logged on

                               Content type – application/json

Request Parameters 複製

{

      name":"displayName",

      "description":"Edited description",

      "server":"192.0.2.9"

      "secureChannelProtocol":"true",

      "port":"345",

      "authentication":"false”,

      “username”: “test”,

      “password”: “testPassword”,

      "msSecurePasswordAuth":"true",

      "fromName":"Email name",

      "fromEmail":test@example.com,

      "numOfRetries":5,

      "timeout":30,

      "maxRecipients":100

}

Delete server configuration

Delete the specified SMS or SMTP server configuration.

URL: https://<host-name>:<port-number>/xenmobile/api/v1/notificationserver/{id}

Request type: DELETE

Request header: auth_token – the authentication token obtained when the user logged on

                               Content type – application/json

Set default SMS configuration

Set the specified SMS server configuration as the default.

URL: https://<host-name>:<port-number>/xenmobile/api/v1/notificationserver/activate/sms/{id}

Request type: PUT

Request header: auth_token – the authentication token obtained when the user logged on

                               Content type – application/json

Set default SMTP configuration

Set the specified SMTP server configuration as the default.

URL: https://<host-name>:<port-number>/xenmobile/api/v1/notificationserver/activate/smtp/{id}

Request type: PUT

Request header: auth_token – the authentication token obtained when the user logged on

                               Content type – application/json

To manage local users and groups

You can manage local users and groups by using the following services.

Get all users

Get all local users.

URL: https://<host-name>:<port-number>/xenmobile/api/v1/localusersgroups

Request type: GET

Request header: auth_token – the authentication token obtained when the user logged on

                               Content type – application/json

Example Response 複製

{

      "status": 0,

      "message": "Success",

      "result": [

              {

                     "userid": 8,

                      "username": "admin",

                      "password": null,

                      "confirmPassword": null,

                      "groups": [],

                      "attributes": {

                             "company": "example"

                      },

                      "role": "ADMIN",

                      "roles": null,

                      "createdOn": "1/10/15 11:42 AM",

                      "lastAuthenticated": "1/10/15 11:42 AM",

                      "domainName": null,

                      "adUser": false,

                      "vppUser": false

              }

      ]

}

Get one user

Get the specified local user.

URL: https://<host-name>:<port-number>/xenmobile/api/v1/localusersgroups/{name}

Request type: GET

Request header: auth_token – the authentication token obtained when the user logged on

                               Content type – application/json

Example Response 複製

{

      "status": 0,

      "message": "Success",

      "result": {

              "userid": 8,

              "username": "admin",

              "password": null,

              "confirmPassword": null,

              "groups": [],

              "attributes": {

                      "company": "example"

              },

              "role": "ADMIN",

              "roles": null,

              "createdOn": "1/10/15 11:42 AM",

              "lastAuthenticated": "1/10/15 11:42 AM",

              "domainName": null,

              "adUser": false,

              "vppUser": false

      }

}

Add user

Add a user with the specified attributes.

URL: https://<host-name>:<port-number>/xenmobile/api/v1/localusersgroups

Request type: POST

Request header: auth_token – the authentication token obtained when the user logged on

                               Content type – application/json

Request Parameters 複製

{

      "attributes": {

              "badpwdcount": "4",

              "asuseremail": "justa.name@example.com",

              "company": "example",

              "mobile": "4695557854"

              },

      "groups": [

              "MSP"

              ],

      "role": "USER",

      "username": "justaname_XX",

      "password": "password"

}

Example Response 複製

{

      "status": 0,

      "message": "Success",

      "user": {

              "userid": 0,

              "username": "justaname_XX",

              "password": "password",

              "confirmPassword": null,

              "groups": [

                      "MSP"

              ],

              "attributes": {

                      "badpwdcount": "4",

                      "asuseremail": "justa.name@example.com",

                      "company": "example",

                      "mobile": "4695557854"

              },

              "role": "USER",

              "roles": null,

              "createdOn": null,

              "lastAuthenticated": null,

              "domainName": null,

              "adUser": false,

              "vppUser": false

      }

}

Update user

Update user attributes.

URL: https://<host-name>:<port-number>/xenmobile/api/v1/localusersgroups

Request type: PUT

Request header: auth_token – the authentication token obtained when the user logged on

                               Content type – application/json

Request Parameters 複製

{

      "attributes": {

              "badpwdcount": "4",

              "asuseremail": "justa.name@example.com",

              "company": "example",

              "mobile": "4695557854"

              },

      "groups": [

              "MSP"

              ],

      "role": "USER",

      "username": "justaname_XX",

      "password": "password"

}

Example Response 複製

{

      "status": 0,

      "message": "Success",

      "user": {

              "userid": 108,

              "username": "justaname_XX",

              "password": null,

              "confirmPassword": null,

              "groups": [

                      "MSP"

              ],

              "attributes": {

                      "badpwdcount": "4",

                      "asuseremail": "justa.name@example.com",

                      "company": "example",

                      "mobile": "4695557854"

              },

              "role": "USER",

              "roles": null,

              "createdOn": "3/27/15 1:10 PM",

              "lastAuthenticated": "3/27/15 1:10 PM",

              "domainName": null,

              "adUser": false,

              "vppUser": false

      }

}

Change user password

Reset a user's password; you can also change a user's password in the update local user call.

URL: https://<host-name>:<port-number>/xenmobile/api/v1/localusersgroups/resetpassword

Request type: PUT

Request header: auth_token – the authentication token obtained when the user logged on

                               Content type – application/json

Request Parameters 複製

{

      "username": “administrator”,

      “password”: “newPassword”

}

Example Response 複製

 

Response Errors:

1250 – User id not found

1252 – Failed to reset the password

Password can also be changed in the update local user call.

 

Delete users

Delete the specified users.

URL: https://<host-name>:<port-number>/xenmobile/api/v1/localusersgroups/resetpassword

Request type: DELETE

Request header: auth_token – the authentication token obtained when the user logged on

                               Content type – application/json

Request Parameters 複製

{ justaname XX }

Example Response 複製

{

      "status": 0,

      "message": "Success",

      "user": null

}

Delete one user

Delete the specified user.

URL: https://<host-name>:<port-number>/xenmobile/api/v1/localusersgroups/

Request type: DELETE

Request header: auth_token – the authentication token obtained when the user logged on

                               Content type – application/json

Example Response 複製

{

      "status": 0,

      "message": "Success",

      "user": null

}

Import provisioning file

Upload a file containing local user data. The file to be uploaded must be in .csv format. For more information on provisioning files, see Provisioning File Formats.

URL: https://<host-name>:<port-number>/xenmobile/api/v1/localusersgroups/importprovisioningfile

Request type: POST

Request header: auth_token – the authentication token obtained when the user logged on

                               Content type – application/json

Request Parameters 複製

importdata={"fileType:"user"}

uploadfile=<file to be uploaded.csv>

Example Response 複製

{

      "status": 0,

      "message": "Success",

      "user": null

}

To manage apps

You can manage apps with the following services.

Get all apps by filter

Get apps based on the specified filter parameters.

URL: https://<host-name>:<port-number>/xenmobile/api/v1/application/filter

Request type: GET

Request header: auth_token – the authentication token obtained when the user logged on

                               Content type – application/json

Request Parameters 複製

{

      "start": 0,

      "limit": 10,

      "orderBy": "name",

      "sortOrder": "desc",

      "searchStr": "justaserver1"

}

Get mobile apps by container

Get mobile apps in the specified container.

URL: https://<host-name>:<port-number>/xenmobile/api/v1/application/mobile/{containerId}

Request type: GET

Request header: auth_token – the authentication token obtained when the user logged on

                               Content type – application/json

Example response 複製

{

      "status": 0,

      "message": "Success",

      "result": {

              "id": 14,

              "name": "testApp",

              "description": "",

              "createdOn": null,

              "lastUpdated": null,

              "disabled": false,

              "nbSuccess": 0,

              "nbFailure": 0,

              "nbPending": 0,

              "schedule": {

                      "enableDeployment": true,

                      "deploySchedule": "NOW",

                      "deployScheduleCondition": "EVERYTIME",

                      "deployDate": null,

                      "deployTime": null,

                      "deployInBackground": false

              },

              "iconData": "",

              "appType": "MDX",

              "categories": [

                      "Default"

              ],

              "roles": [],

              "workflow": null,

              "ios": {

                      "displayName": "GoToMeeting",

                      "description": "G2MW_IOS_5.3.3_075_01",

                      "paid": false,

                      "removeWithMdm": true,

                      "preventBackup": true,

                      "appVersion": "5.3.3.075",

                      "minOsVersion": "",

                      "maxOsVersion": "",

                      "excludedDevices": "",

                      "avppParams": null,

                      "avppTokenParams": null,

                      "rules": null,

                      "appType": "mobile_ios",

                      "uuid": "8e69d397-48bb-4f29-a95c-dd7b16665c1c",

                     "id": 0,

                      "store": {

                             "rating": {

                                     "rating": 0,

                                     "reviewerCount": 0

                             },

                             "screenshots": [],

                             "faqs": [],

                             "storeSettings": {

                                     "rate": true,

                                     "review": true

                             }

                      },

                      "policies": [

                             {

                                     "policyName": "ReauthenticationPeriod",

                                     "policyValue": "480",

                                     "policyType": "integer",

                                     "policyCategory": "Authentication",

                                     "title": "Reauthentication period (minutes)",

                                     "description": "\nDefines the period before a user is challenged to authenticate again. ",

                                     "units": "minutes",

                                     "explanation": null

                             },

                             {

                                     "policyName": "BlockJailbrokenDevices",

                                     "policyValue": "true",

                                     "policyType": "boolean",

                                     "policyCategory": "Device Security",

                                     "title": "Block jailbroken or rooted",

                                     "description": "\nIf On, the application is locked when the device is jailbroken or rooted.",

                                     "units": null,

                                     "explanation": null

                             },

                             {

                                     "policyName": "CertificateLabel",

                                     "policyValue": "",

                                     "policyType": "string",

                                     "policyCategory": "Network Access",

                                     "title": "Certificate label",

                                     "description": "\nThe label for the certificate.\n                                                                   Default value is empty.\n                                              ",

                                     "units": null,

                                     "explanation": null

                             }

                      ]

              },

              "android": null,

              "android_knox": null,

              "android_work": null,

              "windows": null,

              "windows_tab": null

      }

}

Get SaaS apps by container

Get SaaS apps from the specified container.

URL: https://<host-name>:<port-number>/xenmobile/api/v1/application/mobile/saas/{containerId}

Request type: GET

Request header: auth_token – the authentication token obtained when the user logged on

                               Content type – application/json

Get public store apps by container

Get public store apps from the specified container.

URL: https://<host-name>:<port-number>/xenmobile/api/v1/application/mobile/appstore/{containerId}

Request type: GET

Request header: auth_token – the authentication token obtained when the user logged on

                               Content type – application/json

Get Web link apps by container

Get Web link apps from the specified container.

URL: https://<host-name>:<port-number>/xenmobile/api/v1/application/mobile/weblink/{containerId}

Request type: GET

Request header: auth_token – the authentication token obtained when the user logged on

                               Content type – application/json

Delete app container

Delete the specified app container.

URL: https://<host-name>:<port-number>/xenmobile/api/v1/application/{containerId}

Request type: DELETE

Request header: auth_token – the authentication token obtained when the user logged on

                               Content type – application/json

To manage delivery group configurations

You can manage delivery group configurations with the following services.

Get delivery groups by filter

Use the specified filter parameters to get delivery groups.

URL: https://<host-name>:<port-number>/xenmobile/api/v1/deliverygroups/filter

Request type: POST

Request header: auth_token – the authentication token obtained when the user logged on

                               Content type – application/json

Request Parameters 複製

{

      "start": 1,

      "sortOrder": "DESC",

      "deliveryGroupSortColumn": "id",

      “limit”:10,

      "search": "add"

}

Example Response 複製

{

        "status": 0,

        "message": "Success",

        "dgListData": {

               "totalMatchCount": 7,

               "totalCount": 10,

               "dgList": [

                       {

                               "id": null,

                               "name": "add delivery group 6.0",

                               "description": "testing add delivery group 6.0",

                               "groups": [

                                      {

                                              "id": 1,

                                              "userListId": 1,

                                              "name": "MSP",

                                              "uniqueName": "MSP",

                                              "uniqueId": "MSP",

                                              "domainName": "local",

                                              "primaryToken": 0

                                      }

                               ],

                               "zoneId": null,

                               "zoneDomain": null,

                               "rules": "{\"AND\":[{\"values\":{\"stringOperator\":\"eq\",\"value\":\"shankar.ganesh@citrix.com\"},\"ruleId\":\"001-restrictUserPropEmail\"}]}",

                               "disabled": false,

                               "lastUpdated": 1427144713353,

                               "anonymousUser": true,

                               "roledefLangVersionId": 1,

                               "applications": [

                                      {

                                              "name": "Web Link",

                                              "required": false

                                      },

                                      {

                                              "name": "GoogleApps_SAML",

                                              "required": true

                                      }

                               ],

                               "devicePolicies": [

                                      "test terms conditions"

                               ],

                               "smartActions": [

                                      "shankar ganesh"

                               ],

                               "nbSuccess": 0,

                               "nbFailure": 0,

                               "nbPending": 0

                       },

                       {

                               "id": null,

                               "name": "add delivery group 5.0",

                               "description": "testing add delivery group 5.0",

                               "groups": [

                                      {

                                              "id": 1,

                                              "userListId": 1,

                                              "name": "MSP",

                                              "uniqueName": "MSP",

                                              "uniqueId": "MSP",

                                              "domainName": "local",

                                              "primaryToken": 0

                                      }

                               ],

                               "zoneId": null,

                               "zoneDomain": null,

                               "rules": "{\"AND\":[{\"values\":{\"stringOperator\":\"eq\",\"value\":\"shankar.ganesh@citrix.com\"},\"ruleId\":\"001-restrictUserPropEmail\"}]}",

                               "disabled": false,

                               "lastUpdated": 1426891345698,

                               "anonymousUser": true,

                               "roledefLangVersionId": 1,

                               "applications": [

                                      {

                                              "name": "GoogleApps_SAML",

                                              "required": true

                                      },

                                      {

                                              "name": "Web Link",

                                              "required": false

                                       }

                               ],

                               "devicePolicies": [

                                      "test terms conditions"

                               ],

                               "smartActions": [

                                      "shankar ganesh"

                               ],

                               "nbSuccess": 0,

                               "nbFailure": 0,

                               "nbPending": 0

                       }

               ]

        }

}

Get delivery group by name

URL: https://<host-name>:<port-number>/xenmobile/api/v1/deliverygroups/{name}

Request type: GET

Request header: auth_token – the authentication token obtained when the user logged on

                               Content type – application/json

Example Response 複製

{

      "status": 0,

      "message": "Success",

      "role": {

              "id": null,

              "name": "AllUsers",

              "description": "default role",

              "groups": [],

              "zoneId": null,

              "zoneDomain": null,

              "rules": null,

              "disabled": false,

              "lastUpdated": null,

              "anonymousUser": false,

              "roledefLangVersionId": 1,

              "applications": [

                      {

                             "name": "test mdx",

                             "required": false

                      },

                      {

                             "name": "test all",

                             "required": false

                      },

                      {

                             "name": "justa test",

                             "required": false

                      },

                      {

                             "name": "test enterprise",

                             "required": false

                      },

                      {

                             "name": "name test",

                             "required": false

                      }

              ],

              "devicePolicies": [

                      "test terms conditions"

              ],

              "smartActions": [

                      "justa name"

              ],

              "nbSuccess": 0,

              "nbFailure": 0,

              "nbPending": 0

      }

}

Edit delivery group

URL: https://<host-name>:<port-number>/xenmobile/api/v1/deliverygroups

Request type: PUT

Request header: auth_token – the authentication token obtained when the user logged on

                               Content type – application/json

Request Parameters 複製

{

      "name": "add delivery group 2",

      "description": "Changing the description of the delivery group xxx",

      "groups": [

              {

                      "name": "MSP",

                      "uniqueName": "MSP",

                      "uniqueId": "MSP",

                      "domainName": "local"

              },

              {

                      "name":"CN=Users,CN=Builtin,DC=example,DC=com",

                      "uniqueName": "Users",

                      "uniqueId":"a4169204-45f6-48fb-8a0d-847a3200d47e",

                      "domainName": "example.com"

              }

              ],

      "disabled": false,

      "anonymousUser": false,

      "applications": [

              {

                      "name": "GoogleApps_SAML",

                      "required": true

              },

              {

                      "name": "test mdx",

                      "required": false

              }

              ],

      "devicePolicies": [

              {

                      "name":"test terms conditions",

                      "priority":-1

              }

              ],

      "smartActions": [

              {

                      "name":"Smart Action Name 1",

                      "priority":-1

              }

              ],

      "rules": "{\"AND\":[{\"values\":{\"stringOperator\":\"eq\",\"value\":\"justa.name@example.com\"},\"ruleId\":\"001-restrictUserPropEmail\"}]}"

}

Example Response 複製

{

      "status": 0,

      "message": "Success",

      "role": {

              "id": null,

              "name": "add delivery group 2",

              "description": "Changing the description of the delivery group xxx",

              "groups": [

                      {

                             "id": null,

                             "userListId": null,

                             "name": "MSP",

                             "uniqueName": "MSP",

                             "uniqueId": "MSP",

                             "domainName": "local",

                             "primaryToken": null

                      },

                      {

                             "id": null,

                             "userListId": null,

                             "name": "CN=Users,CN=Builtin,DC=example,DC=com",

                             "uniqueName": "Users",

                             "uniqueId": "a4169204-45f6-48fb-8a0d-847a3200d47e",

                             "domainName": "example.com",

                             "primaryToken": null

                      }

                     ],

              "zoneId": null,

              "zoneDomain": null,

              "rules": "{\"AND\":[{\"values\":{\"stringOperator\":\"eq\",\"value\":\"justa.name@example.com\"},\"ruleId\":\"001-restrictUserPropEmail\"}]}",

              "disabled": false,

              "lastUpdated": null,

              "anonymousUser": false,

              "roledefLangVersionId": null,

              "applications": [

                     {

                      "name": "GoogleApps_SAML",

                             "required": true

                     },

                     {

                             "name": "test mdx",

                             "required": false

                     }

                     ],

              "devicePolicies": [

                     "test terms conditions"

                      ],

              "smartActions": [

                     "justa name"

                     ],

              "nbSuccess": 0,

              "nbFailure": 0,

              "nbPending": 0

      }

}

Add delivery group

Adds a delivery group.

URL: https://<host-name>:<port-number>/xenmobile/api/v1/deliverygroups

Request type: POST

Request header: auth_token – the authentication token obtained when the user logged on

                               Content type – application/json

Request Parameters 複製

{

      "name": "add delivery group 4.0",

      "description": "testing add delivery group 4.0",

      "anonymousUser": true,

      "devicePolicies": [

              {

                      "name":"test terms conditions",

                      "priority":-1

              }

              ],

              "applications": [

                      {

                             "name": "GoogleApps_SAML",

                             "required": true

                      },

                      {

                             "name": "Web Link",

                             "required": false

                      }

              ],

      "devicePolicies": [

              {

                      "name":"test terms conditions",

                      "priority":-1

              }

              ],

       "smartActions": [

              {

                      "name":"Smart Action Name 1",

                      "priority":-1

              }

              ],

      "groups": [

              {

                      "uniqueName": "MSP",

                      "domainName": "local",

                      "name": "MSP",

                      "uniqueId": "MSP"

              }

              ],

      "rules": "{\"AND\":[{\"eq\":{\"property\":{\"type\":\"USER_PROPERTY\",\"name\":\"mail\"},\"type\":\"STRING\",\"value\":\"justa.name@example.com\"}}]}"

}

Example Response 複製

{

      "status": 0,

      "message": "Success",

      "role": {

              "id": 16,

              "name": "add delivery group 11.0",

              "description": "testing add delivery group 4.0",

              "groups": [

                      {

                             "id": null,

                             "userListId": null,

                             "name": "MSP",

                             "uniqueName": "MSP",

                             "uniqueId": "MSP",

                             "domainName": "local",

                             "primaryToken": null

                      }

                     ],

              "zoneId": null,

              "zoneDomain": null,

              "rules": "{\"AND\":[{\"eq\":{\"property\":{\"type\":\"USER_PROPERTY\",\"name\":\"mail\"},\"type\":\"STRING\",\"value\":\"justa.name@example.com\"}}]}",

              "disabled": false,

              "lastUpdated": null,

              "anonymousUser": true,

              "roledefLangVersionId": null,

              "applications": [

                      {

                             "name": "GoogleApps_SAML",

                             "required": true

                      },

                      {

                             "name": "Web Link",

                             "required": false

                      }

                      ],

              "devicePolicies": [

                      "test terms conditions"

                      ],

              "smartActions": [

                      "justa name"

                      ],

              "nbSuccess": 0,

              "nbFailure": 0,

              "nbPending": 0

      }

}

Delete delivery group

Delete specified delivery groups.

URL: https://<host-name>:<port-number>/xenmobile/api/v1/deliverygroups

Request type: DELETE

Request header: auth_token – the authentication token obtained when the user logged on

                               Content type – application/json

Request Parameters 複製

[ "add delivery group 11.0" ]

Example Response 複製

{

      "status": 0,

      "message": "Success",

      "roleNames": [

              "add delivery group 11.0"

      ]

}

To manage server properties

You can manage XenMobile server properties by using the following services.

Get all server properties

Get all current XenMobile server properties.

URL: https://<host-name>:<port-number>/xenmobile/api/v1/serverproperties

Request type: GET

Request header: auth_token – the authentication token obtained when the user logged on

                               Content type – application/json

Example Response 複製

{

      "status": 0,

      "message": "Success",

      "allEwProperties": [

              {

                      "id": 1,

                      "name": "ios.mdm.pki.ca-root.certificatefile",

                      "value": "c:/opt/sas/sw/tomcat/inst1/conf/pki-ca-root.crt.pem",

                      "displayName": "ios.mdm.pki.ca-root.certificatefile",

                      "description": "",

                      "defaultValue": "c:/opt/sas/sw/tomcat/inst1/conf/pki-ca-root.crt.pem",

                      "displayFlag": false,

                      "editFlag": true,

                      "deleteFlag": false,

                      "markDeleted": false

              } ,

              {

                      "id": 2,

                      "name": "ios.mdm.https.host",

                      "value": "192.0.2.4",

                      "displayName": "ios.mdm.https.host",

                      "description": "",

                      "defaultValue": "192.0.2.4",

                      "displayFlag": false,

                      "editFlag": false,

                      "deleteFlag": false,

                      "markDeleted": false

              },

              {

                      "id": 3,

                      "name": "ios.mdm.enrolment.checkRemoteAddress",

                      "value": "false",

                      "displayName": "iOS Device Management Enrollment - Check Remote Address",

                      "description": "",

                      "defaultValue": "false",

                      "displayFlag": true,

                      "editFlag": true,

                      "deleteFlag": false,

                      "markDeleted": false

              },

      ]

}

Get server properties by filter

Get server properties using the specified filter parameters.

URL: https://<host-name>:<port-number>/xenmobile/api/v1/serverproperties/filter

Request type: POST

Request header: auth_token – the authentication token obtained when the user logged on

                               Content type – application/json

Request Parameters 複製

{

      "start": 0,

      "limit": 1000,

      "orderBy": "name",

      "sortOrder": "desc",

      "searchStr": "justaserver1"

}

Example Response 複製

{

      "status": 0,

      "message": "Success",

      "allEwProperties": [

              {

                      "id": 154,

                      "name": "justaserver123",

                      "value": "justaserver1",

                      "displayName": "justarserver display name",

                      "description": "justaserver description",

                      "defaultValue": "justaserver1",

                      "displayFlag": true,

                      "editFlag": true,

                      "deleteFlag": true,

                      "markDeleted": false

              }

      ]

}

Add server property

Add the specified server property.

URL: https://<host-name>:<port-number>/xenmobile/api/v1/serverproperties

Request type: POST

Request header: auth_token – the authentication token obtained when the user logged on

                               Content type – application/json

Request Parameters 複製

{

      "name": "Key 2",

      "value": "Value 1",

      "displayName": "Display Name 1",

      "description": "Description 1"

}

Example Response 複製

{

      "status": 0,

      "message": "Success",

      "allEwProperties": null

}

Edit server properties

Edit the specified server property.

URL: https://<host-name>:<port-number>/xenmobile/api/v1/serverproperties

Request type: PUT

Request header: auth_token – the authentication token obtained when the user logged on

                               Content type – application/json

Request Parameters 複製

{

      "name": "Key 2",

      "value": "Value 1",

      "displayName": "Display Name 2",

      "description": "Description 2"

}

Example Response 複製

{

      "status": 0,

      "message": "Success",

      "user": null

}

Reset server properties

Reset the specified server properties.

URL: https://<host-name>:<port-number>/xenmobile/api/v1/serverproperties/reset

Request type: POST

Request header: auth_token – the authentication token obtained when the user logged on

                               Content type – application/json

Request Parameters 複製

{

      "names": [,

              "justaname7"

              ]

}

Example Response 複製

{

      "status": 0,

      "message": "Success",

      "allEwProperties": null

}

Delete server properties

URL: https://hostname:4443 /xenmobile/api/v1/serverproperties

Request type: DELETE

Request header: auth_token – the authentication token obtained when the user logged on

                               Content type – application/json

Request Parameters 複製

{

      "justaname3",

      "justaname4"

}

Example Response 複製

{

      "status": 0,

      "message": "Success",

      "user": null

}