I would like to contribute some information to the dev-backend Documentation for testing the API using Postman:
-
Get the access token: make a
POST
type request to https://yourgramps.com/api/token/ (seems like the last forward slash is required here, omitting it will result in aMethod not allowed
response) with Body → raw (make sure JSON is set in the dropdown on the right):{ "username": "your_username", "password": "your_password" }
Click on Send.
Copy the value of theaccess_token
property from the response. -
Make an API request using the access token: Prepare a
GET
type request to https://yourgramps.com/api/metadata (seems to work with or without the last forward slash?), set Authorization → Auth Type = Bearer token and paste the Access token you copied from the previous step in the Token field. Body can be reset to none.
Click on Send. You should get a response with the metadata from your Gramps Web API. -
You should be able to follow the same method in step 2 for the following endpoints (as documented at Swagger UI):
/api/people
/api/families
/api/events
/api/places
/api/citations
/api/sources
/api/repositories
/api/media
/api/notes
/api/tags
/api/transactions/history
/api/types
/api/name-formats
/api/name-groups
/api/bookmarks
/api/filters
/api/translations
/api/timelines/people
/api/reports
/api/facts
/api/holidays
/api/exporters
/api/users
/api/importers
/api/trees
From my tests it seems that
/api/config
does not work, I get the following response:<!doctype html> <html lang=en> <title>403 Forbidden</title> <h1>Forbidden</h1> <p>You don't have the permission to access the requested resource. It is either read-protected or not readable by the server.</p>