> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://apidoc.dreamclass.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://apidoc.dreamclass.io/_mcp/server.

# GetSingleEvent

GET https://dreamclassapi/v1/calendar/event/single

Get list of single events

Input variables

- period: id of the School Period
    
- dateFrom: minimum event date (optional, UTC)  
    example: 2023-12-31T09:00:00
    
- dateTo: maxumum event date (optional, UTC)  
    example: 2023-12-31T09:00:00

Reference: https://apidoc.dreamclass.io/dream-class-api/calendar/get-single-event

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: collection
  version: 1.0.0
paths:
  /dreamclassapi/v1/calendar/event/single:
    get:
      operationId: get-single-event
      summary: GetSingleEvent
      description: |-
        Get list of single events

        Input variables

        - period: id of the School Period
            
        - dateFrom: minimum event date (optional, UTC)  
            example: 2023-12-31T09:00:00
            
        - dateTo: maxumum event date (optional, UTC)  
            example: 2023-12-31T09:00:00
      tags:
        - subpackage_calendar
      parameters:
        - name: periodId
          in: query
          required: false
          schema:
            type: string
        - name: tenant
          in: header
          required: false
          schema:
            type: string
        - name: schoolCode
          in: header
          required: false
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: >-
                    #/components/schemas/DreamclassapiV1CalendarEventSingleGetResponsesContentApplicationJsonSchemaItems
servers:
  - url: https:/
    description: https://{server}
  - url: https://your-webhook-url
    description: https://your-webhook-url
components:
  schemas:
    DreamclassapiV1CalendarEventSingleGetResponsesContentApplicationJsonSchemaItems:
      type: object
      properties:
        id:
          type: integer
        title:
          type: string
        duration:
          type: integer
        createdBy:
          type: string
          format: email
        description:
          type: string
        startDatetime:
          type: string
          format: date-time
        visibleToStudents:
          description: Any type
        visibleToProfessors:
          description: Any type
      required:
        - id
        - title
        - duration
        - createdBy
        - description
        - startDatetime
      title: >-
        DreamclassapiV1CalendarEventSingleGetResponsesContentApplicationJsonSchemaItems

```

## Examples



**Response**

```json
[
  {
    "id": 18,
    "title": "Weekly Standup",
    "duration": 10,
    "createdBy": "test@mail.com",
    "description": "Weekly team standup meeting",
    "startDatetime": "2024-11-07T14:00:00"
  },
  {
    "id": 19,
    "title": "Custom Meeting",
    "duration": 10,
    "createdBy": "test@mail.com",
    "description": "Custom meeting description",
    "startDatetime": "2024-11-07T14:00:00"
  }
]
```

**SDK Code**

```python Calendar_GetSingleEvent_example
import requests

url = "https://https/dreamclassapi/v1/calendar/event/single"

querystring = {"periodId":"{{schoolperiodid}}"}

headers = {
    "tenant": "{{tenant}}",
    "schoolCode": "{{schoolCode}}"
}

response = requests.get(url, headers=headers, params=querystring)

print(response.json())
```

```javascript Calendar_GetSingleEvent_example
const url = 'https://https/dreamclassapi/v1/calendar/event/single?periodId=%7B%7Bschoolperiodid%7D%7D';
const options = {method: 'GET', headers: {tenant: '{{tenant}}', schoolCode: '{{schoolCode}}'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Calendar_GetSingleEvent_example
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://https/dreamclassapi/v1/calendar/event/single?periodId=%7B%7Bschoolperiodid%7D%7D"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("tenant", "{{tenant}}")
	req.Header.Add("schoolCode", "{{schoolCode}}")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Calendar_GetSingleEvent_example
require 'uri'
require 'net/http'

url = URI("https://https/dreamclassapi/v1/calendar/event/single?periodId=%7B%7Bschoolperiodid%7D%7D")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["tenant"] = '{{tenant}}'
request["schoolCode"] = '{{schoolCode}}'

response = http.request(request)
puts response.read_body
```

```java Calendar_GetSingleEvent_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://https/dreamclassapi/v1/calendar/event/single?periodId=%7B%7Bschoolperiodid%7D%7D")
  .header("tenant", "{{tenant}}")
  .header("schoolCode", "{{schoolCode}}")
  .asString();
```

```php Calendar_GetSingleEvent_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://https/dreamclassapi/v1/calendar/event/single?periodId=%7B%7Bschoolperiodid%7D%7D', [
  'headers' => [
    'schoolCode' => '{{schoolCode}}',
    'tenant' => '{{tenant}}',
  ],
]);

echo $response->getBody();
```

```csharp Calendar_GetSingleEvent_example
using RestSharp;

var client = new RestClient("https://https/dreamclassapi/v1/calendar/event/single?periodId=%7B%7Bschoolperiodid%7D%7D");
var request = new RestRequest(Method.GET);
request.AddHeader("tenant", "{{tenant}}");
request.AddHeader("schoolCode", "{{schoolCode}}");
IRestResponse response = client.Execute(request);
```

```swift Calendar_GetSingleEvent_example
import Foundation

let headers = [
  "tenant": "{{tenant}}",
  "schoolCode": "{{schoolCode}}"
]

let request = NSMutableURLRequest(url: NSURL(string: "https://https/dreamclassapi/v1/calendar/event/single?periodId=%7B%7Bschoolperiodid%7D%7D")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```