Categorygithub.com/CedricThomas/api-cmangos
modulepackage
0.0.0-20191030152428-88fadfa93a80
Repository: https://github.com/cedricthomas/api-cmangos.git
Documentation: pkg.go.dev

# README

api-cmangos

a rest api for the cmangos core database.

api

examples

create account

Based on the config the Authorization header has to be set to a invite token. Set needInvite in contrib/config.ini.dist.

curl \
  -X POST \
  --header "Authorization: Token <invite-token>" \
  --header "Content-Type: application/json" \
  --data '{"username":"test","password":"test","repeat":"test","email":"[email protected]"}' \
  http://127.0.0.1:5556/account

To create an invite token you have to authenticate yourself first.

curl \
  -X POST \
  --user "<username>:<password>" \
  http://127.0.0.1:5556/account/auth

You will receive a X-Auth-Token header containing a token for further requests.

curl \
  -X POST \
  --header "Authorization: Token <token>" \
  http://127.0.0.1:5556/account/invite

api-cmangos

# Packages

No description provided by the author
No description provided by the author