This RFC describe how Privacy Index filtering is used between CaliOpen ReST API and a Client.

Resources

Resources using Privacy Index filtering are Thread, Message and Contact.

Principle

An HTTP Header X-Caliopen-PI is used to give PI range wanted by an API Client. Format for this header is an integer range between 0 and 100, inclusives values. Values are separated using semi colon ‘;’ character.

Examples:

X-Caliopen-PI: 0;100 -> to retrieve all resources

X-Caliopen-PI: 50;100 -> to retrieve only resources having at least a PI value of 50

Return code

API will reply with a 417 HTTP status code if a wanted resource PI do not fit into PI filter range.

API will reply with a 400 HTTP status code if PI values are invalid, given this rules:

  • min < 0
  • max > 100
  • min > max