Posted:

Originally posted to the Google Apps Developer blog

Posted by Edward Jones, Software Engineer, Google Apps Script and Wesley Chun, Developer Advocate, Google Apps

Have you ever wanted a server API that modifies cells in a Google Sheet, to execute a Google Apps Script app from outside of Google Apps, or a way to use Apps Script as an API platform? Today, we’re excited to announce you can do all that and more with the Google Apps Script Execution API.

The Execution API allows developers to execute scripts from any client (browser, server, mobile, or any device). You provide the authorization, and the Execution API will run your script. If you’re new to Apps Script, it’s simply JavaScript code hosted in the cloud that can access authorized Google Apps data using the same technology that powers add-ons. The Execution API extends the ability to execute Apps Script code and unlocks the power of Docs, Sheets, Forms, and other supported services for developers.

One of our launch partners, Pear Deck, used the new API to create an interactive presentation tool that connects students to teachers by converting slide decks into interactive experiences. Their app calls the Execution API to automatically generate a Google Doc customized for each student, so everyone gets a personalized set of notes from the presentation. Without the use of Apps Script, their app would be limited to using PDFs and other static file types. Check out the video below to see how it works.

Bruce McPherson, a Google Developer Expert (GDE) for Google Apps, says: “The Execution API is a great tool for enabling what I call ‘incremental transition’ from Microsoft Office (and VBA) to Apps (and Apps Script). A mature Office workflow may involve a number of processes currently orchestrated by VBA, with data in various formats and locations. It can be a challenge to move an entire workload in one step, especially an automated process with many moving parts. This new capability enables the migration of data and process in manageable chunks.” You can find some of Bruce’s sample migration code using the Execution API here.

The Google Apps Script Execution API is live and ready for you to use today. To get started, check out the developer documentation and quickstarts. We invite you to show us what you build with the Execution API!

Posted:
By Lucia Fedorova, Google Calendar API Team

Choose your own event IDs

Imagine you work at a package delivery company and are developing a system for automatically assigning deliveries to your employees. Each of your employees has a work calendar in Google Calendar and needs to know when and where to be for the next delivery. Previously, you had to store an ID of an event in the internal deliveries database; otherwise you would not be able to find and update calendar events when work assignments changed. But now you can simply use the delivery ID as the ID of a corresponding event in Google Calendar. The complexity of figuring out which calendar event matches which delivery entirely disappears. This opens up a whole new set of integration options -- for example, when an employee declines the calendar event, Google Calendar can notify you so that you can automatically reschedule the delivery to someone else.

Try it out for yourself: just set the ID field when creating a new single or recurring event via the Calendar API v3 and observe that it sticks! The IDs must still follow certain format, but don’t worry -- it’s possible to represent almost any content in the ID by using base32hex encoding.

Set up notifications for changes in your calendar

It’s also now possible to use the Calendar API to specify how you want to receive notifications each time an event is added to a calendar or a guest responds to an invitation. The different types of change notifications can be toggled separately, which means you can set up different notification types for new events, changed events, canceled events, response updates and daily agendas. These settings are available for each calendar in the CalendarList collection.

If you are interested in using these new features, check out the Google Calendar API v3 documentation for Events and CalendarList to get started.

Lucia Fedorova is a Tech Lead of the Google Calendar API team. The team focuses on providing great experience to Google Calendar developers and enabling new and exciting integrations.

Posted by Louis Gray, Googler

Posted:
By Dan Ciruli, Google Cloud Platform Team

We strive to make our APIs accessible to anyone on any platform: ReST, HTTP and JSON mean that from nearly any language on nearly any hardware, you can call any of our APIs. However, to be truly useful on many platforms, it helps to have a client library -- one that packs a lot of functionality like handling auth, streaming media uploads and downloads, and gives you native language idioms.

Today, we are announcing General Availability of the Google APIs Client Library for .NET.

This library is an open-source effort, hosted at NuGet, that lets developers building on the Microsoft® .NET Framework to integrate their desktop or Windows Phone applications with Google’s services. It handles OAuth 2.0 integration, streaming uploads and downloads of media, and batching requests. For more than fifty Google APIs, it is the easiest way to get access for any Windows developer. Whether you are plugging Google Calendar into your .NET Framework-based application, translating text in a Windows Phone app or writing a PowerShell script to start Google Compute Engine instances, the Google APIs Client Library for .NET can save you tons of time.

Want to try it out? Visit the Getting Started tutorial. Want to hear more about about using Google’s services from .NET? Follow the Google APIs Client Library for .NET blog here.

