---
title: "Get appointment sorted by date time (agenda view). Include self context in contextList by adding \"me\". This also works with allTeamContexts option. Leaving contextList and allTeamContexts empty will fetch own context."
method: GET
path: "/api/v1/calendar/instancebyid"
tags: ["Calendar"]
---

# Get appointment sorted by date time (agenda view). Include self context in contextList by adding "me". This also works with allTeamContexts option. Leaving contextList and allTeamContexts empty will fetch own context.

`GET /api/v1/calendar/instancebyid`

## Request

- Base URL: `https://api.intheloop.io`
- URL: `https://api.intheloop.io/api/v1/calendar/instancebyid`
- Auth: API key in header `Authorization`

## Query parameters

- `calendarInstanceIds` string[]

## Headers

- `Authorization` string
- `X-Impersonate-User` string

## Response `200`

OK

- ListOfResourcesOfCalendarInstanceResponse: List of resources
  - `resources` CalendarInstanceResponse[]: List of resources
    - `syncUserId` string: User id - owner instances
    - `instances` CalendarInstance[]: Instances
      - `id` string: Id is composite id hold contextId and calendar instance id
      - `name` string: calendar instance name
      - `contextId` string: calendar context id
      - `rights` 'Reader' | 'Owner', required: calendar instance rights enum
      - `providerType` 'GoogleCalendar' | 'MicrosoftCalendar' | 'ExchangeCalendar', required: Appointment provider type
      - `onlineMeetings` OnlineMeeting[]: Available Online Meeting providers
        - `provider` string: Provider string (Returned by GET /appointment/list/options)
        - `joinUrl` string: Conference/online-meeting url
        - `joinPhoneNumbers` string[]: Conference/online-meeting phone numbers
        - `meetingId` string: Conference/online-meeting ID. Can be zoom room ID, google meets ID, ... Leave empty when creating new.
        - `password` string: Password or pin for the meeting
        - `name` string: Provider name or meeting name
        - `iconUrl` string: Provider icon or meeting specific icon
      - `isDefault` boolean, required: calendar primary instance
      - `color` string: color
      - `timezone` string: calendar default timezone (IANA)
    - `errorMessage` string: If error occours ErrorMessage is set
  - `size` integer, required: Page size
  - `offset` integer, required: Page offset
  - `offsetHistoryId` string: Offset history id
  - `totalSize` integer, required: Total size (if total size is at least one bigger than size, then there are more resources). Total size does not necessarily mean the actual total size

## Other responses

- `400`: Bad request. Check fields message and error code from response body for additional information.
- `401`: Unauthorized request. Check fields message and error code from response body for additional information.
- `429`: Too many requests. Check response header Retry-After indicating how long to wait before making a new request.
- `451`: Unavailable because account is not verified.

---

[API](https://skmtc.dev/intheloop/apis/loop-api.md) - [All operations](https://skmtc.dev/intheloop/apis/loop-api/llms.txt) - [OpenAPI document](https://skmtc.dev/intheloop/apis/loop-api/revisions/0892c5ba0787?raw)
