Reports

When a feedback is delivered (see : Life cycle overview), a report is created.

An Administrator gets all his organization’s reports with :

GET /organizations/{organization}/reports

And a specific report with :

GET /reports/{report}

Life cycle

When a new report is generated by a feedback, its state is NEW.

Below is a representation of each possible state for a report and the actions on that report leading to this state.

_images/report_workflow.png

There is a unique endpoint to change a report’s state :

PATCH /reports/{report}/state

For example, to change the report’s state from NEW to ACCEPTED, the admin will send the previous request with the following body :

{
    "transition": "accept"
}

A report can only be closed (state CLOSED), if every operation linked to this report has been either resolved or refused (see paragraph below Operations).

Operations

An operation is an action assigned to a member of the organization in relation with a report.

This endpoint sends back all operations resulting from a report :

GET /reports/{report}/operations

Creation and modification of an operation

An admin creates an operation on a report with this request :

POST /operations
{
    "description":"operation's description",
    "name":"operation's name",
    "report":"cb7118b5-a821-4cf2-9475-0c0d0efdb8d0"
}

A newly created operation has the state NEW.

One or more images can be added to an operation :

POST /operations/{operation}/images
{
    "image":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAIAAAACDbGyAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAB3RJTUUH4QIVDRUfvq7u+AAAABl0RVh0Q29tbWVudABDcmVhdGVkIHdpdGggR0lNUFeBDhcAAAAUSURBVAjXY3wrIcGABJgYUAGpfABZiwEnbOeFrwAAAABJRU5ErkJggg=="
}

The description of an operation can be modified with the request :

PATCH /operations/{operation}
{
    "description": "New description"
}

Assignment

To assign an operation to a member, the admin sends the following request :

POST /operations/{operation}/assign
{
    "member": "{member}",
}

where {member} is the member’s id the operation is assigned to.

In progress and resolved operation

After being assigned, the operation will be changed to “in progress” then “resolved”, either by the assigned member or the admin.

Life cycle of an operation

_images/operation_workflow.png

Comments

It’s possible to comment an operation :

POST /operations/{operation}/comments
{
    "text":"My comment"
}

To get all comments on an operation :

GET /operations/{operation}/comments

Logs of an operation

An admin can see the history of an operation :

GET /operations/{operation}/logs

Delegation

An admin can delegate a report to a partner organization.

See : Manage partnership

To delegate a report, an admin sends the following request :

POST /organizations/{organization}/delegates
{
    "report":"cb7118b5-a821-4cf2-9475-0c0d0efdb8d0",
    "organization":"a31d9ab7-9476-45f2-8cc7-033bf40bbcfa"
}

where {organization} is the organization’s id delegating the report. And a31d9ab7-9476-45f2-8cc7-033bf40bbcfa is the receiving organization’s id.

This report is shared between the delegating organization and the receiving organization. The latter will treat this report the same has every other report.

The partner organization may itself delegate this report to one of its partners and so on.

Export

An admin can export every report from his organization to the Excel format:

POST /organizations/{organization}/reports/exports

An archive containing the Excel file listing all reports and the associated images will be emailed to the authenticated admin.