Auth V2

Overview and Target Audience

This guide is targeted at developers with experience in using REST APIs to orchestrate integrations between multiple real-time systems. It is expected that the developer is versed in using APIs in a low-latency mode, to reduce negative impact to the handling of voice calls, emails, chats or other sessions that are active.

Getting Started
Introduction

The Platform28 Cloud API can be used to create, modify and delete most entities within Platform28. In addition, the API can be used to actuate real-time control of :term:sessions that are in progress, or to initiate new sessions. There are a few exceptional cases where a session may be initiated after-the-fact by an API request.

The API is accessed via REST and most message contents are JSON. There are a few exceptions where FORM posts are accepted, such as in the case of file-uploads. Most API’s use matrix-parameters (within the URL), while newer API’s have moved to the more common query parameter model.

Test chapter

This is a test chapter This is a test chapter This is a test chapter This is a test chapter This is a test chapter This is a test chapter This is a test chapter This is a test chapter This is a test chapter This is a test chapter This is a test chapter This is a test chapter This is a test chapter This is a test chapter This is a test chapter This is a test chapter This is a test chapter This is a test chapter This is a test chapter This is a test chapter This is a test chapter This is a test chapter This is a test chapter This is a test chapter This is a test chapter This is a test chapter This is a test chapter This is a test chapter This is a test chapter This is a test chapter This is a test chapter This is a test chapter

Example 1
Example 2

Ex1

{ 
    "object": 1,
    "name":"renny"  
}

Ex2

import blah;

blah.sendData();
ex2
Example 1

Send using Java:

import blah;

blah.send();
Security
Token-based Sessionless Access

Most API requests require an API Key or an active Login Session ID (LSID) to be provided with the request. LSIDs are included as matrix parameters in the query, while API Keys are included as query_parameters. If you do not already have an API key, and wish to integrate an application or backend service, please contact the Platform28 Support team.

LSID’s must be used in cases where your code is acting on behalf of a logged-in user, while API Keys are used when acting on behalf of the system that is being integrated.

Operations
authenticate
GET /authenticate/block/{username}
DELETE /authenticate/block/{username}
GET /authenticate/ping
POST /authenticate
DELETE /authenticate/clear/{username}
getBlockedDetails
GET /authenticate/block/{username}

Path variables

username
string required

Request body

application/x-www-form-urlencoded

Responses

500 default

successful operation

application/json
Example 1
Example 2
curl -X GET "/authenticate/block/test"  \
 -H "Content-Type: application/x-www-form-urlencoded"
Client.initiateRequest("blah");
clearBlockedUser
DELETE /authenticate/block/{username}

Path variables

username
string required

Request body

application/x-www-form-urlencoded

Responses

500 default

successful operation

application/json
Update the Last Ping time
GET /authenticate/ping

Request body

Session id which is pinging

string

Responses

401 401

The current login session is invalid

404 404

A session with the given ID was not found

200 200

Last ping time updated

login
POST /authenticate

Request body

application/x-www-form-urlencoded
Object
username
string
passwordhash
string

Responses

500 default

successful operation

application/json
clear
DELETE /authenticate/clear/{username}

Path variables

username
string required

Responses

500 default

successful operation

application/json
session
GET /session/{sessionId}
DELETE /session/{sessionId}
POST /session/{sessionId}/setEffectiveUser
POST /session/{sessionId}/setEffectiveOrg
DELETE /session/user/{userId}
GET /session/{sessionId}/clone
Get a login session by ID
GET /session/{sessionId}

Path variables

sessionId
string required

Session id to retrieve

Responses

200 200

Login session found

Body
application/json
text/plain
404 404

Specified session does not exist or the current user does not have access to it

application/json
text/plain
500 500

Server error while trying to access the session

application/json
text/plain
Terminate a login session
DELETE /session/{sessionId}

slakdl;sak;dlska asdasldk askd

Path variables

sessionId
string required

Login session id to terminate

Request body

Should all sessions of this user be terminated?

boolean

Responses

200 200

Login session terminated

Body
application/json
text/plain
404 404

Couldn’t find the specified login session

application/json
text/plain
500 500

Server error while trying to terminate the session

application/json
text/plain
Example 1
Example 2
Example 3
DELETE /session/123123213213123 HTTP/1.1 

Content-Type: application/json

true
curl -X DELETE "/session/12312323"  \
 -H "Content-Type: application/json1"  \
 -d 'true'