Dan Ciruli is a Product Manager in the Cloud Platform Team intent on making developers' lives easier.

Posted by Louis Gray, Googler

Posted:
Author PhotoBy Gregory Yakushev, Software Engineer

Today we are introducing new behavior for “all-following” changes to recurring events. Previously, we cut a recurring event at the point an “all-following” change was made and created a new recurring event starting at that point. Now, in most cases we keep the recurring event intact, while still applying the relevant changes to all following instances.

This means that users can now perform operations on the entire recurring series even after an “all-following” change has been made. They can modify, reply to, delete, or apply additional “all-following” changes. Also, in many cases, changes to specific instances of a recurring event will still be preserved after an “all-following” change.

To preserve backward compatibility, API clients will still see a separate recurring event after each “all-following” change. A separate post will announce API support for making these “all-following” changes and accessing whole recurring events with multiple “all-following” changes in them.

For example: suppose I have a recurring event “Daily Meeting” for my team. Paul knows that he will be on vacation, so he declined a few instances next month. I know that we will get new intern in a month, so I invite him starting next month to “all following” instances. Also I want to move it to a different room starting next week, so I change location and apply to “all following” instances.

After all these operations Paul's responses are still preserved: I see that he will not attend a few meetings next month. I also see that on instances two months ahead both of my “all-following” changes are reflected correctly: the room is changed and intern is invited. And all attendees still see all “Daily Meeting” instances as one recurrence: they can accept, decline or remove all of them with one click.


Grisha Yakushev ensures Calendar servers keep your data consistent and safe. He enjoys travelling the world, preferably by hitchhiking.

Posted by Scott Knaster, Editor

Posted:
Author PhotoBy Jonathan Tomer, Software Engineer

Cross-posted from the Google Politics & Elections Blog

Many applications track and map governmental data, but few help their users identify the relevant local public officials. Too often local problems are divorced from the government institutions designed to help. Today, we're launching new functionality in the Google Civic Information API that lets developers connect constituents to their federal, state, county and municipal elected officials—right down to the city council district.

The Civic Information API has already helped developers create apps for US elections that incorporate polling place and ballot information, from helping those affected by Superstorm Sandy find updated polling locations over SMS to learning more about local races through social networks. We want to support these developers in their work beyond elections, including everyday civic engagement.

In addition to elected representatives, the API also returns your political jurisdictions using Open Civic Data Identifiers. We worked with the Sunlight Foundation and other civic technology groups to create this new open standard to make it easier for developers to combine the Civic Information API with their datasets. For example, once you look up districts and representatives in the Civic Information API, you can match the districts up to historical election results published by Open Elections.

Developers can head over to the documentation to get started; be sure to check out the "Map Your Reps" sample application from Bow & Arrow to get a sense of what the API can do. You can also see the API in action today through new features from some of our partners, for example:

  • Change.org has implemented a new Decision Makers feature which allows users to direct a petition to their elected representative and lists that petition publicly on the representative's profile page. As a result, the leader has better insight into the issues being discussed in their district, and a new channel to respond to constituents.
  • PopVox helps users share their opinions on bills with their Congressional Representatives in a meaningful format. PopVox uses the API to connect the user to the correct Congressional District. Because PopVox verifies that users are real constituents, the opinions shared with elected officials have more impact on the political process.
Over time, we will expand beyond US elected representatives and elections to other data types and places. We can’t grow without your help. As you use the API, please visit our Developer Forum to share your experiences and tell us how we can help you build the next generation of civic apps and services.

This release is an investment in making the world’s civic data universally accessible and useful. We’ll continue to work with civic developers who are tackling real-world challenges. Together, we can build new tools to improve civic life for everyone.


Jonathan Klabunde Tomer is a software engineer in Google's Washington, DC office. He enjoys bicycling, good food, good wine, and open data.

Posted by Scott Knaster, Editor

Posted:
Author PhotoBy Akshay Kannan, Product Manager, Google Cloud Platform

Back in 2010, we launched the Google APIs Console, enabling you to manage multiple Google APIs from a single, centralized console.

Today, we are introducing the Google Cloud Console, our next evolution of the APIs Console. The new Google Cloud Console makes managing the over 60 Google APIs housed within easier than ever. It brings an entirely new visual design and integrates tightly with our Cloud Platform services, enabling you to manage an end-to-end application deployment. For the past few weeks, we've given you the ability to opt in to the new experience, and starting soon we'll be making it the default (with the ability to go back to the old experience if you prefer).

