Difference between revisions of "PEC-Developer/Current/SCAPI/MediaNamespace"

From Genesys Documentation
Jump to: navigation, search
m (Text replacement - "\|Platform=([^\|]*)GenesysEngage-onpremises([\|]*)" to "|Platform=$1GenesysEngage-cloud$2")
 
(2 intermediate revisions by 2 users not shown)
Line 3: Line 3:
 
|DisplayName=Media namespace
 
|DisplayName=Media namespace
 
|TocName=Media namespace
 
|TocName=Media namespace
|Context=Learn about the Media namespace methods and type definitions in the Service Client API..
+
|Context=Learn about the Media namespace methods and type definitions in the Service Client API.
 
|ComingSoon=No
 
|ComingSoon=No
 
|Platform=GenesysEngage-cloud
 
|Platform=GenesysEngage-cloud
|Prereq=
 
 
|Section={{Section
 
|Section={{Section
 
|sectionHeading=Methods
 
|sectionHeading=Methods
 
|anchor=Methods
 
|anchor=Methods
 
|alignment=Vertical
 
|alignment=Vertical
|Media=
 
|image=
 
 
|structuredtext=The Media namespace includes the following methods:
 
|structuredtext=The Media namespace includes the following methods:
  
 
*{{Link-SomewhereInThisManual|topic=MediaNamespace|anchor=getMediaList|display text=getMediaList}}
 
*{{Link-SomewhereInThisManual|topic=MediaNamespace|anchor=getMediaList|display text=getMediaList}}
 +
*{{Link-SomewhereInThisManual|topic=MediaNamespace|anchor=getMediaByName|display text=getMediaByName}}
 
*{{Link-SomewhereInThisManual|topic=MediaNamespace|anchor=setState|display text=setState}}
 
*{{Link-SomewhereInThisManual|topic=MediaNamespace|anchor=setState|display text=setState}}
  
Line 21: Line 19:
 
{{{!}}
 
{{{!}}
 
!Signature
 
!Signature
{{!}}<static> getMediaList() → {Array.<{{Link-SomewhereInThisManual|topic=MediaNamespace|anchor=State|display text=media.Media}}>}
+
{{!}}<static> getMediaList(succeeded, failed) → {Array.<{{Link-SomewhereInThisManual|topic=MediaNamespace|anchor=State|display text=media.Media}}>}
 
{{!}}-
 
{{!}}-
 
!Description
 
!Description
{{!}}Get the media attributes.
+
{{!}}Get the list of media with attributes.
 +
{{!}}-
 +
!Parameters
 +
{{!}}
 +
{{{!}}
 +
!Name
 +
!Type
 +
!Description
 +
{{!}}-
 +
{{!}}succeeded
 +
{{!}}function
 +
{{!}}A function called when the operation succeeds.
 +
{{!}}-
 +
{{!}}failed
 +
{{!}}function
 +
{{!}}A function called when the operation fails.
 +
{{!}}}
 
{{!}}-
 
{{!}}-
 
!Returns
 
!Returns
 
{{!}}Array.<{{Link-SomewhereInThisManual|topic=MediaNamespace|anchor=State|display text=media.Media}}>
 
{{!}}Array.<{{Link-SomewhereInThisManual|topic=MediaNamespace|anchor=State|display text=media.Media}}>
 +
{{!}}}
 +
 +
===getMediaByName===
 +
{{{!}}
 +
!Signature
 +
{{!}}<static> getMediaByName(''name'', succeeded, failed)
 +
{{!}}-
 +
!Description
 +
{{!}}Get the media attributes.
 +
{{!}}-
 +
!Parameters
 +
{{!}}
 +
{{{!}}
 +
!Name
 +
!Type
 +
!Description
 +
{{!}}-
 +
{{!}}name
 +
{{!}}string
 +
{{!}}The media name.
 +
{{!}}-
 +
{{!}}succeeded
 +
{{!}}function
 +
{{!}}A function called when the operation succeeds.
 +
{{!}}-
 +
{{!}}failed
 +
{{!}}function
 +
{{!}}A function called when the operation fails.
 +
{{!}}}
 
{{!}}}
 
{{!}}}
  
Line 33: Line 76:
 
{{{!}}
 
{{{!}}
 
!Signature
 
!Signature
{{!}}<static> setState(''name'', ''stateOperationName'')
+
{{!}}<static> setState(''name'', ''stateOperationName'', succeeded, failed)
 
{{!}}-
 
{{!}}-
 
!Description
 
!Description
Line 52: Line 95:
 
{{!}}string
 
{{!}}string
 
{{!}}An <tt>operationName</tt> from the agent states list. See {{Link-SomewhereInThisManual|topic=MediaNamespace|anchor=State|display text=State}}.
 
{{!}}An <tt>operationName</tt> from the agent states list. See {{Link-SomewhereInThisManual|topic=MediaNamespace|anchor=State|display text=State}}.
 +
{{!}}-
 +
{{!}}succeeded
 +
{{!}}function
 +
{{!}}A function called when the operation succeeds.
 +
{{!}}-
 +
{{!}}failed
 +
{{!}}function
 +
{{!}}A function called when the operation fails.
 
{{!}}}
 
{{!}}}
 
{{!}}}
 
{{!}}}
|structuredtextwide=
 
|FAQHeading=
 
 
|Status=No
 
|Status=No
 
}}{{Section
 
}}{{Section
Line 61: Line 110:
 
|anchor=Typedefinitions
 
|anchor=Typedefinitions
 
|alignment=Vertical
 
|alignment=Vertical
|Media=
 
|image=
 
 
|structuredtext=The Media namespace includes the following object types:
 
|structuredtext=The Media namespace includes the following object types:
  
Line 162: Line 209:
 
{{!}}}
 
{{!}}}
 
