Know Me - Emergency

Know Me provides a way for users to store some information about themselves that could be used in case of an emergency.

Emergency Items

Emergency items are similar to profile items, but they are meant to store information for emergency situations.

Emergency Item List

The emergency item list endpoint allows for listing and creation of emergency items.

GET /know-me/users/(int: id)/emergency-items/

List the emergency items for a Know Me user.

Response JSON Array of Objects:
 
  • id (int) – The emergency item’s ID.
  • url (string) – The URL of the emergency item’s detail view.
  • name (string) – The emergency item’s name.
  • description (string) – The emergency item’s description. Can be an empty string.
  • media_resource (object) – The media resource associated with the emergency item. Can be null.
Status Codes:
  • 200 OK – The emergency item list was successfully retrieved.
  • 404 Not Found – There is no Know Me user with the provided id accessible to the requesting user.
POST /know-me/users/(int: id)/emergency-items/

Create a new emergency item.

Request JSON Object:
 
  • name (string) – The emergency item’s name.
  • description (string) – (Optional) The emergency item’s description.
  • media_resource (int) – (Optional) The ID of a media resource to attach to the emergency item.
Response Headers:
 
  • Location – The URL of the created emergency item’s detail view.
Response JSON Object:
 
  • id (int) – The emergency item’s ID.
  • url (string) – The URL of the emergency item’s detail view.
  • name (string) – The emergency item’s name.
  • description (string) – The emergency item’s description. This can be an empty string.
  • media_resource (object) – The media resource attached to the item. This can be null.
Status Codes:
  • 200 OK – A new emergency item was successfully created.
  • 400 Bad Request – Invalid request. Check the response data for details.
  • 404 Not Found – There is no Know Me user with the provided id accessible to the requesting user.

Emergency Item Detail

The emergency item detail endpoint allows for retrieving, updating, or deleting of specific emergency items.

GET /know-me/emergency-items/(int: id)/

Retrieve a specific emergency item’s details.

Response JSON Object:
 
  • id (int) – The emergency item’s ID.
  • url (string) – The URL of the emergency item’s detail view.
  • name (string) – The emergency item’s name.
  • description (string) – The emergency item’s description. This can be an empty string.
  • media_resource (object) – The media resource attached to the item. This can be null.
Status Codes:
  • 200 OK – The emergency item’s details were successfully retrieved.
  • 404 Not Found – There is no emergency item with the provided id accessible to the requesting user.
PATCH /know-me/emergency-items/(int: id)/

Update a particular emergency item.

Request JSON Object:
 
  • name (string) – (Optional) A new name for the item.
  • description (string) – (Optional) A new description for the item.
  • media_resource (int) – (Optional) The ID of a media resource to attach to the item.
Response JSON Object:
 
  • id (int) – The emergency item’s ID.
  • url (string) – The URL of the emergency item’s detail view.
  • name (string) – The emergency item’s name.
  • description (string) – The emergency item’s description. This can be an empty string.
  • media_resource (object) – The media resource attached to the item. This can be null.
Status Codes:
  • 200 OK – The emergency item’s details were successfully updated.
  • 400 Bad Request – Invalid request. Check the response data for details.
  • 404 Not Found – There is no emergency item with the provided id accessible to the requesting user.
DELETE /know-me/emergency-items/(int: id)/

Delete a particular emergency item.

Status Codes:
  • 204 No Content – The emergency item was successfully deleted.
  • 404 Not Found – There is no emergency item with the provided id accessible to the requesting user.