var sessionId = "12312312323213":

SessionAPI.deleteSession(sessionId);
Update the effective user of a login session
POST /session/{sessionId}/setEffectiveUser

Path variables

sessionId
string required

Session id to update

Request body

application/x-www-form-urlencoded
Object
userId
integer

User ID to set as the effective user

Responses

200 200

Login session updated

Body
application/json
400 400

Invalid request in POST body

application/json
404 404

Specified session or user does not exist or the current user does not have access to it

application/json
500 500

Server error while trying to access the session

application/json
Reset the effective user on a login session back to the authenticated user and organization
DELETE /session/{sessionId}/assumedIdentity

Path variables

sessionId
string required

Session id to update

Responses

200 200

Login session reset successfully

Body
application/json
404 404

Specified session does not exist or the current user does not have access to it

application/json
500 500

Server error while trying to access the session

application/json
Update the effective organization of a login session
POST /session/{sessionId}/setEffectiveOrg

Path variables

sessionId
string required

Session id to update

Request body

application/x-www-form-urlencoded
application/json
string

Responses

200 200

Login session updated

Body
application/json
text/plain
400 400

Invalid request in POST body

application/json
text/plain
404 404

Specified session or organization does not exist or the current user does not have access to it

application/json
text/plain
500 500

Server error while trying to access the session

application/json
text/plain
Terminate all login sessions for a give user
DELETE /session/user/{userId}

Path variables

userId
integer int32 required

User id of the user who’s sessions should be terminated

Responses

200 200

Login session terminated

Body
application/json
text/plain
401 401

Current user is not authorized to logout other users

application/json
text/plain
404 404

Couldn’t find the specified user

application/json
text/plain
500 500

Server error while trying to terminate the session

application/json
text/plain
Clones a login session
GET /session/{sessionId}/clone

Path variables

sessionId
string required

Session id to update

Responses

200 200

Login session created

Body
application/json
text/plain
404 404

Specified session does not exist or the current user does not have access to it

application/json
text/plain
500 500

Server error while trying to access the session

application/json
text/plain
management
GET /management/ping
ping
GET /management/ping

Responses

500 default

successful operation

text/plain
Password Reset Service
POST /passwordReset/sendResetEmail
POST /passwordReset/validateAndResetPassword
sendResetEmail
POST /passwordReset/sendResetEmail

Request body

application/x-www-form-urlencoded
Object
userId
integer

ID of the user to reset

emailAddress
string

Email address of the user

phoneNumber
string

Phone number of the user - for additional validation

mobileNumber
string

Mobile number of the user - for additional validation

templateName
string

Template name

resetPageUrl
string

Reset page URL to use in the email

Responses

500 default

successful operation

application/json
performPasswordReset
POST /passwordReset/validateAndResetPassword

Request body

application/x-www-form-urlencoded
Object
token
string required

Password reset token being used

username
string

Username of this account

newPasswordHash
string required

New password hash of the user

Responses

500 default

successful operation

application/json
Update the password of the user based on the specified ID
POST /passwordReset/user/{userId}

Update the password of the user based on the specified id and password.

Path variables

userId
integer int32 required

ID of desired user

Request body

application/x-www-form-urlencoded
Object
oldPasswordHash
string required

old password hash of the user

newPasswordHash
string required

New password hash of the user

adminPasswordHash
string required

Password hash of the admin who is trying to force a password change

Responses

401 401

The current login session is invalid

application/json
404 404

A user with the given ID and Password was not found

application/json
200 200

Password updated

