1. Teleboard | Support Center
  2. Solution home
  3. API Documentation
  4. REST API - GET Requests
Open navigation

GET/myProfile

Jump to:



The GET/myProfile method (case sensitive) returns a detailed list of entries related to a user's TeleConsole's profile and PBX settings based on the basic authentication credentials provided. 


The response is broken into several categories and include:


Main User Details


This category lists the main details about the user from his TeleConsole's profile, availability status, extension, system IDs, and more.


  • id - a specific system ID for the user on the Telebroad server.
  • username - the user name used for logging in to the TeleConsole account of the user. This is usually the same as the user's email.
  • pbx_uid - the unique id of the user on the PBX system of the office.
  • pbx_cid - The PBX customer ID of the user in the general Telebroad PBX database.
  • pbx_role - a numeric value representing a certain role of the user in the PBX system. The role of the user dictates the kind of operations he is permitted to perform. For example, an administrator (role 11) will have much more access privileges and ability to change settings than a regular user (role 4.)
  • title - the title of the user.
  • firstname - the first name of the user for the requested profile.
  • lastname - the last name of the user for the requested profile.
  • email - the email of the user.
  • telephone -  the phone number of the user.
  • extension - the extension of the user.
  • mobile - the mobile number of the user
  • address1 - first address field for the user, such as street address etc. 
  • address2 - second address field for the user, such as suite or office number etc.
  • address3 - third address field for the user, such as extended location information etc.
  • address_city - the city of the user's address.
  • address_state - the state of the user's address.
  • address_code - the zip code of the user's address.
  • country - the country of the user's address.
  • language - the default language selected  for the user.
  • timezone - the default time zone selected for the user.
  • opt_email - an optional email address for the user.
  • photo - a path to a photo of the user on Telebroad's server.
  • status - a value of 1 indicates an "Available" status on the Teleconsole. A value of 0 indicates a "Busy" status. 
  • status_msg - the status message associated with the availability of the user. 
  • status_time - the time and date the status was set by the user.

pbx_customer


Some details about the user as they appear in the PBX customers database.


  • id - the PBX customer ID of the user (this is the same as pbx_cid.)
  • name - the name of the TeleConsole account.
  • callerid - the main caller ID currently selected by the user for his Teleconsole account.

rights


This category shows certain rights that the user have. The values are not Boolean. If they are listed it means the user have them. This also relates to the PBX role of the user as explained above.


Common user rights may include -


  • queues_stats - indicates the user has the right to see statistics about queues.
  • change_callerid - indicates the user has the right to change his caller ID from a list of available caller IDs.
  • callerid_original - indicates the user has the right to create a new original caller ID and add it to the list of already existing  caller IDs.
  • list_common_numbers - the user has the right to request a list of common phone numbers on the system. 
  • list_common_mailboxes - the user has the right to request a list of common mail boxes on the system (using the GET/mailboxes request.)
  • list_common_faxlines - the user has the right to request a list of common fax lines on the system.

Common administrator rights may include -

  • call_record_any- the administrator has the right to make a recording of any phone call.    
  • list_common_huntgroups - the administrator has the right to request a list of common hunt groups on the system.

  • join_call - the administrator has the right to join a call in progress.

  • recording_get - the administrator has the right to access call recordings.

phones 


A list of phone number lines belonging to the user.


  • name - a name associated with the phone number of the user. By default this is identical to his PBX number. 
  • description - a description of the phone line. It could be the name of the user, a description of the function of the line, or any other appropriate description.
  • callerIDint - the PBX number of the line, essentially a unique internal caller ID of the line.
  • callerID - a caller ID currently associated with the PBX line.
  • fcode - a feature dialing code for the user. A feature code is associated with a user's internal phone line. It is setup by an administrator and facilitate faster and more convenient dialing for internal users. For example a user can dial feature code 202 to reach another user instead of the full internal PBX number. External callers have no access to the feature code and need to use the regular extension, phone number, or caller ID of the user.
  • secret - the SIP password for the phone line. 
  • appServer and appServer2 - the telebroad servers involved in providing notifications about calls

sms_lines 


A list of business SMS lines belonging to the user.


  • sms_line - the number of the SMS line.
  • sms_linename - the name associated with the SMS line. 

