> 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.

# GetStudents

GET https://dreamclassapi/v1/students/records/list/test

Get a list of students based on their lastname

Input variables

- nameOrEmail: optional string to match the last name or the email of student(s)

Reference: https://apidoc.dreamclass.io/dream-class-api/students/get-students

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: collection
  version: 1.0.0
paths:
  /dreamclassapi/v1/students/records/list/test:
    get:
      operationId: get-students
      summary: GetStudents
      description: >-
        Get a list of students based on their lastname


        Input variables


        - nameOrEmail: optional string to match the last name or the email of
        student(s)
      tags:
        - subpackage_students
      parameters:
        - 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/DreamclassapiV1StudentsRecordsListTestGetResponsesContentApplicationJsonSchemaItems
servers:
  - url: https:/
    description: https://{server}
  - url: https://your-webhook-url
    description: https://your-webhook-url
components:
  schemas:
    DreamclassapiV1StudentsRecordsListTestGetResponsesContentApplicationJsonSchemaItemsGuardiansItemsGuardian:
      type: object
      properties:
        id:
          type: integer
        city:
          type: string
        email:
          description: Any type
        gender:
          type: string
        mobile:
          description: Any type
        address:
          type: string
        country:
          type: string
        lastname:
          type: string
        birthdate:
          description: Any type
        firstname:
          type: string
        telephone:
          type: string
        birthplace:
          description: Any type
        middlename:
          description: Any type
        customFields:
          description: Any type
      required:
        - id
        - city
        - gender
        - address
        - country
        - lastname
        - firstname
        - telephone
      title: >-
        DreamclassapiV1StudentsRecordsListTestGetResponsesContentApplicationJsonSchemaItemsGuardiansItemsGuardian
    DreamclassapiV1StudentsRecordsListTestGetResponsesContentApplicationJsonSchemaItemsGuardiansItemsRelation:
      type: object
      properties:
        id:
          type: integer
        translation:
          type: string
        institutionId:
          type: integer
      required:
        - id
        - translation
        - institutionId
      title: >-
        DreamclassapiV1StudentsRecordsListTestGetResponsesContentApplicationJsonSchemaItemsGuardiansItemsRelation
    DreamclassapiV1StudentsRecordsListTestGetResponsesContentApplicationJsonSchemaItemsGuardiansItems:
      type: object
      properties:
        guardian:
          $ref: >-
            #/components/schemas/DreamclassapiV1StudentsRecordsListTestGetResponsesContentApplicationJsonSchemaItemsGuardiansItemsGuardian
        relation:
          $ref: >-
            #/components/schemas/DreamclassapiV1StudentsRecordsListTestGetResponsesContentApplicationJsonSchemaItemsGuardiansItemsRelation
      required:
        - guardian
        - relation
      title: >-
        DreamclassapiV1StudentsRecordsListTestGetResponsesContentApplicationJsonSchemaItemsGuardiansItems
    DreamclassapiV1StudentsRecordsListTestGetResponsesContentApplicationJsonSchemaItemsCustomFields:
      type: object
      properties:
        '1':
          type: string
        '2':
          type: string
        '3':
          type: string
      required:
        - '1'
        - '2'
        - '3'
      title: >-
        DreamclassapiV1StudentsRecordsListTestGetResponsesContentApplicationJsonSchemaItemsCustomFields
    DreamclassapiV1StudentsRecordsListTestGetResponsesContentApplicationJsonSchemaItemsSchoolPeriodsItemsSchoolPeriod:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        endDate:
          type: string
          format: date
        duration:
          type: integer
        shortName:
          description: Any type
        startDate:
          type: string
          format: date
        schoolyear:
          type: string
      required:
        - id
        - name
        - endDate
        - duration
        - startDate
        - schoolyear
      title: >-
        DreamclassapiV1StudentsRecordsListTestGetResponsesContentApplicationJsonSchemaItemsSchoolPeriodsItemsSchoolPeriod
    DreamclassapiV1StudentsRecordsListTestGetResponsesContentApplicationJsonSchemaItemsSchoolPeriodsItems:
      type: object
      properties:
        id:
          type: integer
        active:
          type: boolean
        schoolPeriod:
          $ref: >-
            #/components/schemas/DreamclassapiV1StudentsRecordsListTestGetResponsesContentApplicationJsonSchemaItemsSchoolPeriodsItemsSchoolPeriod
        registrationDate:
          type: string
          format: date
      required:
        - id
        - active
        - schoolPeriod
        - registrationDate
      title: >-
        DreamclassapiV1StudentsRecordsListTestGetResponsesContentApplicationJsonSchemaItemsSchoolPeriodsItems
    DreamclassapiV1StudentsRecordsListTestGetResponsesContentApplicationJsonSchemaItems:
      type: object
      properties:
        id:
          type: integer
        city:
          type: string
        email:
          type: string
          format: email
        gender:
          type: string
        mobile:
          description: Any type
        address:
          type: string
        country:
          type: string
        lastname:
          type: string
        birthdate:
          type: string
          format: date
        firstname:
          type: string
        guardians:
          type: array
          items:
            $ref: >-
              #/components/schemas/DreamclassapiV1StudentsRecordsListTestGetResponsesContentApplicationJsonSchemaItemsGuardiansItems
        telephone:
          type: string
        birthplace:
          type: string
        middlename:
          type: string
        customFields:
          $ref: >-
            #/components/schemas/DreamclassapiV1StudentsRecordsListTestGetResponsesContentApplicationJsonSchemaItemsCustomFields
        schoolPeriods:
          type: array
          items:
            $ref: >-
              #/components/schemas/DreamclassapiV1StudentsRecordsListTestGetResponsesContentApplicationJsonSchemaItemsSchoolPeriodsItems
      required:
        - id
        - city
        - email
        - gender
        - address
        - country
        - lastname
        - birthdate
        - firstname
        - guardians
        - telephone
        - birthplace
        - middlename
        - customFields
        - schoolPeriods
      title: >-
        DreamclassapiV1StudentsRecordsListTestGetResponsesContentApplicationJsonSchemaItems

