20
API-Driven Relationships Building The Trans-Internet Express of the Future Pat Patterson Developer Evangelist Architect @metadaddy

API-Driven Relationships: Building The Trans-Internet Express of the Future

Embed Size (px)

DESCRIPTION

Presented at IRM Summit, June 4 2014. Abstract: Move over Thomas the Tank Engine! If developers are the train conductors of the railway, then APIs are the bullet trains of the future. In this session, Pat Patterson will explain how identity allows API ecosystems to flourish, enabling developers to build ever more elaborate integrations. Whether it be ExactTarget, Minecraft, or other great services, APIs are the basis for empowering developers to build boundary-less railways across the web. ALLLLLL ABOOOOOOOOOAAAARD!

Citation preview

  • API-Driven Relationships Building The Trans-Internet Express of the Future Pat Patterson Developer Evangelist Architect @metadaddy
  • Apps Image used under CC-BY-SA. Attribution: SeeSchloss on en.wikipedia.org APIs Image used under CC-BY-SA. Attribution: Daniel Schwen on en.wikipedia.org Identity Image used under CC-BY-SA. Attribution: Arne Hckelheim on en.wikipedia.org
  • Integrating Issues from GitHub into Salesforce1 Im tracking support cases in Service Cloud Some of my products are also open source projects I want to link Service Cloud Case records to GitHub Issues manage links from the Salesforce1 Mobile App
  • Salesforce1 Mobile App Run Your Business From Your Phone Mobile access to data in Salesforce Accounts, Contacts, Cases etc Custom Objects Extension points for customization PublisherActions CustomApps Containerization Image used under CC-BY-SA. Attribution: Simeon87 on en.wikipedia.org
  • GitHub API Resources: Repositories, issues, comments, file contents etc Hyperlinked Authentication: None Basic OAuth 2.0 REST
  • GitHub API Example call $curlhttps://api.github.com/users/metadaddy-sfdc { "login": "metadaddy-sfdc", "id":723517, "avatar_url": "https://avatars.githubusercontent.com/u/723517?", "gravatar_id": "19573811373a51e4d063f9be63a5ac7c", "url":"https://api.github.com/users/metadaddy-sfdc", "html_url": "https://github.com/metadaddy-sfdc", "followers_url": "https://api.github.com/users/metadaddy-sfdc/followers", "following_url": "https://api.github.com/users/metadaddy-sfdc/following{/other_user}", "repos_url":"https://api.github.com/users/metadaddy-sfdc/repos", "type": "User", "name":"Pat Patterson", "company": "salesforce.com", "location": "SanFrancisco, CA", "bio":"Principal Developer Evangelist at salesforce.com", "public_repos": 55, "public_gists": 31, }
  • Issues in GitHub Single-page app built with Ionic Framework and AngularJS Custom GitHub URL field on Salesforce Case object Custom GitHub tokenfield on Salesforce User object Login to GitHub via OAuth 2.0 Pull my open Issues via GitHubAPI Set value of GitHub URL field on Case github.com/metadaddy-sfdc/IssuesInGitHub
  • Demo Issues in GitHub
  • Automating Salesforce ExactTarget Marketing Cloud I use ExactTarget for email marketing My users log in to a community site via Facebook and other social providers I want to automatically add new users to ExactTarget send new users a personalized welcome email Double Header Image used under CC-BY. Attribution: chief_huddleston on Flickr
  • ExactTarget APIs Authentication App-to-App Request POST/v1/requestToken Host:auth.exacttargetapis.com Content-type: application/json { "clientSecret":"jY3CejwqkeqhelkqweetMKh", "clientId":"qew7rehjlrhlehrlwerwbfbfh49w } Response { "accessToken":"uuqxk7rf5f7ddpy7f5f4m74u", "expiresIn":3550 }
  • ExactTarget APIs Web Service (SOAP) Manage Subscribers, Lists, Campaigns etc Create https://webservice.exacttarget.com/Service.asmx uuqxk7rf5f7ddpy7f5f4m74u [email protected]@salesforceidentity.info Image used under CC-BY-SA. Attribution: Franois Melchior on en.wikipedia.org SOAP
  • ExactTarget APIs Fuel API (REST) Trigger events, send SMS, mobile app notifications POST/interaction-experimental/v1/events Host:www.exacttargetapis.com Authorization: Bearer uuqxk7rf5f7ddpy7f5f4m74u Content-type: application/json { "ContactKey": "[email protected]", "Data": { "Facebook_ID__c": "100001234567890", "First_Name__c": Demo", "Last_Name__c": User", "Locale__c": "en_US", "User_Email__c": "[email protected]" }, "EventDefinitionKey": "Facebook-User-c-trigger" } REST Image used under CC-BY-SA. Attribution: Daniel Schwen on en.wikipedia.org
  • Demo Communities / ExactTarget Integration
  • Visualizing Business Data in Minecraft I build Minecraft mods with my kids I want to see data from Salesforce in a Minecraft world Image used under CC-BY. Attribution: Rklawton on en.wikipedia.org Fun!
  • Salesforce Identity OAuth 2.0 (Resource Owner Password Credentials Grant) Request POST/services/oauth2/token Host:login.salesforce.com Content-type:application/x-www-form-urlencoded grant_type=password&client_id=3MV...&client_secret=123...&[email protected]&password=password Response { "id":"https://login.salesforce.com/id/00D50000000IZ3ZEAW/00550000001fg5OAAQ", "issued_at":"1296509381665", "instance_url":"https://na1.salesforce.com", "signature":"+Nbl5EOl/DlsvUZ4NbGDno6vn935XsWGVbwoKyXHayo=", "access_token":"00D50000000IZ3Z!AQgAQH0Yd9M51BU_rayzAdmZ6NmT3pXZ1kTuuQPljJVsX4CPt3naL7qustlb" }
  • Salesforce1 Platform Force.com REST API Queries SOQLor SOSL query passed as URLparameter /services/data/v29.0/query?q=SELECT+Id,+Name+FROM+Account Resources Object types and records in database /services/data/v29.0/sobjects/ /services/data/v29.0/sobjects/Account/ /services/data/v29.0/sobjects/Account/001i000000b64Rw
  • Salesforce1 Platform Force.com Streaming API Bayeux wire protocol HTTP Long Polling CometD Client Libraries client = new BayeuxClient(salesforceStreamingEndpoint(endpoint), transport); ... client.getChannel(OPPORTUNITY_CHANNEL).subscribe(new OpportunityListener()); ... public class OpportunityListener implements MessageListener { public void onMessage(ClientSessionChannel channel, Message message) { } }
  • Demo Forcecraft github.com/metadaddy-sfdc/Forcecraft
  • Just as standard rail gauge and couplings allowed the railways to flourish, identity standards such as OAuth 2.0 and OpenID Connect, and standard API patterns such as REST, allow us to build the Trans-Internet Express of the future.