{{!}}}
 
{{!}}}
|structuredtextwide=
 
|FAQHeading=
 
 
|Status=No
 
|Status=No
 
}}
 
}}
 
}}
 
}}

Latest revision as of 13:44, February 22, 2023

This topic is part of the manual Service Client API Reference for version Current of Developer.

Learn about the Media namespace methods and type definitions in the Service Client API.

Methods

The Media namespace includes the following methods:

getMediaList

Signature <static> getMediaList(succeeded, failed) → {Array.<media.Media>}
Description Get the list of media with attributes.
Parameters
Name Type Description
succeeded function A function called when the operation succeeds.
failed function A function called when the operation fails.
Returns Array.<media.Media>

getMediaByName

Signature <static> getMediaByName(name, succeeded, failed)
Description Get the media attributes.
Parameters
Name Type Description
name string The media name.
succeeded function A function called when the operation succeeds.
failed function A function called when the operation fails.

setState

Signature <static> setState(name, stateOperationName, succeeded, failed)
Description Sets the media state.
Parameters
Name Type Description
name string The media name.
stateOperationName string An operationName from the agent states list. See State.
succeeded function A function called when the operation succeeds.
failed function A function called when the operation fails.

Type definitions

The Media namespace includes the following object types:

Media

Description Represents the JSON structure of a media.
Type Object
Properties
Name Type Description
name string The media name.
state media.State The media state object.

State

Description Represents the JSON structure of a media state.
Type Object
Properties
Name Type Description
type string The type of operation. Possible values are:
  • LOGOUT
  • READY
  • PARTIAL_READY *
  • NOT_READY
  • NOT_READY_ACTION_CODE
  • NOT_READY_AFTER_CALLWORK
  • NOT_READY_AFTER_CALLWORK_ACTION_CODE
  • DND_ON
  • OUT_OF_SERVICE *
  • LOGOUT_DND_ON *
  • UNKNOWN *
displayName string The display name of the state.
operationName string The operation name to use with agent.setState and media.setState.

* States that are limited to an event and can't be applied by code

Device

Description Represents the JSON structure of a media.
Type Object
Properties
Name Type Description
number string The phone number configured for an agent – the physical DN.

Note: This property is applicable only for voice data.

dynamicPhoneNumber string The dynamic phone number configured for the agent for the session.

Note: This property is applicable only for voice data. This property is applicable only when there is an alternate phone number and applicable for the current session only.

Comments or questions about this documentation? Contact us for support!