Example #1
0
    def show(self,
             id: EncodedDatabaseIdField,
             trans: ProvidesUserContext = DependsOnTrans,
             full: typing.Optional[bool] = False) -> typing.Dict:
        """
        Return dictionary containing description of job data

        Parameters
        - id: ID of job to return
        - full: Return extra information ?
        """
        id = trans.app.security.decode_id(id)
        job = self.job_manager.get_accessible_job(trans, id)
        return view_show_job(trans, job, bool(full))
Example #2
0
    def show(self, trans: ProvidesUserContext, id, **kwd):
        """
        show( trans, id )
        * GET /api/jobs/{id}:
            return jobs for current user

        :type   id: string
        :param  id: Specific job id

        :type   full: boolean
        :param  full: whether to return extra information

        :rtype:     dictionary
        :returns:   dictionary containing full description of job data
        """
        job = self.__get_job(trans, id)
        full_output = util.asbool(kwd.get('full', 'false'))
        return view_show_job(trans, job, full_output)