Body
application/json
Type Definitions
AllocationStrategyDTOReference
Object
isReference
boolean
id
integer int32
humanName
string
__delete
boolean
CampaignAssignmentDTO
Object
id
integer int32
skillLevel
integer int32
assignmentTime
string date-time
modificationTime
string date-time
__delete
boolean
Types: ResourceDTO
CarrierDTOReference
Object
isReference
boolean
id
integer int32
__delete
boolean
ChannelDTOReference
Object
isReference
boolean
id
integer int32
__delete
boolean
ConnectorAliasDTOReference
Object
isReference
boolean
__delete
boolean
Types: ConnectorDTO
ConnectorAliasIdDTO
Object
connectorId
integer int32
accountName
string
__delete
boolean
ConnectorDTO
Object
id
integer int32
channelId
integer int32
name
string
accountName
string
isDeleted
boolean
lastModifiedBy
integer int32
ownerPool
ownerOrganization
ownerLocation
ownerUser
ownerQueue
ownerHumanName
string
deviceConnections
Unique items: YES
targets
Array of TargetDTO
connectorAliases
Unique items: YES
__delete
boolean
Types: UserDTO
ConnectorDTOReference
Object
isReference
boolean
id
integer int32
__delete
boolean
CustomerDTOReference
Object
isReference
boolean
id
integer int32
humanName
string
__delete
boolean
CustomerUserMapDTO
Object
creationTime
string date-time
modificationTime
string date-time
__delete
boolean
Types: UserDTO
CustomerUserMapIdDTO
Object
customerId
integer int32
userId
integer int32
__delete
boolean
DestinationDTO
Object
id
integer int32
channelId
integer int32
destination
string
divertedFrom
string
reason
string
name
string
notes
string
tags
string
assignedOrganization
belongsToOrganization
load
integer int32
priority
integer int32
recordingPercentage
integer int32
creationTime
string date-time
modificationTime
string date-time
carrierCode
string
rcf
string
group
string
isBillable
boolean
direction
string
status
string
outboundAttemptTimeout
integer int32
tagsList
Array
Unique items: YES
Object
humanName
string
__delete
boolean
Types: TargetDTO
DestinationDTOReference
Object
isReference
boolean
id
integer int32
humanName
string
__delete
boolean
DeviceConnectionDTO
Object
id
integer int32
description
string
connectionNumber
integer int32
humanName
string
name
string
targets
__delete
boolean
Types: UserDTO
DeviceConnectionDTOReference
Object
isReference
boolean
id
integer int32
humanName
string
__delete
boolean
DeviceDTOReference
Object
isReference
boolean
id
integer int32
humanName
string
__delete
boolean
FaxLineDTOReference
Object
isReference
boolean
connectorId
integer int32
__delete
boolean
Types: ConnectorDTO
FlowDTOReference
Object
isReference
boolean
id
integer int32
humanName
string
__delete
boolean
Types: TargetDTO
GatewayDTOReference
Object
isReference
boolean
id
integer int32
__delete
boolean
HuntGroupDTOReference
Object
isReference
boolean
id
integer int32
__delete
boolean
Types: TargetDTO
IVRDTOReference
Object
isReference
boolean
id
integer int32
humanName
string
__delete
boolean
Types: TargetDTO
JoinCallDTOReference
Object
isReference
boolean
id
integer int32
humanName
string
__delete
boolean
Types: TargetDTO
LanguageDTOReference
Object
isReference
boolean
id
integer int32
humanName
string
__delete
boolean
LocationDTOReference
Object
isReference
boolean
id
integer int32
humanName
string
__delete
boolean
LocationUserMapDTO
Object
creationTime
string date-time
modificationTime
string date-time
__delete
boolean
Types: UserDTO
LocationUserMapIdDTO
Object
locationId
integer int32
userId
integer int32
__delete
boolean
LoginSessionDTO
Object
id
string
authenticatedUser
user
organization
effectiveOrganization
accessingFrom
string
loginTime
string date-time
expirationTime
string date-time
properties
Object
additional properties
string
lastPingTime
string date-time
lastValidatedTime
string date-time
isDesktopSession
boolean
isApplicationKey
boolean
__delete
boolean
LoginSessionDTOReference
Object
isReference
boolean
id
string
__delete
boolean
Types: ResourceDTO
MailboxDTOReference
Object
isReference
boolean
id
integer int32
__delete
boolean
MakeVoiceCallDTOReference
Object
isReference
boolean
id
integer int32
humanName
string
__delete
boolean
Types: TargetDTO
OpenSipsLocationDTO
Object
id
integer int32
username
string
domain
string
contact
string
received
string
path
string
expires
string date-time
q
number float
callid
string
cseq
integer int32
lastModified
string date-time
flags
integer int32
cflags
integer int32
userAgent
string
socket
string
methods
integer int32
sipInstance
string
__delete
boolean
Types: UserDTO
OrganizationDTO
Object
id
integer int32
parentOrganization
defaultRole
SIMPLEDomain
primaryDestination
secondaryDestination
objectId
string
uuid
string
name
string
address1
string
address2
string
city
string
state
string
zip
string
country
string
supportEmail
string
tags
string
extensionDigits
integer int32
lastUsedExtension
integer int32
dateTimeFormat
string
dateFormat
string
timeFormat
string
defaultAllocationStrategy
defaultTreatmentId
integer int32
defaultLanguage
maxVoiceErrors
integer int32
maxDataErrors
integer int32
maxAgentDesktops
integer int32
maxSimulAgentDesktops
integer int32
maxAgents
integer int32
maxSimulAgents
integer int32
maxBizDesktops
integer int32
maxSimulBizDesktops
integer int32
creationTime
string date-time
modificationTime
string date-time
inactiveUserTimeout
integer int32
isAgentInboundOnLogin
boolean
isAgentOutboundOnLogin
boolean
isAgentReadyOnLogin
boolean
isExcludeGlobalRoles
boolean
isEnableEntityDelete
boolean
agentAutoReadyDelay
integer int32
agentInterCallDelay
integer int32
isTcpaOutboundOnly
boolean
primaryDestinationNumber
string
secondaryDestinationNumber
string
preferenceValues
Object
additional properties
Object
outgoingCallerId
string
humanName
string
__delete
boolean
OrganizationDTOReference
Object
isReference
boolean
id
integer int32
humanName
string
__delete
boolean
OutboundCampaignDTOReference
Object
isReference
boolean
id
integer int32
__delete
boolean
PoolDTOReference
Object
isReference
boolean
id
integer int32
humanName
string
__delete
boolean
PoolMembershipDTO
Object
creationTime
string date-time
modificationTime
string date-time
__delete
boolean
Types: ResourceDTO
PoolMembershipIdDTO
Object
resourceId
integer int32
poolId
integer int32
__delete
boolean
PromptDTOReference
Object
isReference
boolean
id
integer int32
humanName
string
__delete
boolean
Types: TargetDTO
QueueAssignmentDTO
Object
id
integer int32
skillLevel
integer int32
assignmentTime
string date-time
modificationTime
string date-time
__delete
boolean
Types: ResourceDTO
QueueDTOReference
Object
isReference
boolean
id
integer int32
humanName
string
__delete
boolean
QueueUserMapDTO
Object
canView
boolean
canModify
boolean
__delete
boolean
Types: UserDTO
QueueUserMapIdDTO
Object
userId
integer int32
queueId
integer int32
__delete
boolean
RecordVoiceDTOReference
Object
isReference
boolean
id
integer int32
humanName
string
__delete
boolean
Types: TargetDTO
ResourceDTO
Object
id
integer int32
belongsToLocation
currentlyAtLocation
incomingSessionTarget
isEnabled
boolean
enqueueIncomingSession
boolean
incomingSessionQueueTimeout
integer int32
monitoredByResource
monitoredResource
requiresLogin
boolean
isReady
boolean
notReadyReason
string
name
string
percentAvailable
integer int32
percentUsed
integer int32
shouldCountSessions
boolean
activeSessionCount
integer int32
maximumSessionCount
integer int32
lastStatusChangeTime
string date-time
loginTime
string date-time
lastLogoutTime
string date-time
wrapupEndTime
string date-time
tsError
string date-time
lastSessionAssignmentTime
string date-time
lastSessionEndTime
string date-time
sessionCount
integer int32
secondsIdle
integer int32
secondsActive
integer int32
secPostCall
integer int32
secHold
integer int32
secondsUnavailable
integer int32
recycleDelay
integer int32
voiceErrorCount
integer int32
dataErrorCount
integer int32
isAvailableToAcd
boolean
creationTime
string date-time
modificationTime
string date-time
recordingPercentage
integer int32
agentAutoReadyDelay
integer int32
agentInterCallDelay
integer int32
isAgentInboundOnLogin
boolean
isAgentOutboundOnLogin
boolean
isAgentReadyOnLogin
boolean
reservationType
string
reservationExpiresAt
string date-time
reservationId
string
humanName
string
idOfUser
integer int32
idOfLocation
integer int32
isProcessing
boolean
isOffline
boolean
isLoggedIn
boolean
isAvailableForInbound
boolean
isAvailableForOutbound
boolean
isWrappingUp
boolean
queueAssignments
Unique items: YES
resourceSkillMaps
Unique items: YES
poolMemberships
Unique items: YES
campaignAssignments
Unique items: YES
__delete
boolean
Types: UserDTO
ResourceDTOReference
Object
isReference
boolean
id
integer int32
humanName
string
__delete
boolean
ResourceSkillMapDTO
Object
level
integer int32
creationTime
string date-time
modificationTime
string date-time
__delete
boolean
Types: ResourceDTO
ResourceSkillMapIdDTO
Object
resourceId
integer int32
skillId
integer int32
__delete
boolean
RoleDTOReference
Object
isReference
boolean
id
integer int32
humanName
string
__delete
boolean
RouterDTOReference
Object
isReference
boolean
id
integer int32
humanName
string
__delete
boolean
Types: TargetDTO
SIPDomainDTOReference
Object
isReference
boolean
id
integer int32
humanName
string
__delete
boolean
SkillDTOReference
Object
isReference
boolean
id
integer int32
humanName
string
__delete
boolean
SoaInvocationDTOReference
Object
isReference
boolean
id
integer int32
humanName
string
__delete
boolean
Types: TargetDTO
SplitCallDTOReference
Object
isReference
boolean
id
integer int32
humanName
string
__delete
boolean
Types: TargetDTO
TargetDTO
Object
id
integer int32
promptIdExpression
string
targetTypeId
string
channelId
integer int32
address
string
description
string
isSystemGenerated
boolean
isPrimaryTarget
boolean
targetUri
string
timeout
integer int32
timeoutTarget
data
string
tags
string
modificationTime
string date-time
creationTime
string date-time
billingCode
string
billingOrganization
humanName
string
targetEntitySubType
string
isConnector
boolean
targetEntityInfo
string
type
string
destinations
Array of DestinationDTO
__delete
boolean
Types: ConnectorDTO
TargetDTOReference
Object
isReference
boolean
id
integer int32
humanName
string
__delete
boolean
TimezoneDTOReference
Object
isReference
boolean
id
integer int32
humanName
string
__delete
boolean
TreatmentDTOReference
Object
isReference
boolean
id
integer int32
humanName
string
__delete
boolean
UserDTO
Object
id
integer int32
uuid
string
username
string
isEnabled
boolean
isHidden
boolean
isAgent
boolean
firstName
string
lastName
string
passwordHash
string
otherEmail
string
showInContactList
boolean
allowDialByName
boolean
dateTimeFormat
string
dateFormat
string
timeFormat
string
phone
string
mobilePhone
string
primaryPool
physicalLocation
billingLocation
address1
string
address2
string
city
string
state
string
zip
string
country
string
lastPortalLoginSessionId
string
lastDesktopLoginSessionId
string
lastPhoneLoginSessionId
string
resource
recordingPercentage
integer int32
creationTime
string date-time
modificationTime
string date-time
deletionTime
string date-time
disablementTime
string date-time
enablementTime
string date-time
preferenceValues
Object
additional properties
Object
humanName
string
systemTarget
humanNameOfRole
string
primaryExtension
string
destinationInfo
Array
Object
lastPortalLogin
Object
additional properties
string
lastDesktopLogin
Object
additional properties
string
lastPhoneLogin
Object
additional properties
string
voiceMailboxes
faxMailboxes
customers
Unique items: YES
targets
locations
Unique items: YES
recognizedSources
Unique items: YES
deviceConnections
connectors
Array of ConnectorDTO
Unique items: YES
openSipsLocations
Unique items: YES
mappedQueues
Array of QueueUserMapDTO
__delete
boolean
UserRecognizedSourceDTO
Object
isEnabled
boolean
__delete
boolean
Types: UserDTO
UserRecognizedSourceIdDTO
Object
type
string
location
string
destinationId
integer int32
__delete
boolean
VoiceDocumentDTOReference
Object
isReference
boolean
id
integer int32
humanName
string
__delete
boolean
Types: UserDTO
VoiceLineDTOReference
Object
isReference
boolean
connectorId
integer int32
__delete
boolean
Types: ConnectorDTO
WaitForJoinDTOReference
Object
isReference
boolean
id
integer int32
humanName
string
__delete
boolean
Types: TargetDTO
LoginSessionHistoryDTO
Object
id
string
authenticatedUser
effectiveOrganization
accessedFrom
string
loginTime
string date-time
endTime
string date-time
endReason
string
lastPingTime
string date-time
lastValidatedTime
string date-time
isDesktopSession
boolean
isApplicationKey
boolean
__delete
boolean