cloud console screenshot

You'll notice an entirely new visual design, a hierarchical navigation, and even a friendly new URL structure.

cloud console screenshot

We’ve also simplified the process of getting API credentials. Now, you can register an app on the platform you are building on, then see all the possible credential types for your application, making it easier to quickly grab the credentials you need.

cloud console screenshot

If you haven't already, give the new Cloud Console a shot. We'd love to hear your thoughts and feedback in the comments section below.

cloud console screenshot


Akshay Kannan is a Product Manager on the Google Cloud Console team. His focus is on providing an integrated, beautiful developer experience for all Google Developers.

Posted by Scott Knaster, Editor

Posted:
Author Photo By Nick Mihailovksi, Product Manager, Google Analytics API Team

Cross-posted from the Google Analytics Blog

Google AdSense is a free, simple way for website publishers to earn money by displaying targeted Google ads on their websites. Today, we’ve added the ability to access AdSense data from the Google Analytics Core Reporting API. The AdSense and Analytics integration allows publishers to gain richer data and insights, leading to better optimized ad space and a higher return on investment.

In the past, accessing AdSense data using the Analytics Core Reporting API has been a top feature request. We’ve now added 8 new AdSense metrics to the Analytics Core Reporting API, enabling publishers to streamline their analysis.

Answering Business Questions
You can now answer the following business questions using these API queries:

Which pages on your site contribute most to your AdSense revenue?


dimensions=ga:pagePath
&metrics=ga:adsenseCTR,ga:adsenseRevenue,ga:adsenseECPM &sort=-ga:adsenseRevenue

Which pages generate a high number of pageviews but aren't monetizing as well as other pages?
dimensions=ga:pagePath
&metrics=ga:pageviews,ga:adsenseCTR
&sort=-ga:pageviews



Which traffic sources contribute to your revenue?
dimensions=ga:sourceMedium
&metrics=ga:adsenseCTR,ga:adsenseRevenue,ga:adsenseECPM
&sort=-ga:adsenseRevenue
Reporting Automation
By accessing this data through the API, you can now automate reporting and spend more time doing analysis. You can also use the API to integrate data from multiple sites into a single dashboard, build corporate dashboards to share across the team, and use the API to integrate data into CRM tools that display AdSense Ads.

Getting Started
To learn more about the new AdSense data, take a look at our Google Analytics Dimensions and Metrics Explorer. You can also test the API with your data by building queries in the Google Analytics Query Explorer.

Busy? In that case, now’s a great time to try these Analytics API productivity tools:
  • Magic Script: A Google Spreadsheets script to automate importing Analytics data into Spreadsheets, allowing for easy data manipulation. No coding required!
  • Google Analytics superProxy: An App Engine application that reduces all the complexity of authorization.

We hope this new data will be useful, and we're looking forward to seeing what new reports developers build.


Nick Mihailovski oversees the Google Analytics APIs. In his spare time, he likes to travel around the world.

Posted by Scott Knaster, Editor

Posted:
Author Picture By Nick Mihailovski, Product Manager, Google Analytics

Many large companies have unique needs, with dozens of websites and many users. In the past, configuring Google Analytics for these companies was time-consuming and required too many clicks.

We're thrilled to announce a new set of APIs that will make it even easier for large companies to manage multiple websites. These APIs will streamline the Google Analytics setup process, allowing IT teams to programmatically manage and configure Google Analytics, so teams can focus their efforts on analysis and gaining insights.

Account Setup and Configuration APIs
To simplify account setup, we’ve added new APIs to manage Properties, Profiles, and Goals. This reduces the time it takes to build new account structures, and allows you to enable new features across all your existing accounts.



Note: These APIs are currently available in closed beta. Please sign up here to request access.


User Permissions APIs
To reduce the overhead in managing user access, we’ve also added APIs to manage user permissions across all your accounts. With these APIs, you can quickly list which users have access to your accounts. You can also now write programs to sync Google Analytics users with corporate directory services such as LDAP.


The User Permissions APIs are public and can be used today.

Getting Started
To get started, you can find all the API resources on our Google Analytics APIs for Large Companies page. This launch brings new opportunities to developers, IT Teams, and Google Analytics users. Let us know what you think!


Nick Mihailovski oversees the Google Analytics APIs. In his spare time, he likes to travel around the world.

Posted by Scott Knaster, Editor

