├── Authentication.md ├── Homework.md ├── README.md └── pics └── homework-types.png /Authentication.md: -------------------------------------------------------------------------------- 1 | # SOMtoday Authentication Docs 2 | 3 | --- 4 | 5 | This guide is a step-by-step tutorial on how to authenticate mimicking the SOMToday app/webapp with Somtoday. It explains the details of the parameters you need to get an access token, how to generate a code challenge, and how to submit the authorization code and login credentials to Somtoday. If you prefer to use a different guide for fetching the access token via SOMtoday login or via SSO, you have that option too. Moreover, this page also covers how to retrieve information about your school, such as their name, UUID, and location. Plus, it gives you information on how to refresh the access token you obtained during the authentication process by using the POST /oauth2/token endpoint. 6 | 7 | 8 | --- 9 | 10 | 11 | - [SOMtoday Authentication Docs](#somtoday-authentication-docs) 12 | - [Getting a list of schools](#getting-a-list-of-schools) 13 | - [Authentication by mimicking the SOMToday app/webapp](#authentication-by-mimicking-the-somtoday-appwebapp) 14 | - [Fetching the access token via Somtoday login](#step-1-fetching-the-access-token-via-somtoday-login-get-httpsinloggensomtodaynloauth2authorize) 15 | - [Deciding if it is a username+password flow or an username first-flow](#step-2-deciding-if-it-is-a-usernamepassword-flow-or-an-username-first-flow) 16 | - [Telling SOMToday that you are done](#step-3-telling-somtoday-that-you-are-done-post-httpsinloggensomtodaynloauth2token) 17 | - [Authentication using SSO](#authentication-using-sso-single-sign-on) 18 | - [Fetching the access token via SOMtoday login (Possibly deprecated)](#fetching-the-access-token-via-somtoday-login-post-oauth2token) 19 | 20 | - [Refreshing the access token](#refreshing-the-access-token-post-oauth2token) 21 | --- 22 | ## Getting a list of schools 23 |
Click to open 24 | 25 | 26 | ### Getting a list of schools `GET https://servers.somtoday.nl/organisaties.json` 27 | 28 | Each object in the "instellingen" array represents a school and contains three values. The first is it's "uuid", which is a unique identifier for the school. The second value is "naam", which represents the name of the school. The third value pair is "plaats", which represents the location of the school. 29 | 30 | In addition to these properties, each school can also have an array of "oidcurls" (Object Identifier Uniform Resource Locators). This array contains objects with three values: "omschrijving", "url", and "domain_hint". These properties provide additional information about the school's authentication systems (which are used when the school uses, for example, microsoft to authenticate its students). 31 | 32 | #### Returns 33 | ```json 34 | [ 35 | { 36 | "instellingen": [ 37 | { 38 | "uuid": "099ce144-c400-4468-95d4-ad36f9f5cb5c", 39 | "naam": "Etty Hillesum Lyceum", 40 | "plaats": "DEVENTER", 41 | "oidcurls": [ 42 | { 43 | "omschrijving":"Carmel", 44 | "url":"https://idpcluster.stichtingcarmelcollege.nl/nidp/oauth/nam", 45 | "domain_hint":"" 46 | } 47 | ] 48 | }, 49 | { 50 | "uuid": "ee8c456e-a227-4b7f-bb33-8601147d3264", 51 | "naam": "Scholengemeenschap Marianum", 52 | "plaats": "GROENLO", 53 | "oidcurls": [] 54 | }, 55 | { 56 | "uuid": "dda02c4c-82e5-42a7-a80d-bba133fd0430", 57 | "naam": "R.-K. Sg. Canisius", 58 | "plaats": "ALMELO", 59 | "oidcurls": [] 60 | }, 61 | ... 62 | ] 63 | } 64 | ] 65 | ``` 66 | 67 |
68 | 69 | ## Authentication by mimicking the SOMToday app/webapp 70 |
Click to open the guide for authentication by mimicking SOMToday 71 | 72 | If you rather have a Postman example, you van view it here, but I recommend to still read through the documentation for the best understanding of the authentication process: 73 | 74 | [Run In Postman](https://www.postman.com/red-equinox-452973/workspace/public-workspace/collection/19370875-46472ea9-9786-4cc0-87e0-f1f144f976cb?action=share&creator=19370875) 75 | 76 | ### Step 1: Fetching the access token via Somtoday login: `GET https://inloggen.somtoday.nl/oauth2/authorize` 77 | 78 | #### Parameters 79 | | Name | Type | Value | 80 | |-----------------------|-----------|--------------------------------------| 81 | | redirect_uri | Parameter | somtoday://nl.topicus.somtoday.leerling/oauth/callback| 82 | | client_id | Parameter | somtoday-leerling-native | 83 | | state | Parameter | [state] | 84 | | response_type | Parameter | code | 85 | | scope | Parameter | openid | 86 | | tenant_uuid | Parameter | [tenant_uuid] | 87 | | session | Parameter | no_session | 88 | | code_challenge | Parameter | [code_challenge] | 89 | | code_challenge_method | Parameter | S256 | 90 | 91 | `redirect_uri`: This parameter is the URL that the user will be redirected to after authentication is completed. In this case, it's `somtoday://nl.topicus.somtoday.leerling/oauth/callback`, which is a custom URI scheme that will launch the Somtoday Leerling app (or any other app that has this deeplink registered) on the user's device. I suspect that `somtodayouder://oauth/callback` will also work, since SOMToday has a parent version of their app, but I'm not sure! 92 | 93 | `state`: This parameter is used by the client to maintain state between the request and the callback. In this case, it's a randomly generated string of 8 characters. 94 | 95 | `tenant_uuid`: This is a unique identifier for the used by SOMtoday to identify you as part of a school. This value can be found in the `uuid` property of the school object in the list of schools. This was explained above. 96 | 97 | `code_challenge`: This parameter is used to prevent replay attacks by generating a unique value that is used to verify the client's identity when exchanging the authorization code for an access token. 98 | 99 | ```C# 100 | public void GenerateTokens() 101 | { 102 | string CodeVerifier = GenerateNonce(); 103 | string CodeChallenge = GenerateCodeChallenge(CodeVerifier); 104 | } 105 | 106 | private static string GenerateNonce() 107 | { 108 | const string chars = "abcdefghijklmnopqrstuvwxyz123456789"; 109 | var nonce = new char[128]; 110 | for (int i = 0; i < nonce.Length; i++) 111 | { 112 | nonce[i] = chars[Random.Range(0, chars.Length)]; 113 | } 114 | 115 | return new string(nonce); 116 | } 117 | 118 | private static string GenerateCodeChallenge(string codeVerifier) 119 | { 120 | using var sha256 = SHA256.Create(); 121 | var hash = sha256.ComputeHash(Encoding.UTF8.GetBytes(codeVerifier)); 122 | var b64Hash = Convert.ToBase64String(hash); 123 | var code = Regex.Replace(b64Hash, "\\+", "-"); 124 | code = Regex.Replace(code, "\\/", "_"); 125 | code = Regex.Replace(code, "=+$", ""); 126 | return code; 127 | } 128 | 129 | ``` 130 | 131 | The GenerateNonce() function generates a 128-character string composed of lowercase letters and numbers. 132 | 133 | The GenerateCodeChallenge() function first creates a SHA256 hash of the codeVerifier string using the SHA256.Create() method, and then encodes it as a base64 string using Convert.ToBase64String(). The resulting string is then modified to be safe for use in a URL by replacing certain characters with URL-safe equivalents using regular expressions. 134 | 135 | When you're finished generating the link, it will look something like this:
136 | `https://inloggen.somtoday.nl/oauth2/authorize?redirect_uri=somtoday://nl.topicus.somtoday.leerling/oauth/callback&client_id=somtoday-leerling-native&response_type=code&state=[8 random characters]&scope=openid&tenant_uuid=[UUID of the school]&session=no_session&code_challenge=[code challenge]k&code_challenge_method=S256`

137 | 138 | You are able to send the user to that generated link. They will see the usual SOMtoday login screen and will need to log into their account. When SOMtoday has authenticated them, SOMtoday will redirect them to a callback, which will look something like this:
139 | `somtodayleerling://oauth:443/callback?code=eyJ6aXAiOiJERUYiLCJjdHkiOiJKV1QiLCJlbmMiOiJBMjU2R0NNIiwiYWxnIjoiZGlyIn0....&iss=https://somtoday.nl&state=[8 random characters, same as first URL]`
140 | The `code` parameter is the access token that you are looking for. But this is only handy when working with native apps (like the SOMtoday app). The 'url' above is a deeplink that will open an installed app, hence the `somtodayleerling://` scheme. You can use this to open the SOMtoday app (or any apps with the scheme registered) on the user's device, and the app will handle the rest of the authentication process.

141 | #### Returns 142 | This will return a redirect (HTTP 302), which will redirect the user. You need to intercept that redirect url and parse the query parameters. The `code` parameter is the authorization code that you need for the next parts of the authentication process, I will refer to this as the `authorization_code`.

143 | You also need to save the following cookie: 'production-authenticator-stickiness' which is a cookie value that is used to keep the user logged in. This cookie is used in the next steps of the authentication process. It looks something like this: `"5929c2cf25fe1a95"`

144 | And at last, you need to save the `location` header, which is the url that the user is redirected to. This url is used in the next steps of the authentication process. It looks something like this: `https://inloggen.somtoday.nl/?auth=` 145 | 146 | ### Step 1.1: Getting a cookie (~~for santa~~): `GET https://inloggen.somtoday.nl/` 147 | 148 | | Name | Type | Value | 149 | |-------------------------------------|-----------|---------------------------------------| 150 | | auth | Parameter | `authorization_code` | 151 | | production-authenticator-stickiness | cookie | [production-authenticator-stickiness] | 152 | 153 | 154 | This will return another cookie that you need to save: `JSESSIONID`. To make sure you can save the cookie I recommend to disallow the HTTP request to follow redirects. 155 | 156 | 157 | ### Step 2: Deciding if it is a username+password flow or an username first-flow 158 | 159 | When logging in to somtoday, there'll be 2 options on how to send your username and password. 160 | 161 | username+password flow: After entering your school and pressing "Volgende", there will appear 2 input fields for username & password. 162 | 163 | username first-flow: After entering your school and pressing "Volgende", there only appears 1 input field for the username. 164 | 165 | To decide which flow it is, we'll have to send one request. 166 | 167 | #### `POST /0-1.-panel-signInForm` 168 | | Name | Type | Value | 169 | |----------------------------------------------------------|-----------|---------------------------------------| 170 | | usernameFieldPanel:usernameFieldPanel_body:usernameField | body | [username] | 171 | | Origin | header | https://inloggen.somtoday.nl | 172 | | JSESSIONID | cookie | [JSESSIONID] | 173 | | auth | param | `authorization_code` | 174 | | production-authenticator-stickiness | cookie | [production-authenticator-stickiness] | 175 | 176 | 177 | `auth`: This is the authorization code that you got from step 1. 178 | 179 | `username`: This is the username of the user that you want to authenticate. 180 | 181 | #### Returns 182 | 183 | Don't follow the redirect, check if the ``auth`` parameter exists in the 'Location' header. If it exists, then you need to use the **username + password flow**, otherwise it is a **username first-flow** 184 | 185 | #### Authentication with username first-flow: `POST https://inloggen.somtoday.nl/login?2-1.-passwordForm` 186 | 187 | #### Parameters 188 | 189 | | Name | Type | Value | 190 | |----------------------------------------------------------|-----------|---------------------------------------| 191 | | loginLink | body | x | 192 | | passwordFieldPanel:passwordFieldPanel_body:passwordField | body | [password] | 193 | | origin | header | https://inloggen.somtoday.nl | 194 | | JSESSIONID | cookie | [JSESSIONID] | 195 | | auth | param | `authorization_code` | 196 | | production-authenticator-stickiness | cookie | [production-authenticator-stickiness] | 197 | 198 | `auth`: This is the authorization code that you got from step 1. 199 | 200 | `password`: This is the password of the user that you want to authenticate. 201 | 202 | 203 | ***The reason that we're only submitting our `password` is because we submitted already our username before to decide what flow it is.*** 204 | #### Returns 205 | A redirect (HTTP 302), you need to intercept this redirect and parse the query parameters. The `code` parameter is the authorization code that you need for the next parts of the authentication process, I will refer to this as the `final_authorization_code`. 206 | 207 | #### Authentication with username + password flow `POST https://inloggen.somtoday.nl/?0-1.-panel-signInForm` 208 | 209 | | Name | Type | Value | 210 | |----------------------------------------------------------|-----------|---------------------------------------| 211 | | loginLink | body | x | 212 | | usernameFieldPanel:usernameFieldPanel_body:usernameField | body | [username] 213 | | passwordFieldPanel:passwordFieldPanel_body:passwordField | body | [password] | 214 | | origin | header | https://inloggen.somtoday.nl | 215 | | auth | param | `authorization_code` 216 | | JSESSIONID | cookie | [JSESSIONID] | 217 | | production-authenticator-stickiness | cookie | [production-authenticator-stickiness] | 218 | 219 | 220 | #### Returns 221 | A redirect (HTTP 302), you need to intercept this redirect and parse the query parameters. The `code` parameter is the authorization code that you need for the next parts of the authentication process, I will refer to this as the `final_authorization_code`. 222 | 223 | ### Step 3: Telling SOMToday that you are done: `POST https://inloggen.somtoday.nl/oauth2/token` 224 | 225 | #### Parameters 226 | 227 | | Name | Type | Value | 228 | |-----------------------|-----------|--------------------------------------| 229 | | grant_type | Parameter | authorization_code | 230 | | session | Parameter | no_session | 231 | | scope | Parameter | openid | 232 | | client_id | Parameter | somtoday-leerling-native | 233 | | tenant_uuid | Parameter | [tenant_uuid] | 234 | | code | Parameter | `final_authorization_code` | 235 | | code_verifier | Parameter | [code_verifier] | 236 | 237 | `tentant_uuid`: This is a unique identifier for the used by SOMtoday to identify you as part of a school. This value can be found in the `uuid` property of the school object in the list of schools. This was explained above. 238 | 239 | `final_authorization_code`: This is the authorization code that you got from step 2. 240 | 241 | `code_verifier`: This is the code verifier that you generated in step 1. 242 | 243 | #### Returns 244 | 245 | ```json 246 | { 247 | "access_token": "", 248 | "refresh_token": "", 249 | "somtoday_api_url": "https://api.somtoday.nl", 250 | "scope": "openid", 251 | "somtoday_tenant": "bonhoeffer", 252 | "id_token": "", 253 | "token_type": "Bearer", 254 | "expires_in": 3600 255 | } 256 | ``` 257 |
258 | 259 | ## Authentication using SSO (single sign on) 260 |
Click to open the guide for authentication using SSO 261 | 262 | ### Fetching the access token via SSO: `POST /oauth2/token` 263 | 264 | #### Parameters 265 | 266 | | Name | Type | Value | 267 | |---------------|------|--------------------------------------| 268 | | grant_type | Body | authorization_code | 269 | | redirect_uri | Body | [redirect_uri] | 270 | | code_verifier | Body | [code_verifier] | 271 | | code | Body | [code] | 272 | | scope | Body | openid | 273 | | client_id | Body | D50E0C06-32D1-4B41-A137-A9A850C892C2 | 274 | 275 | `redirect_uri` is the link redirected to after the user logged in. (Must be the same as in the login link and one of a few specified values. An example is: `somtodayleerling://oauth/callback`) 276 | `code_verifier` is the string that was encoded and send in the login link. (Must be the same as in the login link when encoded using the method specified in the login link) 277 | `code` is the code that has been sent to the redirect uri. it is a JWT token (5 base64 url encoded blocks separated by '.') 278 | 279 | #### Returns 280 | 281 | ```json 282 | { 283 | "access_token": "", 284 | "refresh_token": "", 285 | "somtoday_api_url": "https://bonhoeffer-api.somtoday.nl", 286 | "scope": "openid", 287 | "somtoday_tenant": "bonhoeffer", 288 | "id_token": "", 289 | "token_type": "Bearer", 290 | "expires_in": 3600 291 | } 292 | ``` 293 | 294 | The `somtoday_api_url` is used for all non-authentication requests, like for getting grades. 295 | 296 | token_type, scope and (probably) expires_in are always the same, the other values change depending on the user, and school (the tokens are of course randomly generated). 297 | 298 | #### Example 299 | 300 | ```bash 301 | redirect_uri='somtodayleerling://oauth/callback' code_verifier='SOME_BASE64_CODE' code='SOME_TOKEN' 302 | curl "https://somtoday.nl/oauth2/token" -d "grant_type=authorization_code&redirect_uri=$redirect_uri&code_verifier=$code_verifier&code=$code&scope=openid&client_id=D50E0C06-32D1-4B41-A137-A9A850C892C2" 303 | ``` 304 | 305 | #### Code verifier and challenge 306 | 307 | To generate the verifier you need to generate a random 32-byte url encoded base64 value and use some algorithm to encode it. I would advise to use sha256. Here is a node.js example. 308 | 309 | ```javascript 310 | // source: https://auth0.com/docs/authorization/flows/call-your-api-using-the-authorization-code-flow-with-pkce#create-code-challenge 311 | // Dependency: Node.js crypto module 312 | // https://nodejs.org/api/crypto.html#crypto_crypto 313 | function base64URLEncode(str) { 314 | return str.toString('base64') 315 | .replace(/\+/g, '-') 316 | .replace(/\//g, '_') 317 | .replace(/=/g, ''); 318 | } 319 | var verifier = base64URLEncode(crypto.randomBytes(32)); 320 | function sha256(buffer) { 321 | return crypto.createHash('sha256').update(buffer).digest(); 322 | } 323 | var challenge = base64URLEncode(sha256(verifier)); 324 | console.log(verifier) 325 | console.log(challenge) 326 | ``` 327 | 328 | ### The Url format 329 | 330 | The url that the client has to visit to get a login window is `https://somtoday.nl/oauth2/authorize`. 331 | These are the parameters: 332 | 333 | | Name | Type | Value | 334 | |-----------------------|------|--------------------------------------| 335 | | response_type | Body | code | 336 | | redirect_uri | Body | [uri] | 337 | | code_challenge | Body | [code_challenge] | 338 | | tenant_uuid | Body | [tenant_uuid] | 339 | | oidc_iss | Body | [oidc_iss] | 340 | | code_challenge_method | Body | [code_challenge_method] | 341 | | (state) | Body | [custom_state] | 342 | | prompt | Body | login | 343 | | scope | Body | openid | 344 | | client_id | Body | D50E0C06-32D1-4B41-A137-A9A850C892C2 | 345 | 346 | `uri` and `code_challenge` have been described already. 347 | `tenant_uuid` and `oidc_iss` can be found in the organisaties.json inside oidcurls 348 | `code_challenge_method` is the method used to encode the `code_verifier`. It is highly advised to use 'S256' which stands for Sha256. 349 | `state` is an optional parameter. 350 | `custom_state` will be included in the callback and can be used for identification while fetching multiple tokens. 351 | 352 | After the user has logged in the page will redirect to the `uri` with these parameters 353 | 354 | | Name | Type | Value | 355 | |---------|------|---------------------| 356 | | code | Body | [code] | 357 | | (state) | Body | [custom_state] | 358 | | iss | Body | https://somtoday.nl | 359 | 360 | `custom_state` is the previously defined value. 361 | `code` has already been described 362 | 363 |
364 | 365 | ## Fetching the access token via SOMtoday login (Possibly deprecated) 366 |
Click to open the guide for fetching the access token via SOMtoday login 367 | 368 | All routes here are prefixed with the base url: `https://somtoday.nl` 369 | 370 | ### Fetching the access token via Somtoday login: `POST /oauth2/token` 371 | 372 | #### Parameters 373 | 374 | | Name | Type | Value | 375 | |------------|------|--------------------------------------| 376 | | grant_type | Body | password | 377 | | username | Body | [school uuid]\\[username] | 378 | | password | Body | [password] | 379 | | scope | Body | openid | 380 | | client_id | Body | D50E0C06-32D1-4B41-A137-A9A850C892C2 | 381 | 382 | **Note: Since April 1st of 2021, SOMToday started using a different OAuth2 implementation in their app (SSO). The requests used to contain a `client_secret`, along with the `client_id`, currently, only the `client_id` is needed. The documentation has been adapted accordingly. Thanks to everyone on Discord for giving me a heads-up about this problem, and special thanks to @jktechs for figuring out that omitting the `client_secret` makes it work again.** 383 | 384 | #### Returns 385 | 386 | ```json 387 | { 388 | "access_token": "", 389 | "refresh_token": "", 390 | "somtoday_api_url": "https://bonhoeffer-api.somtoday.nl", 391 | "scope": "openid", 392 | "somtoday_tenant": "bonhoeffer", 393 | "id_token": "", 394 | "token_type": "Bearer", 395 | "expires_in": 3600 396 | } 397 | ``` 398 | 399 | The `somtoday_api_url` is used for all non-authentication requests, like for getting grades. 400 | 401 | token_type, scope and (probably) expires_in are always the same, the other values change depending on the user, and school (the tokens are of course randomly generated). 402 | 403 | #### Example 404 | 405 | ```bash 406 | school_uuid='4213a402-b898-4d16-9ebb-8c5f02b57474' username='450000@live.bc-enschede.nl' password='MYSECRETPASSWORD123' 407 | curl "https://somtoday.nl/oauth2/token" -d "grant_type=password&username=$school_uuid\\$username&password=$password&scope=openid&client_id=D50E0C06-32D1-4B41-A137-A9A850C892C2" 408 | ``` 409 | 410 | **Note: We use `\\` here, because `\` is normally used to escape things like quotes (e.g. `\"`) (and only bash double quote strings can escape using `\`), so `\\` will translate to `\`, and you can just use `\` if you use single quotes** 411 | 412 | 413 | 414 |
415 | 416 | ## Refreshing the access token 417 |
Click to open the guide for refreshing the access token 418 | 419 | 420 | ### Refreshing the access token `POST /oauth2/token` 421 | 422 | #### Parameters 423 | 424 | | Name | Type | Value | 425 | |---------------|------|--------------------------------------| 426 | | grant_type | Body | refresh_token | 427 | | refresh_token | Body | [refresh_token] | 428 | | client_id | Body | D50E0C06-32D1-4B41-A137-A9A850C892C2 | 429 | | scope | Body | openid | 430 | 431 | `refresh_token`: This is the refresh token that you get from the authentication process. 432 | 433 | #### Returns 434 | 435 | ```json 436 | { 437 | "access_token": "", 438 | "refresh_token": "", 439 | "somtoday_api_url": "https://api.somtoday.nl", 440 | "scope": "openid", 441 | "somtoday_tenant": "bonhoeffer", 442 | "id_token": "", 443 | "token_type": "Bearer", 444 | "expires_in": 3600 445 | } 446 | ``` 447 | 448 |
449 | -------------------------------------------------------------------------------- /Homework.md: -------------------------------------------------------------------------------- 1 | # SOMtoday Homework docs 2 | 3 | --- 4 | 5 | ## Table of contents 6 | 7 | 8 | 9 | - [SOMtoday Homework docs](#somtoday-rest-api-docs) 10 | - [Table of contents](#table-of-contents) 11 | - [General Info](#general-info) 12 | - [Fetching Information](#fetching-homework) 13 | - [1. Homework from appointments: `GET /rest/v1/studiewijzeritemafspraaktoekenningen`](#1-homework-from-appointments-get-restv1studiewijzeritemafspraaktoekenningen) 14 | - [2. Homework from days: `GET /rest/v1/studiewijzeritemdagtoekenningen`](#2-homework-from-days-get-restv1studiewijzeritemdagtoekenningen) 15 | - [3. Homework from weeks: `GET /rest/v1/studiewijzeritemweektoekenningen`](#3-homework-from-weeks-get-restv1studiewijzeritemweektoekenningen) 16 | - [Updating Information](#updating-information) 17 | - [1. Homework Made `PUT /rest/v1/swigemaakt/[id]`](#1-homework-made-put-restv1swigemaaktid) 18 | - [2. Homework Made `PUT /rest/v1/swigemaakt/cou`](#2-homework-made-put-restv1swigemaaktcou) 19 | 20 | 21 | 22 | --- 23 | 24 | ## General Info 25 |
Click to open 26 | 27 | There are 3 different types of homework in Somtoday. In picture below you can see how they look on the website. 28 | For each kind of homework you can request a specific homework item by adding `/[id]` behind it, with the id from `links[0].id`. You could also use the link from `links[0].href` 29 | 30 | ![Homework Types](/pics/homework-types.png) 31 | 32 |
33 | 34 | ## Fetching Homework 35 | 36 | ### 1. Homework from appointments: `GET /rest/v1/studiewijzeritemafspraaktoekenningen` 37 |
Click to open 38 | 39 | Receives the homework from appointments after a specified date 40 | 41 | #### Parameters 42 | 43 | | Name | Type | Value | 44 | |--------------------------------------------------|-----------|-----------------------------| 45 | | begintNaOfOp | Parameter | Date (yyyy-MM-dd) | 46 | | jaarWeek | Parameter | Date (yyyy~ww) (IE 2024~25) | 47 | | geenDifferentiatieOfGedifferentieerdVoorLeerling | Parameter | [id] | 48 | | additional | Parameter | swigemaaktVinkjes | 49 | | additional | Parameter | leerlingen | 50 | | additional | Parameter | huiswerkgemaakt | 51 | | additional | Parameter | leerlingenMetInlevering | 52 | | additional | Parameter | lesgroep | 53 | | additional | Parameter | leerlingProjectgroep | 54 | | additional | Parameter | studiewijzerId | 55 | | Authorization | Header | Bearer [access_token] | 56 | 57 | #### Returns 58 | 59 | ```json 60 | { 61 | "items": [ 62 | { 63 | "$type": "studiewijzer.RSWIAfspraakToekenning", 64 | "links": [ 65 | { 66 | "id": 12345678901, 67 | "rel": "self", 68 | "type": "studiewijzer.RSWIAfspraakToekenning", 69 | "href": "{{api_url}}/rest/v1/studiewijzeritemafspraaktoekenningen/12345678901" 70 | } 71 | ], 72 | "permissions": [], 73 | "additionalObjects": { 74 | "huiswerkgemaakt": null, 75 | "swigemaaktVinkjes": { 76 | "$type": "LinkableWrapper", 77 | "items": [ 78 | { 79 | "$type": "studiewijzer.RSWIGemaakt", 80 | "links": [ 81 | { 82 | "id": 1234567890123, 83 | "rel": "self", 84 | "type": "studiewijzer.RSWIGemaakt", 85 | "href": "{{api_url}}/rest/v1/swigemaakt/1234567890123" 86 | } 87 | ], 88 | "permissions": [], 89 | "additionalObjects": {}, 90 | "leerling": { 91 | "links": [ 92 | { 93 | "id": 1234567890, 94 | "rel": "self", 95 | "type": "leerling.RLeerlingPrimer", 96 | "href": "https://api.somtoday.nl/rest/v1/leerlingen/1234567890" 97 | } 98 | ], 99 | "permissions": [], 100 | "additionalObjects": {}, 101 | "UUID": "12abc34-12a3-1a2b-a1b2-1a2b34cd5e67", 102 | "leerlingnummer": 10000, 103 | "roepnaam": "NAME", 104 | "achternaam": "NAME" 105 | }, 106 | "swiToekenning": { 107 | "links": [ 108 | { 109 | "id": 1234567890123, 110 | "rel": "koppeling", 111 | "type": "studiewijzer.RSWIToekenning" 112 | } 113 | ], 114 | "permissions": [], 115 | "additionalObjects": {}, 116 | "studiewijzer": { 117 | "links": [ 118 | { 119 | "id": 12345678901, 120 | "rel": "koppeling", 121 | "type": "studiewijzer.RAbstractStudiewijzer" 122 | } 123 | ], 124 | "permissions": [], 125 | "additionalObjects": {}, 126 | "uuid": "12abc34e-12a3-1a2b-a1b2-1a2b34cd5e67", 127 | "naam": "engels, leerjaar 6", 128 | "vestiging": { 129 | "links": [ 130 | { 131 | "id": 1234567890, 132 | "rel": "self", 133 | "type": "instelling.RVestiging", 134 | "href": "{{api_url}}/rest/v1/vestigingen/1234567890" 135 | } 136 | ], 137 | "permissions": [], 138 | "additionalObjects": {}, 139 | "naam": "School Name" 140 | } 141 | }, 142 | "studiewijzerItem": { 143 | "links": [ 144 | { 145 | "id": 1234567890123, 146 | "rel": "self", 147 | "type": "studiewijzer.RStudiewijzerItem", 148 | "href": "{{api_url}}/rest/v1/studiewijzeritems/1234567890123" 149 | } 150 | ], 151 | "permissions": [], 152 | "additionalObjects": {}, 153 | "onderwerp": "Topic", 154 | "huiswerkType": "GROTE_TOETS, TOETS or HUISWERK", 155 | "omschrijving": "Description", 156 | "inleverperiodes": false, 157 | "lesmateriaal": false, 158 | "projectgroepen": false, 159 | "bijlagen": [], 160 | "externeMaterialen": [], 161 | "inlevermomenten": [], 162 | "tonen": true, 163 | "notitieZichtbaarVoorLeerling": false 164 | }, 165 | "sortering": 0, 166 | "synchroniseertMet": "Leerjaar 6, periode 2" 167 | }, 168 | "gemaakt": true 169 | } 170 | ] 171 | }, 172 | "leerlingen": { 173 | "$type": "LinkableWrapper", 174 | "items": [ 175 | { 176 | "$type": "leerling.RLeerlingPrimer", 177 | "links": [ 178 | { 179 | "id": 12345678901, 180 | "rel": "self", 181 | "type": "leerling.RLeerlingPrimer", 182 | "href": "{{api_url}}/rest/v1/leerlingen/12345678901" 183 | } 184 | ], 185 | "permissions": [], 186 | "additionalObjects": {}, 187 | "UUID": "12abc34e-12a3-1a2b-a1b2-1a2b34cd5e67", 188 | "leerlingnummer": 10000, 189 | "roepnaam": "NAME", 190 | "achternaam": "NAME" 191 | } 192 | ] 193 | }, 194 | "lesgroep": { 195 | "links": [ 196 | { 197 | "id": 12345678901, 198 | "rel": "self", 199 | "type": "lesgroep.RLesgroep", 200 | "href": "{{api_url}}/rest/v1/lesgroepen/12345678901" 201 | } 202 | ], 203 | "permissions": [], 204 | "additionalObjects": {}, 205 | "UUID": "12abc34-12a3-1a2b-a1b2-1a2b34cd5e67", 206 | "naam": "6entl4", 207 | "schooljaar": { 208 | "$type": "onderwijsinrichting.RSchooljaar", 209 | "links": [ 210 | { 211 | "id": 12345678, 212 | "rel": "self", 213 | "type": "onderwijsinrichting.RSchooljaar", 214 | "href": "{{api_url}}/rest/v1/schooljaren/12345678" 215 | } 216 | ], 217 | "permissions": [], 218 | "additionalObjects": {}, 219 | "naam": "2020/2021", 220 | "vanafDatum": "2020-08-01", 221 | "totDatum": "2021-07-31", 222 | "isHuidig": true 223 | }, 224 | "vak": { 225 | "links": [ 226 | { 227 | "id": 12345678901, 228 | "rel": "self", 229 | "type": "onderwijsinrichting.RVak", 230 | "href": "{{api_url}}/rest/v1/vakken/12345678901" 231 | } 232 | ], 233 | "permissions": [], 234 | "additionalObjects": {}, 235 | "afkorting": "entl", 236 | "naam": "Engelse taal en literatuur" 237 | }, 238 | "heeftStamgroep": true, 239 | "examendossierOndersteund": true 240 | }, 241 | "leerlingProjectgroep": {}, 242 | "studiewijzerId": 12345678901, 243 | "leerlingenMetInlevering": { 244 | "$type": "LongWrapper", 245 | "values": [] 246 | } 247 | }, 248 | "studiewijzer": { 249 | "links": [ 250 | { 251 | "id": 12345678901, 252 | "rel": "koppeling", 253 | "type": "studiewijzer.RAbstractStudiewijzer" 254 | } 255 | ], 256 | "permissions": [], 257 | "additionalObjects": {}, 258 | "uuid": "12abc34-12a3-1a2b-a1b2-1a2b34cd5e67", 259 | "naam": "6entl4", 260 | "vestiging": { 261 | "links": [ 262 | { 263 | "id": 12345678901, 264 | "rel": "self", 265 | "type": "instelling.RVestiging", 266 | "href": "{{api_url}}/rest/v1/vestigingen/12345678901" 267 | } 268 | ], 269 | "permissions": [], 270 | "additionalObjects": {}, 271 | "naam": "SchoolName" 272 | } 273 | }, 274 | "studiewijzerItem": { 275 | "links": [ 276 | { 277 | "id": 12345678901, 278 | "rel": "self", 279 | "type": "studiewijzer.RStudiewijzerItem", 280 | "href": "{{api_url}}/rest/v1/studiewijzeritems/12345678901" 281 | } 282 | ], 283 | "permissions": [], 284 | "additionalObjects": {}, 285 | "onderwerp": "Topic", 286 | "huiswerkType": "GROTE_TOETS, TOETS or HUISWERK", 287 | "omschrijving": "Description", 288 | "inleverperiodes": false, 289 | "lesmateriaal": false, 290 | "projectgroepen": false, 291 | "bijlagen": [], 292 | "externeMaterialen": [], 293 | "inlevermomenten": [], 294 | "tonen": true, 295 | "notitieZichtbaarVoorLeerling": false 296 | }, 297 | "sortering": 0, 298 | "lesgroep": { 299 | "links": [ 300 | { 301 | "id": 12345678901, 302 | "rel": "self", 303 | "type": "lesgroep.RLesgroep", 304 | "href": "{{api_url}}/rest/v1/lesgroepen/12345678901" 305 | } 306 | ], 307 | "permissions": [], 308 | "additionalObjects": {}, 309 | "UUID": "12abc34-12a3-1a2b-a1b2-1a2b34cd5e67", 310 | "naam": "6entl4", 311 | "schooljaar": { 312 | "$type": "onderwijsinrichting.RSchooljaar", 313 | "links": [ 314 | { 315 | "id": 12345678, 316 | "rel": "self", 317 | "type": "onderwijsinrichting.RSchooljaar", 318 | "href": "{{api_url}}/rest/v1/schooljaren/12345678" 319 | } 320 | ], 321 | "permissions": [], 322 | "additionalObjects": {}, 323 | "naam": "2020/2021", 324 | "vanafDatum": "2020-08-01", 325 | "totDatum": "2021-07-31", 326 | "isHuidig": true 327 | }, 328 | "vak": { 329 | "links": [ 330 | { 331 | "id": 12345678901, 332 | "rel": "self", 333 | "type": "onderwijsinrichting.RVak", 334 | "href": "{{api_url}}/rest/v1/vakken/12345678901" 335 | } 336 | ], 337 | "permissions": [], 338 | "additionalObjects": {}, 339 | "afkorting": "entl", 340 | "naam": "Engelse taal en literatuur" 341 | }, 342 | "heeftStamgroep": true, 343 | "examendossierOndersteund": true 344 | }, 345 | "datumTijd": "yyyy-MM-dd'T'HH:mm:ss.SSS+HH:mm", 346 | "aangemaaktOpDatumTijd": "yyyy-MM-dd'T'HH:mm:ss.SSS+HH:mm" 347 | } 348 | ] 349 | } 350 | ``` 351 | 352 |
353 | 354 | ### 2. Homework from days: `GET /rest/v1/studiewijzeritemdagtoekenningen` 355 |
Click to open 356 | 357 | 358 | Receives the homework from days after a specified date. 359 | 360 | #### Parameters 361 | 362 | | Name | Type | Value | 363 | |--------------------------------------------------|-----------|-----------------------------| 364 | | begintNaOfOp | Parameter | Date (yyyy-MM-dd) | 365 | | jaarWeek | Parameter | Date (yyyy~ww) (IE 2024~25) | 366 | | geenDifferentiatieOfGedifferentieerdVoorLeerling | Parameter | [id] | 367 | | additional | Parameter | swigemaaktVinkjes | 368 | | additional | Parameter | leerlingen | 369 | | additional | Parameter | huiswerkgemaakt | 370 | | additional | Parameter | leerlingenMetInlevering | 371 | | additional | Parameter | lesgroep | 372 | | additional | Parameter | leerlingProjectgroep | 373 | | additional | Parameter | studiewijzerId | 374 | | Authorization | Header | Bearer [access_token] | 375 | 376 | #### Returns 377 | 378 | ```json 379 | { 380 | "items": [ 381 | { 382 | "$type": "studiewijzer.RSWIDagToekenning", 383 | "links": [ 384 | { 385 | "id": 123456789012, 386 | "rel": "self", 387 | "type": "studiewijzer.RSWIDagToekenning", 388 | "href": "https://api.somtoday.nl/rest/v1/studiewijzeritemdagtoekenningen/123456789012" 389 | } 390 | ], 391 | "permissions": [], 392 | "additionalObjects": { 393 | "huiswerkgemaakt": null, 394 | "swigemaaktVinkjes": { 395 | "$type": "LinkableWrapper", 396 | "items": [ 397 | { 398 | "$type": "studiewijzer.RSWIGemaakt", 399 | "links": [ 400 | { 401 | "id": 1234567890123, 402 | "rel": "self", 403 | "type": "studiewijzer.RSWIGemaakt", 404 | "href": "{{api_url}}/rest/v1/swigemaakt/1234567890123" 405 | } 406 | ], 407 | "permissions": [], 408 | "additionalObjects": {}, 409 | "leerling": { 410 | "links": [ 411 | { 412 | "id": 1234567890, 413 | "rel": "self", 414 | "type": "leerling.RLeerlingPrimer", 415 | "href": "https://api.somtoday.nl/rest/v1/leerlingen/1234567890" 416 | } 417 | ], 418 | "permissions": [], 419 | "additionalObjects": {}, 420 | "UUID": "12abc34-12a3-1a2b-a1b2-1a2b34cd5e67", 421 | "leerlingnummer": 10000, 422 | "roepnaam": "NAME", 423 | "achternaam": "NAME" 424 | }, 425 | "swiToekenning": { 426 | "links": [ 427 | { 428 | "id": 1234567890123, 429 | "rel": "koppeling", 430 | "type": "studiewijzer.RSWIToekenning" 431 | } 432 | ], 433 | "permissions": [], 434 | "additionalObjects": {}, 435 | "studiewijzer": { 436 | "links": [ 437 | { 438 | "id": 12345678901, 439 | "rel": "koppeling", 440 | "type": "studiewijzer.RAbstractStudiewijzer" 441 | } 442 | ], 443 | "permissions": [], 444 | "additionalObjects": {}, 445 | "uuid": "12abc34e-12a3-1a2b-a1b2-1a2b34cd5e67", 446 | "naam": "engels, leerjaar 6", 447 | "vestiging": { 448 | "links": [ 449 | { 450 | "id": 1234567890, 451 | "rel": "self", 452 | "type": "instelling.RVestiging", 453 | "href": "{{api_url}}/rest/v1/vestigingen/1234567890" 454 | } 455 | ], 456 | "permissions": [], 457 | "additionalObjects": {}, 458 | "naam": "School Name" 459 | } 460 | }, 461 | "studiewijzerItem": { 462 | "links": [ 463 | { 464 | "id": 1234567890123, 465 | "rel": "self", 466 | "type": "studiewijzer.RStudiewijzerItem", 467 | "href": "{{api_url}}/rest/v1/studiewijzeritems/1234567890123" 468 | } 469 | ], 470 | "permissions": [], 471 | "additionalObjects": {}, 472 | "onderwerp": "Topic", 473 | "huiswerkType": "GROTE_TOETS, TOETS or HUISWERK", 474 | "omschrijving": "Description", 475 | "inleverperiodes": false, 476 | "lesmateriaal": false, 477 | "projectgroepen": false, 478 | "bijlagen": [], 479 | "externeMaterialen": [], 480 | "inlevermomenten": [], 481 | "tonen": true, 482 | "notitieZichtbaarVoorLeerling": false 483 | }, 484 | "sortering": 0, 485 | "synchroniseertMet": "Leerjaar 6, periode 2" 486 | }, 487 | "gemaakt": true 488 | } 489 | ] 490 | }, 491 | "leerlingen": { 492 | "$type": "LinkableWrapper", 493 | "items": [ 494 | { 495 | "$type": "leerling.RLeerlingPrimer", 496 | "links": [ 497 | { 498 | "id": 12345678901, 499 | "rel": "self", 500 | "type": "leerling.RLeerlingPrimer", 501 | "href": "{{api_url}}/rest/v1/leerlingen/12345678901" 502 | } 503 | ], 504 | "permissions": [], 505 | "additionalObjects": {}, 506 | "UUID": "12abc34e-12a3-1a2b-a1b2-1a2b34cd5e67", 507 | "leerlingnummer": 10000, 508 | "roepnaam": "NAME", 509 | "achternaam": "NAME" 510 | } 511 | ] 512 | }, 513 | "lesgroep": { 514 | "links": [ 515 | { 516 | "id": 12345678901, 517 | "rel": "self", 518 | "type": "lesgroep.RLesgroep", 519 | "href": "{{api_url}}/rest/v1/lesgroepen/12345678901" 520 | } 521 | ], 522 | "permissions": [], 523 | "additionalObjects": {}, 524 | "UUID": "12abc34-12a3-1a2b-a1b2-1a2b34cd5e67", 525 | "naam": "6entl4", 526 | "schooljaar": { 527 | "$type": "onderwijsinrichting.RSchooljaar", 528 | "links": [ 529 | { 530 | "id": 12345678, 531 | "rel": "self", 532 | "type": "onderwijsinrichting.RSchooljaar", 533 | "href": "{{api_url}}/rest/v1/schooljaren/12345678" 534 | } 535 | ], 536 | "permissions": [], 537 | "additionalObjects": {}, 538 | "naam": "2020/2021", 539 | "vanafDatum": "2020-08-01", 540 | "totDatum": "2021-07-31", 541 | "isHuidig": true 542 | }, 543 | "vak": { 544 | "links": [ 545 | { 546 | "id": 12345678901, 547 | "rel": "self", 548 | "type": "onderwijsinrichting.RVak", 549 | "href": "{{api_url}}/rest/v1/vakken/12345678901" 550 | } 551 | ], 552 | "permissions": [], 553 | "additionalObjects": {}, 554 | "afkorting": "entl", 555 | "naam": "Engelse taal en literatuur" 556 | }, 557 | "heeftStamgroep": true, 558 | "examendossierOndersteund": true 559 | }, 560 | "leerlingProjectgroep": {}, 561 | "studiewijzerId": 12345678901, 562 | "leerlingenMetInlevering": { 563 | "$type": "LongWrapper", 564 | "values": [] 565 | } 566 | }, 567 | "studiewijzer": { 568 | "links": [ 569 | { 570 | "id": 12345678901, 571 | "rel": "koppeling", 572 | "type": "studiewijzer.RAbstractStudiewijzer" 573 | } 574 | ], 575 | "permissions": [], 576 | "additionalObjects": {}, 577 | "uuid": "12abc34-12a3-1a2b-a1b2-1a2b34cd5e67", 578 | "naam": "6entl4", 579 | "vestiging": { 580 | "links": [ 581 | { 582 | "id": 12345678901, 583 | "rel": "self", 584 | "type": "instelling.RVestiging", 585 | "href": "{{api_url}}/rest/v1/vestigingen/12345678901" 586 | } 587 | ], 588 | "permissions": [], 589 | "additionalObjects": {}, 590 | "naam": "SchoolName" 591 | } 592 | }, 593 | "studiewijzer": { 594 | "links": [ 595 | { 596 | "id": 12345678901, 597 | "rel": "koppeling", 598 | "type": "studiewijzer.RAbstractStudiewijzer" 599 | } 600 | ], 601 | "permissions": [], 602 | "additionalObjects": {}, 603 | "uuid": "12abc34-12a3-1a2b-a1b2-1a2b34cd5e67", 604 | "naam": "6entl4", 605 | "vestiging": { 606 | "links": [ 607 | { 608 | "id": 1234567890, 609 | "rel": "self", 610 | "type": "instelling.RVestiging", 611 | "href": "{{api_url}}/rest/v1/vestigingen/1234567890" 612 | } 613 | ], 614 | "permissions": [], 615 | "additionalObjects": {}, 616 | "naam": "School Name" 617 | } 618 | }, 619 | "studiewijzerItem": { 620 | "links": [ 621 | { 622 | "id": 123456789012, 623 | "rel": "self", 624 | "type": "studiewijzer.RStudiewijzerItem", 625 | "href": "{{api_url}}/rest/v1/studiewijzeritems/123456789012" 626 | } 627 | ], 628 | "permissions": [], 629 | "additionalObjects": {}, 630 | "onderwerp": "Topic", 631 | "huiswerkType": "GROTE_TOETS, TOETS or HUISWERK", 632 | "omschrijving": "Description", 633 | "inleverperiodes": false, 634 | "lesmateriaal": false, 635 | "projectgroepen": false, 636 | "bijlagen": [], 637 | "externeMaterialen": [], 638 | "inlevermomenten": [], 639 | "tonen": true, 640 | "notitieZichtbaarVoorLeerling": false 641 | }, 642 | "sortering": 0, 643 | "datumTijd": "2020-10-08T00:00:00.000+02:00", 644 | "lesgroep": { 645 | "links": [ 646 | { 647 | "id": 12345678901, 648 | "rel": "self", 649 | "type": "lesgroep.RLesgroep", 650 | "href": "{{api_url}}/rest/v1/lesgroepen/12345678901" 651 | } 652 | ], 653 | "permissions": [], 654 | "additionalObjects": {}, 655 | "UUID": "12abc34e-12a3-1a2b-a1b2-1a2b34cd5e67", 656 | "naam": "6entl4", 657 | "schooljaar": { 658 | "$type": "onderwijsinrichting.RSchooljaar", 659 | "links": [ 660 | { 661 | "id": 12345678, 662 | "rel": "self", 663 | "type": "onderwijsinrichting.RSchooljaar", 664 | "href": "{{api_url}}/rest/v1/schooljaren/12345678" 665 | } 666 | ], 667 | "permissions": [], 668 | "additionalObjects": {}, 669 | "naam": "2020/2021", 670 | "vanafDatum": "2020-08-01", 671 | "totDatum": "2021-07-31", 672 | "isHuidig": true 673 | }, 674 | "vak": { 675 | "links": [ 676 | { 677 | "id": 1234567890, 678 | "rel": "self", 679 | "type": "onderwijsinrichting.RVak", 680 | "href": "{{api_url}}/rest/v1/vakken/1234567890" 681 | } 682 | ], 683 | "permissions": [], 684 | "additionalObjects": {}, 685 | "afkorting": "entl", 686 | "naam": "engelse taal en literatuur" 687 | }, 688 | "heeftStamgroep": true, 689 | "examendossierOndersteund": true 690 | } 691 | } 692 | ] 693 | } 694 | ``` 695 | 696 |
697 | 698 | ### 3. Homework from weeks: `GET /rest/v1/studiewijzeritemweektoekenningen` 699 |
Click to open 700 | 701 | Receives the homework from weeks after a specified date. 702 | 703 | #### Parameters 704 | 705 | | Name | Type | Value | 706 | |--------------------------------------------------|-----------|-------------------------| 707 | | begintNaOfOp | Parameter | Date (yyyy-MM-dd) | 708 | | weeknummer | Parameter | Number [1-52] | 709 | | geenDifferentiatieOfGedifferentieerdVoorLeerling | Parameter | [id] | 710 | | additional | Parameter | swigemaaktVinkjes | 711 | | additional | Parameter | leerlingen | 712 | | additional | Parameter | huiswerkgemaakt | 713 | | additional | Parameter | leerlingenMetInlevering | 714 | | additional | Parameter | lesgroep | 715 | | additional | Parameter | leerlingProjectgroep | 716 | | additional | Parameter | studiewijzerId | 717 | | Authorization | Header | Bearer [access_token] | 718 | 719 | #### Returns 720 | 721 | ```json 722 | { 723 | "items": [ 724 | { 725 | "$type": "studiewijzer.RSWIWeekToekenning", 726 | "links": [ 727 | { 728 | "id": 12345678901, 729 | "rel": "self", 730 | "type": "studiewijzer.RSWIWeekToekenning", 731 | "href": "{{api_url}}/rest/v1/studiewijzeritemweektoekenningen/12345678901" 732 | } 733 | ], 734 | "permissions": [], 735 | "additionalObjects": { 736 | "huiswerkgemaakt": null, 737 | "swigemaaktVinkjes": { 738 | "$type": "LinkableWrapper", 739 | "items": [ 740 | { 741 | "$type": "studiewijzer.RSWIGemaakt", 742 | "links": [ 743 | { 744 | "id": 1234567890123, 745 | "rel": "self", 746 | "type": "studiewijzer.RSWIGemaakt", 747 | "href": "{{api_url}}/rest/v1/swigemaakt/1234567890123" 748 | } 749 | ], 750 | "permissions": [], 751 | "additionalObjects": {}, 752 | "leerling": { 753 | "links": [ 754 | { 755 | "id": 1234567890, 756 | "rel": "self", 757 | "type": "leerling.RLeerlingPrimer", 758 | "href": "https://api.somtoday.nl/rest/v1/leerlingen/1234567890" 759 | } 760 | ], 761 | "permissions": [], 762 | "additionalObjects": {}, 763 | "UUID": "12abc34-12a3-1a2b-a1b2-1a2b34cd5e67", 764 | "leerlingnummer": 10000, 765 | "roepnaam": "NAME", 766 | "achternaam": "NAME" 767 | }, 768 | "swiToekenning": { 769 | "links": [ 770 | { 771 | "id": 1234567890123, 772 | "rel": "koppeling", 773 | "type": "studiewijzer.RSWIToekenning" 774 | } 775 | ], 776 | "permissions": [], 777 | "additionalObjects": {}, 778 | "studiewijzer": { 779 | "links": [ 780 | { 781 | "id": 12345678901, 782 | "rel": "koppeling", 783 | "type": "studiewijzer.RAbstractStudiewijzer" 784 | } 785 | ], 786 | "permissions": [], 787 | "additionalObjects": {}, 788 | "uuid": "12abc34e-12a3-1a2b-a1b2-1a2b34cd5e67", 789 | "naam": "engels, leerjaar 6", 790 | "vestiging": { 791 | "links": [ 792 | { 793 | "id": 1234567890, 794 | "rel": "self", 795 | "type": "instelling.RVestiging", 796 | "href": "{{api_url}}/rest/v1/vestigingen/1234567890" 797 | } 798 | ], 799 | "permissions": [], 800 | "additionalObjects": {}, 801 | "naam": "School Name" 802 | } 803 | }, 804 | "studiewijzerItem": { 805 | "links": [ 806 | { 807 | "id": 1234567890123, 808 | "rel": "self", 809 | "type": "studiewijzer.RStudiewijzerItem", 810 | "href": "{{api_url}}/rest/v1/studiewijzeritems/1234567890123" 811 | } 812 | ], 813 | "permissions": [], 814 | "additionalObjects": {}, 815 | "onderwerp": "Topic", 816 | "huiswerkType": "GROTE_TOETS, TOETS or HUISWERK", 817 | "omschrijving": "Description", 818 | "inleverperiodes": false, 819 | "lesmateriaal": false, 820 | "projectgroepen": false, 821 | "bijlagen": [], 822 | "externeMaterialen": [], 823 | "inlevermomenten": [], 824 | "tonen": true, 825 | "notitieZichtbaarVoorLeerling": false 826 | }, 827 | "sortering": 0, 828 | "synchroniseertMet": "Leerjaar 6, periode 2" 829 | }, 830 | "gemaakt": true 831 | } 832 | ] 833 | }, 834 | "leerlingen": { 835 | "$type": "LinkableWrapper", 836 | "items": [ 837 | { 838 | "$type": "leerling.RLeerlingPrimer", 839 | "links": [ 840 | { 841 | "id": 12345678901, 842 | "rel": "self", 843 | "type": "leerling.RLeerlingPrimer", 844 | "href": "{{api_url}}/rest/v1/leerlingen/12345678901" 845 | } 846 | ], 847 | "permissions": [], 848 | "additionalObjects": {}, 849 | "UUID": "12abc34e-12a3-1a2b-a1b2-1a2b34cd5e67", 850 | "leerlingnummer": 10000, 851 | "roepnaam": "NAME", 852 | "achternaam": "NAME" 853 | } 854 | ] 855 | }, 856 | "lesgroep": { 857 | "links": [ 858 | { 859 | "id": 12345678901, 860 | "rel": "self", 861 | "type": "lesgroep.RLesgroep", 862 | "href": "{{api_url}}/rest/v1/lesgroepen/12345678901" 863 | } 864 | ], 865 | "permissions": [], 866 | "additionalObjects": {}, 867 | "UUID": "12abc34-12a3-1a2b-a1b2-1a2b34cd5e67", 868 | "naam": "6entl4", 869 | "schooljaar": { 870 | "$type": "onderwijsinrichting.RSchooljaar", 871 | "links": [ 872 | { 873 | "id": 12345678, 874 | "rel": "self", 875 | "type": "onderwijsinrichting.RSchooljaar", 876 | "href": "{{api_url}}/rest/v1/schooljaren/12345678" 877 | } 878 | ], 879 | "permissions": [], 880 | "additionalObjects": {}, 881 | "naam": "2020/2021", 882 | "vanafDatum": "2020-08-01", 883 | "totDatum": "2021-07-31", 884 | "isHuidig": true 885 | }, 886 | "vak": { 887 | "links": [ 888 | { 889 | "id": 12345678901, 890 | "rel": "self", 891 | "type": "onderwijsinrichting.RVak", 892 | "href": "{{api_url}}/rest/v1/vakken/12345678901" 893 | } 894 | ], 895 | "permissions": [], 896 | "additionalObjects": {}, 897 | "afkorting": "entl", 898 | "naam": "Engelse taal en literatuur" 899 | }, 900 | "heeftStamgroep": true, 901 | "examendossierOndersteund": true 902 | }, 903 | "leerlingProjectgroep": {}, 904 | "studiewijzerId": 12345678901, 905 | "leerlingenMetInlevering": { 906 | "$type": "LongWrapper", 907 | "values": [] 908 | } 909 | }, 910 | "studiewijzer": { 911 | "links": [ 912 | { 913 | "id": 12345678901, 914 | "rel": "koppeling", 915 | "type": "studiewijzer.RAbstractStudiewijzer" 916 | } 917 | ], 918 | "permissions": [], 919 | "additionalObjects": {}, 920 | "uuid": "12abc34-12a3-1a2b-a1b2-1a2b34cd5e67", 921 | "naam": "6entl4", 922 | "vestiging": { 923 | "links": [ 924 | { 925 | "id": 12345678901, 926 | "rel": "self", 927 | "type": "instelling.RVestiging", 928 | "href": "{{api_url}}/rest/v1/vestigingen/12345678901" 929 | } 930 | ], 931 | "permissions": [], 932 | "additionalObjects": {}, 933 | "naam": "SchoolName" 934 | } 935 | }, 936 | "studiewijzer": { 937 | "links": [ 938 | { 939 | "id": 12345678901, 940 | "rel": "koppeling", 941 | "type": "studiewijzer.RAbstractStudiewijzer" 942 | } 943 | ], 944 | "permissions": [], 945 | "additionalObjects": {}, 946 | "uuid": "12abc34e-12a3-1a2b-a1b2-1a2b34cd5e67", 947 | "naam": "Klas 6entl4", 948 | "vestiging": { 949 | "links": [ 950 | { 951 | "id": 1234567890, 952 | "rel": "self", 953 | "type": "instelling.RVestiging", 954 | "href": "{{api_url}}/rest/v1/vestigingen/1234567890" 955 | } 956 | ], 957 | "permissions": [], 958 | "additionalObjects": {}, 959 | "naam": "School Name" 960 | } 961 | }, 962 | "studiewijzerItem": { 963 | "links": [ 964 | { 965 | "id": 12345678901, 966 | "rel": "self", 967 | "type": "studiewijzer.RStudiewijzerItem", 968 | "href": "{{api_url}}/rest/v1/studiewijzeritems/12345678901" 969 | } 970 | ], 971 | "permissions": [], 972 | "additionalObjects": {}, 973 | "onderwerp": "Topic", 974 | "huiswerkType": "GROTE_TOETS, TOETS or HUISWERK", 975 | "omschrijving": "Description", 976 | "inleverperiodes": false, 977 | "lesmateriaal": false, 978 | "projectgroepen": false, 979 | "bijlagen": [], 980 | "externeMaterialen": [], 981 | "inlevermomenten": [], 982 | "tonen": true, 983 | "notitieZichtbaarVoorLeerling": false 984 | }, 985 | "sortering": 1, 986 | "synchroniseertMet": "Wiskunde klas 6 periode 4", 987 | "weeknummerVanaf": 60, 988 | "weeknummerTm": 60 989 | } 990 | ] 991 | } 992 | ``` 993 | 994 |
995 | 996 | ## Updating information 997 | 998 | ### 1. Homework Made `PUT /rest/v1/swigemaakt/[id]` 999 |
Click to open 1000 | 1001 | Updates the the `gemaakt` status of a `studiewijzer.RSWIGemaakt` object 1002 | 1003 | #### Parameters 1004 | 1005 | | Name | Type | Value | 1006 | |---------------|--------|-----------------------| 1007 | | Authorization | Header | Bearer [access_token] | 1008 | 1009 | #### Body 1010 | 1011 | This is the minimal information you need to update the `gemaakt` status, you can get all the information from every kind of homework listed above. 1012 | 1013 | ```json 1014 | { 1015 | "leerling": { 1016 | "links": [ 1017 | { 1018 | "id": 1234567890, 1019 | "rel": "self", 1020 | "href": "https://api.somtoday.nl/rest/v1/leerlingen/1234567890" 1021 | } 1022 | ] 1023 | }, 1024 | "gemaakt": true 1025 | } 1026 | ``` 1027 | 1028 | #### Returns 1029 | 1030 | The now changed `studiewijzer.RSWIGemaakt` Object 1031 | 1032 | ```json 1033 | { 1034 | "links": [ 1035 | { 1036 | "id": 1234567890123, 1037 | "rel": "self", 1038 | "type": "studiewijzer.RSWIGemaakt", 1039 | "href": "{{api_url}}/rest/v1/swigemaakt/1234567890123" 1040 | } 1041 | ], 1042 | "permissions": [ 1043 | { 1044 | "full": "studiewijzer.RSWIGemaakt:READ,UPDATE:INSTANCE(1234567890123)", 1045 | "type": "studiewijzer.RSWIGemaakt", 1046 | "operations": [ 1047 | "READ", 1048 | "UPDATE" 1049 | ], 1050 | "instances": [ 1051 | "INSTANCE(1234567890123)" 1052 | ] 1053 | } 1054 | ], 1055 | "additionalObjects": {}, 1056 | "leerling": { 1057 | "links": [ 1058 | { 1059 | "id": 1234567890, 1060 | "rel": "self", 1061 | "type": "leerling.RLeerlingPrimer", 1062 | "href": "{{api_url}}/rest/v1/leerlingen/1234567890" 1063 | } 1064 | ], 1065 | "permissions": [ 1066 | { 1067 | "full": "leerling.RLeerlingPrimer:READ:INSTANCE(1234567890)", 1068 | "type": "leerling.RLeerlingPrimer", 1069 | "operations": [ 1070 | "READ" 1071 | ], 1072 | "instances": [ 1073 | "INSTANCE(1234567890)" 1074 | ] 1075 | } 1076 | ], 1077 | "additionalObjects": {}, 1078 | "UUID": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", 1079 | "leerlingnummer": 100000, 1080 | "roepnaam": "Name", 1081 | "voorvoegsel": "Name", 1082 | "achternaam": "Name" 1083 | }, 1084 | "swiToekenningId": 1234567890123, 1085 | "gemaakt": true 1086 | } 1087 | ``` 1088 | 1089 |
1090 | 1091 | ### 2. Homework Made `PUT /rest/v1/swigemaakt/cou` 1092 |
Click to open 1093 | 1094 | Updates the the `gemaakt` status of a `studiewijzer.RSWIGemaakt` object without knowing the id 1095 | 1096 | #### Parameters 1097 | 1098 | | Name | Type | Value | 1099 | |---------------|--------|-----------------------| 1100 | | Authorization | Header | Bearer [access_token] | 1101 | 1102 | #### Body 1103 | 1104 | This is the minimal information you need to update the `gemaakt` status, for this you will need the id of the student and the id of the homework object. 1105 | 1106 | ```json 1107 | { 1108 | "leerling": { 1109 | "links": [ 1110 | { 1111 | "id": [Student_id], 1112 | "rel": "self", 1113 | "href": "https://api.somtoday.nl/rest/v1/leerlingen/[Student_id]" 1114 | } 1115 | ] 1116 | }, 1117 | "swiToekenningId": [Homework_id], 1118 | "gemaakt": false 1119 | } 1120 | ``` 1121 | 1122 | #### Returns 1123 | 1124 | The now changed or created `studiewijzer.RSWIGemaakt` Object 1125 | 1126 | ```json 1127 | { 1128 | "links": [ 1129 | { 1130 | "id": 1234567890123, 1131 | "rel": "self", 1132 | "type": "studiewijzer.RSWIGemaakt", 1133 | "href": "{{api_url}}/rest/v1/swigemaakt/1234567890123" 1134 | } 1135 | ], 1136 | "permissions": [ 1137 | { 1138 | "full": "studiewijzer.RSWIGemaakt:READ,UPDATE:INSTANCE(1234567890123)", 1139 | "type": "studiewijzer.RSWIGemaakt", 1140 | "operations": [ 1141 | "READ", 1142 | "UPDATE" 1143 | ], 1144 | "instances": [ 1145 | "INSTANCE(1234567890123)" 1146 | ] 1147 | } 1148 | ], 1149 | "additionalObjects": {}, 1150 | "leerling": { 1151 | "links": [ 1152 | { 1153 | "id": 1234567890, 1154 | "rel": "self", 1155 | "type": "leerling.RLeerlingPrimer", 1156 | "href": "{{api_url}}/rest/v1/leerlingen/1234567890" 1157 | } 1158 | ], 1159 | "permissions": [ 1160 | { 1161 | "full": "leerling.RLeerlingPrimer:READ:INSTANCE(1234567890)", 1162 | "type": "leerling.RLeerlingPrimer", 1163 | "operations": [ 1164 | "READ" 1165 | ], 1166 | "instances": [ 1167 | "INSTANCE(1234567890)" 1168 | ] 1169 | } 1170 | ], 1171 | "additionalObjects": {}, 1172 | "UUID": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", 1173 | "leerlingnummer": 100000, 1174 | "roepnaam": "Name", 1175 | "voorvoegsel": "Name", 1176 | "achternaam": "Name" 1177 | }, 1178 | "swiToekenningId": 1234567890123, 1179 | "gemaakt": true 1180 | } 1181 | ``` 1182 | 1183 |
1184 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # SOMtoday REST API docs 2 | 3 | #### Discord 4 | 5 | [![Discord Chat](https://img.shields.io/discord/789249810032361502.svg)](https://discord.gg/yE3e3erCut) 6 | 7 | ## Table of contents 8 | 9 | 10 | 11 | - [SOMtoday REST API docs](#somtoday-rest-api-docs) 12 | - [Discord](#discord) 13 | - [Table of contents](#table-of-contents) 14 | - [Some miscellaneous stuff](#some-miscellaneous-stuff) 15 | - [Authentication / authorization](Authentication.md) 16 | - [Getting a list of schools](Authentication.md#getting-a-list-of-schools) 17 | - [Authentication by mimicking the SOMToday app/webapp](Authentication.md#authentication-by-mimicking-the-somtoday-appwebapp) 18 | - [Fetching the access token via SSO](Authentication.md#authentication-using-sso-single-sign-on) 19 | - [Fetching the access token via Somtoday login: `POST /oauth2/token`](Authentication.md#fetching-the-access-token-via-somtoday-login) 20 | - [Refreshing the token: `POST /oauth2/token`](Authentication.md#refreshing-the-access-token) 21 | - [Fetching information](#fetching-information) 22 | - [Current student(s): `GET /rest/v1/leerlingen`](#current-students-get-restv1leerlingen) 23 | - [Student by ID: `GET /rest/v1/leerlingen/[id]`](#student-by-id-get-restv1leerlingenid) 24 | - [Grades: `GET /rest/v1/resultaten/huidigVoorLeerling/[id]`](#grades-get-restv1resultatenhuidigvoorleerlingid) 25 | - [Schedule: `GET /rest/v1/afspraken`](#schedule-get-restv1afspraken) 26 | - [Absence Reports: `GET /rest/v1/absentiemeldingen`](#absence-reports-get-restv1absentiemeldingen) 27 | - [Study Guides: `GET /rest/v1/studiewijzers`](#study-guides-get-restv1studiewijzers) 28 | - [Subjects: `GET /rest/v1/vakken`](#subjects-get-restv1vakken) 29 | - [User Account: `GET /rest/v1/account`](#account-get-restv1account--get-restv1accountid) 30 | - [School Years: `GET /rest/v1/schooljaren`](#schooljaren-get-restv1schooljaren--get-restv1schooljarenid) 31 | - [Vakkeuzes: `GET /rest/v1/vakkeuzes`](#vakkeuzes-get-restv1vakkeuzes) 32 | - [Waarnemingen: `GET /rest/v1/waarnemingen`](#waarnemingen-get-restv1waarnemingen) 33 | - [Messages: `GET /rest/v1/boodschappen/conversaties`](#messages-get-restv1boodschappenconversaties) 34 | - [Schoolgegevens: `GET /rest/v1/leerlingen/[id]/schoolgegevens`](#schoolgegevens-get-restv1idschoolgegevens) 35 | - [Vakanties: `GET /rest/v1/vakanties/leerling/[id]`](#vakanties-get-restv1vakantiesleerlingid) 36 | - [Studiemateriaal: `GET /rest/v1/vakken/studiemateriaal/[id]` & `GET rest/v1/vakken/studiemateriaal/[id]/vak/[uuid]` & `/rest/v1/studiemateriaal/algemeen/[id]`](#studiemateriaal-get-restv1vakkenstudiemateriaalid--get-restv1vakkenstudiemateriaalidvakuuid--restv1studiemateriaalalgemeenid) 37 | - [ICalendar: `GET /rest/v1/icalendar`](#icalendar-get-restv1icalendar) 38 | - [ICalendar: `DELETE /rest/v1/icalendar`](#icalendar-delete-restv1icalendar) 39 | - [Homework](Homework.md) 40 | - [1. Homework from appointments: `GET /rest/v1/studiewijzeritemafspraaktoekenningen`](Homework.md#1-homework-from-appointments-get-restv1studiewijzeritemafspraaktoekenningen) 41 | - [2. Homework from days: `GET /rest/v1/studiewijzeritemdagtoekenningen`](Homework.md#2-homework-from-days-get-restv1studiewijzeritemdagtoekenningen) 42 | - [3. Homework from weeks: `GET /rest/v1/studiewijzeritemweektoekenningen`](Homework.md#3-homework-from-weeks-get-restv1studiewijzeritemweektoekenningen)

43 | - [1. Homework Made `PUT /rest/v1/swigemaakt/[id]`](Homework.md#1-homework-made-put-restv1swigemaaktid) 44 | - [2. Homework Made `PUT /rest/v1/swigemaakt/cou`](Homework.md#2-homework-made-put-restv1swigemaaktcou) 45 | 46 | 47 | 48 | 49 | 50 | ## Some miscellaneous stuff 51 |
Click to open miscellaneous stuff 52 | 53 | 54 | - Endpoint for the API is returned when you fetch the access token 55 | - Always include the header "Accept" with the value of "application/json" so you won't get XML. (except if you want XML :-) ) (the authentication stuff always returns JSON)

56 | 57 | - you can do sample requests using curl, for example: 58 | 59 | ```bash 60 | curl http://example.com/user/blah?active=true&limit=3 -d "key=value&otherkey=value" -H "AHeader: Value" 61 | ``` 62 | 63 | which will be listed here as 64 | 65 | | Name | Type | Value | 66 | |----------|--------|-------| 67 | | id | URL | blah | 68 | | active | Query | true | 69 | | limit | Query | 3 | 70 | | key | Body | value | 71 | | otherkey | Body | value | 72 | | AHeader | Header | Value | 73 | 74 | When there is a value that is unique to you (like username, password, or token), it will have a value like `[username]` 75 | 76 | I don't recommend using curl in your programming language, except for PHP but even there it's a pain. There are much better libraries. 77 | 78 |
A list of libraries for your language 79 | 80 | JavaScript: [window.fetch](https://developers.google.com/web/updates/2015/03/introduction-to-fetch)
81 | NodeJS: [node-fetch](https://github.com/bitinn/node-fetch), [HTTP from stdlib](https://nodejs.org/api/http.html), [Request](https://github.com/request/request), [Axios](https://github.com/axios/axios)
82 | Go: [net/http](https://golang.org/pkg/net/http/)
83 | Ruby: [Faraday](https://github.com/lostisland/faraday), [HTTParty](https://github.com/jnunemaker/httparty)
84 | Python: [requests](http://docs.python-requests.org/en/master/)
85 | 86 | Please add more if you know more. 87 | 88 |
89 | 90 |
91 | 92 | ## Fetching information 93 | 94 | baseurl: returned when you fetch a token (`somtoday_api_url`), usually [lowercase snakecased schoolname]-api.somtoday.nl 95 | 96 | All routes here are prefixed with that baseurl. 97 | 98 | ### Current student(s): `GET /rest/v1/leerlingen` 99 |
Click to open 100 | 101 | This REST method might return multiple students (I cannot test), since it says /leerlingen (Dutch plural for student). 102 | 103 | I suppose it returns all students the current user has access to (so if a school administrator runs it, it will return all students on the school). 104 | 105 | #### Parameters 106 | 107 | | Name | Type | Value | 108 | |---------------|-----------|-----------------------| 109 | | Authorization | Header | Bearer [access_token] | 110 | | additional | Parameter | pasfoto | 111 | 112 | The additional parameter is an optional GET parameter. 113 | 114 | #### Returns 115 | 116 | Depending on the additional parameters, some of the items in the result may not be present. Assuming `pasfoto` is set: 117 | 118 | ```json 119 | { 120 | "items": [ 121 | { 122 | "$type": "leerling.RLeerling", 123 | "links": [ 124 | { 125 | "id": 1234, 126 | "rel": "self", 127 | "type": "leerling.RLeerling", 128 | "href": "https://bonhoeffer-api.somtoday.nl/rest/v1/leerlingen/1234" 129 | } 130 | ], 131 | "permissions": [ 132 | { 133 | "full": "leerling.RLeerlingPrimer:READ:INSTANCE(1234)", 134 | "type": "leerling.RLeerlingPrimer", 135 | "operations": ["READ"], 136 | "instances": ["INSTANCE(1234)"] 137 | } 138 | ], 139 | "additionalObjects": { 140 | "pasfoto": { 141 | "$type": "leerling.RLeerlingpasfoto", 142 | "links": [ 143 | { 144 | "id": 1234, 145 | "rel": "self" 146 | } 147 | ], 148 | "permissions": [], 149 | "additionalObjects": {}, 150 | "datauri": "" 151 | } 152 | }, 153 | "leerlingnummer": 450000, 154 | "roepnaam": "Eli", 155 | "achternaam": "Saado", 156 | "email": "450000@live.bc-enschede.nl", 157 | "mobielNummer": "06-00000000", 158 | "geboortedatum": "2000-00-00", 159 | "geslacht": "Man" 160 | } 161 | ] 162 | } 163 | ``` 164 | 165 | #### Example 166 | 167 | ```bash 168 | token='' school_url=https://bonhoeffer-api.somtoday.nl 169 | curl "$school_url/rest/v1/leerlingen" -H "Authorization: Bearer $token" -H "Accept: application/json" 170 | ``` 171 | 172 | --- 173 | 174 | ### Student by ID: `GET /rest/v1/leerlingen/[id]` 175 | 176 | #### Parameters 177 | 178 | | Name | Type | Value | 179 | |---------------|--------|-----------------------| 180 | | id | URL | [user id] | 181 | | Authorization | Header | Bearer [access_token] | 182 | 183 | #### Returns 184 | 185 | ```json 186 | { 187 | "links": [ 188 | { 189 | "id": 1234, 190 | "rel": "self", 191 | "type": "leerling.RLeerling", 192 | "href": "https://bonhoeffer-api.somtoday.nl/rest/v1/leerlingen/1234" 193 | } 194 | ], 195 | "permissions": [ 196 | { 197 | "full": "leerling.RLeerlingPrimer:READ:INSTANCE(1234)", 198 | "type": "leerling.RLeerlingPrimer", 199 | "operations": ["READ"], 200 | "instances": ["INSTANCE(1234)"] 201 | } 202 | ], 203 | "additionalObjects": {}, 204 | "leerlingnummer": 450000, 205 | "roepnaam": "Eli", 206 | "achternaam": "Saado", 207 | "email": "450000@live.bc-enschede.nl", 208 | "mobielNummer": "06-00000000", 209 | "geboortedatum": "2000-00-00", 210 | "geslacht": "Man" 211 | } 212 | ``` 213 | 214 | #### Example 215 | 216 | ```bash 217 | token='' school_url=https://bonhoeffer-api.somtoday.nl id=1234 218 | curl "$school_url/rest/v1/leerlingen/$id" -H "Authorization: Bearer $token" -H "Accept: application/json" 219 | ``` 220 | 221 |
222 | 223 | ### Grades: `GET /rest/v1/resultaten/huidigVoorLeerling/[id]` 224 |
Click to open 225 | 226 | Fetches the grades of the student. Note that all average grades are also grade items returned by the API. There are the different types of columns: the `type` property in the json (e.g. 'Toetskolom', 'ToetssoortGemiddeldeKolom'). 227 | 228 | #### Parameters 229 | 230 | | Name | Type | Value | 231 | |---------------|-----------|---------------------------------| 232 | | id | URL | [user id] | 233 | | Authorization | Header | Bearer [access_token] | 234 | | Range | Header | items=[LowerBound]-[UpperBound] | 235 | | additional | Parameter | berekendRapportCijfer | 236 | | additional | Parameter | samengesteldeToetskolomId | 237 | | additional | Parameter | resultaatkolomId | 238 | | additional | Parameter | cijferkolomId | 239 | | additional | Parameter | toetssoortnaam | 240 | | additional | Parameter | huidigeAnderVakKolommen | 241 | 242 | These LowerBound and UpperBound values are the amount of grades you want to request (the API uses pagination here). The value may not exceed 100, so the way to request **all** grades is by doing the following: 243 | 244 | 1. Request 0-99 245 | 2. Request 100-199 246 | 3. Request 200-299 247 | 4. Request .00-.99 248 | 5. Continue until the response contains less than 99 records 249 | 6. Profit! 250 | 251 | #### Returns 252 | 253 | ```js 254 | { 255 | "items": [ 256 | { 257 | "$type": "resultaten.RResultaat", 258 | "links": [ 259 | { 260 | "id": 1234, 261 | "rel": "self", 262 | "type": "resultaten.RResultaat", 263 | "href": "https://api.somtoday.nl/rest/v1/resultaten/1234" 264 | } 265 | ], 266 | "permissions": [ 267 | { 268 | "full": "resultaten.RResultaat:READ:INSTANCE()", 269 | "type": "resultaten.RResultaat", 270 | "operations": [ 271 | "READ" 272 | ], 273 | "instances": [ 274 | "INSTANCE()" 275 | ] 276 | } 277 | ], 278 | "additionalObjects": {}, 279 | "herkansingstype": "Geen", 280 | "resultaat": "7.9", 281 | "geldendResultaat": "7.9", 282 | "datumInvoer": "2019-09-10T13:41:11.805+02:00", 283 | "teltNietmee": false, 284 | "toetsNietGemaakt": false, 285 | "leerjaar": 0, 286 | "periode": 0, 287 | "examenWeging": 0, 288 | "isExamendossierResultaat": true, 289 | "isVoortgangsdossierResultaat": false, 290 | "type": "ToetssoortGemiddeldeKolom", 291 | "vak": { 292 | "links": [ 293 | { 294 | "id": 1234, 295 | "rel": "self", 296 | "type": "onderwijsinrichting.RVak", 297 | "href": "https://api.somtoday.nl/rest/v1/vakken/1234" 298 | } 299 | ], 300 | "permissions": [ 301 | { 302 | "full": "onderwijsinrichting.RVak:READ:INSTANCE()", 303 | "type": "onderwijsinrichting.RVak", 304 | "operations": [ 305 | "READ" 306 | ], 307 | "instances": [ 308 | "INSTANCE()" 309 | ] 310 | } 311 | ], 312 | "additionalObjects": {}, 313 | "afkorting": "ckv", 314 | "naam": "culturele en kunstzinnige vorming" 315 | }, 316 | "leerling": { 317 | "links": [ 318 | { 319 | "id": 1234, 320 | "rel": "self", 321 | "type": "leerling.RLeerlingPrimer", 322 | "href": "https://api.somtoday.nl/rest/v1/leerlingen/1234" 323 | } 324 | ], 325 | "permissions": [ 326 | { 327 | "full": "leerling.RLeerlingPrimer:READ:INSTANCE()", 328 | "type": "leerling.RLeerlingPrimer", 329 | "operations": [ 330 | "READ" 331 | ], 332 | "instances": [ 333 | "INSTANCE()" 334 | ] 335 | } 336 | ], 337 | "additionalObjects": {}, 338 | "UUID": "070dabd4-3449-4af3-8c38-788faac283a3", 339 | "leerlingnummer": 1234, 340 | "roepnaam": "", 341 | "voorvoegsel": "", 342 | "achternaam": "" 343 | } 344 | }, 345 | ... 346 | } 347 | ``` 348 | 349 |
350 | 351 | ### Schedule: `GET /rest/v1/afspraken` 352 |
Click to open 353 | 354 | Fetch the appointments from the schedule of the student. 355 | 356 | #### Parameters 357 | 358 | | Name | Type | Value | 359 | |---------------|-----------|-----------------------| 360 | | Authorization | Header | Bearer [access_token] | 361 | | sort | Parameter | asc-id | 362 | | additional | Parameter | vak | 363 | | additional | Parameter | docentAfkortingen | 364 | | additional | Parameter | leerlingen | 365 | | begindatum | Parameter | yyyy-MM-dd | 366 | | einddatum | Parameter | yyyy-MM-dd | 367 | 368 | #### Returns 369 | 370 | ```json 371 | { 372 | "items": [ 373 | { 374 | "$type": "participatie.RAfspraak", 375 | "links": [ 376 | { 377 | "id": 8849104409, 378 | "rel": "self", 379 | "type": "participatie.RAfspraak", 380 | "href": "AFSPRAAK_URL" 381 | } 382 | ], 383 | "permissions": [ 384 | { 385 | "full": "participatie.RAfspraak:READ:INSTANCE(8849104409)", 386 | "type": "participatie.RAfspraak", 387 | "operations": ["READ"], 388 | "instances": ["INSTANCE(8849104409)"] 389 | } 390 | ], 391 | "additionalObjects": { 392 | "vak": { 393 | "$type": "onderwijsinrichting.RVak", 394 | "links": [ 395 | { 396 | "id": 126211284, 397 | "rel": "self", 398 | "type": "onderwijsinrichting.RVak", 399 | "href": "VAK_URL" 400 | } 401 | ], 402 | "permissions": [ 403 | { 404 | "full": "onderwijsinrichting.RVak:READ:INSTANCE(126211284)", 405 | "type": "onderwijsinrichting.RVak", 406 | "operations": ["READ"], 407 | "instances": ["INSTANCE(126211284)"] 408 | } 409 | ], 410 | "additionalObjects": {}, 411 | "afkorting": "wisB", 412 | "naam": "wiskunde B" 413 | }, 414 | "docentAfkortingen": "Stk", 415 | "leerlingen": { 416 | "$type": "LinkableWrapper", 417 | "items": [ 418 | { 419 | "$type": "leerling.RLeerlingPrimer", 420 | "links": [ 421 | { 422 | "id": 546308480, 423 | "rel": "self", 424 | "type": "leerling.RLeerlingPrimer", 425 | "href": "LEERLING_URL" 426 | } 427 | ], 428 | "permissions": [ 429 | { 430 | "full": "leerling.RLeerlingPrimer:READ:INSTANCE(546308480)", 431 | "type": "leerling.RLeerlingPrimer", 432 | "operations": ["READ"], 433 | "instances": ["INSTANCE(546308480)"] 434 | } 435 | ], 436 | "additionalObjects": {}, 437 | "UUID": "UUID", 438 | "leerlingnummer": 119371, 439 | "roepnaam": "Christos", 440 | "achternaam": "Karapasias" 441 | } 442 | ] 443 | } 444 | }, 445 | "afspraakType": { 446 | "links": [ 447 | { 448 | "id": 144662674, 449 | "rel": "self", 450 | "type": "participatie.RAfspraakType", 451 | "href": "AFSPRAAK_TYPE_URL" 452 | } 453 | ], 454 | "permissions": [ 455 | { 456 | "full": "participatie.RAfspraakType:READ:INSTANCE(144662674)", 457 | "type": "participatie.RAfspraakType", 458 | "operations": ["READ"], 459 | "instances": ["INSTANCE(144662674)"] 460 | } 461 | ], 462 | "additionalObjects": {}, 463 | "naam": "Les", 464 | "omschrijving": "Les", 465 | "standaardKleur": -2394583, 466 | "categorie": "Rooster", 467 | "activiteit": "Verplicht", 468 | "percentageIIVO": 0, 469 | "presentieRegistratieDefault": true, 470 | "actief": true, 471 | "vestiging": { 472 | "$type": "instelling.RVestiging", 473 | "links": [ 474 | { 475 | "id": 126208855, 476 | "rel": "self", 477 | "type": "instelling.RVestiging", 478 | "href": "VESTIGING_URL" 479 | } 480 | ], 481 | "permissions": [ 482 | { 483 | "full": "instelling.RVestiging:READ:INSTANCE(126208855)", 484 | "type": "instelling.RVestiging", 485 | "operations": ["READ"], 486 | "instances": ["INSTANCE(126208855)"] 487 | } 488 | ], 489 | "additionalObjects": {}, 490 | "naam": "Fortes Lyceum" 491 | } 492 | }, 493 | "locatie": "217", 494 | "beginDatumTijd": "2020-05-04T11:15:00.000+02:00", 495 | "eindDatumTijd": "2020-05-04T12:00:00.000+02:00", 496 | "beginLesuur": 4, 497 | "eindLesuur": 4, 498 | "titel": "217 - A5wisB_2 - Stk", 499 | "omschrijving": "217 - A5wisB_2 - Stk", 500 | "presentieRegistratieVerplicht": true, 501 | "presentieRegistratieVerwerkt": false, 502 | "afspraakStatus": "ACTIEF", 503 | "vestiging": { 504 | "links": [ 505 | { 506 | "id": 126208855, 507 | "rel": "self", 508 | "type": "instelling.RVestiging", 509 | "href": "VESTIGING_URL" 510 | } 511 | ], 512 | "permissions": [ 513 | { 514 | "full": "instelling.RVestiging:READ:INSTANCE(126208855)", 515 | "type": "instelling.RVestiging", 516 | "operations": ["READ"], 517 | "instances": ["INSTANCE(126208855)"] 518 | } 519 | ], 520 | "additionalObjects": {}, 521 | "naam": "SCHOOL_NAAM" 522 | } 523 | } 524 | ] 525 | } 526 | ``` 527 | 528 | #### Example 529 | 530 | ```bash 531 | curl "$school_url/rest/v1/afspraken?sort=asc-id&additional=vak&additional=docentAfkortingen&additional=leerlingen&begindatum=2020-05-01&einddatum=2020-05-19" -H "Authorization: Bearer $token" -H "Accept: application/json" 532 | ``` 533 | 534 |
535 | 536 | ### Absence Reports: `GET /rest/v1/absentiemeldingen` 537 |
Click to open 538 | 539 | Fetches the absence reports of the user 540 | 541 | #### Parameters 542 | 543 | | Name | Type | Value | 544 | |----------------|-----------|-----------------------| 545 | | Authorization | Header | Bearer [access_token] | 546 | | begindatumtijd | Parameter | yyyy-MM-dd | 547 | | einddatumtijd | Parameter | yyyy-MM-dd | 548 | 549 | #### Returns 550 | 551 | Array of absance reports 552 | 553 | ```json 554 | { 555 | "items": [ 556 | { 557 | "$type": "participatie.RAbsentieMelding", 558 | "links": [ 559 | { 560 | "id": 1234567890123, 561 | "rel": "self", 562 | "type": "participatie.RAbsentieMelding", 563 | "href": "{{api_url}}/rest/v1/waarnemingen/1234567890123" 564 | } 565 | ], 566 | "permissions": [], 567 | "additionalObjects": {}, 568 | "leerling": { 569 | "links": [ 570 | { 571 | "id": 1234567890, 572 | "rel": "self", 573 | "type": "leerling.RLeerlingPrimer", 574 | "href": "{{api_url}}/rest/v1/leerlingen/1234567890" 575 | } 576 | ], 577 | "permissions": [], 578 | "additionalObjects": {}, 579 | "UUID": "12abc34e-12a3-1a2b-a1b2-1a2b34cd5e67", 580 | "leerlingnummer": 100000, 581 | "roepnaam": "Name", 582 | "achternaam": "Name" 583 | }, 584 | "absentieReden": { 585 | "links": [ 586 | { 587 | "id": 1234567890, 588 | "rel": "self", 589 | "type": "participatie.RAbsentieRedenPrimer", 590 | "href": "{{api_url}}/rest/v1/absentieredenen/1234567890" 591 | } 592 | ], 593 | "permissions": [], 594 | "additionalObjects": {}, 595 | "absentieSoort": "Absent", 596 | "afkorting": "XC", 597 | "omschrijving": "Onbekend", 598 | "geoorloofd": false 599 | }, 600 | "datumTijdInvoer": "yyyy-MM-dd'T'HH:mm:ss.SSS+HH:mm", 601 | "beginDatumTijd": "yyyy-MM-dd'T'HH:mm:ss.SSS+HH:mm", 602 | "eindDatumTijd": "yyyy-MM-dd'T'HH:mm:ss.SSS+HH:mm", 603 | "beginLesuur": 3, 604 | "eindLesuur": 3, 605 | "afgehandeld": true, 606 | "eigenaar": { 607 | "links": [ 608 | { 609 | "id": 1234567890, 610 | "rel": "self", 611 | "type": "medewerker.RMedewerker", 612 | "href": "{{api_url}}/rest/v1/medewerkers/1234567890" 613 | } 614 | ], 615 | "permissions": [], 616 | "additionalObjects": {}, 617 | "UUID": "12abc34e-12a3-1a2b-a1b2-1a2b34cd5e67", 618 | "nummer": 100000, 619 | "afkorting": "HH", 620 | "achternaam": "Henk", 621 | "geslacht": "MAN", 622 | "voorletters": "H.H.", 623 | "roepnaam": "Hans" 624 | } 625 | } 626 | ] 627 | } 628 | ``` 629 |
630 | 631 | ### Study Guides: `GET /rest/v1/studiewijzers` 632 |
Click to open 633 | 634 | Fetches the study guides for the user 635 | 636 | #### Parameters 637 | 638 | | Name | Type | Value | 639 | |---------------|-----------|-----------------------| 640 | | Authorization | Header | Bearer [access_token] | 641 | | additional | Parameter | leerlingen | 642 | | additional | Parameter | bijlagen | 643 | | additional | Parameter | externeMaterialen | 644 | | additional | Parameter | bijlageMappen | 645 | 646 | The additional parameters are optional GET parameters to include information in the result. `leerlingen` will only give back 1 result when queried by a student, but will fetch all students when queried by a teacher/school admin. 647 | 648 | #### Returns 649 | 650 | Depending on the additional parameters, some of the items in the result may not be present. Assuming all 4 are set: 651 | 652 | ```json 653 | { 654 | "items": [ 655 | { 656 | "$type": "studiewijzer.RStudiewijzer", 657 | "links": [ 658 | { 659 | "id": 3709468886305, 660 | "rel": "self", 661 | "type": "studiewijzer.RStudiewijzer", 662 | "href": "https://api.somtoday.nl/rest/v1/studiewijzers/3709468886305" 663 | } 664 | ], 665 | "permissions": [ 666 | { 667 | "full": "studiewijzer.RStudiewijzer:READ:INSTANCE(3709468886305)", 668 | "type": "studiewijzer.RStudiewijzer", 669 | "operations": [ 670 | "READ" 671 | ], 672 | "instances": [ 673 | "INSTANCE(3709468886305)" 674 | ] 675 | } 676 | ], 677 | "additionalObjects": { 678 | "bijlageMappen": { 679 | "$type": "LinkableWrapper", 680 | "items": [] 681 | }, 682 | "bijlagen": { 683 | "$type": "LinkableWrapper", 684 | "items": [] 685 | }, 686 | "leerlingen": { 687 | "$type": "LinkableWrapper", 688 | "items": [ 689 | { 690 | "$type": "leerling.RLeerlingPrimer", 691 | "links": [ 692 | { 693 | "id": 9496745174, 694 | "rel": "self", 695 | "type": "leerling.RLeerlingPrimer", 696 | "href": "https://api.somtoday.nl/rest/v1/leerlingen/9496745174" 697 | } 698 | ], 699 | "permissions": [ 700 | { 701 | "full": "leerling.RLeerlingPrimer:READ:INSTANCE(9496745174)", 702 | "type": "leerling.RLeerlingPrimer", 703 | "operations": [ 704 | "READ" 705 | ], 706 | "instances": [ 707 | "INSTANCE(9496745174)" 708 | ] 709 | } 710 | ], 711 | "additionalObjects": {}, 712 | "UUID": "f8cf6f6c-c213-4526-8ba1-6a306cf724a4", 713 | "leerlingnummer": 123456, 714 | "roepnaam": "{{first_name}}", 715 | "achternaam": "{{last_name}}" 716 | } 717 | ] 718 | }, 719 | "externeMaterialen": { 720 | "$type": "LinkableWrapper", 721 | "items": [] 722 | } 723 | }, 724 | "uuid": "4d2188a0-03d8-4dca-9f51-0e54d3c353c6", 725 | "naam": "vwo5.schka", 726 | "vestiging": { 727 | "links": [ 728 | { 729 | "id": 9496567717, 730 | "rel": "self", 731 | "type": "instelling.RVestiging", 732 | "href": "https://api.somtoday.nl/rest/v1/vestigingen/9496567717" 733 | } 734 | ], 735 | "permissions": [ 736 | { 737 | "full": "instelling.RVestiging:READ:INSTANCE(9496567717)", 738 | "type": "instelling.RVestiging", 739 | "operations": [ 740 | "READ" 741 | ], 742 | "instances": [ 743 | "INSTANCE(9496567717)" 744 | ] 745 | } 746 | ], 747 | "additionalObjects": {}, 748 | "naam": "Stella Maris College Meerssen" 749 | }, 750 | "lesgroep": { 751 | "links": [ 752 | { 753 | "id": 3543707887108, 754 | "rel": "self", 755 | "type": "lesgroep.RLesgroep", 756 | "href": "https://api.somtoday.nl/rest/v1/lesgroepen/3543707887108" 757 | } 758 | ], 759 | "permissions": [ 760 | { 761 | "full": "lesgroep.RLesgroep:READ:INSTANCE(3543707887108)", 762 | "type": "lesgroep.RLesgroep", 763 | "operations": [ 764 | "READ" 765 | ], 766 | "instances": [ 767 | "INSTANCE(3543707887108)" 768 | ] 769 | } 770 | ], 771 | "additionalObjects": {}, 772 | "UUID": "d4afb5b8-fbf6-4bbd-ac73-cb50cc883392", 773 | "naam": "vwo5.schka", 774 | "schooljaar": { 775 | "$type": "onderwijsinrichting.RSchooljaar", 776 | "links": [ 777 | { 778 | "id": 40851957, 779 | "rel": "self", 780 | "type": "onderwijsinrichting.RSchooljaar", 781 | "href": "https://api.somtoday.nl/rest/v1/schooljaren/40851957" 782 | } 783 | ], 784 | "permissions": [ 785 | { 786 | "full": "onderwijsinrichting.RSchooljaar:READ:INSTANCE(40851957)", 787 | "type": "onderwijsinrichting.RSchooljaar", 788 | "operations": [ 789 | "READ" 790 | ], 791 | "instances": [ 792 | "INSTANCE(40851957)" 793 | ] 794 | } 795 | ], 796 | "additionalObjects": {}, 797 | "naam": "2021/2022", 798 | "vanafDatum": "2021-08-01", 799 | "totDatum": "2022-07-31", 800 | "isHuidig": true 801 | }, 802 | "vak": { 803 | "links": [ 804 | { 805 | "id": 9505018979, 806 | "rel": "self", 807 | "type": "onderwijsinrichting.RVak", 808 | "href": "https://api.somtoday.nl/rest/v1/vakken/9505018979" 809 | } 810 | ], 811 | "permissions": [ 812 | { 813 | "full": "onderwijsinrichting.RVak:READ:INSTANCE(9505018979)", 814 | "type": "onderwijsinrichting.RVak", 815 | "operations": [ 816 | "READ" 817 | ], 818 | "instances": [ 819 | "INSTANCE(9505018979)" 820 | ] 821 | } 822 | ], 823 | "additionalObjects": {}, 824 | "afkorting": "schk", 825 | "naam": "Scheikunde" 826 | }, 827 | "heeftStamgroep": false, 828 | "examendossierOndersteund": true, 829 | "vestiging": { 830 | "links": [ 831 | { 832 | "id": 9496567717, 833 | "rel": "self", 834 | "type": "instelling.RVestiging", 835 | "href": "https://api.somtoday.nl/rest/v1/vestigingen/9496567717" 836 | } 837 | ], 838 | "permissions": [ 839 | { 840 | "full": "instelling.RVestiging:READ:INSTANCE(9496567717)", 841 | "type": "instelling.RVestiging", 842 | "operations": [ 843 | "READ" 844 | ], 845 | "instances": [ 846 | "INSTANCE(9496567717)" 847 | ] 848 | } 849 | ], 850 | "additionalObjects": {}, 851 | "naam": "Stella Maris College Meerssen" 852 | } 853 | } 854 | } 855 | ... 856 | ] 857 | } 858 | ``` 859 | 860 |
861 | 862 | ### Subjects: `GET /rest/v1/vakken` 863 |
Click to open 864 | 865 | Fetches the subjects for the user 866 | 867 | #### Parameters 868 | 869 | | Name | Type | Value | 870 | |---------------|--------|-----------------------| 871 | | Authorization | Header | Bearer [access_token] | 872 | 873 | #### Returns 874 | 875 | ```json 876 | { 877 | "items": [ 878 | { 879 | "$type": "onderwijsinrichting.RVak", 880 | "links": [ 881 | { 882 | "id": 123456789, 883 | "rel": "self", 884 | "type": "onderwijsinrichting.RVak", 885 | "href": "https://api.somtoday.nl/rest/v1/vakken/123456789" 886 | } 887 | ], 888 | "permissions": [ 889 | { 890 | "full": "onderwijsinrichting.RVak:READ:INSTANCE(123456789)", 891 | "type": "onderwijsinrichting.RVak", 892 | "operations": [ 893 | "READ" 894 | ], 895 | "instances": [ 896 | "INSTANCE(123456789)" 897 | ] 898 | } 899 | ], 900 | "additionalObjects": {}, 901 | "afkorting": "", 902 | "naam": "" 903 | } 904 | ... 905 | ] 906 | } 907 | ``` 908 | 909 |
910 | 911 | ### Account: `GET /rest/v1/account/` / `GET /rest/v1/account/[id]` / `GET /rest/v1/account/me` 912 |
Click to open 913 | 914 | Fetches information about the account that is connected with the Somtoday access token 915 | 916 | #### Parameters 917 | 918 | | Name | Type | Value | 919 | |---------------|-----------|-----------------------| 920 | | id | URL | [user-id] | 921 | | Authorization | Header | Bearer [access_token] | 922 | | additional | Parameter | restricties | 923 | 924 | 925 | #### Returns 926 | 927 | 928 | 929 | ```json 930 | { 931 | "items": [ 932 | { 933 | "$type": "auth.RAccount", 934 | "links": [ 935 | { 936 | "id": 1234567890, 937 | "rel": "self", 938 | "type": "auth.RAccount", 939 | "href": "https://api.somtoday.nl/rest/v1/account/1234567890" 940 | } 941 | ], 942 | "permissions": [ 943 | { 944 | "full": "auth.RAccount:READ:INSTANCE(1234567890)", 945 | "type": "auth.RAccount", 946 | "operations": [ 947 | "READ" 948 | ], 949 | "instances": [ 950 | "INSTANCE(1234567890)" 951 | ] 952 | } 953 | ], 954 | "additionalObjects": { 955 | "restricties": { 956 | "$type": "LinkableWrapper", 957 | "items": [ 958 | { 959 | "$type": "restricties.REloRestricties", 960 | "links": [], 961 | "permissions": [], 962 | "additionalObjects": {}, 963 | "vestigingsId": REDACTED, 964 | "leerlingId": REDACTED, 965 | "mobieleAppAan": true, 966 | "studiewijzerAan": true, 967 | "berichtenVerzendenAan": false, 968 | "leermiddelenAan": true, 969 | "adviezenTokenAan": true, 970 | "opmerkingRapportCijferTonenAan": true, 971 | "periodeGemiddeldeTonenResultaatAan": true, 972 | "rapportGemiddeldeTonenResultaatAan": true, 973 | "rapportCijferTonenResultaatAan": true, 974 | "toetssoortgemiddeldenAan": true, 975 | "seResultaatAan": true, 976 | "stamgroepLeerjaarAan": true, 977 | "emailWijzigenAan": false, 978 | "mobielWijzigenAan": false, 979 | "wachtwoordWijzigenAan": true, 980 | "absentiesBekijkenAan": true, 981 | "absentieConstateringBekijkenAan": true, 982 | "absentieMaatregelBekijkenAan": true, 983 | "absentieMeldingBekijkenAan": true, 984 | "berichtenBekijkenAan": true, 985 | "cijfersBekijkenAan": true, 986 | "huiswerkBekijkenAan": true, 987 | "nieuwsBekijkenAan": true, 988 | "pasfotoLeerlingTonenAan": true, 989 | "pasfotoMedewerkerTonenAan": false, 990 | "profielBekijkenAan": true, 991 | "roosterBekijkenAan": true, 992 | "roosterBeschikbaarIcalAan": true, 993 | "vakkenBekijkenAan": true, 994 | "lesurenVerbergenSettingAan": false 995 | } 996 | ] 997 | } 998 | }, 999 | "gebruikersnaam": "[REDACTED]", 1000 | "accountPermissions": [], 1001 | "persoon": { 1002 | "$type": "leerling.RLeerlingPrimer", 1003 | "links": [ 1004 | { 1005 | "id": "0123456789", 1006 | "rel": "self", 1007 | "type": "leerling.RLeerlingPrimer", 1008 | "href": "https://api.somtoday.nl/rest/v1/leerlingen/0123456789" 1009 | } 1010 | ], 1011 | "permissions": [ 1012 | { 1013 | "full": "leerling.RLeerlingPrimer:READ:INSTANCE(1409824200)", 1014 | "type": "leerling.RLeerlingPrimer", 1015 | "operations": [ 1016 | "READ" 1017 | ], 1018 | "instances": [ 1019 | "INSTANCE(0123456789)" 1020 | ] 1021 | } 1022 | ], 1023 | "additionalObjects": {}, 1024 | "UUID": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", 1025 | "leerlingnummer": 100000, 1026 | "roepnaam": "Name", 1027 | "voorvoegsel": "Name", 1028 | "achternaam": "Name" 1029 | } 1030 | } 1031 | ] 1032 | } 1033 | ``` 1034 | 1035 |
1036 | 1037 | ### Schooljaren: `GET /rest/v1/schooljaren` / `GET /rest/v1/schooljaren/[id]` 1038 |
Click to open 1039 | 1040 | Fetches information about a school year 1041 | 1042 | #### Parameters 1043 | 1044 | | Name | Type | Value | 1045 | |---------------|--------|-----------------------| 1046 | | id | URL | [id] | 1047 | | id | URL | huidig | 1048 | | Authorization | Header | Bearer [access_token] | 1049 | 1050 | When you want info about the current school year add /huidig to the url 1051 | 1052 | #### Returns 1053 | 1054 | ```json 1055 | { 1056 | "items": [ 1057 | { 1058 | "$type": "onderwijsinrichting.RSchooljaar", 1059 | "links": [ 1060 | { 1061 | "id": 40851958, //this id is for everyone the same (in this case for year 2022/2023) 1062 | "rel": "self", 1063 | "type": "onderwijsinrichting.RSchooljaar", 1064 | "href": "https://api.somtoday.nl/rest/v1/schooljaren/40851958" 1065 | } 1066 | ], 1067 | "permissions": [ 1068 | { 1069 | "full": "onderwijsinrichting.RSchooljaar:READ:INSTANCE(40851958)", 1070 | "type": "onderwijsinrichting.RSchooljaar", 1071 | "operations": [ 1072 | "READ" 1073 | ], 1074 | "instances": [ 1075 | "INSTANCE(40851958)" 1076 | ] 1077 | } 1078 | ], 1079 | "additionalObjects": {}, 1080 | "naam": "2022/2023", 1081 | "vanafDatum": "2022-08-01", 1082 | "totDatum": "2023-07-31", 1083 | "isHuidig": true 1084 | }, 1085 | ... 1086 | ] 1087 | } 1088 | ``` 1089 | 1090 |
1091 | 1092 | ### Vakkeuzes: `GET /rest/v1/vakkeuzes` 1093 |
Click to open 1094 | 1095 | Fetches all the subjects you are currently enrolled in. 1096 | 1097 | #### Parameters 1098 | 1099 | | Name | Type | Value | 1100 | |---------------|-----------|-----------------------| 1101 | | Authorization | Header | Bearer [access_token] | 1102 | | additional | Parameter | vaknormering | 1103 | | additional | Parameter | actiefOpPeildatum | 1104 | 1105 | #### Returns 1106 | 1107 | ```json 1108 | { 1109 | "items": [ 1110 | { 1111 | "$type": "onderwijsinrichting.RVakkeuze", 1112 | "links": [ 1113 | { 1114 | "id": xxxxxxxxxx, 1115 | "rel": "self", 1116 | "type": "onderwijsinrichting.RVakkeuze", 1117 | "href": "https://api.somtoday.nl/rest/v1/vakkeuzes/xxxxxxxxxx" 1118 | } 1119 | ], 1120 | "permissions": [ 1121 | { 1122 | "full": "onderwijsinrichting.RVakkeuze:READ:INSTANCE(xxxxxxxxxx)", 1123 | "type": "onderwijsinrichting.RVakkeuze", 1124 | "operations": [ 1125 | "READ" 1126 | ], 1127 | "instances": [ 1128 | "INSTANCE(xxxxxxxxxx)" 1129 | ] 1130 | } 1131 | ], 1132 | "additionalObjects": { 1133 | "vaknormering": { 1134 | "$type": "onderwijsinrichting.RVakNormering", 1135 | "vakId": yyyyyyyyyy, 1136 | "toetsnormering1": "Standaard", 1137 | "toetsnormering2": "Alternatief" 1138 | } 1139 | }, 1140 | "vak": { 1141 | "links": [ 1142 | { 1143 | "id": yyyyyyyyyy, 1144 | "rel": "self", 1145 | "type": "onderwijsinrichting.RVak", 1146 | "href": "https://api.somtoday.nl/rest/v1/vakken/yyyyyyyyyy" 1147 | } 1148 | ], 1149 | "permissions": [ 1150 | { 1151 | "full": "onderwijsinrichting.RVak:READ:INSTANCE(yyyyyyyyyy)", 1152 | "type": "onderwijsinrichting.RVak", 1153 | "operations": [ 1154 | "READ" 1155 | ], 1156 | "instances": [ 1157 | "INSTANCE(yyyyyyyyyy)" 1158 | ] 1159 | } 1160 | ], 1161 | "additionalObjects": {}, 1162 | "afkorting": "ne", 1163 | "naam": "Nederlandse taal" 1164 | } 1165 | }, 1166 | ... 1167 | ] 1168 | } 1169 | ``` 1170 | 1171 |
1172 | 1173 | ### Waarnemingen: `GET /rest/v1/waarnemingen` 1174 |
Click to open 1175 | 1176 | Fetches all the waarnemingen currently tied to your account, filter them by date, isGeoorloofd and/or waarnemingSoort. 1177 | 1178 | #### Parameters 1179 | 1180 | | Name | Type | Value | 1181 | |----------------------------|-----------|-----------------------| 1182 | | Authorization | Header | Bearer [access_token] | 1183 | | waarnemingSoort (optional) | Parameter | Afwezig/aanwezig | 1184 | | isGeoorloofd (optional) | Parameter | true/false | 1185 | 1186 | You can, if you want, provide dates to filter the results. If you don't provide any dates, it will return all the results. 1187 | You can either provide a date range or a single date. If you provide a single date, it will return all the results from that date. If you provide a date range, it will return all the results inbetween those dates. 1188 | 1189 | | Date types | Type | Value | 1190 | |-----------------|-----------|-------------| 1191 | | begintNaOfOp | Parameter | yyyy-MM-dd | 1192 | | OR | 1193 | | beginDatumTijd | Parameter | yyyy-MM-dd | 1194 | | eindDatumTijd | Parameter | yyyy-MM-dd | 1195 | 1196 | #### Returns 1197 | 1198 | ```json 1199 | { 1200 | "items": [ 1201 | { 1202 | "$type": "participatie.RWaarneming", 1203 | "links": [ 1204 | { 1205 | "id": 1234567891234, 1206 | "rel": "self", 1207 | "type": "participatie.RWaarneming", 1208 | "href": "https://api.somtoday.nl/rest/v1/waarnemingen/1234567891234" 1209 | } 1210 | ], 1211 | "permissions": [ 1212 | { 1213 | "full": "participatie.RWaarneming:READ:INSTANCE(1234567891234)", 1214 | "type": "participatie.RWaarneming", 1215 | "operations": [ 1216 | "READ" 1217 | ], 1218 | "instances": [ 1219 | "INSTANCE(1234567891234)" 1220 | ] 1221 | } 1222 | ], 1223 | "additionalObjects": {}, 1224 | "beginDatumTijd": "2023-01-09T11:05:00.000+01:00", 1225 | "eindDatumTijd": "2023-01-09T11:55:00.000+01:00", 1226 | "beginLesuur": 4, 1227 | "eindLesuur": 4, 1228 | "waarnemingSoort": "Aanwezig", 1229 | "leerling": { 1230 | "links": [ 1231 | { 1232 | "id": 1234567890, 1233 | "rel": "self", 1234 | "type": "leerling.RLeerlingPrimer", 1235 | "href": "https://api.somtoday.nl/rest/v1/leerlingen/1234567890" 1236 | } 1237 | ], 1238 | "permissions": [ 1239 | { 1240 | "full": "leerling.RLeerlingPrimer:READ:INSTANCE(1234567890)", 1241 | "type": "leerling.RLeerlingPrimer", 1242 | "operations": [ 1243 | "READ" 1244 | ], 1245 | "instances": [ 1246 | "INSTANCE(1234567890)" 1247 | ] 1248 | } 1249 | ], 1250 | "additionalObjects": {}, 1251 | "UUID": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", 1252 | "leerlingnummer": 100000, 1253 | "roepnaam": "Name", 1254 | "voorvoegsel": "Name", 1255 | "achternaam": "Name" 1256 | }, 1257 | "afspraak": { 1258 | "links": [ 1259 | { 1260 | "id": 12345678901345, 1261 | "rel": "self", 1262 | "type": "participatie.RAfspraakPrimer", 1263 | "href": "https://api.somtoday.nl/rest/v1/afspraken/12345678901345" 1264 | } 1265 | ], 1266 | "permissions": [ 1267 | { 1268 | "full": "participatie.RAfspraak:READ:INSTANCE(12345678901345)", 1269 | "type": "participatie.RAfspraak", 1270 | "operations": [ 1271 | "READ" 1272 | ], 1273 | "instances": [ 1274 | "INSTANCE(12345678901345)" 1275 | ] 1276 | } 1277 | ], 1278 | "additionalObjects": {}, 1279 | "afspraakType": { 1280 | "links": [ 1281 | { 1282 | "id": 1234567890, 1283 | "rel": "self", 1284 | "type": "participatie.RAfspraakType", 1285 | "href": "https://api.somtoday.nl/rest/v1/afspraaktype/1234567890" 1286 | } 1287 | ], 1288 | "permissions": [ 1289 | { 1290 | "full": "participatie.RAfspraakType:READ:INSTANCE(1234567890)", 1291 | "type": "participatie.RAfspraakType", 1292 | "operations": [ 1293 | "READ" 1294 | ], 1295 | "instances": [ 1296 | "INSTANCE(1234567890)" 1297 | ] 1298 | } 1299 | ], 1300 | "additionalObjects": {}, 1301 | "naam": "LES", 1302 | "omschrijving": "LES", 1303 | "standaardKleur": -16448251, 1304 | "categorie": "Rooster", 1305 | "activiteit": "Verplicht", 1306 | "percentageIIVO": 100, 1307 | "presentieRegistratieDefault": true, 1308 | "actief": true, 1309 | "vestiging": { 1310 | "$type": "instelling.RVestiging", 1311 | "links": [ 1312 | { 1313 | "id": 1234567890, 1314 | "rel": "self", 1315 | "type": "instelling.RVestiging", 1316 | "href": "https://api.somtoday.nl/rest/v1/vestigingen/1234567890" 1317 | } 1318 | ], 1319 | "permissions": [ 1320 | { 1321 | "full": "instelling.RVestiging:READ:INSTANCE(1234567890)", 1322 | "type": "instelling.RVestiging", 1323 | "operations": [ 1324 | "READ" 1325 | ], 1326 | "instances": [ 1327 | "INSTANCE(1234567890)" 1328 | ] 1329 | } 1330 | ], 1331 | "additionalObjects": {}, 1332 | "naam": "De super coole school", 1333 | } 1334 | }, 1335 | "locatie": "lokaal naam", 1336 | "beginDatumTijd": "2023-01-09T11:05:00.000+01:00", 1337 | "eindDatumTijd": "2023-01-09T11:55:00.000+01:00", 1338 | "beginLesuur": 4, 1339 | "eindLesuur": 4, 1340 | "titel": "titel" 1341 | }, 1342 | "afgehandeld": true, 1343 | "invoerDatum": "2023-01-09T11:09:08.000+01:00", 1344 | "laatstGewijzigdDatum": "2023-01-09T11:09:08.000+01:00", 1345 | "herkomst": "Medewerker", 1346 | "ingevoerdDoor": { 1347 | "links": [ 1348 | { 1349 | "id": 1234567890123, 1350 | "rel": "self", 1351 | "type": "medewerker.RMedewerkerPrimer", 1352 | "href": "https://api.somtoday.nl/rest/v1/medewerkers/1234567890123" 1353 | } 1354 | ], 1355 | "permissions": [], 1356 | "additionalObjects": {}, 1357 | "UUID": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", 1358 | "nummer": 12345678, 1359 | "afkorting": "afkorting", 1360 | "achternaam": "name", 1361 | "geslacht": "VROUW/MAN", 1362 | "voorletters": "voorletter(s)", 1363 | "roepnaam": "roepnaam" 1364 | }, 1365 | "laatstGewijzigdDoor": { 1366 | "links": [ 1367 | { 1368 | "id": 1234567890123, 1369 | "rel": "self", 1370 | "type": "medewerker.RMedewerkerPrimer", 1371 | "href": "https://api.somtoday.nl/rest/v1/medewerkers/1234567890123" 1372 | } 1373 | ], 1374 | "permissions": [], 1375 | "additionalObjects": {}, 1376 | "UUID": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", 1377 | "nummer": 12345678, 1378 | "afkorting": "afkorting", 1379 | "achternaam": "name", 1380 | "geslacht": "VROUW/MAN", 1381 | "voorletters": "voorletter(s)", 1382 | "roepnaam": "roepnaam" 1383 | } 1384 | }, 1385 | ... 1386 | ] 1387 | } 1388 | ``` 1389 |
1390 | 1391 | ### Messages: `GET /rest/v1/boodschappen/conversaties` 1392 |
Click to open 1393 | Fetches your SomToday messages/berichten. 1394 | 1395 | #### Parameters 1396 | 1397 | | Name | Type | Value | 1398 | |---------------|-----------|------------------------| 1399 | | Authorization | Header | Bearer [access_token] | 1400 | | additional | Parameter | verzondenDoorGebruiker | 1401 | | additional | Parameter | verzenderCorrespondent | 1402 | | additional | Parameter | aantalExtraOntvangers | 1403 | | additional | Parameter | actiefVoorGebruiker | 1404 | | alle | Parameter | true/false | 1405 | 1406 | #### Returns 1407 | ```json 1408 | { 1409 | "items":[ 1410 | { 1411 | "$type":"berichten.RBoodschapConversatie", 1412 | "boodschappen":[ 1413 | { 1414 | "links":[ 1415 | { 1416 | "id":1234567890, 1417 | "rel":"koppeling", 1418 | "type":"berichten.RBoodschap" 1419 | } 1420 | ], 1421 | "permissions":[], 1422 | "additionalObjects":{ 1423 | "aantalExtraOntvangers":0, 1424 | "verzondenDoorGebruiker":false, 1425 | "ontvangerCorrespondenten":{ 1426 | "$type":"NonLinkableWrapper", 1427 | "items":[ 1428 | { 1429 | "$type":"berichten.RBoodschapCorrespondent", 1430 | "naam":"REDACTED", 1431 | "vakken":[] 1432 | }, 1433 | { 1434 | "$type":"berichten.RBoodschapCorrespondent", 1435 | "naam":"REDACTED", 1436 | "vakken":[] 1437 | } 1438 | ] 1439 | }, 1440 | "verzenderCorrespondent":{ 1441 | "$type":"berichten.RBoodschapCorrespondent", 1442 | "naam":"REDACTED", 1443 | "sorteerNaam":"REDACTED", 1444 | "initialen":"REDACTED", 1445 | "vakken":[ 1446 | { 1447 | "links":[ 1448 | { 1449 | "id":1234567890, 1450 | "rel":"self", 1451 | "type":"onderwijsinrichting.RVak", 1452 | "href":"https://api.somtoday.nl/rest/v1/vakken/1234567890" 1453 | } 1454 | ], 1455 | "permissions":[ 1456 | { 1457 | "full":"onderwijsinrichting.RVak:READ,UPDATE,DELETE:INSTANCE(1234567890)", 1458 | "type":"onderwijsinrichting.RVak", 1459 | "operations":["READ","UPDATE","DELETE"], 1460 | "instances":["INSTANCE(1234567890)"] 1461 | } 1462 | ], 1463 | "additionalObjects":{}, 1464 | "afkorting":"schk", 1465 | "naam":"scheikunde", 1466 | "UUID":"UUID" 1467 | } 1468 | ] 1469 | }, 1470 | "actiefVoorGebruiker":true, 1471 | "isOuderavondUitnodiging":false 1472 | }, 1473 | "startPublicatie":"tijd", 1474 | "verzendDatum":"tijd", 1475 | "wijzigingsDatum":"tijd", 1476 | "draft":false, 1477 | "onderwerp":"REDACTED", 1478 | "inhoud":"REDACTED", 1479 | "prioriteit":"NORMAAL", 1480 | "notificatieType":"Bericht", 1481 | "bijlages":[ 1482 | { 1483 | "links":[ 1484 | { 1485 | "id":1234567890, 1486 | "rel":"koppeling", 1487 | "type":"berichten.RBoodschapBijlage" 1488 | } 1489 | ], 1490 | "permissions":[], 1491 | "additionalObjects":{}, 1492 | "assemblyResults":[ 1493 | { 1494 | "links":[ 1495 | { 1496 | "id":1234567890, 1497 | "rel":"koppeling", 1498 | "type":"cloudfiles.bestanden.RAssemblyResult" 1499 | } 1500 | ], 1501 | "permissions":[], 1502 | "additionalObjects":{}, 1503 | "assemblyFileType":"MISC", 1504 | "fileExtension":"xlsx", 1505 | "mimeType":"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", 1506 | "fileSize":11039, 1507 | "fileType":"office", 1508 | "fileUrl":"REDACTED.xlsx", 1509 | "sslUrl":"REDACTED.xlsx", 1510 | "fileName":"REDACTED.xlsx" 1511 | } 1512 | ], 1513 | "sortering":0 1514 | } 1515 | ] 1516 | } 1517 | ] 1518 | }, 1519 | ... 1520 | ] 1521 | } 1522 | ``` 1523 |
1524 | 1525 | ### Schoolgegevens: `GET /rest/v1/leerlingen/[id]/schoolgegevens` 1526 |
Click to open 1527 | 1528 | Fetches info about the school, including your mentor. 1529 | 1530 | #### Parameters 1531 | 1532 | | Name | Type | Value | 1533 | |---------------|--------|-----------------------| 1534 | | id | URL | [user id] | 1535 | | Authorization | Header | Bearer [access_token] | 1536 | 1537 | #### Returns 1538 | 1539 | ```json 1540 | { 1541 | "$type": "leerling.RLeerlingSchoolgegevens", 1542 | "instellingsnaam": "REDACTED", 1543 | "vestigingsnaam": "REDACTED", 1544 | "plaats": "REDACTED", 1545 | "straat": "REDACTED", 1546 | "postcode": "REDACTED", 1547 | "telefoonnummer": "REDACTED", 1548 | "email": "REDACTED", 1549 | "leerjaar": 99, 1550 | "mentoren": [ 1551 | "REDACTED" 1552 | ] 1553 | } 1554 | ``` 1555 | 1556 |
1557 | 1558 | ### Vakanties: `GET /rest/v1/vakanties/leerling/[id]` 1559 |
Click to open 1560 | 1561 | Fetches info about the school, including your mentor. 1562 | 1563 | #### Parameters 1564 | 1565 | | Name | Type | Value | 1566 | |---------------|--------|-----------------------| 1567 | | id | URL | [user id] | 1568 | | Authorization | Header | Bearer [access_token] | 1569 | 1570 | #### Returns 1571 | 1572 | ```json 1573 | { 1574 | "items": [ 1575 | { 1576 | "$type": "participatie.RVakantie", 1577 | "links": [ 1578 | { 1579 | "id": 123456789, 1580 | "rel": "self", 1581 | "type": "participatie.RVakantie", 1582 | "href": "https://api.somtoday.nl/rest/v1/vakanties/123456789" 1583 | } 1584 | ], 1585 | "permissions": [ 1586 | { 1587 | "full": "participatie.RVakantie:READ:INSTANCE(123456789)", 1588 | "type": "participatie.RVakantie", 1589 | "operations": [ 1590 | "READ" 1591 | ], 1592 | "instances": [ 1593 | "INSTANCE(123456789)" 1594 | ] 1595 | } 1596 | ], 1597 | "additionalObjects": {}, 1598 | "naam": "Herfstvakantie", 1599 | "beginDatum": "2023-10-16T00:00:00.000+02:00", 1600 | "eindDatum": "2023-10-20T00:00:00.000+02:00" 1601 | }, 1602 | ... 1603 | ] 1604 | } 1605 | ``` 1606 | 1607 |
1608 | 1609 | ### Studiemateriaal: `GET /rest/v1/vakken/studiemateriaal/[id]` & `GET rest/v1/vakken/studiemateriaal/[id]/vak/[uuid]` & `/rest/v1/studiemateriaal/algemeen/[id]` 1610 |
Click to open 1611 | 1612 | Fetches all studiemateriaal. (I.E. Annual supplements, online textbooks, etc.) 1613 | 1614 | First, make a request to `GET /rest/v1/vakken/studiemateriaal/[id]`. And then to `/rest/v1/vakken/studiemateriaal/[id]/vak/[uuid]` with the UUID of subject which studiemateriaal you want to fetch. 1615 | 1616 | #### Parameters 1617 | 1618 | | Name | Type | Value | 1619 | |---------------|--------|-----------------------| 1620 | | id | URL | [user id] | 1621 | | Authorization | Header | Bearer [access_token] | 1622 | 1623 | #### Returns 1624 | 1625 | `GET /rest/v1/vakken/studiemateriaal/[id]` returns: 1626 | 1627 | ```json 1628 | { 1629 | "items": [ 1630 | { 1631 | "$type": "onderwijsinrichting.RVak", 1632 | "links": [ 1633 | { 1634 | "id": 123456789, 1635 | "rel": "self", 1636 | "type": "onderwijsinrichting.RVak", 1637 | "href": "https://api.somtoday.nl/rest/v1/vakken/123456789" 1638 | } 1639 | ], 1640 | "permissions": [ 1641 | { 1642 | "full": "onderwijsinrichting.RVak:READ:INSTANCE(123456789)", 1643 | "type": "onderwijsinrichting.RVak", 1644 | "operations": [ 1645 | "READ" 1646 | ], 1647 | "instances": [ 1648 | "INSTANCE(123456789)" 1649 | ] 1650 | } 1651 | ], 1652 | "additionalObjects": {}, 1653 | "afkorting": "ne", 1654 | "naam": "Nederlandse taal", 1655 | "UUID": "REDACTED" 1656 | }, 1657 | ... 1658 | ] 1659 | } 1660 | ``` 1661 | `GET /rest/v1/vakken/studiemateriaal/[id]/vak/[uuid]` returns: 1662 | 1663 | ```json 1664 | { 1665 | "$type": "studiewijzer.RStudieMateriaal", 1666 | "studiewijzer": { 1667 | "links": [ 1668 | { 1669 | "id": 123456789, 1670 | "rel": "self", 1671 | "type": "studiewijzer.RStudiewijzer", 1672 | "href": "https://api.somtoday.nl/rest/v1/studiewijzers/123456789" 1673 | } 1674 | ], 1675 | "permissions": [ 1676 | { 1677 | "full": "studiewijzer.RStudiewijzer:READ:INSTANCE(123456789)", 1678 | "type": "studiewijzer.RStudiewijzer", 1679 | "operations": [ 1680 | "READ" 1681 | ], 1682 | "instances": [ 1683 | "INSTANCE(123456789)" 1684 | ] 1685 | } 1686 | ], 1687 | "additionalObjects": {}, 1688 | "uuid": "Redacted", 1689 | "naam": "Nederland", 1690 | "vestiging": { 1691 | "links": [ 1692 | { 1693 | "id": 123456789, 1694 | "rel": "self", 1695 | "type": "instelling.RVestiging", 1696 | "href": "https://api.somtoday.nl/rest/v1/vestigingen/123456789" 1697 | } 1698 | ], 1699 | "permissions": [ 1700 | { 1701 | "full": "instelling.RVestiging:READ:INSTANCE(123456789)", 1702 | "type": "instelling.RVestiging", 1703 | "operations": [ 1704 | "READ" 1705 | ], 1706 | "instances": [ 1707 | "INSTANCE(123456789)" 1708 | ] 1709 | } 1710 | ], 1711 | "additionalObjects": {}, 1712 | "naam": "REDACTED", 1713 | "uuid": "REDACTED" 1714 | }, 1715 | "lesgroep": { 1716 | "links": [ 1717 | { 1718 | "id": 123456789, 1719 | "rel": "self", 1720 | "type": "lesgroep.RLesgroep", 1721 | "href": "https://api.somtoday.nl/rest/v1/lesgroepen/123456789" 1722 | } 1723 | ], 1724 | "permissions": [ 1725 | { 1726 | "full": "lesgroep.RLesgroep:READ:INSTANCE(123456789)", 1727 | "type": "lesgroep.RLesgroep", 1728 | "operations": [ 1729 | "READ" 1730 | ], 1731 | "instances": [ 1732 | "INSTANCE(123456789)" 1733 | ] 1734 | } 1735 | ], 1736 | "additionalObjects": {}, 1737 | "UUID": "REDACTED", 1738 | "naam": "REDACTED", 1739 | "omschrijving": "REDACTED", 1740 | "schooljaar": { 1741 | "$type": "onderwijsinrichting.RSchooljaar", 1742 | "links": [ 1743 | { 1744 | "id": 12345689, 1745 | "rel": "self", 1746 | "type": "onderwijsinrichting.RSchooljaar", 1747 | "href": "https://api.somtoday.nl/rest/v1/schooljaren/12345689" 1748 | } 1749 | ], 1750 | "permissions": [ 1751 | { 1752 | "full": "onderwijsinrichting.RSchooljaar:READ:INSTANCE(12345689)", 1753 | "type": "onderwijsinrichting.RSchooljaar", 1754 | "operations": [ 1755 | "READ" 1756 | ], 1757 | "instances": [ 1758 | "INSTANCE(12345689)" 1759 | ] 1760 | } 1761 | ], 1762 | "additionalObjects": {}, 1763 | "naam": "2023/2024", 1764 | "vanafDatum": "2023-08-01", 1765 | "totDatum": "2024-07-31", 1766 | "isHuidig": true 1767 | }, 1768 | "vak": { 1769 | "links": [ 1770 | { 1771 | "id": 12345689, 1772 | "rel": "self", 1773 | "type": "onderwijsinrichting.RVak", 1774 | "href": "https://api.somtoday.nl/rest/v1/vakken/12345689" 1775 | } 1776 | ], 1777 | "permissions": [ 1778 | { 1779 | "full": "onderwijsinrichting.RVak:READ:INSTANCE(12345689)", 1780 | "type": "onderwijsinrichting.RVak", 1781 | "operations": [ 1782 | "READ" 1783 | ], 1784 | "instances": [ 1785 | "INSTANCE(12345689)" 1786 | ] 1787 | } 1788 | ], 1789 | "additionalObjects": {}, 1790 | "afkorting": "ne", 1791 | "naam": "Nederlandse taal", 1792 | "UUID": "REDACTED" 1793 | }, 1794 | "heeftStamgroep": false, 1795 | "examendossierOndersteund": false, 1796 | "vestiging": { 1797 | "links": [ 1798 | { 1799 | "id": 12345689, 1800 | "rel": "self", 1801 | "type": "instelling.RVestiging", 1802 | "href": "https://api.somtoday.nl/rest/v1/vestigingen/12345689" 1803 | } 1804 | ], 1805 | "permissions": [ 1806 | { 1807 | "full": "instelling.RVestiging:READ:INSTANCE(12345689)", 1808 | "type": "instelling.RVestiging", 1809 | "operations": [ 1810 | "READ" 1811 | ], 1812 | "instances": [ 1813 | "INSTANCE(12345689)" 1814 | ] 1815 | } 1816 | ], 1817 | "additionalObjects": {}, 1818 | "naam": "REDACTED", 1819 | "uuid": "REDACTED" 1820 | } 1821 | } 1822 | }, 1823 | ... 1824 | } 1825 | ``` 1826 | `GET /rest/v1/studiemateriaal/algemeen/[id]` returns: 1827 | 1828 | ```json 1829 | { 1830 | "items": [ 1831 | { 1832 | "$type": "leermiddel.REduRoutePortalUserProduct", 1833 | "links": [ 1834 | { 1835 | "id": 123456789, 1836 | "rel": "self", 1837 | "type": "leermiddel.REduRoutePortalUserProduct", 1838 | "href": "https://api.somtoday.nl/rest/v1/edurouteportaluserproduct/123456789" 1839 | } 1840 | ], 1841 | "permissions": [ 1842 | { 1843 | "full": "leermiddel.REduRoutePortalUserProduct:READ:INSTANCE(123456789)", 1844 | "type": "leermiddel.REduRoutePortalUserProduct", 1845 | "operations": ["READ"], 1846 | "instances": ["INSTANCE(123456789)"] 1847 | } 1848 | ], 1849 | "additionalObjects": {}, 1850 | "leerling": { 1851 | "$type": "leerling.RLeerlingPrimer", 1852 | "links": [ 1853 | { 1854 | "id": 9496745174, 1855 | "rel": "self", 1856 | "type": "leerling.RLeerlingPrimer", 1857 | "href": "https://api.somtoday.nl/rest/v1/leerlingen/9496745174" 1858 | } 1859 | ], 1860 | "permissions": [ 1861 | { 1862 | "full": "leerling.RLeerlingPrimer:READ:INSTANCE(9496745174)", 1863 | "type": "leerling.RLeerlingPrimer", 1864 | "operations": ["READ"], 1865 | "instances": ["INSTANCE(9496745174)"] 1866 | } 1867 | ], 1868 | "additionalObjects": {}, 1869 | "UUID": "f8cf6f6c-c213-4526-8ba1-6a306cf724a4", 1870 | "leerlingnummer": 123456, 1871 | "roepnaam": "{{first_name}}", 1872 | "achternaam": "{{last_name}}" 1873 | }, 1874 | "product": { 1875 | "$type": "leermiddel.REduRoutePortalProduct", 1876 | "links": [ 1877 | { 1878 | "id": 1234567890123, 1879 | "rel": "self", 1880 | "type": "leermiddel.REduRoutePortalProduct", 1881 | "href": "https://api.somtoday.nl/rest/v1/edurouteportalproduct/1234567890123" 1882 | } 1883 | ], 1884 | "permissions": [ 1885 | { 1886 | "full": "leermiddel.REduRoutePortalProduct:READ:INSTANCE(1234567890123)", 1887 | "type": "leermiddel.REduRoutePortalProduct", 1888 | "operations": ["READ"], 1889 | "instances": ["INSTANCE(1234567890123)"] 1890 | } 1891 | ], 1892 | "additionalObjects": {}, 1893 | "title": "Chemie Overal ed 5.0 vwo 5 FLEX boek + online", 1894 | "url": "https://toegang.noordhoff.nl/1234567890123", 1895 | "UUID": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", 1896 | "methodeInformatie": { 1897 | "$type": "leermiddel.RMethodeInformatie", 1898 | "links": [ 1899 | { 1900 | "id": 1234567890123, 1901 | "rel": "self", 1902 | "type": "leermiddel.RMethodeInformatie", 1903 | "href": "https://api.somtoday.nl/rest/v1/methodeinformatie/1234567890123" 1904 | } 1905 | ], 1906 | "permissions": [ 1907 | { 1908 | "full": "leermiddel.RMethodeInformatie:READ:INSTANCE(1234567890123)", 1909 | "type": "leermiddel.RMethodeInformatie", 1910 | "operations": ["READ"], 1911 | "instances": ["INSTANCE(1234567890123)"] 1912 | } 1913 | ], 1914 | "additionalObjects": {}, 1915 | "UUID": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", 1916 | "dashboardMethodeNaam": "Chemie overal", 1917 | "methode": "Chemie overal", 1918 | "uitgever": "Noordhoff" 1919 | } 1920 | }, 1921 | "UUID": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" 1922 | }, 1923 | ... 1924 | ] 1925 | } 1926 | 1927 | ``` 1928 | 1929 |
1930 | 1931 | ### ICalendar: `GET /rest/v1/icalendar` 1932 |
Click to open 1933 | 1934 | Fetches the url to the icalendar stream. 1935 | 1936 | #### Parameters 1937 | 1938 | | Name | Type | Value | 1939 | |---------------|-----------|-----------------------| 1940 | | Authorization | Header | Bearer [access_token] | 1941 | 1942 | #### Returns 1943 | 1944 | ```json 1945 | { 1946 | "links": [], 1947 | "permissions": [], 1948 | "additionalObjects": {}, 1949 | "leerlingICalendarLink": "https://api.somtoday.nl/rest/v1/icalendar/stream/REDACTED" 1950 | } 1951 | ``` 1952 | 1953 |
1954 | 1955 | ### ICalendar: `DELETE /rest/v1/icalendar` 1956 |
Click to open 1957 | 1958 | Deletes the currently active icalendar stream 1959 | 1960 | #### Parameters 1961 | 1962 | | Name | Type | Value | 1963 | |---------------|-----------|-----------------------| 1964 | | Authorization | Header | Bearer [access_token] | 1965 | 1966 | #### Returns 1967 | 1968 | NONE 1969 | 1970 |
1971 | 1972 | ### Undocumented: 1973 | 1974 | - `GET /rest/v1/medewerkers/ontvangers` 1975 | - `GET /rest/v1/maatregeltoekenningen` 1976 | - `GET /rest/v1/leerlingadresseringen` 1977 | - `GET /rest/v1/verzorgers/` 1978 | - `GET /rest/v1/onderwijsopafstandperiodes/` 1979 | - `GET /rest/v1/edurouteportaluserproduct/[id]` 1980 | - `GET /rest/v1/methodeinformatie/[id]` 1981 | -------------------------------------------------------------------------------- /pics/homework-types.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/elisaado/somtoday-api-docs/8fe5a1b74b6c4dca02c6a2f134b482ac8f6e0444/pics/homework-types.png --------------------------------------------------------------------------------