App-Dochazka-REST
view release on metacpan or search on metacpan
lib/App/Dochazka/REST/Docs/Resources.pm view on Meta::CPAN
=head2 C<< employee/self/priv >>
=over
Allowed methods: GET
Displays the "full profile" of the currently logged-in employee. The
information includes the full employee object (taken from the 'current_emp'
property) as well as the employee's current privlevel and schedule, which are
looked up from the database.
=back
=head2 C<< employee/team >>
=over
Allowed methods: GET
This resource enables supervisors to easily list the nicks of
employees in their team - i.e. their direct reports.
=back
=head2 C<< forbidden >>
=over
Allowed methods: CONNECT, DELETE, GET, OPTIONS, POST, PUT, TRACE
This resource returns 403 Forbidden for all allowed methods, regardless of user.
Implementation note: this can be accomplished for any resource by including an 'acl_profile'
property with the value 'undef' or any unrecognized privilege level string (like "foobar").
=back
=head2 C<< genreport >>
=over
Allowed methods: GET, POST
The "POST genreport" resource generates reports from Mason templates.
The resource takes a request body with one mandatory property, "path"
(corresponding to the path of a Mason component relative to the component
root), and one optional property, "parameters", which should be a hash
of parameter names and values.
The resource handler checks (1) if the component exists in the database,
(2) whether current employee has sufficient permissions to generate the
report (by comparing the employee's privlevel with the ACL profile of the
component), and (3) validates the parameters, if any, by applying the
validation rules specified in the component object. Iff all of these
conditions are met, the component is called with the provided parameters.
=back
=head2 C<< holiday/:tsrange >>
=over
Allowed methods: GET
This resource takes a tsrange and returns a list of holidays (dates) that
fall within that tsrange.
=back
=head2 C<< interval >>
=over
Allowed methods: CONNECT, DELETE, GET, OPTIONS, POST, PUT, TRACE
Parent for interval resources
=back
=head2 C<< interval/:self/:ts/:psqlint >>
=over
Allowed methods: DELETE, GET
This is just like 'interval/self/:tsrange' except that the time range is
specified by giving a timestamp and a PostgreSQL time interval, e.g "1 week 3 days".
=back
=head2 C<< interval/eid/:eid/:ts/:psqlint >>
=over
Allowed methods: DELETE, GET
This is just like 'interval/eid/:eid/:tsrange' except that the time range is
specified by giving a timestamp and a PostgreSQL time interval, e.g "1 week 3 days".
=back
=head2 C<< interval/eid/:eid/:tsrange >>
( run in 2.278 seconds using v1.01-cache-2.11-cpan-5b529ec07f3 )