290 likes | 517 Views
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. Overview. Architecture. Presence. Instant Messaging.
E N D
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 Overview Architecture Presence Instant Messaging Getting Started with the Unified Communications Web API
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 Experience Pattern Authenticate a user against UCWA Operations happen using the user’s identity Interact with the UCWA service endpoint Make HTTP requests and handle response Follow links in response if applicable Environment Browser and language independent No browser plugin required No ActiveX dependency Lync client does not need to be running
Agenda Overview Architecture Presence Instant Messaging Getting Started with the Unified Communications Web API
Building Blocks Unified Communications Web API VoiceXML UCMA 4.0 Core API UCMA Server Speech API Media Stack Microsoft.Speech SIP Layer Lync Server Infrastructure
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
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
Agenda Overview Architecture Presence Instant Messaging Getting Started with the Unified Communications Web API
Getting a User’s Presence Request GET Me resource GET Presence resource Response Properties Availability Links Note resource Presence resource Photo 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
Agenda Overview Architecture Presence Instant Messaging Getting Started with the Unified Communications Web API
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
Agenda Overview Architecture Presence Instant Messaging Getting Started with the Unified Communications Web API
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
© 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.