code: def get_state(self, api=None):
          
          api = api or self._API
          return api.get(self._URL['state'].format(id=self.id)).json()
docs: Retrieve automation run state.
          :param api: sevenbridges Api instance
          :return: State file json contents as string