Skip to content

Get All Portals Accessible To User

Request

Overview

The Get All Portals Accessible to User API allows a user to fetch all portals accessible to user across all department.

  • If no access tags are specified for a portal, then any user can access the portal.
  • If access tags are specified for a portal, users with a user profile that allows access have access to the portal. For users with multiple user profiles, the user profile that allows access does not need to be the active user profile.
  • All the global users(partition) cannot be assigned user profiles; their access is limited to portals without access restrictions.
  • The only articles returned are associated to an Article type when the parameter, “Include in browse on portals” is set to "Yes".
  • When the "shortUrlTemplate" query parameter is provided, the API filters accessible portals according to the specified language and template name. Portal Short URL specific to to the "shortUrlTemplate" query parameter value is returned in the response.
  • When there is no short URL available for a specific language, the API returns a portal object with an empty "shortURL" field.
Security
oAuthUser(Required scopes:
https://api.egain.cloud/auth/kno...
)
or oAuthOnBehalfOfUser(Required scopes:
https://api.egain.cloud/auth/kno...
)
Query
$langstring(languageCode)required

The language used for a resource. Resources available in different languages may differ from each other.

Enum:"en-US""fr-FR""en-GB""es-ES""it-IT""nl-NL""da-DA""sv-SE""pt-PT""fi-FI"
Example:$lang=en-US
departmentstring, [ 0 .. 255 ] characters^[\w\W]+$

The Name of the department for which portals are to be fetched

Example:department=service
filterTextstring, [ 0 .. 255 ] characters^[\w\W]+$

Portal name starting with a specific character are considered to filter the result.

Example:filterText=master
shortUrlTemplatestring, [ 0 .. 255 ] characters^[\w\W]+$

The Name of the template used while creating Short URL.

Example:shortUrlTemplate=silver
$sortstring

Objects returned in server response are sorted based on the attribute supplied under $sort.
Default value: name.

Enum:"id""name""departmentName"
$orderstring

Common query parameter $order.
Default value: asc

Enum:"asc""desc"
Example:$order=asc
$pagenuminteger, (int64), [ 1 .. 999 ]

Pagination parameter that specifies the page number of results to be returned. Used in conjunction with $pagesize.

Default:1
$pagesizeinteger, (int64), [ 1 .. 75 ]

Pagination parameter that specifies the number of results per page. Used in conjunction with $pagenum.
Valid range of 5-75
Default value: 25

Default:25
Headers
Accept-Languagestringrequired

The Language locale accepted by the client (used for locale specific fields in resource representation and in error responses).

Enum:"en-US""es-ES""fr-FR""it-IT""de-DE""nl-NL""pt-BR""pt-PT""da-DK""ru-RU"
Example:en-US
GET
/myportals
curl -i -X GET \
  'https://api.egain.cloud/knowledge/portalmgr/v4/myportals?%24lang=en-US&department=service&filterText=master&shortUrlTemplate=silver&%24sort=id&%24order=asc&%24pagenum=1&%24pagesize=25' \
  -H 'Accept-Language: en-US' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>'

Responses

Success

Bodyapplication/json
portalArray of objects(Portals accessible to agent)

portals

paginationInfoobject(PaginationInfo)
Response
By default, shortURL only contains single object
{ "portal": [ {} ], "paginationInfo": { "count": 1, "pagenum": 1, "pagesize": 25 } }