fax_lines 


A list of fax lines available to be used by the user. Since a company usually wants to maintain only one main fax line, what is listed here are all the potential fax lines based on all the caller IDs numbers created by the administrator for the system. Only the fax line indicated as owned by the user is relevant - also relating to the fax boxes category.


  • name - the name (practically the number) of the potential fax line. 
  • owned - a "true" value indicates the line is owned by the user. As explained above, with regard to wanting to maintain one fax line, most lines listed will be indicated by a "false" value. 

fax_boxes  


 The details of the box (storage allotment) where the faxes are actually stored. 


  • name -  the name (practically the number) of the fax box.
  • owned - a "true" value indicates the box is owned by the user. A box can be shared among several users, so it is not required for a user to own a box in order to send or receive faxes.

vox_boxes 


A list of voicemails storage boxes (vox) where voicemails are stored for the user. 


  • name - the name (practically the number) of the voicemail box.
  • owned - a "true" value indicates the box is owned by the user, and this will be so in most cases. The exception is a situation where a departmental voicemail exists and is shared among several users. An administrator can associate a user with such a box, even without the user owning it. A box can be shared among several users, so it is not required for a user to own a box in order to send faxes.

user_settings


Additional settings for the user including his active lines, statuses, and calls listings.


Some information listed in the above categories is repeated here. The difference is that while previous categories listed all lines belonging to the user, here only the ones which are actually active are shown. Additionally real-time push notification channel information is provided here. 


  • activeVoicemails an array (container) with information about the user's active voicemail lines.

    Each array item includes the name of the voicemail line (usually the same as its number), a Boolean value indicating if the voicemail line is owned by the user or not, and the pubnub_channel used for providing real-time push notifications about the voicemail line.

  •  activeSmsLines - an array (container) with information about the user's active SMS lines.

    Each array item includes the name of the SMS line and the pubnub_channel used for providing real-time push notifications about the sms line.

  • userStatuses a list of the user's TeleConsole's availability statuses. There are four default statuses ("Available", "Busy", "Urgent calls only", "Text only") but more can be created using the PUT/myStatus request in the TeleConsole settings's status manager.  

    Each item in the list has the id of the status, a status Boolean field indicating that the type of the  status is either  available ("1" value) or unavailable ("0" value), and the message for the status.

  • activeFaxes an array (container) with information about the user's active fax lines.

    Each array item includes the name of the voicemail line (usually the same as its number), a Boolean value indicating if the voicemail line is owned by the user or not, and the pubnub_channel used for providing real-time push notifications about the fax line.

  • activePhoneLine - an array (container) with information about the user's active phone lines.

    The fields here are the same as is in the phones category above. Two additional fields here are the pubnub_channel used for providing real-time push notifications about the calls, and callerid_external that has the caller ID associated with the line when external numbers are dialed.

  • defaultSmsLine - as you can have several business SMS lines active, this lists the one that will be used for sending outgoing messages. 

  • fwPhoneNr - details of forwarding phone number. Usually the user's mailbox line is listed for unanswered or busy calls. A second number is listed if the user has actually activated phone forwarding on his number.

  • showRecentCalls - if the field has a "true" value, the three recent calls related to the dialled or received number will display for each call in the active calls screen of the TeleConsole.

  • showIncomingCall -  if the field has a "true" value, incoming calls will display in the TeleConsole. A "false" value will appear here if the user has enabled Do Not Disturb on his account.

Parameters


The requested profile is determined by the login credentials provided in the basic authentication header of the request.


By default the phones, sms_lines, fax_lines, and vox_boxes categories are not expanded, and appear like this:


        "phones": [],

        "sms_lines": [],

        "fax_lines": [],
        "vox_boxes": []


To expand them and see the items they contain use the following parameters:


ParameterTypeOperation
phonesBooleanA value of 1 will expand the list of phone lines.
sms    BooleanA value of 1 will expand the list of SMS lines.
faxBooleanA value of 1 will expand the list fax lines.
voxBooleanA value of 1 will expand the list voicemail boxes.

Example


To get information about a user profile with expanded lists for SMS lines,  phones, voicemail boxes, and fax lines use the following syntax:


