Loading...

Bully addIncident

Request Description

Records a bullying incident and logs to the database. On success, returns the ID of the incident that has been commited to the database.


Request Information

Response Format:JSON
Requires Authentication:Yes
Cached:No
Cache Duration:N/A

Parameters

bully_idPerson ID for a student, or an array of IDs if there are multiple aggressors involved in this incident.
victim_idPerson ID for a student, or an array of IDs if there are multiple victims involved in this incident.
catsSingle category or array of categories in which this incident falls into (cyber/physical/etc)
dateDate and time of incident - Format of YYYY-MM-DD HH:MM:SS - Time is not essential and can be left blank.
infoNarrative of text about the incident
staffPerson ID for the staff member reporting the incident. If the staff ID does not exist in the HUB: Bully Log group, they will only be able to see their incidents they log so this parameter is important.

Example Request

$a = $api->sendRequest(
  array( 
    'controller'    => 'Bully',  
    'action'        => 'addIncident',
    'bully_id'      => array( '123', '456' ),
    'victim_id'     => '789',
    'cats'          => array( 'Cyber', 'Verbal' ),
    'date'          => '2015-05-20',
    'info'          => 'Aggressor A sent a nasty message to the victim.'
    'staff'         => '1012'
  )
  );

Example Result

Array
(
    [result] => Success
    [last_id] => 10
)