Push index integration checklist

This article provides a list of things that you should address when you integration with a push index.

Are you using a non-expiring client token to access the Push API?

Why is this important? Using a non-expiring client token is important to ensure that your integration continues to work. If you use a user token, then the integration will cease to work if the associated user is removed. A client token is tied to your search service and will exist for the life of your service, or until you revoke the token.

Is your application token secured so that it’s access is limited to the Push API, and specific push data sources?

Why is this important? The API token provides a username and password that can be used to make API calls. You should ensure that the token is only granted permissions that enable it to interact with the push API of your push data source(s).

Does your integration check for error responses and handle them appropriately?

Why is this important? If you don’t check for and handle errors then you might submit something to the Push API and have it silently fail. This can mean content that you thought you added/updated or deleted is not reflected in your search index.

How can I address this? When you submit something to the push API check the response code. If you do not receive a HTTP 200 OK response then you should handle this - options you can consider:

  • Retry the call after a period of time (once again checking for a successful response).

  • Create a queue of API calls to make and ensure the item is not removed from the queue until the call was successful.

  • Provide feedback to the end user alerting them to the fact that the API call failed (and what the consequence is)

Are you submitting your item with a canonicalized URI/URL key?

Why is this important? If you don’t have a process in place where you always refer to your item with the same index key then you can end up with duplicate items inside the search index, and you may also have problems if you need to update or delete the item.