HTTPS method: GET


 webserv.telebroad.com/api/teleconsole/rest/myProfile?vox=1&sms=1&fax=1&phones=1

Response:


{"error":null,

    "result":

        {"id":"750",

        "username":"alex_pierce@nmc.com",

        "pbx_uid":"13697",

        "pbx_cid":"1532",

        "pbx_role":"4",

        "title":"Mr.",

        "firstname":"Alex",

        "lastname":"Pierce",

        "email":"alex_pierce@nmc.com",

        "telephone":"3472221450",

        "extension":"1024853",

        "mobile":"347-180-1117",

        "fax":"3472221452",

        "address1":"1914 Cliffside Drive",

        "address2":"Unit 2",

        "address3":"",

        "address_city":"Binghamton",

        "address_state":"NY",

        "address_code":"13901",

        "country":"US",

        "address_other":"",

        "language":"English",

        "timezone":"EST5EDT",

        "opt_email":null,

        "photo":"telebroad.com\/cdn\

        /avatar\/JH\/bC9\

        /042el8bc4923092653ec2f59f3e78348dmez.jpg",

        "status":"1",

        "status_msg":"In a meeting. Chats only.",

        "status_time":"2018-02-15 02:24:49",

        "settings":{},

    "pbx_customer":

        {"id":"1437",

        "name":"NMC PBX",

        "callerid":"13472222000"},

    "rights":

        ["queues_stats",

        "change_callerid",

        "list_common_numbers",

        "callerid_original"],

    "phones":

        [{"name":"1024853",

        "description":"Alex Pierce NMC",

        "callerIDint":"1024853",

        "callerID":"13474367740",

        "fcode":"205",

        "secret":"t171et"

        "appServer": "push2.telebroad.com", 

        "appServer2": "push.telebroad.com",

        }

    ],

    "people":[],

    "sms_lines":

        [{"sms_line":"16468781560",

        "sms_linename":"Alex Pierce NMC"},

        {"sms_line":"16468781561",

        "sms_linename":"Alex Pierce NMC"}

        ],

    "fax_lines":

        [{"name":"12024474477",

        "owned":false},               

         {"name":"13474377710",

        "owned":false},

        {"name":"15558828706",

        "owned":true},       

        {"name":"163328200088",

        "owned":false},],

    "fax_boxes":        

        [{"name":"16466991359",

        "owned":true}],

    "vox_boxes":

        [{"name":"1113840",

        "owned":true}]

        { "name": "100", 

        "owned": false }] 

    "user_settings": 

        {"activeVoicemails":

            [ { "name": "1113834", 

            "owned": true, 

            "pubnub_channel":"voicemail_1532_e3207e3a81430d9ae7f58b2e9e540bac"},

            { "name": "201",

            "owned": true,

            "pubnub_channel": "voicemail_1532_757b505cfd34c64c85ca5b5690ee5293"

            }], 

        "activeSmsLines": 

            [ { "name": "16466991371", 

            "pubnub_channel": "sms_285c38b98a16a0dfb82120589a10f829" 

            }],

         "userStatuses":

            [ { "id": 0, "status": 1, "message": "Available" }, 

            { "id": 1, "status": 0, "message": "Busy" }, 

            { "id": 2, "status": 0, "message": "Urgent calls only" }, 

            { "id": 3, "status": 0, "message": "Text only" } ], 

        "activeFaxes": [{

            "name": "16466991359",

            "owner": true,

            "pubnub_channel": "fax_1532_fbc688912ae85b27231e5497a4d338a6"}], 

        "activePhoneLine": 

            { "name": "1113834", 

            "description": "Rick Goodwin", 

            "callerIDint": "201", 

            "callerID": "original", 

            "fcode": "201",

            "secret": "tB444OZ",

            "appServer": "push2.telebroad.com",

            "appServer2": "push.telebroad.com", 

            "pubnub_channel": "pbx_e3207e3a81430d9ae7f58b2e9e540bac",

            "callerid_external": "original" }, 

        "defaultSmsLine": "16466991371", 

        "liveCallsHandler": false, 

        "fwPhoneNr": { "1113834": "17186725455"}, 

        "showRecentCalls": "false", 

        "showIncomingCall": "true" } } } 

    }} 

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article