Setting Up Use From a Mobile Device
Setting Up Use From a Mobile Device
This section describes how to use the CTERA Portal API to manage folders and files from a mobile device. After logging on to the portal from the mobile device, the ServicesPortal/api API is used with different request bodies to perform the required functionality.
In this section
Note: All folder and file manipulations are within the same portal and not across portals.
Setting up a mobile device
Logging in to a portal via a mobile device
Log in to a portal from a mobile device.
API
ServicesPortal/api/login
URI
https://portal_url/ServicesPortal/api/login
where portal_url is the URL of a team portal to login to.
HTTP Method
POST
Request Content-Type
application/x-www-form-urlencoded
Request body
j_username=username&j_password=password
Expected Response status
200 OK and a HTTP session cookie which is then used for the duration of the session.
The session times out after 30 minutes of inactivity.
If a response such as 403 Forbidden is returned, check the user name and password provided.
Response body
<val>Login succeed</val>
Where:
j_username – Mandatory: The name of a user with administrative rights to the team portal with the URL portal_url.
j_password – Mandatory: The password for the user. The password is not encrypted.
If this is the first time the mobile device was used it must be attached to the portal. After attaching the device, it is recognized every time you log in to the portal. For details about setting up the mobile device, see Attaching a logged in mobile device to the portal.
Attaching a logged in mobile device to the portal
The way the device is attached to the portal is dependent on whether SAML (single-sign-on) or Microsoft Active Directory is used by the portal to authenticate users.
API
SAML: ServicesPortal/public/users/
Active Directory (AD): ServicesPortal/public/domains/domain_name/adUsers/
Neither SAML nor AD: ServicesPortal/public/users/username
URI
SAML: https://portal_url/ServicesPortal/public/users/
Active Directory (AD): https://portal_url/ServicesPortal/public/domains/domain_name/adUsers/
Neither SAML nor AD: https://portal_url/ServicesPortal/public/users/username
where portal_url is the URL of a team portal to login to.
HTTP Method
POST
Request Content-Type
application/x-www-form-urlencoded
Request body
<obj>
  <att id="name">
     <val>attachMobileDevice</val>
  </att>
  <att id="param">
    <obj class="AttachedMobileDeviceParams">
      <att id="deviceMac">
        <val>deviceMac</val>
      </att>
      <att id= "deviceType">
        <val>deviceType</val>
      </att>
      <att id="password">
        <val>password</val>
      </att>
      <att id="ssoActivationCode">
        <val>ssoActivationCode</val>
      </att>
      <att id="hostname">
        <val>devHostname</val>
      </att>
    </obj>
  </att>
</obj>
Expected Response status
200 OK.
Response body
The response is the device Identifier and the SharedSecret.
deviceMac – Mandatory: The device MAC address.
deviceType – Mandatory: The device type.
password – The user password when SAML or Active Directory is not used. When SAML or Active Directory is used, this field is empty.
ssoActivationCode – The user password when SAML is used. When SAML is not used, this field is empty.
devHostname – The device host name.