def METHOD_NAME(self, recurring_api_id=None):
    """
    ---
    single:
      description: Retrieve an Recurring API by id
      tags:
        - recurring_apis
      parameters:
        - in: path
          name: recurring_api_id
          required: true
          schema:
            type: integer
      responses:
        200:
          content:
            application/json:
              schema: SingleRecurringAPI
        400:
          content:
            application/json:
              schema: Error
    multiple:
      description: Retrieve all Recurring APIs
      tags:
        - recurring_apis
      responses:
        200:
          content:
            application/json:
              schema: ArrayOfRecurringAPIs
        400:
          content:
            application/json:
              schema: Error
    """
    with self.Session() as session:
        if recurring_api_id is not None:
            s = session.scalars(
                RecurringAPI.select(session.user_or_token).where(
                    RecurringAPI.id == recurring_api_id
                )
            ).first()
            if s is None:
                return self.error('Cannot access this Recurring API.', status=403)
            recurring_api_dict = recursive_to_dict(s)
            return self.success(data=recurring_api_dict)
        # retrieve multiple services
        recurring_apis = session.scalars(
            RecurringAPI.select(session.user_or_token)
        ).all()
        ret_array = []
        for a in recurring_apis:
            recurring_api_dict = recursive_to_dict(a)
            if isinstance(a.payload, str):
                recurring_api_dict["payload"] = json.loads(a.payload)
            elif isinstance(a.payload, dict):
                recurring_api_dict["payload"] = a.payload
            else:
                return self.error(message='payload must be dictionary or string')
            ret_array.append(recurring_api_dict)
        return self.success(data=ret_array)