App-Dochazka-REST

 view release on metacpan or  search on metacpan

lib/App/Dochazka/REST/Docs/Resources.pm  view on Meta::CPAN

interval report-generators do not have to handle changes in employee status.

By default, the number of intervals returned is limited to 500. This number
can be changed via the DOCHAZKA_INTERVAL_SELECT_LIMIT site configuration
parameter (set to 'undef' for no limit).


=back

=head2 C<< interval/iid >>


=over

Allowed methods: POST

Enables existing interval objects to be updated by sending a POST request to
the REST server. Along with the properties to be modified, the request body
must include an 'iid' property, the value of which specifies the iid to be
updated.


=back

=head2 C<< interval/iid/:iid >>


=over

Allowed methods: DELETE, GET, PUT

This resource makes it possible to GET, PUT, or DELETE an interval object by
its IID.

=over

=item * GET

Retrieves an interval object by its IID.

=item * PUT

Updates the interval object whose iid is specified by the ':iid' URI parameter.
The fields to be updated and their new values should be sent in the request
body, e.g., like this:

    { 
        "eid" : 34, 
        "aid" : 1, 
        "intvl" : '[ 2014-11-18 08:00, 2014-11-18 12:00 )' 
    }

=item * DELETE

Deletes the interval object whose iid is specified by the ':iid' URI parameter.
As long as the interval does not overlap with a lock interval, the delete operation
will probably work as expected.

=back

ACL note: 'active' employees can update/delete only their own unlocked intervals.


=back

=head2 C<< interval/new >>


=over

Allowed methods: POST

This is the resource by which employees add new attendance data to the
database. It takes a request body containing, at the very least, C<aid> and
C<intvl> properties. Additionally, it can contain C<long_desc>, while
administrators can also specify C<eid> and C<remark>.


=back

=head2 C<< interval/nick/:nick/:ts/:psqlint >>


=over

Allowed methods: DELETE, GET

This is just like 'interval/nick/:nick/: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/nick/:nick/:tsrange >>


=over

Allowed methods: DELETE, GET

With this resource, administrators can retrieve any employee's intervals 
over a given tsrange, and active employees can do the same with their own intervals. 

Before any records are returned, the tsrange is checked to see if it overlaps with
any privlevel or schedule changes - in which case an error is returned. This is so
interval report-generators do not have to handle changes in employee status.

By default, the number of intervals returned is limited to 500. This number
can be changed via the DOCHAZKA_INTERVAL_SELECT_LIMIT site configuration
parameter (set to 'undef' for no limit).


=back

=head2 C<< interval/self/:tsrange >>


=over

Allowed methods: DELETE, GET

lib/App/Dochazka/REST/Docs/Resources.pm  view on Meta::CPAN


=over

Allowed methods: POST

Enables existing lock objects to be updated by sending a POST request to
the REST server. Along with the properties to be modified, the request body
must include an 'lid' property, the value of which specifies the lid to be
updated.


=back

=head2 C<< lock/lid/:lid >>


=over

Allowed methods: DELETE, GET, PUT

This resource makes it possible to GET, PUT, or DELETE an lock object by its
LID.

=over

=item * GET

Retrieves an lock object by its lid.

=item * PUT

Updates the lock object whose lid is specified by the ':lid' URI parameter.
The fields to be updated and their new values should be sent in the request
body, e.g., like this:

    { 
        "eid" : 34, 
        "intvl" : '[ 2014-11-18 00:00, 2014-11-18 24:00 )' 
    }

=item * DELETE

Deletes the lock object whose lid is specified by the ':lid' URI parameter.

=back

ACL note: 'active' employees can view only their own locks, and of course
admin privilege is required to modify or remove a lock.


=back

=head2 C<< lock/new >>


=over

Allowed methods: POST

This is the resource by which the attendance data entered by an employee 
for a given time period can be "locked" to prevent any subsequent
modifications.  It takes a request body containing, at the very least, an
C<intvl> property specifying the tsrange to lock. Additionally, administrators
can specify C<remark> and C<eid> properties.


=back

=head2 C<< lock/nick/:nick/:tsrange >>


=over

Allowed methods: GET

With this resource, administrators can retrieve any employee's locks 
over a given tsrange. 

There are no syntactical limitations on the tsrange, but if too many records would
be fetched, the return status will be C<DISPATCH_TOO_MANY_RECORDS_FOUND>.


=back

=head2 C<< lock/self/:tsrange >>


=over

Allowed methods: GET

With this resource, employees can retrieve their own attendance locks 
over a given tsrange. 

There are no syntactical limitations on the tsrange, but if too many records would
be fetched, the return status will be C<DISPATCH_TOO_MANY_RECORDS_FOUND>.


=back

=head2 C<< noop >>


=over

Allowed methods: CONNECT, DELETE, GET, OPTIONS, POST, PUT, TRACE

Regardless of anything, this resource does nothing at all.


=back

=head2 C<< param/:type/:param >>


=over

Allowed methods: DELETE, GET, PUT

This resource can be used to look up (GET) meta, core, and site parameters, 
as well as to set (PUT) and delete (DELETE) meta parameters.



( run in 1.503 second using v1.01-cache-2.11-cpan-63c85eba8c4 )