from meitner import Meitner, models
import os
with Meitner(
security=models.Security(
client_credentials=os.getenv("MEITNER_CLIENT_CREDENTIALS", ""),
client_secret=os.getenv("MEITNER_CLIENT_SECRET", ""),
),
) as m_client:
res = m_client.schools.list(limit=1, offset=0)
while res is not None:
# Handle items
res = res.next(){
"data": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"meta": {
"createdAt": "2024-01-15T10:30:00Z",
"createdBy": "987fcdeb-51a2-43d1-b567-123456789abc",
"updatedAt": "2024-01-15T14:45:00Z",
"updatedBy": "987fcdeb-51a2-43d1-b567-123456789abc"
},
"external": {
"sourceID": "12345678",
"source": "ExternalIntegrationAPI"
},
"title": "Meitner Grundskola",
"unitCode": "12345678",
"csnSchoolCode": "12345",
"municipalityCode": "0184",
"schoolType": "GR"
}
],
"pagination": {
"offset": 0,
"limit": 1,
"total": 100
}
}Returns a paginated list of all Schools in your organization.
from meitner import Meitner, models
import os
with Meitner(
security=models.Security(
client_credentials=os.getenv("MEITNER_CLIENT_CREDENTIALS", ""),
client_secret=os.getenv("MEITNER_CLIENT_SECRET", ""),
),
) as m_client:
res = m_client.schools.list(limit=1, offset=0)
while res is not None:
# Handle items
res = res.next(){
"data": [
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"meta": {
"createdAt": "2024-01-15T10:30:00Z",
"createdBy": "987fcdeb-51a2-43d1-b567-123456789abc",
"updatedAt": "2024-01-15T14:45:00Z",
"updatedBy": "987fcdeb-51a2-43d1-b567-123456789abc"
},
"external": {
"sourceID": "12345678",
"source": "ExternalIntegrationAPI"
},
"title": "Meitner Grundskola",
"unitCode": "12345678",
"csnSchoolCode": "12345",
"municipalityCode": "0184",
"schoolType": "GR"
}
],
"pagination": {
"offset": 0,
"limit": 1,
"total": 100
}
}The maximum number of Schools to return (default: 50) when listing Schools
The number of Schools to skip before starting to return results (default: 0) when listing Schools
Response for School List operation - returns a paginated list of School
Array of School objects
Show child attributes
Unique identifier for the School
The title of the school
Type of schooling provided at the school
GR, GY, FS "GR"
Metadata information for the School
Show child attributes
Timestamp when the resource was created
User who created the resource
Timestamp when the resource was last updated
User who last updated the resource
{
"createdAt": "2024-01-15T10:30:00Z",
"createdBy": "987fcdeb-51a2-43d1-b567-123456789abc",
"updatedAt": "2024-01-15T14:45:00Z",
"updatedBy": "987fcdeb-51a2-43d1-b567-123456789abc"
}External is a reusable object that can be used to store external information about the school from another system, used for third-party integration tracking.
{
"sourceID": "12345678",
"source": "ExternalIntegrationAPI"
}The School Unit Code provided by SCB, is used in reports and printed on grade documents
The School Code provided by CSN, required for reports to CSN
Municipality code of the school, is used in reports and printed on grade documents
Pagination information
{ "offset": 0, "limit": 1, "total": 100 }