Posted:
Author Photo By Ranjith Jayaram, Product Manager, Google+ iOS Platform

Cross-posted with the Google+ Developers Blog

Today we are announcing version 1.4.0 of the Google+ iOS SDK. The new version includes two of the most highly requested features from the developer community:
  1. In-app share box. Now your users can share with their Google+ circles, directly from your iOS app! In addition, the native in-app share box supports image and video attachments. If you've already implemented browser-based sharing, you can switch to the native in-app share box with a single line change:
              Just update this:
     [[GPPShare sharedInstance] shareDialog]
              to this:
     [[GPPShare sharedInstance] nativeShareDialog]
                             
The native iOS in-app share box                                            
   

2.  ID token support. ID tokens allow you to securely verify the identity of users of your iOS                     clients to your application servers.

To download or to learn more about the Google+ iOS SDK, visit our Google+ Developers site.


Ranjith Jayaram is a Product Manager on the Google+ Platform team. While he's not working, he enjoys reading and occasionally writing fiction.

Posted by +Scott Knaster, Editor

Posted:
Author PhotoBy Kuntal Loya, Software Engineer

With the Google Picker API, you can provide users of your application with a simple interface to select photos, maps, videos, documents and other content from Google using a few lines of JavaScript.

Starting today, the Picker API is available via the APIs Console. For those of you who are already using the API, this change makes it easier to manage and view traffic and authentication data alongside any other Google APIs that you may be using with your application.

To get started, register your project on the APIs Console. If you’re already using the Picker API, you’ll need to include the developer key you obtained during registration with the JavaScript used to create the picker.
<script type="text/javascript">

      // The API developer key obtained from the Google APIs Console.
      var developerKey = 'ABC123 ... ';

      // Use the API Loader script to load google.picker.
      function loadPicker() {
        gapi.load('picker', {'callback': createPicker});
      }

      // Create and render a Picker object for searching images.
      function createPicker() {
        var picker = new google.picker.PickerBuilder().
            addView(google.picker.ViewId.IMAGE_SEARCH).
            setDeveloperKey(developerKey).
            setCallback(pickerCallback).
            build();
        picker.setVisible(true);
      }
    </script>
    <script type="text/javascript" 
      src="https://apis.google.com/js/api.js?onload=loadPicker">
    </script>
See the Developer’s Guide for more details.


Kuntal Loya has been making the Google Picker smarter while enjoying Bangalore’s weather and the food at the Google Café. Meanwhile, she’s nearing the end of Mahasamar, Narendra Kohli’s 8-volume re-telling of the Mahabharata.

Posted by Scott Knaster, Editor

Posted:
Author Photo By Nick Mihailovski, Google Analytics API team

Cross-posted from the Google Analytics Blog

Google Analytics users can use the Core Reporting API to save time by building dashboards and automating complex reporting tasks. This API exposes over 250 data points (dimensions and metrics), and new data is added every few months. For many developers, it can be difficult to keep their applications up to date with all the latest data.

To make things easier, today we are launching the new Google Analytics Metadata API to simplify data discovery. The Metadata API contains all the queryable dimensions and metrics included in the Core Reporting API. We’ve also added attributes for each dimension and metric, such as the web or app name, full text description, grouping, metric calculations, deprecation status, and whether the data is queryable in segments. You can check out at a live Metadata API response here.

You now have programmatic access to generate the same list of dimensions and metrics we use to generate our public documentation.



You can now create this list using the Metadata API.


Saving developers time

When you create tools to query the Core Reporting API, you can use the Metadata API to automatically update your user interfaces. For example, Analytics Canvas, a popular third-party Google Analytics data extraction tool, uses the Metadata API to keep its query building interface up to date.



Analytics Canvas uses the Metadata API to power its query builder.

According to James Standen, founder of Analytics Canvas, "In the past, keeping Analytics Canvas up to date with the Google Analytics API dimensions and metrics required a lot of manual updating to our application. The new Metadata API automates this process, saving us time, and giving our users direct access to all the great new data the instant it's available. Users love it!"


New deprecation policy

To increase data transparency, we’ve also published a new data deprecation policy for dimensions and metrics. New data we release will be announced on our changelogs and automatically added to the Metadata API. Data we decide to remove will be marked as deprecated in the Metadata API, allowing developers to gracefully remove these values from their tools.


Get started today

Our goal was to make this API super easy to use. To get started, take a look at our resources:

Questions? Comments? Simply want to share in the excitement? Join the analytics developer community in our Reporting API Developer forum.



