Giter Site home page Giter Site logo

resistopia-base-tool's Introduction

REST API

Authentification

To authenticate with the API, either a staff user or an API user is needed.

Authentification via API user (recommended):

Send an http request to api/auth/key with key (auth key) and password as POST parameters to get your access token:

curl -i -H "Accept:application/json" "<HOST>/api/auth/key" -d "key=<auth key>&password=<password>"
Authentification via staff user:

Send an http request to api/auth/sid with sid and password as POST parameters to get your access token:

curl -i -H "Accept:application/json" "<HOST>/api/auth/sid" -d "sid=<sid>&password=<password>"

To make an authenticated call, the retrieved access_token has to be send along every request

This can be done by header (recommended):

curl <...> --header "access-token: <access token>"

or as a GET parameter:

curl <...> "<url>&access-token=m5j3jSydPVHyj_OaGvnm5mqqWaJhVJMU"

API Calls

Staff

api/staff/view

GET-Parameters:

  • sid: Staff SID

Response: Detailed information about the requested staff entry

api/staff/access-list

GET-Parameters:

  • sid: Staff SID

Response: List of all access keys the user has access rights to

api/staff/has-access

GET-Parameters:

  • sid: Staff SID
  • accessKey: Key of access right to read, first part or whole

Response: Boolean if the user is permitted a specific action or not

api/section/keys

No parameters api/base-category/keys is deprecated and will be removed soon!

Response: Array of all sections. Structure BaseCategory::name => BaseCategory::key

resistopia-base-tool's People

Stargazers

Nadja Sommerfeld avatar

Watchers

Marius Teller avatar Lucas Mösch avatar

Forkers

prim-edv

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.