agenda pattern authenticate a user against ucwa operations happen using the user’s identity...
DESCRIPTION
AgendaTRANSCRIPT
Introducing the Unified Communications Web API
Session Objectives
• Introducing the Unified Communications Web API (UCWA)
• UCWA Architecture• Working with Web APIs• Presence• Instant Messaging
Agenda
Instant MessagingPresence
ArchitectureOverview
Getting Started with the Unified Communications Web API
Overview
Overview
• One API across platforms, devices, and browsers• Embrace HTTP as application layer• Built on top of UCMA• REST-like API
• Presence• Group Memberships• Contacts• Privacy Relationships• Scheduled Conferences• Search• Instant Messaging
Development ExperiencePattern
Authenticate a user against UCWAOperations happen using the user’s identityInteract with the UCWA service endpointMake HTTP requests and handle responseFollow links in response if applicable
EnvironmentBrowser and language independentNo browser plugin requiredNo ActiveX dependencyLync client does not need to be running
Instant MessagingPresence
ArchitectureOverview
Getting Started with the Unified Communications Web API
Agenda
Architecture
Building Blocks
Lync Server Infrastructure
SIP Layer Media Stack Microsoft.Speech
UCMA 4.0 Core API UCMA Server Speech API
VoiceXMLUnified Communications Web API
UCWA Represents an API View of Lync
Natively expose a Lync Server programming interface over HTTP
Abstract away dealing with the SIP protocol
Consistent programming interface for web and mobile clients
Authenticating UCWA Requests
Autodiscover• Attempt to locate Autodiscover service• Requested is redirected to OAuth endpoint
to get a token
OAuth Token• Provide user credentials• Token is attached to every request header• Token establishes the user’s identity
Web Token
Representational State Transfer (REST)
• Architectural pattern that sees the internet as a collection of resources available at unique locations (URLs\HREFs)
• Resources are nouns/things• /ucwa/applications(<applicationid>)/me is the
URL of the Me resource• Make HTTP requests to perform create, read,
update, and delete (CRUD) operations on resources• GET
/ucwa/applications(<applicationid>)/me/presence
• UCWA is REST-like
REST - Hypermedia
• A response may contain links that can denote:• Resource – links between things• Capability – links that convey an action
• Application should check for links in the response• Only make a request to the link if it is available• Don’t hardcode URLs in request
Instant MessagingPresence
ArchitectureOverview
Getting Started with the Unified Communications Web API
Agenda
Presence
Getting a User’s PresenceRequest
GET Me resourceGET Presence resource
ResponseProperties
AvailabilityLinks
Note resourcePresence resourcePhoto resource
Event Channel
• Keep a channel open to handle real-time events• Changes in presence• Receive an instant message
• Presence• No need to poll for changes in presence• Listen for events on the event channel• Notification can contain information about multiple
events• If you receive a presence event, handle accordingly• After notification, make a call to listen to the next
event
demoGetting User Presence in UCWA
Instant MessagingPresence
ArchitectureOverview
Getting Started with the Unified Communications Web API
Agenda
Instant Messaging
Implementing Instant Messaging using UCWA
• Create a “channel” for the new instant message
conversation
• Send an invitation for an instant message
conversation
• Get handle to the new instant message conversation
• Watch for new instant messages in the conversation
• Handle subsequent messages
UCWA Instant Messaging Implementation
• Create application• POST on makeMeAvailable• POST on startMessaging• POST on sendMessage link under Messaging
resource• Listen for incoming messages on the event channel• Send more messages by doing a POST on
sendMessage link under Messaging resource
demoImplementing Instant Messaging using UCWA
Instant MessagingPresence
ArchitectureOverview
Getting Started with the Unified Communications Web API
Agenda
Key takeaways
• UCWA is a new REST-like API to enable real-time communications over the web
• Embrace HTTP as an application layer• Resource-oriented programming model• Simple data structures• UCWA removes browser, plugin, and programming language
dependencies
thank you
© 2011 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.
The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after
the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.