Session

Session er et API til at starte en GC2 session, hente API key og skabe en JWT token.

curl -XPOST "https://swarm.gc2.io/api/v2/session/start" -d '
{
  "user": "_plandata",
  "password": "xxxx",
  "schema": null
}
'

Session returnerer et JSON objekt:

{
  "success": true,
  "message": "Session started",
  "screen_name": "horsens",
  "session_id": "vclj8pl13flage3qt3cei48i21",
  "subuser": "_plandata",
  "api_key": "cf24de11c018af060fa410b115c41ac1",
  "token": "eyJ0eXAiOiJKV1QiLCJhbGci6iJIUzI1NiJ9.eyJpc3MiOiJokHRwczpcL1wvc3dhcm0uZ2MyLmlvOjgwIiwidWlkIjoiX3BsYW5kYXRhIiwiZXhwIjoxNTQ4NjEzMjE3LCJpYXQiOjE1NDg2MDk2MTcsImRhdGFiYXNlIjoiaG9yc2VucyIsImlzU3ViVXNlciI6dHJ1ZX0.tUUNYDM81iz8tC5fYh_8fKsDwmqIeI-uHMYFzAd_9CE",
  "_execution_time": 0.121
}

screen_name = databasen

session_id = Session id til cookie baserede API'er

subuser = Hvis user er Sub User, angives navnet her. Ellers false

api_key = User API nøgle til public API'er

token = JSON Web Token til  til public API'er (er ikke fuldt ud implementeret)


0 Comments

Add your comment

E-Mail me when someone replies to this comment