Nick Mihailovski oversees the Google Analytics APIs. In his spare time, he likes to travel around the world.

Posted by Scott Knaster, Editor

Posted:
Author PhotoBy Piotr Stanczyk, Tech Lead, Google Calendar APIs

If you've developed an application integrated with Google Calendar, you know that you need to periodically poll for event changes to ensure your application stays in sync. Today we’re launching Push notifications for Calendar API. This change makes periodic polling unnecessary. Push notifications significantly reduce the amount of time that the app is out of sync with the server. For mobile devices, this can lead to big savings in data usage and power consumption.

The only thing an app needs to do to get the new push functionality is to subscribe to a calendar of interest. When a calendar changes, we’ll notify your app and the app does an API call to get the update. If you use one of the Google API client libraries it’s very easy to utilize push notifications.

As an example, let’s assume you have a calendar [email protected]. Your app is hosted on a server with my-host.com domain and push notifications should be delivered to an HTTPS web-hook https://my-host.com/notification:
Map<String, String> params = new HashMap<String, String>();
Channel request = new Channel()
  .setId("unique_subscription_ID")
  .setType("web_hook")
  .setAddress(String.format("https://my-host.com/notification"))
  .setParams(params);
service.events().watch("[email protected]", request).execute();
From now on, every time [email protected] changes, Google Calendar server will trigger a web-hook callback at https://my-host.com/notification. All the app needs to do is request an incremental sync as it did before:
changes = service.events().list("[email protected]")
  .setUpdatedMin(lastSynchonizationTime).execute();
If you are interested in using this new feature, please refer to Google API v3 documentation for Push.


Piotr Stanczyk is a Tech Lead for Google Calendar APIs. His current focus is to provide the next generation Calendar API which makes lives of developers easier.

Posted by Scott Knaster, Editor

Posted:
By Srinivasan Kannan, Google Analytics API Team

Cross-posted from the Google Analytics Blog

Over the past year we’ve added many new features to Google Analytics. Today we are releasing all of this data in the Core Reporting API.


Custom Dimensions and Metrics

We're most excited about the ability to query for custom dimensions and metrics using the API.

Developers can use custom dimensions to send unique IDs into Google Analytics, and then use the core reporting API to retrieve these IDs along with other Google Analytics data.

For example, your content management system can pass a content ID as a custom dimension using the Google Analytics tracking code. Developers can then use the API to get a list of the most popular content by ID and display the list of most popular content on their website.

Mobile Dimensions and Metrics

We've added more mobile dimensions and metrics, including those found in the Mobile App Analytics reports:

  • ga:appId
  • ga:appVersion
  • ga:appName
  • ga:appInstallerId
  • ga:landingScreenName
  • ga:screenDepth
  • ga:screenName
  • ga:exitScreenName
  • ga:timeOnScreen
  • ga:avgScreenviewDuration
  • ga:deviceCategory
  • ga:isTablet
  • ga:mobileDeviceMarketingName
  • ga:exceptionDescription
  • ga:exceptionsPerScreenview
  • ga:fatalExceptionsPerScreenview

Some examples of questions this new data can answer are:

Local Currency Metrics

If you are sending Google Analytics multiple currencies, you now have the ability to access the local currency of the transactions with this new data:

  • ga:currencyCode
  • ga:localItemRevenue
  • ga:localTransactionRevenue
  • ga:localTransactionShipping
  • ga:localTransactionTax

Time Dimensions

We added new time-based dimensions to simplify working with reporting data:

  • ga:dayOfWeekName
  • ga:dateHour
  • ga:isoWeek
  • ga:yearMonth
  • ga:yearWeek

Sample queries:

Traffic Source Dimensions

Finally, we've added two new traffic source dimensions, including one to return the full URL of the referral.

  • ga:fullReferrer
  • ga:sourceMedium

Sample query: the top 10 referrers based on visits (using full referrer).

For a complete list of the new data, take a look at the Core Reporting API changelog.
For all the data definitions, check the Core Reporting API Dimensions and Metrics explorer.
As always, you can check out this new data directly within our Query Explorer tool.



Writen by Srinivasan Kannan, Google Analytics API Team

Posted by Scott Knaster, Editor

Posted:
Author PhotoBy Piotr Stanczyk, Tech Lead

