function getApi (apiId, selectIt = false, stage, cacheBust = false) {
  return updateUsagePlansAndApisList(cacheBust)
    .then(() => {
      let thisApi

      const allApis = [].concat(store.apiList.apiGateway, store.apiList.generic)

      if (allApis.length) {
        if (apiId === 'ANY' || apiId === 'FIRST') {
          thisApi = allApis[0]
        } else {
          thisApi = allApis.find(api => (api.apiId === apiId && api.apiStage === stage))

          if (!thisApi) {
            thisApi = allApis.find(api => (api.id.toString() === apiId))
          }
        }
      }

      if (selectIt) store.api = thisApi

      return thisApi
    })
}
Return the API with the provided apiId. Can also provide the special strings "FIRST" or "ANY" to get the first API returned. Can select the api returned as a side-effect.

@param {String} apiId   An apiId or the special strings 'FIRST' or 'ANY'. 'FIRST' and 'ANY' both return the first api encountered.
@param {Boolean} [selectIt=false]   If true, sets the found API as the current 'selected' API.