Skip to content

Delete Request

Developer From Jokela edited this page Jul 15, 2020 · 1 revision

This method deletes previously saved data from Push Request.

Any data that belongs to this user will be deleted immediately.

Request details:
  • Method: POST
  • URL: /api/v1/delete
Parameters:
  • server_url: Wilma Server's url (include the Slug ID if needed)
  • session: Wilma Server's session cookie value (read more below)
  • iid_key: FCM Client ID (or as google calls it "Instance ID")
  • apikey: This is optional, required only if apikey check is turned on in notifier.py. (Can also be checked from client using a GET
Wilma Session (session):

Wilma Session is a cookie (Wilma2SID=f91a3ffb7ecf9d9db622a485338cb646;). API needs only cookie's value, nothing else. I recommend using this regex to extract that: ^(.*)Wilma2SID=([^;]+)(.*)$, and group 2 is the value.

Response:

200 OK

{
    "status": true
}

Error Response:

i.e. 500 Internal Server error or 400 Bad Request

{
    "status": false,
    "cause": "Example cause of this error"
}

Error Response with Wilma:

i.e. 500 Internal Server error or 400 Bad Request, which is caused by Wilma error

{
    "status": false,
    "cause": "Example cause of this error",
    "wilma": {
        "id": "common-20",
        "message": "Istunnon tunniste ei kelpaa.",
        "description": "Kirjautumiseen käytetty sivu tulee välimuistista tai Wilma on käynnistetty uudelleen.",
        "whatnext": "Ole hyvä ja kirjaudu sisään uudelleen. Jos tämä virhe toistuu usein, ota yhteys oppilaitokseen.",
        "statuscode": 403
    }
}

Clone this wiki locally