In March we announced that CalDAV, an open standard for accessing calendar data across the web, would become a partner-only API because it appeared that almost all the API usage was driven by a few large developers. Since that announcement, we received many requests for access to CalDAV, giving us a better understanding of developers’ use cases and causing us to revisit that decision. In response to those requests, we are keeping the CalDAV API public. And in the spirit of openness, today we’re also making CardDAV – an open standard for accessing contact information across the web – available to everyone for the first time.

Both of these APIs are getting other updates as well:
In addition, the CalDAV API now has a new endpoint:
https://apidata.googleusercontent.com/caldav/v2


Piotr Stanczyk is the Tech Lead of the Google Calendar APIs group. His current focus is to provide next generation Calendar APIs which make developers’ lives easier. He also participates in CalConnect consortium.

Posted by Scott Knaster, Editor


Posted:
Author PhotoBy Ted Hamilton, YouTube Analytics

Cross-posted from the YouTube API Blog

Trying to figure out how YouTube’s one billion monthly users are interacting with your videos? Try the new YouTube Analytics API to get custom reports of the YouTube statistics you care about in a direct JSON or CSV response, perfect for dashboards and ad hoc reports.

The new API includes all the standard view and engagement metrics you would expect, including views, shares, and subscriber numbers. Compared to the previous Insight Data API, you also get:
  • Watch metrics: Track estimated minutes watched across channel, content owner, or video, and dive into the video details with average view time and average view percentage.
  • Earning performance metrics: Track estimated earnings (net revenue) from select advertising sources across your content.
  • Ad performance metrics: Break down video performance with monetized playbacks, ad impressions, gross revenue, and cost per impression reports.
  • Annotation metrics: Optimize overlays/annotations with click through and close rate metrics.
Client libraries and code samples
You’ll find client libraries for the languages you use most, with nine different languages available today. You can also make HTTP RESTful requests directly, and with our API Explorer, you can try out sample reports before writing any code.

Don’t write your code from scratch! Get started with code examples in Java, JavaScript, Python, and Ruby. If you want a step-by-step walkthrough of building a complete web application, have a look at our JavaScript exercise.

App examples
Check out some apps that are already using the API:

app screen shot

  • Next Big Sound provides analytics and insights for the music industry by tracking billions of social signals including YouTube. This enables record labels, artists, and band managers to make better decisions on everything from promotion strategies to tour locations.
  • vidIQ is an audience development suite that works with global brands to organically grow their views and subscribers. Their features include cross-platform social analytics, advanced comment management, SEO tools, social syndication and influencer identification.
app screen shot
  • Wizdeo’s WizTracker provides in-depth analysis of YouTube channels to help with cross promotion and video comparisons during their initial launch. Users get access to detailed analytics about views, subscriber engagement, traffic sources and demographics.
  • Vidyard is a video marketing platform. With powerful analytics, built-in marketing tools, and integration with key marketing automation platforms, Vidyard helps marketers drive results with video content.
app screen shot
Fullscreen is building a global network of YouTube channels with content creators and brands. Fullscreen provides a full suite of end-to-end YouTube tools and uses the new API for internal, business-intelligence tools.

Learn more
In addition to the documentation, check out our Analytics API playlist to make getting started even easier.



If your goal is to export all statistics for a large number of channels on a recurring basis for your data warehouse, look forward to using the upcoming scheduled reports feature of the API, expected to launch later this year.

To get more info on the YouTube APIs, subscribe to our YouTube for Developers channel and YouTubeDev on Google+.


Ted Hamilton is the Product Manager for YouTube Analytics based out of Zurich, Switzerland. Prior to Google, Ted was a consultant at Bain and Company in London. Ted has a Computer Science degree from Northwestern University and holds an MBA from MIT Sloan.

Posted by Scott Knaster, Editor

Posted:
Author Photo
By Adam Feldman, APIs Product Manager

We know that deprecation policies can be complex. But it shouldn’t be hard for you to determine which features of our APIs and services are covered by a deprecation policy and which ones aren’t. To date, we’ve often used the label “Experimental” to indicate that certain new versions, features, or functionality don’t have the deprecation policy. But we know you don’t want to hunt through documentation looking for what is “Experimental” and what isn’t.

So starting today, for each API or service that has the deprecation policy, we are creating an explicit list of what is covered by that policy. For instance, here’s what this list will look like for the Google Maps APIs:

We are not adding or subtracting anything, but only changing how we display this information to make it easier to locate and understand. This change will be fully rolled out in the coming weeks. Please refer to each API or service’s terms of service for more information. We hope this will make your life easier so you get back to your code sooner!


Adam Feldman is a Product Manager, focusing on all of Google's APIs and making sure Google provides the best possible platform to developers.

