Calendars

Calendar management.

The Calendars Model

A calendar is represented by the following schema:

Scheme

  • Name
    id
    Type
    integer
    Description
  • Name
    name
    Type
    string
    Description
  • Name
    data
    Type
    string
    Description
    base64 encoded in iCalendar format
  • Name
    attributes
    Type
    object
    Description

GET/calendars

Retrieve a list of calendars

Without any params, returns a list of Calendars the user has access to

Authorizations

BasicAuth or ApiKey

  • Name
    BasicAuth
    Type
    scheme
    Description

    HTTP Authorization Scheme: basic

  • Name
    ApiKey
    Type
    scheme
    Description

    HTTP Authorization Scheme: bearer

Query Parameters

  • Name
    all
    Type
    boolean
    Description

    Can only be used by administrators or managers to retrieve all Calendar objects.

  • Name
    userId
    Type
    integer
    Description

    Standard users can use this only with their own userId

  • Name
    refresh
    Type
    boolean
    Description

Responses

  • Name
    200
    Type
    success
    Description
  • Name
    application/json
    Type
    response schema
    Description
  • Array of Calendar

Request

GET
/calendars
curl --location 'https://gw.onemap8.com/api/calendars?all=<boolean>' \
--header 'Accept: application/json' \
--header 'Authorization: Basic {your_access_token}'

Response

[
    {
        "id": 0,
        "name": "string",
        "data": "string",
        "attributes": {}
    },
    {
        ...
    }
]

POST/calendars

Create a calendar

Authorizations

BasicAuth or ApiKey

  • Name
    BasicAuth
    Type
    scheme
    Description

    HTTP Authorization Scheme: basic

  • Name
    ApiKey
    Type
    scheme
    Description

    HTTP Authorization Scheme: bearer

Request body schema

  • Name
    application/json
    Type
    schema
    Description

Body schema

  • Name
    id
    Type
    integer
    Description
  • Name
    name
    Type
    string
    Description
  • Name
    data
    Type
    string
    Description
    base64 encoded in iCalendar format
  • Name
    attributes
    Type
    object
    Description

Responses

  • Name
    200
    Type
    success
    Description
  • Name
    application/json
    Type
    response schema
    Description
  • Calendar

Request

POST
/calendars
curl --location 'https://gw.onemap8.com/api/calendars' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Basic {your_access_token}' \
--data '{
"id": "<integer>",
"name": "<string>",
"data": "<string>",
"attributes": {}
}'

Response

{
    "id": 0,
    "name": "string",
    "data": "string",
    "attributes": {}
}

PUT/calendars/{id}

Update a calendar

Authorizations

BasicAuth or ApiKey

  • Name
    BasicAuth
    Type
    scheme
    Description

    HTTP Authorization Scheme: basic

  • Name
    ApiKey
    Type
    scheme
    Description

    HTTP Authorization Scheme: bearer

Path parameters

  • Name
    id
    Type
    integer required
    Description

Request body schema

  • Name
    application/json
    Type
    schema
    Description

Body schema

  • Name
    id
    Type
    integer
    Description
  • Name
    name
    Type
    string
    Description
  • Name
    data
    Type
    string
    Description
    base64 encoded in iCalendar format
  • Name
    attributes
    Type
    object
    Description

Responses

  • Name
    200
    Type
    success
    Description
  • Name
    application/json
    Type
    response schema
    Description
  • Calendar

Request

PUT
/calendars/{id}
curl --location --request PUT 'https://gw.onemap8.com/api/calendars/<integer>' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Basic {your_access_token}' \
--data '{
"id": "<integer>",
"name": "<string>",
"data": "<string>",
"attributes": {}
}'

Response

{
    "id": 0,
    "name": "string",
    "data": "string",
    "attributes": {}
}

DELETE/calendars/{id}

Delete a calendar

Authorizations

BasicAuth or ApiKey

  • Name
    BasicAuth
    Type
    scheme
    Description

    HTTP Authorization Scheme: basic

  • Name
    ApiKey
    Type
    scheme
    Description

    HTTP Authorization Scheme: bearer

Path parameters

  • Name
    id
    Type
    integer required
    Description

Responses

  • Name
    204
    Type
    success
    Description

    No content

Request

DELETE
/calendars/{id}
  curl --location --request DELETE 'https://gw.onemap8.com/api/calendars/<integer>' \
  --header 'Authorization: Basic {your_access_token}'

Response

No content