Know Me API
bugfix-issue-174-deploy-docs

Contents:

  • REST API
    • Authorization
    • API Endpoints
      • Authentication
      • Account
      • Know Me - Emergency
      • Know Me - Gallery
        • Gallery View
        • Media Resource View
      • Know Me - KMUser
  • Development
  • Deployment
  • Changelog
Know Me API
  • Docs »
  • REST API »
  • Know Me - Gallery
  • Edit on GitHub

Know Me - Gallery¶

The gallery is used to store various files associated with a know me user. Media resources (items in the gallery) can be attached to a particular profile item.

Note

Currently there is no way to retrieve media resources that are not attached to a profile item. This will be introduced later as a paid feature.

Gallery View¶

This endpoint allows for creation of new media resources.

POST /know-me/users/(int: id)/gallery/¶

Create a new media resource.

Note

Since media resources involve a file, the request be sent with the header Content-Type: multipart/form-data.

Parameters:
  • id (int) – The ID of the know me user to create a media resource for.
Form Parameters:
 
  • string name – The name to give the file being uploaded.
  • file file – The file to upload.
Response Headers:
 
  • Location – The URL of the created media resource’s detail view.
Response JSON Object:
 
  • id (int) – The ID of the created media resource.
  • url (string) – The URL of the created media resource’s detail view.
  • name (string) – The name the media resource was created with.
  • file (string) – The URL of the file attached to the media resource.
Status Codes:
  • 201 Created – The media resource was succesfully created.
  • 400 Bad Request – Invalid request. Check the response data for details.
  • 404 Not Found – There is no know me user with the given id accessible to the requesting user.

Media Resource View¶

This endpoint allows for retrieving and updating a specific media resource’s information.

GET /know-me/media-resources/(int: id)/¶

Get the information of a specific media resource.

Parameters:
  • id (int) – The ID of the media resource to retrieve.
Response JSON Object:
 
  • id (int) – The ID of the media resource.
  • url (string) – The URL of the media resource’s detail view.
  • name (string) – The name of the media resource.
  • file (string) – The URL of the file attached to the media resource.
Status Codes:
  • 200 OK – The media resource’s information was succesfully retrieved.
  • 404 Not Found – There is no media resource with the given id accessible to the requesting user.
PATCH /know-me/media-resources/(int: id)/¶

Update a specific media resource’s information.

Parameters:
  • id (int) – The ID of the media resource to update.
<form string name:
 

(Optional) A new name for the media resource.

<form file file:
 

(Optional) A new file to associate with the media resource.

Status Codes:
  • 200 OK – The media resource was succesfully updated.
  • 400 Bad Request – Invalid request. Check the response data for details.
  • 404 Not Found – There is no media resource with the given id accessible to the requesting user.
Next Previous

© Copyright 2017, Know Me Inc. Revision 2b437477.

Built with Sphinx using a theme provided by Read the Docs.