Posted by Scott Knaster, Editor

Posted:
By the Google API Infrastructure Team


As we described in a previous post, earlier this week we experienced an outage in our API infrastructure. Today we’re providing an incident report that details the nature of the outage and our response.

The following is the incident report for the Google API infrastructure outage that occurred on April 30, 2013. We understand this service issue has impacted our valued developers and users, and we apologize to everyone who was affected.

Issue Summary

From 6:26 PM to 7:58 PM PT, requests to most Google APIs resulted in 500 error response messages. Google applications that rely on these APIs also returned errors or had reduced functionality. At its peak, the issue affected 100% of traffic to this API infrastructure. Users could continue to access certain APIs that run on separate infrastructures. The root cause of this outage was an invalid configuration change that exposed a bug in a widely used internal library.

Timeline (all times Pacific Time)
  • 6:19 PM: Configuration push begins
  • 6:26 PM: Outage begins
  • 6:26 PM: Pagers alerted teams
  • 6:54 PM: Failed configuration change rollback
  • 7:15 PM: Successful configuration change rollback
  • 7:19 PM: Server restarts begin
  • 7:58 PM: 100% of traffic back online
Root Cause

At 6:19 PM PT, a configuration change was inadvertently released to our production environment without first being released to the testing enviroment. The change specified an invalid address for the authentication servers in production. This exposed a bug in the authentication libraries which caused them to block permanently while attempting to resolve the invalid address to physical services. In addition, the internal monitoring systems permanently blocked on this call to the authentication library. The combination of the bug and configuration error quickly caused all of the serving threads to be consumed. Traffic was permanently queued waiting for a serving thread to become available. The servers began repeatedly hanging and restarting as they attempted to recover and at 6:26 PM PT, the service outage began.

Resolution and recovery

At 6:26 PM PT, the monitoring systems alerted our engineers who investigated and quickly escalated the issue. By 6:40 PM, the incident response team identified that the monitoring system was exacerbating the problem caused by this bug.

At 6:54 PM, we attempted to rollback the problematic configuration change. This rollback failed due to complexity in the configuration system which caused our security checks to reject the rollback. These problems were addressed and we successfully rolled back at 7:15 PM.

Some jobs started to slowly recover, and we determined that the overall recovery would be faster by a restart of all of the API infrastructure servers globally. To help with the recovery, we turned off some of our monitoring systems which were triggering the bug. As a result, we decided to restart servers gradually (at 7:19 PM), to avoid possible cascading failures from a wide scale restart. By 7:49 PM, 25% of traffic was restored and 100% of traffic was routed to the API infrastructure at 7:58 PM.

Corrective and Preventative Measures

In the last two days, we’ve conducted an internal review and analysis of the outage. The following are actions we are taking to address the underlying causes of the issue and to help prevent recurrence and improve response times:
  • Disable the current configuration release mechanism until safer measures are implemented. (Completed.)
  • Change rollback process to be quicker and more robust.
  • Fix the underlying authentication libraries and monitoring to correctly timeout/interrupt on errors.
  • Programmatically enforce staged rollouts of all configuration changes.
  • Improve process for auditing all high-risk configuration options.
  • Add a faster rollback mechanism and improve the traffic ramp-up process, so any future problems of this type can be corrected quickly.
  • Develop better mechanism for quickly delivering status notifications during incidents.
Google is committed to continually and quickly improving our technology and operational processes to prevent outages. We appreciate your patience and again apologize for the impact to you, your users, and your organization. We thank you for your business and continued support.

Sincerely,

The Google API Infrastructure Team


Posted by Scott Knaster, Editor

Posted:
Author PhotoBy Louis Ryan, Software Engineer

We know that developers around the world depend on our APIs for their apps, sites and businesses every day. Unfortunately, we experienced an outage of the Google API serving infrastructure yesterday, April 30. This outage impacted most Google APIs, resulting in requests failing with a 500 error code. Additionally, users may have experienced missing features or capabilities from some Google services that rely on these APIs.

At 6:26 pm Pacific Time, we pushed a config change that inadvertently caused a widespread outage of our API infrastructure.  Our normal rollback procedure failed, delaying the rollback until 7:22 pm, at which time APIs started to recover. The outage was completely resolved by 8:00 pm.

We are making several changes to help ensure this issue won’t happen again. We’ve identified some key improvements to our release and rollback process that we are implementing immediately. Reliability is a top priority at Google, and we are continuously making improvements to our systems. We apologize to everyone who was affected.


