Skip to content

Doubtfire API Documentation

API: webcal

webcal : Operations about webcal This markdown document provides detailed documentation for the “webcal” API endpoints, including their URLs, methods, parameters (if any), responses, and example requests using curl.

This “webcal” API has the following operations.

  • GET /api/webcal/{guid}
  • GET /api/webcal
  • PUT /api/webcal

GET: Serve webcal with the specified GUID

GET /api/webcal/{guid}

  • URL: /api/webcal/{guid}

  • Method: GET

  • Parameters:

    ParameterDescriptionParameter TypeData TypeMandatory
    guidThe GUID of the webcalheaderstringYes
  • Response: 200 OK

  • Example Request:

    Terminal window
    curl -X GET --header 'Accept: text/calendar' 'http://localhost:3000/api/webcal/545c2530-2932-4bdb-8d79-ae2992494674'
  • Response body:

    BEGIN:VCALENDAR
    VERSION:2.0
    PRODID:OnTrack
    CALSCALE:GREGORIAN
    METHOD:PUBLISH
    X-PUBLISHED-TTL;VALUE=DURATION:P1D
    REFRESH-INTERVAL;VALUE=DURATION:P1D
    END:VCALENDAR

GET: Get webcal details of the authenticated user

GET /api/webcal

  • URL: /api/webcal

  • Method: GET

  • Parameters:

    ParameterDescriptionParameter TypeData TypeMandatory
    UsernameUser usernameheaderstringYes
    Auth_TokenAuthentication tokenheaderstringYes
  • Response: 200 OK

  • Example Request:

    Terminal window
    curl -X GET --header 'Accept: application/json' --header 'Username: aadmin' --header 'Auth_Token: vs61XXKdACADRUfQBWzr' 'http://localhost:3000/api/webcal'
  • Response body:

    {
    "enabled": false
    }

PUT: Update webcal details of the authenticated user

PUT /api/webcal

  • URL: /api/webcal

  • Method: PUT

  • Parameters:

    ParameterDescriptionParameter TypeData TypeMandatory
    webcal[enabled]Is the webcal enabled?formDataboolean
    webcal[should_change_guid]Should the GUID of the webcal be changed?formDataboolean
    webcal[include_start_dates]Should events for start dates be included?formDataboolean
    webcal[unit_exclusions]IDs of units that must be excluded from the webcalformDataArray[integer]
    webcal[reminder][time]formDatainteger
    webcal[reminder][unit]w: weeks, d: days, h: hours, m: minutesformDatastring
    UsernameUser usernameheaderstringYes
    Auth_TokenAuthentication tokenheaderstringYes
  • Response: 200 OK

  • Example Request:

    Terminal window
    curl -X PUT --header 'Content-Type: application/x-www-form-urlencoded' --header 'Accept: application/json' --header 'Username: aadmin' --header 'Auth_Token: vs61XXKdACADRUfQBWzr' -d 'webcal%5Benabled%5D=true' 'http://localhost:3000/api/webcal'
  • Response body:

    {
    "id": 1,
    "guid": "545c2530-2932-4bdb-8d79-ae2992494674",
    "include_start_dates": false,
    "enabled": true,
    "unit_exclusions": []
    }