```

## Examples



**Response**

```json
[
  {
    "id": 3,
    "city": "Sacramento",
    "email": "test@test.com",
    "gender": "",
    "address": "123 N St",
    "country": "United States",
    "lastname": "Johnson",
    "birthdate": "2013-12-02",
    "firstname": "Lisa",
    "guardians": [
      {
        "guardian": {
          "id": 21,
          "city": "San Francisco",
          "gender": "",
          "address": "801, Clement Street",
          "country": "United States",
          "lastname": "Johnson ",
          "firstname": "John ",
          "telephone": "123456"
        },
        "relation": {
          "id": 1,
          "translation": "RELATION.FATHER",
          "institutionId": 1
        }
      }
    ],
    "telephone": "123",
    "birthplace": "Sacramento",
    "middlename": "",
    "customFields": {
      "1": "value1",
      "2": "value2",
      "3": "3"
    },
    "schoolPeriods": [
      {
        "id": 1,
        "active": true,
        "schoolPeriod": {
          "id": 1,
          "name": "Dec 2023 - Oct 2024",
          "endDate": "2024-10-11",
          "duration": 11,
          "startDate": "2023-12-11",
          "schoolyear": ""
        },
        "registrationDate": "2023-10-16"
      }
    ]
  }
]
```

**SDK Code**

```python Students_GetStudents_example
import requests

url = "https://https/dreamclassapi/v1/students/records/list/test"

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

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

print(response.json())
```

```javascript Students_GetStudents_example
const url = 'https://https/dreamclassapi/v1/students/records/list/test';
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 Students_GetStudents_example
package main

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

func main() {

	url := "https://https/dreamclassapi/v1/students/records/list/test"

	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 Students_GetStudents_example
require 'uri'
require 'net/http'

url = URI("https://https/dreamclassapi/v1/students/records/list/test")

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 Students_GetStudents_example
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://https/dreamclassapi/v1/students/records/list/test")
  .header("tenant", "{{tenant}}")
  .header("schoolCode", "{{schoolCode}}")
  .asString();
```

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

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://https/dreamclassapi/v1/students/records/list/test', [
  'headers' => [
    'schoolCode' => '{{schoolCode}}',
    'tenant' => '{{tenant}}',
  ],
]);

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

```csharp Students_GetStudents_example
using RestSharp;

var client = new RestClient("https://https/dreamclassapi/v1/students/records/list/test");
var request = new RestRequest(Method.GET);
request.AddHeader("tenant", "{{tenant}}");
request.AddHeader("schoolCode", "{{schoolCode}}");
IRestResponse response = client.Execute(request);
```

```swift Students_GetStudents_example
import Foundation

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

let request = NSMutableURLRequest(url: NSURL(string: "https://https/dreamclassapi/v1/students/records/list/test")! 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()
```