Louis Ryan is an engineer on the API platforms team in Mountain View. Louis is passionate about making APIs faster, more consistent, and reliable.

Posted by Scott Knaster, Editor

Posted:
Author PhotoBy Brian Cairns, Software Engineer

Google Drive lets users create Docs, Sheets, and Slides, collaborate on them in real time, and have their changes saved automatically. With the new Google Drive Realtime API, you can now easily add some of the same real-time collaboration that powers Google Drive to your own apps. This new API handles network communication, storage, presence, conflict resolution, and other collaborative details so you can focus on building great apps.

Developing for the Drive Realtime API is almost as simple as working with local objects. The API provides collaborative versions of familiar data objects such as maps, lists, strings, and JSON values and automatically synchronizes and stores modifications to these objects. Your application reads from and writes to these objects like any other local object. Change event handlers can be added to collaborative objects so that your app can react to changes from other collaborators.

Because the Drive Realtime API is based on operational transformation (OT), local changes are reflected instantly, even on high-latency networks. The Drive Realtime API automatically transforms changes to the data model so that every collaborator stays in sync.

If basic collections aren't enough for your application, the Drive Realtime API supports custom objects and references, including trees and arbitrary graph structures. As with other collaborative objects, the Drive Realtime API automatically synchronizes these objects with other collaborators and stores them in Drive.

Because presence is important in collaborative applications, the Drive Realtime API also keeps track of who is connected to your application and provides your app with events for when collaborators join, leave, or make changes.

UI showing 3 collaborators
Widget using the Drive Realtime API and showing the collaborators on a document

Neutron Drive, Gantter and draw.io have enabled realtime collaboration in their apps using the Google Drive Realtime API. Check out these apps to see the Drive Realtime API in action.


Collaborative code editing with Neutron Drive

Neutron Drive is an online editor for text and source code files stored in Google Drive. You can now collaboratively edit any text or source code files stored in Drive and get a realtime collaboration experience—shared typing, a view of active collaborators, cursor positioning, and selected text. This all comes in addition to the syntax highlighting and other advanced features offered by Neutron Drive. To learn more, watch the video:




Collaborative project scheduling with Gantter

Gantter is a free online project scheduling tool and Gantt diagram editor. It now allows you to collaboratively—and in real time— work on your project schedules. It even features an embedded chat powered by the Drive Realtime API. Watch the video below to see Gantter’s new realtime collaboration features in action.




Collaborative diagraming with draw.io

draw.io is a diagraming application that enables you to draw a wide variety of diagrams such as flowcharts, UML diagrams and even electronic circuits. You can now see updates from other collaborators instantaneously, with colored visual cues indicating who has changed the diagram and where that change occurred. Try the new draw.io collaborative beta at rt.draw.io and watch the video below.




Learn more about the Drive Realtime API

We built a collaborative colored cube puzzle so you can have some fun while trying out the Drive Realtime API and a Drive Realtime API Playground to take you through the API step-by-step. Both apps are open source so check out our Github repos.

Have a look at the Google Drive Realtime API technical documentation and start making your app realtime-enabled!


Brian Cairns joined the Google Drive team in 2011 and lives in Boulder, Colorado. He is the lead software engineer for the Drive Realtime API.

Posted by Scott Knaster, Editor

Posted:
Author Photo
By Scott Knaster, Google Developers Blog Editor

This post is abridged and cross-posted from the YouTube API Blog.


Adding a high-quality video experience to your Android application just got a whole lot easier. Starting today, you can embed and play YouTube videos in your app using the new YouTube Android Player API.

The API, which was pre-announced at Google I/O 2012, offers these benefits:
We are launching the API as experimental, although we do not expect major interface changes going forward.

The only limit now is your imagination (and ToS)

These instructions explain how to include the API client library in your Android application. The library is supported on Android devices running version 4.2.16 or newer of the Android YouTube app. By including the library in your project, you can create rich video playback experiences through the ability to control and customize the video player. Flipboard, shown below, is a good example. See the full post for more cool app examples.


Flipboard
Flipboard

Learn more

If you would like to learn more about the YouTube Android Player API, read the full post on The YouTube API Blog. The post features several companies already using the API and contains useful links to source code examples and documentation. Alternatively, get started by watching some of the videos from our YouTube Android Player API playlist.




Scott Knaster is the Editor of Google Developers Blog. His programming books have been translated into several languages, including Japanese and Pascal.