KORI API documentation

Please feel free to browse for the information you need!-)

Kori API

Overview

The public API is used for accessing public data related to courses, curricula, organisations and locations.

Contact information

Contact : Kori API

URI scheme

Host : localhost:8080
BasePath : /kori

Tags

  • access-permission-controller : Access Permission Controller

  • admission-target-controller : Admission Target Controller

  • assessment-item-controller : Assessment Item Controller

  • building-controller : Building Controller

  • code-book-controller : Code Book Controller

  • competency-controller : Competency Controller

  • course-unit-controller : Course Unit Controller

  • course-unit-realisation-controller : Course Unit Realisation Controller

  • curriculum-period-controller : Curriculum Period Controller

  • degree-programme-controller : Degree Programme Controller

  • disclosure-authorization-category-controller : Disclosure Authorization Category Controller

  • education-controller : Education Controller

  • education-search-controller : Education Search Controller

  • education-structure-rules-controller : Education Structure Rules Controller

  • enrolment-questionnaire-controller : Enrolment Questionnaire Controller

  • grade-scale-controller : Grade Scale Controller

  • international-contractual-degree-agreement-controller : International Contractual Degree Agreement Controller

  • kori-import-log-controller : Kori Import Log Controller

  • location-controller : Location Controller

  • mass-exam-session-controller : Mass Exam Session Controller

  • module-controller : Module Controller

  • open-university-product-controller : Open University Product Controller

  • organisation-controller : Organisation Controller

  • organisation-settings-controller : Organisation Settings Controller

  • payment-category-controller : Payment Category Controller

  • public-person-controller : Public Person Controller

  • qualification-controller : Qualification Controller

  • recursive-export-controller : Recursive Export Controller

  • search-tag-controller : Search Tag Controller

  • server-constants-controller : Server Constants Controller

  • study-event-controller : Study Event Controller

  • study-module-controller : Study Module Controller

  • study-period-controller : Study Period Controller

  • study-right-expiration-rules-controller : Study Right Expiration Rules Controller

  • term-registration-requirements-controller : Term Registration Requirements Controller

  • timing-template-controller : Timing Template Controller

  • university-settings-controller : University Settings Controller

Paths

Export admission targets

GET /api/admission-targets/v1/export

Description

Entities can be exported in modification order based on one of two separate ways of specifying the starting point. With the 'since' parameter (recommended): an integer key (modification ordinal), which is different for every modification of the entity table. The ordinals are guaranteed to increase for each modification, but not guaranteed to be consecutive. With the 'sinceTime' parameter: an ISO-8601 timestamp. SinceTime is only supported for the case when the modification ordinal is not known by the exporter. In actual practice, if efficient export of all data is desired, the greatest modification ordinal from the previous export must be remembered and used as the since parameter for the next export. Both the since and sinceTime parameters are exclusive: if in one export you get the modification ordinals 3, 4 and 5, the next query should be export?since=5 and then you get the ordinals 6, 7, 8, etc.

Parameters

Type Name Description Schema

Query

limit
optional

The maximum amount of results to return

integer (int32)

Query

sinceOrdinal
optional

sinceOrdinal

integer (int64)

Query

sinceTime
optional

sinceTime

string (date-time)

Responses

HTTP Code Description Schema

200

OK

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Produces

  • application/json

Tags

  • export

Import admission targets

POST /api/admission-targets/v1/import

Parameters

Type Name Description Schema

Body

admissionTargets
required

admissionTargets

< AdmissionTarget > array

Responses

HTTP Code Description Schema

200

OK

No Content

201

Created

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes

  • application/json

Produces

  • */*

Tags

  • import

Export assessment items

GET /api/assessment-items/v1/export

Description

Entities can be exported in modification order based on one of two separate ways of specifying the starting point.With the 'since' parameter (recommended): an integer key (modification ordinal), which is different for every modification of the entity table. The ordinals are guaranteed to increase for each modification, but not guaranteed to be concecutive.With the 'sinceTime' parameter: an ISO-8601 timestamp. SinceTime is only supported for the case when the modification ordinal is not known by the exporter. In actual practice, if efficient export of all data is desired, the greatest modification ordinal from the previous export must be remembered and used as the since parameter for the next export. Both the since and sinceTime parameters are exclusive: if in one export you get the modification ordinals 3, 4 and 5, the next query should be export?since=5 and then you get the ordinals 6, 7, 8, etc.

Parameters

Type Name Description Schema

Query

limit
optional

Maximum number of assessment items to return. May return less, either because there are not enough change items, or because of internal limits. If limit is higher than 10 000, returns only 10 000 items.

integer (int32)

Query

since
optional

Return assessment items modified after (exclusive comparison) this modification ordinal (increasing value within Kori). Alternate parameter with sinceTime. This is the recommended option.

integer (int64)

Query

sinceTime
optional

Return assessment items modified after (exclusive comparison) this ISO-8601 time. Alternate parameter with since. This is the not recommended but sometimes necessary option.

string (date-time)

Responses

HTTP Code Description Schema

200

OK

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Produces

  • application/json

Tags

  • export

Example HTTP request

GET /api/modules/v1/export?since=0&limit=5 HTTP/1.1
Accept: application/json
Host: localhost:8080

Example HTTP response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 2438

{
  "greatestOrdinal" : 45986,
  "hasMore" : false,
  "entities" : [ {
    "metadata" : {
      "revision" : 1,
      "createdBy" : "spectre-study-module-admin-user",
      "createdOn" : "2020-11-19T08:39:03.751806",
      "lastModifiedBy" : "spectre-study-module-admin-user",
      "lastModifiedOn" : "2020-11-19T08:39:03.751943",
      "modificationOrdinal" : 45986
    },
    "documentState" : "DRAFT",
    "id" : "otm-cca48e46-68f6-436a-bfa0-d4fc4e2fa046",
    "universityOrgIds" : [ "the-spectre" ],
    "groupId" : "otm-cca48e46-68f6-436a-bfa0-d4fc4e2fa046",
    "name" : {
      "fi" : "Module that has ID otm-cca48e46-68f6-436a-bfa0-d4fc4e2fa046"
    },
    "moduleContentApprovalRequired" : false,
    "code" : "code-xyzzy-otm-cca48e46-68f6-436a-bfa0-d4fc4e2fa046",
    "targetCredits" : {
      "min" : 0,
      "max" : 10
    },
    "curriculumPeriodIds" : [ "otm-test-curriculum-period-2015-2016" ],
    "approvalState" : "urn:code:approval-state-type:not-ready",
    "validityPeriod" : {
      "startDate" : "1970-01-01",
      "endDate" : "2071-12-04"
    },
    "contentDescription" : null,
    "additionalInfo" : {
      "fi" : "lisätietoa"
    },
    "responsibilityInfos" : [ {
      "text" : null,
      "personId" : "otm-test-user-96",
      "roleUrn" : "urn:code:module-responsibility-info-type:responsible-teacher",
      "validityPeriod" : { }
    } ],
    "organisations" : [ {
      "organisationId" : "the-spectre",
      "educationalInstitutionUrn" : null,
      "roleUrn" : "urn:code:organisation-role:responsible-organisation",
      "share" : 1,
      "validityPeriod" : { }
    } ],
    "inclusionApplicationInstruction" : null,
    "abbreviation" : null,
    "tweetText" : null,
    "outcomes" : null,
    "prerequisites" : null,
    "substitutions" : null,
    "searchTags" : [ ],
    "studyLevel" : "urn:code:study-level:intermediate-studies",
    "possibleAttainmentLanguages" : [ "urn:code:official-language:fi" ],
    "studyFields" : [ "urn:code:study-field:2002-0" ],
    "graded" : true,
    "gradeScaleId" : "hy-0-5",
    "customCodeUrns" : null,
    "contentFilter" : null,
    "studyRightSelectionType" : "urn:code:study-right-selection-type:none",
    "minorStudyRightAcceptanceType" : null,
    "minorStudyRightApplicationInstructions" : null,
    "type" : "StudyModule",
    "rule" : {
      "type" : "AnyCourseUnitRule",
      "localId" : "a59cc674-ba40-43ae-89c7-2f680f83673a"
    }
  } ]
}

Example Curl request

$ curl 'http://localhost:8080/api/modules/v1/export?since=0&limit=5' -i -X GET \
    -H 'Accept: application/json'

Example HTTP request

GET /api/modules/v1/export?since=0&limit=5 HTTP/1.1
Accept: application/json
Host: localhost:8080

Example HTTP response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 2438

{
  "greatestOrdinal" : 45986,
  "hasMore" : false,
  "entities" : [ {
    "metadata" : {
      "revision" : 1,
      "createdBy" : "spectre-study-module-admin-user",
      "createdOn" : "2020-11-19T08:39:03.751806",
      "lastModifiedBy" : "spectre-study-module-admin-user",
      "lastModifiedOn" : "2020-11-19T08:39:03.751943",
      "modificationOrdinal" : 45986
    },
    "documentState" : "DRAFT",
    "id" : "otm-cca48e46-68f6-436a-bfa0-d4fc4e2fa046",
    "universityOrgIds" : [ "the-spectre" ],
    "groupId" : "otm-cca48e46-68f6-436a-bfa0-d4fc4e2fa046",
    "name" : {
      "fi" : "Module that has ID otm-cca48e46-68f6-436a-bfa0-d4fc4e2fa046"
    },
    "moduleContentApprovalRequired" : false,
    "code" : "code-xyzzy-otm-cca48e46-68f6-436a-bfa0-d4fc4e2fa046",
    "targetCredits" : {
      "min" : 0,
      "max" : 10
    },
    "curriculumPeriodIds" : [ "otm-test-curriculum-period-2015-2016" ],
    "approvalState" : "urn:code:approval-state-type:not-ready",
    "validityPeriod" : {
      "startDate" : "1970-01-01",
      "endDate" : "2071-12-04"
    },
    "contentDescription" : null,
    "additionalInfo" : {
      "fi" : "lisätietoa"
    },
    "responsibilityInfos" : [ {
      "text" : null,
      "personId" : "otm-test-user-96",
      "roleUrn" : "urn:code:module-responsibility-info-type:responsible-teacher",
      "validityPeriod" : { }
    } ],
    "organisations" : [ {
      "organisationId" : "the-spectre",
      "educationalInstitutionUrn" : null,
      "roleUrn" : "urn:code:organisation-role:responsible-organisation",
      "share" : 1,
      "validityPeriod" : { }
    } ],
    "inclusionApplicationInstruction" : null,
    "abbreviation" : null,
    "tweetText" : null,
    "outcomes" : null,
    "prerequisites" : null,
    "substitutions" : null,
    "searchTags" : [ ],
    "studyLevel" : "urn:code:study-level:intermediate-studies",
    "possibleAttainmentLanguages" : [ "urn:code:official-language:fi" ],
    "studyFields" : [ "urn:code:study-field:2002-0" ],
    "graded" : true,
    "gradeScaleId" : "hy-0-5",
    "customCodeUrns" : null,
    "contentFilter" : null,
    "studyRightSelectionType" : "urn:code:study-right-selection-type:none",
    "minorStudyRightAcceptanceType" : null,
    "minorStudyRightApplicationInstructions" : null,
    "type" : "StudyModule",
    "rule" : {
      "type" : "AnyCourseUnitRule",
      "localId" : "a59cc674-ba40-43ae-89c7-2f680f83673a"
    }
  } ]
}

Example Curl request

$ curl 'http://localhost:8080/api/modules/v1/export?since=0&limit=5' -i -X GET \
    -H 'Accept: application/json'

Import assessment items

POST /api/assessment-items/v1/import

Parameters

Type Name Description Schema

Body

assessmentItems
required

assessmentItems

< AssessmentItem > array

Responses

HTTP Code Description Schema

200

OK

No Content

201

Created

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes

  • application/json

Produces

  • application/json

Tags

  • import

Example HTTP request

POST /api/assessment-items/v1/import HTTP/1.1
Content-Type: application/json
Content-Length: 928
Host: localhost:8080

[ {
  "metadata" : null,
  "id" : "otm-076f60f8-895c-4ac2-8f13-080e4009c4ff",
  "universityOrgIds" : [ "the-spectre" ],
  "credits" : {
    "min" : 10,
    "max" : 10
  },
  "name" : {
    "fi" : "AssessmentItem 2020-11-19T08:37:55.902045"
  },
  "nameSpecifier" : {
    "fi" : "spec"
  },
  "gradeScaleId" : "hy-0-5",
  "possibleAttainmentLanguages" : [ ],
  "assessmentItemType" : "urn:code:assessment-item-type:exam",
  "contentDescription" : null,
  "studyFormat" : null,
  "grading" : null,
  "learningMaterial" : null,
  "literature" : [ ],
  "studyField" : null,
  "subject" : null,
  "snapshotDateTime" : null,
  "responsibilityInfos" : [ ],
  "organisations" : [ {
    "organisationId" : "the-spectre",
    "educationalInstitutionUrn" : null,
    "roleUrn" : "urn:code:organisation-role:responsible-organisation",
    "share" : 1,
    "validityPeriod" : { }
  } ],
  "primaryCourseUnitGroupId" : "otm-fixture-cu-id"
} ]

Example HTTP response

HTTP/1.1 200 OK

Example Curl request

$ curl 'http://localhost:8080/api/assessment-items/v1/import' -i -X POST \
    -H 'Content-Type: application/json' \
    -d '[ {
  "metadata" : null,
  "id" : "otm-076f60f8-895c-4ac2-8f13-080e4009c4ff",
  "universityOrgIds" : [ "the-spectre" ],
  "credits" : {
    "min" : 10,
    "max" : 10
  },
  "name" : {
    "fi" : "AssessmentItem 2020-11-19T08:37:55.902045"
  },
  "nameSpecifier" : {
    "fi" : "spec"
  },
  "gradeScaleId" : "hy-0-5",
  "possibleAttainmentLanguages" : [ ],
  "assessmentItemType" : "urn:code:assessment-item-type:exam",
  "contentDescription" : null,
  "studyFormat" : null,
  "grading" : null,
  "learningMaterial" : null,
  "literature" : [ ],
  "studyField" : null,
  "subject" : null,
  "snapshotDateTime" : null,
  "responsibilityInfos" : [ ],
  "organisations" : [ {
    "organisationId" : "the-spectre",
    "educationalInstitutionUrn" : null,
    "roleUrn" : "urn:code:organisation-role:responsible-organisation",
    "share" : 1,
    "validityPeriod" : { }
  } ],
  "primaryCourseUnitGroupId" : "otm-fixture-cu-id"
} ]'

Example HTTP request

POST /api/assessment-items/v1/import HTTP/1.1
Content-Type: application/json
Content-Length: 928
Host: localhost:8080

[ {
  "metadata" : null,
  "id" : "otm-076f60f8-895c-4ac2-8f13-080e4009c4ff",
  "universityOrgIds" : [ "the-spectre" ],
  "credits" : {
    "min" : 10,
    "max" : 10
  },
  "name" : {
    "fi" : "AssessmentItem 2020-11-19T08:37:55.902045"
  },
  "nameSpecifier" : {
    "fi" : "spec"
  },
  "gradeScaleId" : "hy-0-5",
  "possibleAttainmentLanguages" : [ ],
  "assessmentItemType" : "urn:code:assessment-item-type:exam",
  "contentDescription" : null,
  "studyFormat" : null,
  "grading" : null,
  "learningMaterial" : null,
  "literature" : [ ],
  "studyField" : null,
  "subject" : null,
  "snapshotDateTime" : null,
  "responsibilityInfos" : [ ],
  "organisations" : [ {
    "organisationId" : "the-spectre",
    "educationalInstitutionUrn" : null,
    "roleUrn" : "urn:code:organisation-role:responsible-organisation",
    "share" : 1,
    "validityPeriod" : { }
  } ],
  "primaryCourseUnitGroupId" : "otm-fixture-cu-id"
} ]

Example HTTP response

HTTP/1.1 200 OK

Example Curl request

$ curl 'http://localhost:8080/api/assessment-items/v1/import' -i -X POST \
    -H 'Content-Type: application/json' \
    -d '[ {
  "metadata" : null,
  "id" : "otm-076f60f8-895c-4ac2-8f13-080e4009c4ff",
  "universityOrgIds" : [ "the-spectre" ],
  "credits" : {
    "min" : 10,
    "max" : 10
  },
  "name" : {
    "fi" : "AssessmentItem 2020-11-19T08:37:55.902045"
  },
  "nameSpecifier" : {
    "fi" : "spec"
  },
  "gradeScaleId" : "hy-0-5",
  "possibleAttainmentLanguages" : [ ],
  "assessmentItemType" : "urn:code:assessment-item-type:exam",
  "contentDescription" : null,
  "studyFormat" : null,
  "grading" : null,
  "learningMaterial" : null,
  "literature" : [ ],
  "studyField" : null,
  "subject" : null,
  "snapshotDateTime" : null,
  "responsibilityInfos" : [ ],
  "organisations" : [ {
    "organisationId" : "the-spectre",
    "educationalInstitutionUrn" : null,
    "roleUrn" : "urn:code:organisation-role:responsible-organisation",
    "share" : 1,
    "validityPeriod" : { }
  } ],
  "primaryCourseUnitGroupId" : "otm-fixture-cu-id"
} ]'

Get assessment item

GET /api/assessment-items/v1/{assessmentItemId}

Parameters

Type Name Description Schema

Path

assessmentItemId
required

assessmentItemId

string (otmid)

Responses

HTTP Code Description Schema

200

OK

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Produces

  • application/json

Tags

  • export

Export buildings

GET /api/buildings/v1/export

Description

Entities can be exported in modification order based on one of two separate ways of specifying the starting point.With the 'since' parameter (recommended): an integer key (modification ordinal), which is different for every modification of the entity table. The ordinals are guaranteed to increase for each modification, but not guaranteed to be concecutive.With the 'sinceTime' parameter: an ISO-8601 timestamp. SinceTime is only supported for the case when the modification ordinal is not known by the exporter. In actual practice, if efficient export of all data is desired, the greatest modification ordinal from the previous export must be remembered and used as the since parameter for the next export. Both the since and sinceTime parameters are exclusive: if in one export you get the modification ordinals 3, 4 and 5, the next query should be export?since=5 and then you get the ordinals 6, 7, 8, etc.

Parameters

Type Name Description Schema

Query

limit
optional

Maximum number of buildings to return. May return less, either because there are not enough change items, or because of internal limits. If limit is higher than 10 000, returns only 10 000 items.

integer (int32)

Query

since
optional

Return buildings modified after (exclusive comparison) this modification ordinal (increasing value within Kori). Alternate parameter with sinceTime. This is the recommended option.

integer (int64)

Query

sinceTime
optional

Return buildings modified after (exclusive comparison) this ISO-8601 time. Alternate parameter with since. This is the not recommended but sometimes necessary option.

string (date-time)

Responses

HTTP Code Description Schema

200

OK

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Produces

  • application/json

Tags

  • export

Example HTTP request

GET /api/buildings/v1/export?since=18802&limit=5 HTTP/1.1
Accept: application/json
Authorization: Basic c3BlY3RyZS5lOnRlc3QxMjM=
Host: localhost:8080

Example HTTP response

HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 757

{
  "greatestOrdinal" : 18805,
  "hasMore" : false,
  "entities" : [ {
    "metadata" : {
      "revision" : 1,
      "createdBy" : "arska",
      "createdOn" : "2020-11-19T08:37:57.216983",
      "lastModifiedBy" : "arska",
      "lastModifiedOn" : "2020-11-19T08:37:57.217138",
      "modificationOrdinal" : 18805
    },
    "documentState" : "ACTIVE",
    "id" : "otm-ed567b6b-72ac-4267-9bb7-1f8b1877cb74",
    "universityOrgIds" : [ "the-spectre" ],
    "name" : {
      "en" : "Viikki",
      "fi" : "Viikki"
    },
    "address" : {
      "countryUrn" : "urn:code:country:246",
      "isUserEditable" : true,
      "streetAddress" : "Viikinkari 9",
      "postalCode" : "00790",
      "city" : "Helsinki",
      "type" : "FinnishAddress"
    }
  } ]
}

Example Curl request

$ curl 'http://localhost:8080/api/buildings/v1/export?since=18802&limit=5' -i -u 'spectre.e:test123' -X GET \
    -H 'Accept: application/json'

Example HTTP request

GET /api/buildings/v1/export?since=18802&limit=5 HTTP/1.1
Accept: application/json
Authorization: Basic c3BlY3RyZS5lOnRlc3QxMjM=
Host: localhost:8080

Example HTTP response

HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 757

{
  "greatestOrdinal" : 18805,
  "hasMore" : false,
  "entities" : [ {
    "metadata" : {
      "revision" : 1,
      "createdBy" : "arska",
      "createdOn" : "2020-11-19T08:37:57.216983",
      "lastModifiedBy" : "arska",
      "lastModifiedOn" : "2020-11-19T08:37:57.217138",
      "modificationOrdinal" : 18805
    },
    "documentState" : "ACTIVE",
    "id" : "otm-ed567b6b-72ac-4267-9bb7-1f8b1877cb74",
    "universityOrgIds" : [ "the-spectre" ],
    "name" : {
      "en" : "Viikki",
      "fi" : "Viikki"
    },
    "address" : {
      "countryUrn" : "urn:code:country:246",
      "isUserEditable" : true,
      "streetAddress" : "Viikinkari 9",
      "postalCode" : "00790",
      "city" : "Helsinki",
      "type" : "FinnishAddress"
    }
  } ]
}

Example Curl request

$ curl 'http://localhost:8080/api/buildings/v1/export?since=18802&limit=5' -i -u 'spectre.e:test123' -X GET \
    -H 'Accept: application/json'

Import buildings

POST /api/buildings/v1/import

Parameters

Type Name Description Schema

Body

buildings
required

buildings

< Building > array

Responses

HTTP Code Description Schema

200

OK

No Content

201

Created

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes

  • application/json

Produces

  • */*

Tags

  • import

Example HTTP request

POST /api/buildings/v1/import HTTP/1.1
Content-Type: application/json
Authorization: Basic c3BlY3RyZS5pOnRlc3QxMjM=
Content-Length: 1211
Host: localhost:8080

[ {
  "metadata" : null,
  "id" : "otm-ed567b6b-72ac-4267-9bb7-1f8b1877cb74",
  "universityOrgIds" : [ "the-spectre" ],
  "name" : {
    "en" : "Viikki",
    "fi" : "Viikki"
  },
  "address" : {
    "countryUrn" : "urn:code:country:246",
    "isUserEditable" : true,
    "streetAddress" : "Viikinkari 9",
    "postalCode" : "00790",
    "city" : "Helsinki",
    "type" : "FinnishAddress"
  }
}, {
  "metadata" : null,
  "id" : "otm-155b685f-2a5e-401a-90c5-167d35101764",
  "universityOrgIds" : [ "the-spectre" ],
  "name" : {
    "en" : "Porthania",
    "fi" : "Porthania"
  },
  "address" : {
    "countryUrn" : "urn:code:country:246",
    "isUserEditable" : true,
    "streetAddress" : "Yliopistonkatu 3",
    "postalCode" : "00100",
    "city" : "Helsinki",
    "type" : "FinnishAddress"
  }
}, {
  "metadata" : null,
  "id" : "otm-5029f514-b78c-4135-a354-9866fa472016",
  "universityOrgIds" : [ "the-spectre" ],
  "name" : {
    "en" : "Chemicum",
    "fi" : "Chemicum"
  },
  "address" : {
    "countryUrn" : "urn:code:country:246",
    "isUserEditable" : true,
    "streetAddress" : "Gustaf Hällströmin katu 2a",
    "postalCode" : "00560",
    "city" : "Helsinki",
    "type" : "FinnishAddress"
  }
} ]

Example HTTP response

HTTP/1.1 200 OK
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY

Example Curl request

$ curl 'http://localhost:8080/api/buildings/v1/import' -i -u 'spectre.i:test123' -X POST \
    -H 'Content-Type: application/json' \
    -d '[ {
  "metadata" : null,
  "id" : "otm-ed567b6b-72ac-4267-9bb7-1f8b1877cb74",
  "universityOrgIds" : [ "the-spectre" ],
  "name" : {
    "en" : "Viikki",
    "fi" : "Viikki"
  },
  "address" : {
    "countryUrn" : "urn:code:country:246",
    "isUserEditable" : true,
    "streetAddress" : "Viikinkari 9",
    "postalCode" : "00790",
    "city" : "Helsinki",
    "type" : "FinnishAddress"
  }
}, {
  "metadata" : null,
  "id" : "otm-155b685f-2a5e-401a-90c5-167d35101764",
  "universityOrgIds" : [ "the-spectre" ],
  "name" : {
    "en" : "Porthania",
    "fi" : "Porthania"
  },
  "address" : {
    "countryUrn" : "urn:code:country:246",
    "isUserEditable" : true,
    "streetAddress" : "Yliopistonkatu 3",
    "postalCode" : "00100",
    "city" : "Helsinki",
    "type" : "FinnishAddress"
  }
}, {
  "metadata" : null,
  "id" : "otm-5029f514-b78c-4135-a354-9866fa472016",
  "universityOrgIds" : [ "the-spectre" ],
  "name" : {
    "en" : "Chemicum",
    "fi" : "Chemicum"
  },
  "address" : {
    "countryUrn" : "urn:code:country:246",
    "isUserEditable" : true,
    "streetAddress" : "Gustaf Hällströmin katu 2a",
    "postalCode" : "00560",
    "city" : "Helsinki",
    "type" : "FinnishAddress"
  }
} ]'

Example HTTP request

POST /api/buildings/v1/import HTTP/1.1
Content-Type: application/json
Authorization: Basic c3BlY3RyZS5pOnRlc3QxMjM=
Content-Length: 1211
Host: localhost:8080

[ {
  "metadata" : null,
  "id" : "otm-ed567b6b-72ac-4267-9bb7-1f8b1877cb74",
  "universityOrgIds" : [ "the-spectre" ],
  "name" : {
    "en" : "Viikki",
    "fi" : "Viikki"
  },
  "address" : {
    "countryUrn" : "urn:code:country:246",
    "isUserEditable" : true,
    "streetAddress" : "Viikinkari 9",
    "postalCode" : "00790",
    "city" : "Helsinki",
    "type" : "FinnishAddress"
  }
}, {
  "metadata" : null,
  "id" : "otm-155b685f-2a5e-401a-90c5-167d35101764",
  "universityOrgIds" : [ "the-spectre" ],
  "name" : {
    "en" : "Porthania",
    "fi" : "Porthania"
  },
  "address" : {
    "countryUrn" : "urn:code:country:246",
    "isUserEditable" : true,
    "streetAddress" : "Yliopistonkatu 3",
    "postalCode" : "00100",
    "city" : "Helsinki",
    "type" : "FinnishAddress"
  }
}, {
  "metadata" : null,
  "id" : "otm-5029f514-b78c-4135-a354-9866fa472016",
  "universityOrgIds" : [ "the-spectre" ],
  "name" : {
    "en" : "Chemicum",
    "fi" : "Chemicum"
  },
  "address" : {
    "countryUrn" : "urn:code:country:246",
    "isUserEditable" : true,
    "streetAddress" : "Gustaf Hällströmin katu 2a",
    "postalCode" : "00560",
    "city" : "Helsinki",
    "type" : "FinnishAddress"
  }
} ]

Example HTTP response

HTTP/1.1 200 OK
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY

Example Curl request

$ curl 'http://localhost:8080/api/buildings/v1/import' -i -u 'spectre.i:test123' -X POST \
    -H 'Content-Type: application/json' \
    -d '[ {
  "metadata" : null,
  "id" : "otm-ed567b6b-72ac-4267-9bb7-1f8b1877cb74",
  "universityOrgIds" : [ "the-spectre" ],
  "name" : {
    "en" : "Viikki",
    "fi" : "Viikki"
  },
  "address" : {
    "countryUrn" : "urn:code:country:246",
    "isUserEditable" : true,
    "streetAddress" : "Viikinkari 9",
    "postalCode" : "00790",
    "city" : "Helsinki",
    "type" : "FinnishAddress"
  }
}, {
  "metadata" : null,
  "id" : "otm-155b685f-2a5e-401a-90c5-167d35101764",
  "universityOrgIds" : [ "the-spectre" ],
  "name" : {
    "en" : "Porthania",
    "fi" : "Porthania"
  },
  "address" : {
    "countryUrn" : "urn:code:country:246",
    "isUserEditable" : true,
    "streetAddress" : "Yliopistonkatu 3",
    "postalCode" : "00100",
    "city" : "Helsinki",
    "type" : "FinnishAddress"
  }
}, {
  "metadata" : null,
  "id" : "otm-5029f514-b78c-4135-a354-9866fa472016",
  "universityOrgIds" : [ "the-spectre" ],
  "name" : {
    "en" : "Chemicum",
    "fi" : "Chemicum"
  },
  "address" : {
    "countryUrn" : "urn:code:country:246",
    "isUserEditable" : true,
    "streetAddress" : "Gustaf Hällströmin katu 2a",
    "postalCode" : "00560",
    "city" : "Helsinki",
    "type" : "FinnishAddress"
  }
} ]'

Get building

GET /api/buildings/v1/{buildingId}

Parameters

Type Name Description Schema

Path

buildingId
required

buildingId

string (otmid)

Responses

HTTP Code Description Schema

200

OK

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Produces

  • application/json

Tags

  • export

Export codebooks

GET /api/codebooks/v1/export

Description

Entities can be exported in modification order based on one of two separate ways of specifying the starting point.With the 'since' parameter (recommended): an integer key (modification ordinal), which is different for every modification of the entity table. The ordinals are guaranteed to increase for each modification, but not guaranteed to be concecutive.With the 'sinceTime' parameter: an ISO-8601 timestamp. SinceTime is only supported for the case when the modification ordinal is not known by the exporter. In actual practice, if efficient export of all data is desired, the greatest modification ordinal from the previous export must be remembered and used as the since parameter for the next export. Both the since and sinceTime parameters are exclusive: if in one export you get the modification ordinals 3, 4 and 5, the next query should be export?since=5 and then you get the ordinals 6, 7, 8, etc.

Parameters

Type Name Description Schema

Query

limit
optional

Maximum number of codebooks to return. May return less, either because there are not enough change items, or because of internal limits.

integer (int32)

Query

since
optional

Return codebooks modified after (exclusive comparison) this modification ordinal (increasing value within Kori). Alternate parameter with sinceTime. This is the recommended option.

integer (int64)

Query

sinceTime
optional

Return codebooks modified after (exclusive comparison) this ISO-8601 time. Alternate parameter with since. This is the not recommended but sometimes necessary option.

string (date-time)

Responses

HTTP Code Description Schema

200

OK

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Produces

  • application/json

Tags

  • export

Import codebooks

POST /api/codebooks/v1/import

Parameters

Type Name Description Schema

Body

codeBooks
required

codeBooks

< CodeBook > array

Responses

HTTP Code Description Schema

200

OK

No Content

201

Created

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes

  • application/json

Produces

  • */*

Tags

  • import

Export university code usages

GET /api/codes/usage/v1/export

Description

Export the information about which university has which code in use. The result includes all the usages for all the codebooks. Entities can be exported in modification order based on one of two separate ways of specifying the starting point.With the 'since' parameter (recommended): an integer key (modification ordinal), which is different for every modification of the entity table. The ordinals are guaranteed to increase for each modification, but not guaranteed to be concecutive.With the 'sinceTime' parameter: an ISO-8601 timestamp. SinceTime is only supported for the case when the modification ordinal is not known by the exporter. In actual practice, if efficient export of all data is desired, the greatest modification ordinal from the previous export must be remembered and used as the since parameter for the next export. Both the since and sinceTime parameters are exclusive: if in one export you get the modification ordinals 3, 4 and 5, the next query should be export?since=5 and then you get the ordinals 6, 7, 8, etc.

Parameters

Type Name Description Schema

Query

limit
optional

Maximum number of code university usages to return. May return less, either because there are not enough change items, or because of internal limits.

integer (int32)

Query

since
optional

Return code university usages modified after (exclusive comparison) this modification ordinal (increasing value within Kori). Alternate parameter with sinceTime. This is the recommended option.

integer (int64)

Query

sinceTime
optional

Return code university usages modified after (exclusive comparison) this ISO-8601 time. Alternate parameter with since. This is the not recommended but sometimes necessary option.

string (date-time)

Responses

HTTP Code Description Schema

200

OK

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Produces

  • application/json

Tags

  • export

Import code university usages

POST /api/codes/usage/v1/import

Description

Import the codes used for university

Parameters

Type Name Description Schema

Body

codesInUse
required

codesInUse

Responses

HTTP Code Description Schema

200

OK

No Content

201

Created

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes

  • application/json

Produces

  • */*

Tags

  • import

Example HTTP request

POST /api/codes/usage/v1/import HTTP/1.1
Content-Type: application/json
Accept: application/json
Authorization: Basic c3BlY3RyZS5pOnRlc3QxMjM=
Content-Length: 130
Host: localhost:8080

[ {
  "codesInUse" : [ "urn:code:test:foo" ],
  "metadata" : null,
  "universityOrgId" : "the-spectre",
  "id" : "the-spectre"
} ]

Example HTTP response

HTTP/1.1 200 OK
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY

Example Curl request

$ curl 'http://localhost:8080/api/codes/usage/v1/import' -i -u 'spectre.i:test123' -X POST \
    -H 'Content-Type: application/json' \
    -H 'Accept: application/json' \
    -d '[ {
  "codesInUse" : [ "urn:code:test:foo" ],
  "metadata" : null,
  "universityOrgId" : "the-spectre",
  "id" : "the-spectre"
} ]'

Example HTTP request

POST /api/codes/usage/v1/import HTTP/1.1
Content-Type: application/json
Accept: application/json
Authorization: Basic c3BlY3RyZS5pOnRlc3QxMjM=
Content-Length: 130
Host: localhost:8080

[ {
  "codesInUse" : [ "urn:code:test:foo" ],
  "metadata" : null,
  "universityOrgId" : "the-spectre",
  "id" : "the-spectre"
} ]

Example HTTP response

HTTP/1.1 200 OK
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY

Example Curl request

$ curl 'http://localhost:8080/api/codes/usage/v1/import' -i -u 'spectre.i:test123' -X POST \
    -H 'Content-Type: application/json' \
    -H 'Accept: application/json' \
    -d '[ {
  "codesInUse" : [ "urn:code:test:foo" ],
  "metadata" : null,
  "universityOrgId" : "the-spectre",
  "id" : "the-spectre"
} ]'

Export Competencies

GET /api/competencies/v1/export

Parameters

Type Name Description Schema

Query

  • sinceTime**
    optional

Exclusive

string (date-time)

Query

limit
optional

limit

integer (int32)

Query

since
optional

Exclusive

integer (int64)

Responses

HTTP Code Description Schema

200

OK

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Produces

  • application/json

Tags

  • export

Import Competencies

POST /api/competencies/v1/import

Parameters

Type Name Description Schema

Body

competencys
required

competencys

< Competency > array

Responses

HTTP Code Description Schema

200

OK

No Content

201

Created

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes

  • application/json

Produces

  • application/json

Tags

  • import

Export course unit realisations

GET /api/course-unit-realisations/v1/export

Description

Entities can be exported in modification order based on one of two separate ways of specifying the starting point. With the 'since' parameter (recommended): an integer key (modification ordinal), which is different for every modification of the entity table. The ordinals are guaranteed to increase for each modification, but not guaranteed to be concecutive. With the 'sinceTime' parameter: an ISO-8601 timestamp. SinceTime is only supported for the case when the modification ordinal is not known by the exporter. In actual practice, if efficient export of all data is desired, the greatest modification ordinal from the previous export must be remembered and used as the since parameter for the next export. Both the since and sinceTime parameters are exclusive: if in one export you get the modification ordinals 3, 4 and 5, the next query should be export?since=5 and then you get the ordinals 6, 7, 8, etc.

Parameters

Type Name Description Schema

Query

limit
optional

Maximum number of course unit realisations to return. May return less, either because there are not enough change items, or because of internal limits. If limit is higher than 10 000, returns only 10 000 items.

integer (int32)

Query

since
optional

Return course unit realisations modified after (exclusive comparison) this modification ordinal (increasing value within Kori). Alternate parameter with sinceTime. This is the recommended option.

integer (int64)

Query

sinceTime
optional

Return course unit realisations modified after (exclusive comparison) this ISO-8601 time. Alternate parameter with since. This is the not recommended but sometimes necessary option.

string (date-time)

Responses

HTTP Code Description Schema

200

OK

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Produces

  • application/json

Tags

  • export

Example HTTP request

GET /api/course-unit-realisations/v1/export?since=34930&limit=5 HTTP/1.1
Accept: application/json
Host: localhost:8080

Example HTTP response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 3439

{
  "greatestOrdinal" : 34931,
  "hasMore" : false,
  "entities" : [ {
    "metadata" : {
      "revision" : 1,
      "createdBy" : "spectre-course-unit-admin-user",
      "createdOn" : "2020-11-19T08:38:40.829007",
      "lastModifiedBy" : "spectre-course-unit-admin-user",
      "lastModifiedOn" : "2020-11-19T08:38:40.829007",
      "modificationOrdinal" : 34931
    },
    "documentState" : "DRAFT",
    "id" : "otm-705a763e-ac53-4d01-87e5-cda1737e3bef",
    "universityOrgIds" : [ "the-spectre" ],
    "flowState" : "PUBLISHED",
    "massExamSessionId" : null,
    "massExamSessionName" : null,
    "name" : {
      "fi" : "Tentti"
    },
    "nameSpecifier" : {
      "fi" : "Biologian perusteiden tentti"
    },
    "assessmentItemIds" : [ "otm-ai-1", "otm-ai-2" ],
    "tweetText" : null,
    "literature" : [ {
      "type" : "LiteratureName",
      "name" : "Romantic life of African Elephants",
      "localId" : "899246ad-8b5f-4d7d-b787-a70653cec8be"
    } ],
    "learningMaterial" : null,
    "learningEnvironmentDescription" : null,
    "learningEnvironments" : [ ],
    "studyFormat" : null,
    "additionalInfo" : null,
    "publishDate" : "2020-09-19",
    "activityPeriod" : {
      "startDate" : "2020-09-19",
      "endDate" : "2021-07-19"
    },
    "teachingLanguageUrn" : "urn:code:language:fi",
    "courseUnitRealisationTypeUrn" : "urn:code:course-unit-realisation-type:independent-work-essay",
    "studyGroupSets" : [ {
      "localId" : "sgs-Virkkaus",
      "name" : {
        "en" : "Virkkaus",
        "fi" : "Virkkaus"
      },
      "studySubGroups" : [ {
        "metadata" : null,
        "id" : "otm-3d618d54-7037-4743-9c65-2f797ad49762",
        "name" : {
          "fi" : "Group_1_AVirkkaus"
        },
        "studyEventIds" : [ "study-event-1" ],
        "teacherIds" : [ "otm-teacher-id-3" ],
        "cancelled" : false,
        "size" : null
      }, {
        "metadata" : null,
        "id" : "otm-d025a55c-4eba-44a6-b760-2587e1fe5446",
        "name" : {
          "fi" : "Group_1_BVirkkaus"
        },
        "studyEventIds" : [ "study-event-1" ],
        "teacherIds" : [ "otm-teacher-id-3" ],
        "cancelled" : false,
        "size" : null
      } ],
      "subGroupRange" : {
        "min" : 0,
        "max" : 1
      }
    } ],
    "responsibilityInfos" : [ {
      "text" : {
        "fi" : "text"
      },
      "personId" : "otm-test-user-96",
      "roleUrn" : "urn:code:course-unit-realisation-responsibility-info-type:responsible-teacher",
      "validityPeriod" : { }
    } ],
    "organisations" : [ {
      "organisationId" : "otm-org-5",
      "educationalInstitutionUrn" : null,
      "roleUrn" : "urn:code:organisation-role:responsible-organisation",
      "share" : 1,
      "validityPeriod" : { }
    } ],
    "enrolmentPeriod" : {
      "startDateTime" : "2020-09-12T00:00",
      "endDateTime" : "2020-09-18T00:00"
    },
    "lateEnrolmentEnd" : "2020-12-19T00:00",
    "enrolmentAdditionalCancellationEnd" : "2020-10-19T00:00",
    "externalEnrolmentLink" : {
      "url" : {
        "en" : "http://www.english-example.com",
        "fi" : "http://www.example.com/fi/"
      },
      "label" : {
        "en" : "Display in English",
        "fi" : "Display suomeksi"
      }
    },
    "usesExternalEnrolment" : true,
    "customCodeUrns" : null,
    "continuousEnrolment" : false,
    "externalStructureLink" : null,
    "usesExternalStructure" : false
  } ]
}

Example Curl request

$ curl 'http://localhost:8080/api/course-unit-realisations/v1/export?since=34930&limit=5' -i -X GET \
    -H 'Accept: application/json'

Example HTTP request

GET /api/course-unit-realisations/v1/export?since=34930&limit=5 HTTP/1.1
Accept: application/json
Host: localhost:8080

Example HTTP response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 3439

{
  "greatestOrdinal" : 34931,
  "hasMore" : false,
  "entities" : [ {
    "metadata" : {
      "revision" : 1,
      "createdBy" : "spectre-course-unit-admin-user",
      "createdOn" : "2020-11-19T08:38:40.829007",
      "lastModifiedBy" : "spectre-course-unit-admin-user",
      "lastModifiedOn" : "2020-11-19T08:38:40.829007",
      "modificationOrdinal" : 34931
    },
    "documentState" : "DRAFT",
    "id" : "otm-705a763e-ac53-4d01-87e5-cda1737e3bef",
    "universityOrgIds" : [ "the-spectre" ],
    "flowState" : "PUBLISHED",
    "massExamSessionId" : null,
    "massExamSessionName" : null,
    "name" : {
      "fi" : "Tentti"
    },
    "nameSpecifier" : {
      "fi" : "Biologian perusteiden tentti"
    },
    "assessmentItemIds" : [ "otm-ai-1", "otm-ai-2" ],
    "tweetText" : null,
    "literature" : [ {
      "type" : "LiteratureName",
      "name" : "Romantic life of African Elephants",
      "localId" : "899246ad-8b5f-4d7d-b787-a70653cec8be"
    } ],
    "learningMaterial" : null,
    "learningEnvironmentDescription" : null,
    "learningEnvironments" : [ ],
    "studyFormat" : null,
    "additionalInfo" : null,
    "publishDate" : "2020-09-19",
    "activityPeriod" : {
      "startDate" : "2020-09-19",
      "endDate" : "2021-07-19"
    },
    "teachingLanguageUrn" : "urn:code:language:fi",
    "courseUnitRealisationTypeUrn" : "urn:code:course-unit-realisation-type:independent-work-essay",
    "studyGroupSets" : [ {
      "localId" : "sgs-Virkkaus",
      "name" : {
        "en" : "Virkkaus",
        "fi" : "Virkkaus"
      },
      "studySubGroups" : [ {
        "metadata" : null,
        "id" : "otm-3d618d54-7037-4743-9c65-2f797ad49762",
        "name" : {
          "fi" : "Group_1_AVirkkaus"
        },
        "studyEventIds" : [ "study-event-1" ],
        "teacherIds" : [ "otm-teacher-id-3" ],
        "cancelled" : false,
        "size" : null
      }, {
        "metadata" : null,
        "id" : "otm-d025a55c-4eba-44a6-b760-2587e1fe5446",
        "name" : {
          "fi" : "Group_1_BVirkkaus"
        },
        "studyEventIds" : [ "study-event-1" ],
        "teacherIds" : [ "otm-teacher-id-3" ],
        "cancelled" : false,
        "size" : null
      } ],
      "subGroupRange" : {
        "min" : 0,
        "max" : 1
      }
    } ],
    "responsibilityInfos" : [ {
      "text" : {
        "fi" : "text"
      },
      "personId" : "otm-test-user-96",
      "roleUrn" : "urn:code:course-unit-realisation-responsibility-info-type:responsible-teacher",
      "validityPeriod" : { }
    } ],
    "organisations" : [ {
      "organisationId" : "otm-org-5",
      "educationalInstitutionUrn" : null,
      "roleUrn" : "urn:code:organisation-role:responsible-organisation",
      "share" : 1,
      "validityPeriod" : { }
    } ],
    "enrolmentPeriod" : {
      "startDateTime" : "2020-09-12T00:00",
      "endDateTime" : "2020-09-18T00:00"
    },
    "lateEnrolmentEnd" : "2020-12-19T00:00",
    "enrolmentAdditionalCancellationEnd" : "2020-10-19T00:00",
    "externalEnrolmentLink" : {
      "url" : {
        "en" : "http://www.english-example.com",
        "fi" : "http://www.example.com/fi/"
      },
      "label" : {
        "en" : "Display in English",
        "fi" : "Display suomeksi"
      }
    },
    "usesExternalEnrolment" : true,
    "customCodeUrns" : null,
    "continuousEnrolment" : false,
    "externalStructureLink" : null,
    "usesExternalStructure" : false
  } ]
}

Example Curl request

$ curl 'http://localhost:8080/api/course-unit-realisations/v1/export?since=34930&limit=5' -i -X GET \
    -H 'Accept: application/json'

Import course unit realisations

POST /api/course-unit-realisations/v1/import

Description

Imports with strict validation

Parameters

Type Name Description Schema

Body

courseUnitRealisations
required

courseUnitRealisations

Responses

HTTP Code Description Schema

200

OK

No Content

201

Created

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes

  • application/json

Produces

  • */*

Tags

  • import

Patch course unit realisations

PATCH /api/course-unit-realisations/v1/import

Description

Patch imports with strict validation

Parameters

Type Name Description Schema

Body

patchEntitites
required

patchEntitites

< PatchEntity > array

Responses

HTTP Code Description Schema

200

OK

No Content

204

No Content

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

Consumes

  • application/json

Produces

  • */*

Tags

  • import

Import legacy course unit realisations

POST /api/course-unit-realisations/v1/import/legacy

Description

Import with a lenient legacy validation

Parameters

Type Name Description Schema

Body

courseUnitRealisations
required

courseUnitRealisations

Responses

HTTP Code Description Schema

200

OK

No Content

201

Created

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes

  • application/json

Produces

  • */*

Tags

  • import

Example HTTP request

POST /api/course-unit-realisations/v1/import/legacy HTTP/1.1
Content-Type: application/json
Content-Length: 2986
Host: localhost:8080

[ {
  "metadata" : {
    "revision" : null,
    "createdBy" : null,
    "createdOn" : null,
    "lastModifiedBy" : null,
    "lastModifiedOn" : null,
    "modificationOrdinal" : null
  },
  "id" : "lega-cy-cur",
  "universityOrgIds" : [ "the-spectre" ],
  "flowState" : "PUBLISHED",
  "massExamSessionId" : null,
  "massExamSessionName" : null,
  "name" : {
    "fi" : "Tentti"
  },
  "nameSpecifier" : {
    "fi" : "Biologian perusteiden tentti"
  },
  "assessmentItemIds" : [ "otm-ai-1", "otm-ai-2" ],
  "tweetText" : null,
  "literature" : [ {
    "type" : "LiteratureName",
    "name" : "Romantic life of African Elephants",
    "localId" : "32550f90-669d-4a1c-8670-7b2b79a53564"
  } ],
  "learningMaterial" : null,
  "learningEnvironmentDescription" : null,
  "learningEnvironments" : [ ],
  "studyFormat" : null,
  "additionalInfo" : null,
  "publishDate" : null,
  "activityPeriod" : {
    "startDate" : "2020-09-19",
    "endDate" : "2021-07-19"
  },
  "teachingLanguageUrn" : "urn:code:language:fi",
  "courseUnitRealisationTypeUrn" : "urn:code:course-unit-realisation-type:independent-work-essay",
  "studyGroupSets" : [ {
    "localId" : "sgs-Virkkaus",
    "name" : {
      "en" : "Virkkaus",
      "fi" : "Virkkaus"
    },
    "studySubGroups" : [ {
      "metadata" : null,
      "id" : "otm-b67f886f-4bbd-4022-bfca-9dd76a0d3506",
      "name" : {
        "fi" : "Group_1_AVirkkaus"
      },
      "studyEventIds" : [ "study-event-1" ],
      "teacherIds" : [ "otm-teacher-id-3" ],
      "cancelled" : false,
      "size" : null
    }, {
      "metadata" : null,
      "id" : "otm-dee09ba7-2b1d-420d-b5cb-61f1debfc801",
      "name" : {
        "fi" : "Group_1_BVirkkaus"
      },
      "studyEventIds" : [ "study-event-1" ],
      "teacherIds" : [ "otm-teacher-id-3" ],
      "cancelled" : false,
      "size" : null
    } ],
    "subGroupRange" : {
      "min" : 0,
      "max" : 1
    }
  } ],
  "responsibilityInfos" : [ {
    "text" : {
      "fi" : "text"
    },
    "personId" : "otm-test-user-96",
    "roleUrn" : "urn:code:course-unit-realisation-responsibility-info-type:responsible-teacher",
    "validityPeriod" : { }
  } ],
  "organisations" : [ {
    "organisationId" : "otm-org-5",
    "educationalInstitutionUrn" : null,
    "roleUrn" : "urn:code:organisation-role:responsible-organisation",
    "share" : 1,
    "validityPeriod" : { }
  } ],
  "enrolmentPeriod" : {
    "startDateTime" : "2020-09-12T00:00",
    "endDateTime" : "2020-09-18T00:00"
  },
  "lateEnrolmentEnd" : "2020-12-19T00:00",
  "enrolmentAdditionalCancellationEnd" : "2020-10-19T00:00",
  "externalEnrolmentLink" : {
    "url" : {
      "en" : "http://www.english-example.com",
      "fi" : "http://www.example.com/fi/"
    },
    "label" : {
      "en" : "Display in English",
      "fi" : "Display suomeksi"
    }
  },
  "usesExternalEnrolment" : true,
  "customCodeUrns" : null,
  "continuousEnrolment" : false,
  "externalStructureLink" : null,
  "usesExternalStructure" : false
} ]

Example HTTP response

HTTP/1.1 200 OK

Example Curl request

$ curl 'http://localhost:8080/api/course-unit-realisations/v1/import/legacy' -i -X POST \
    -H 'Content-Type: application/json' \
    -d '[ {
  "metadata" : {
    "revision" : null,
    "createdBy" : null,
    "createdOn" : null,
    "lastModifiedBy" : null,
    "lastModifiedOn" : null,
    "modificationOrdinal" : null
  },
  "id" : "lega-cy-cur",
  "universityOrgIds" : [ "the-spectre" ],
  "flowState" : "PUBLISHED",
  "massExamSessionId" : null,
  "massExamSessionName" : null,
  "name" : {
    "fi" : "Tentti"
  },
  "nameSpecifier" : {
    "fi" : "Biologian perusteiden tentti"
  },
  "assessmentItemIds" : [ "otm-ai-1", "otm-ai-2" ],
  "tweetText" : null,
  "literature" : [ {
    "type" : "LiteratureName",
    "name" : "Romantic life of African Elephants",
    "localId" : "32550f90-669d-4a1c-8670-7b2b79a53564"
  } ],
  "learningMaterial" : null,
  "learningEnvironmentDescription" : null,
  "learningEnvironments" : [ ],
  "studyFormat" : null,
  "additionalInfo" : null,
  "publishDate" : null,
  "activityPeriod" : {
    "startDate" : "2020-09-19",
    "endDate" : "2021-07-19"
  },
  "teachingLanguageUrn" : "urn:code:language:fi",
  "courseUnitRealisationTypeUrn" : "urn:code:course-unit-realisation-type:independent-work-essay",
  "studyGroupSets" : [ {
    "localId" : "sgs-Virkkaus",
    "name" : {
      "en" : "Virkkaus",
      "fi" : "Virkkaus"
    },
    "studySubGroups" : [ {
      "metadata" : null,
      "id" : "otm-b67f886f-4bbd-4022-bfca-9dd76a0d3506",
      "name" : {
        "fi" : "Group_1_AVirkkaus"
      },
      "studyEventIds" : [ "study-event-1" ],
      "teacherIds" : [ "otm-teacher-id-3" ],
      "cancelled" : false,
      "size" : null
    }, {
      "metadata" : null,
      "id" : "otm-dee09ba7-2b1d-420d-b5cb-61f1debfc801",
      "name" : {
        "fi" : "Group_1_BVirkkaus"
      },
      "studyEventIds" : [ "study-event-1" ],
      "teacherIds" : [ "otm-teacher-id-3" ],
      "cancelled" : false,
      "size" : null
    } ],
    "subGroupRange" : {
      "min" : 0,
      "max" : 1
    }
  } ],
  "responsibilityInfos" : [ {
    "text" : {
      "fi" : "text"
    },
    "personId" : "otm-test-user-96",
    "roleUrn" : "urn:code:course-unit-realisation-responsibility-info-type:responsible-teacher",
    "validityPeriod" : { }
  } ],
  "organisations" : [ {
    "organisationId" : "otm-org-5",
    "educationalInstitutionUrn" : null,
    "roleUrn" : "urn:code:organisation-role:responsible-organisation",
    "share" : 1,
    "validityPeriod" : { }
  } ],
  "enrolmentPeriod" : {
    "startDateTime" : "2020-09-12T00:00",
    "endDateTime" : "2020-09-18T00:00"
  },
  "lateEnrolmentEnd" : "2020-12-19T00:00",
  "enrolmentAdditionalCancellationEnd" : "2020-10-19T00:00",
  "externalEnrolmentLink" : {
    "url" : {
      "en" : "http://www.english-example.com",
      "fi" : "http://www.example.com/fi/"
    },
    "label" : {
      "en" : "Display in English",
      "fi" : "Display suomeksi"
    }
  },
  "usesExternalEnrolment" : true,
  "customCodeUrns" : null,
  "continuousEnrolment" : false,
  "externalStructureLink" : null,
  "usesExternalStructure" : false
} ]'

Example HTTP request

POST /api/course-unit-realisations/v1/import/legacy HTTP/1.1
Content-Type: application/json
Content-Length: 2986
Host: localhost:8080

[ {
  "metadata" : {
    "revision" : null,
    "createdBy" : null,
    "createdOn" : null,
    "lastModifiedBy" : null,
    "lastModifiedOn" : null,
    "modificationOrdinal" : null
  },
  "id" : "lega-cy-cur",
  "universityOrgIds" : [ "the-spectre" ],
  "flowState" : "PUBLISHED",
  "massExamSessionId" : null,
  "massExamSessionName" : null,
  "name" : {
    "fi" : "Tentti"
  },
  "nameSpecifier" : {
    "fi" : "Biologian perusteiden tentti"
  },
  "assessmentItemIds" : [ "otm-ai-1", "otm-ai-2" ],
  "tweetText" : null,
  "literature" : [ {
    "type" : "LiteratureName",
    "name" : "Romantic life of African Elephants",
    "localId" : "32550f90-669d-4a1c-8670-7b2b79a53564"
  } ],
  "learningMaterial" : null,
  "learningEnvironmentDescription" : null,
  "learningEnvironments" : [ ],
  "studyFormat" : null,
  "additionalInfo" : null,
  "publishDate" : null,
  "activityPeriod" : {
    "startDate" : "2020-09-19",
    "endDate" : "2021-07-19"
  },
  "teachingLanguageUrn" : "urn:code:language:fi",
  "courseUnitRealisationTypeUrn" : "urn:code:course-unit-realisation-type:independent-work-essay",
  "studyGroupSets" : [ {
    "localId" : "sgs-Virkkaus",
    "name" : {
      "en" : "Virkkaus",
      "fi" : "Virkkaus"
    },
    "studySubGroups" : [ {
      "metadata" : null,
      "id" : "otm-b67f886f-4bbd-4022-bfca-9dd76a0d3506",
      "name" : {
        "fi" : "Group_1_AVirkkaus"
      },
      "studyEventIds" : [ "study-event-1" ],
      "teacherIds" : [ "otm-teacher-id-3" ],
      "cancelled" : false,
      "size" : null
    }, {
      "metadata" : null,
      "id" : "otm-dee09ba7-2b1d-420d-b5cb-61f1debfc801",
      "name" : {
        "fi" : "Group_1_BVirkkaus"
      },
      "studyEventIds" : [ "study-event-1" ],
      "teacherIds" : [ "otm-teacher-id-3" ],
      "cancelled" : false,
      "size" : null
    } ],
    "subGroupRange" : {
      "min" : 0,
      "max" : 1
    }
  } ],
  "responsibilityInfos" : [ {
    "text" : {
      "fi" : "text"
    },
    "personId" : "otm-test-user-96",
    "roleUrn" : "urn:code:course-unit-realisation-responsibility-info-type:responsible-teacher",
    "validityPeriod" : { }
  } ],
  "organisations" : [ {
    "organisationId" : "otm-org-5",
    "educationalInstitutionUrn" : null,
    "roleUrn" : "urn:code:organisation-role:responsible-organisation",
    "share" : 1,
    "validityPeriod" : { }
  } ],
  "enrolmentPeriod" : {
    "startDateTime" : "2020-09-12T00:00",
    "endDateTime" : "2020-09-18T00:00"
  },
  "lateEnrolmentEnd" : "2020-12-19T00:00",
  "enrolmentAdditionalCancellationEnd" : "2020-10-19T00:00",
  "externalEnrolmentLink" : {
    "url" : {
      "en" : "http://www.english-example.com",
      "fi" : "http://www.example.com/fi/"
    },
    "label" : {
      "en" : "Display in English",
      "fi" : "Display suomeksi"
    }
  },
  "usesExternalEnrolment" : true,
  "customCodeUrns" : null,
  "continuousEnrolment" : false,
  "externalStructureLink" : null,
  "usesExternalStructure" : false
} ]

Example HTTP response

HTTP/1.1 200 OK

Example Curl request

$ curl 'http://localhost:8080/api/course-unit-realisations/v1/import/legacy' -i -X POST \
    -H 'Content-Type: application/json' \
    -d '[ {
  "metadata" : {
    "revision" : null,
    "createdBy" : null,
    "createdOn" : null,
    "lastModifiedBy" : null,
    "lastModifiedOn" : null,
    "modificationOrdinal" : null
  },
  "id" : "lega-cy-cur",
  "universityOrgIds" : [ "the-spectre" ],
  "flowState" : "PUBLISHED",
  "massExamSessionId" : null,
  "massExamSessionName" : null,
  "name" : {
    "fi" : "Tentti"
  },
  "nameSpecifier" : {
    "fi" : "Biologian perusteiden tentti"
  },
  "assessmentItemIds" : [ "otm-ai-1", "otm-ai-2" ],
  "tweetText" : null,
  "literature" : [ {
    "type" : "LiteratureName",
    "name" : "Romantic life of African Elephants",
    "localId" : "32550f90-669d-4a1c-8670-7b2b79a53564"
  } ],
  "learningMaterial" : null,
  "learningEnvironmentDescription" : null,
  "learningEnvironments" : [ ],
  "studyFormat" : null,
  "additionalInfo" : null,
  "publishDate" : null,
  "activityPeriod" : {
    "startDate" : "2020-09-19",
    "endDate" : "2021-07-19"
  },
  "teachingLanguageUrn" : "urn:code:language:fi",
  "courseUnitRealisationTypeUrn" : "urn:code:course-unit-realisation-type:independent-work-essay",
  "studyGroupSets" : [ {
    "localId" : "sgs-Virkkaus",
    "name" : {
      "en" : "Virkkaus",
      "fi" : "Virkkaus"
    },
    "studySubGroups" : [ {
      "metadata" : null,
      "id" : "otm-b67f886f-4bbd-4022-bfca-9dd76a0d3506",
      "name" : {
        "fi" : "Group_1_AVirkkaus"
      },
      "studyEventIds" : [ "study-event-1" ],
      "teacherIds" : [ "otm-teacher-id-3" ],
      "cancelled" : false,
      "size" : null
    }, {
      "metadata" : null,
      "id" : "otm-dee09ba7-2b1d-420d-b5cb-61f1debfc801",
      "name" : {
        "fi" : "Group_1_BVirkkaus"
      },
      "studyEventIds" : [ "study-event-1" ],
      "teacherIds" : [ "otm-teacher-id-3" ],
      "cancelled" : false,
      "size" : null
    } ],
    "subGroupRange" : {
      "min" : 0,
      "max" : 1
    }
  } ],
  "responsibilityInfos" : [ {
    "text" : {
      "fi" : "text"
    },
    "personId" : "otm-test-user-96",
    "roleUrn" : "urn:code:course-unit-realisation-responsibility-info-type:responsible-teacher",
    "validityPeriod" : { }
  } ],
  "organisations" : [ {
    "organisationId" : "otm-org-5",
    "educationalInstitutionUrn" : null,
    "roleUrn" : "urn:code:organisation-role:responsible-organisation",
    "share" : 1,
    "validityPeriod" : { }
  } ],
  "enrolmentPeriod" : {
    "startDateTime" : "2020-09-12T00:00",
    "endDateTime" : "2020-09-18T00:00"
  },
  "lateEnrolmentEnd" : "2020-12-19T00:00",
  "enrolmentAdditionalCancellationEnd" : "2020-10-19T00:00",
  "externalEnrolmentLink" : {
    "url" : {
      "en" : "http://www.english-example.com",
      "fi" : "http://www.example.com/fi/"
    },
    "label" : {
      "en" : "Display in English",
      "fi" : "Display suomeksi"
    }
  },
  "usesExternalEnrolment" : true,
  "customCodeUrns" : null,
  "continuousEnrolment" : false,
  "externalStructureLink" : null,
  "usesExternalStructure" : false
} ]'

Patch legacy course unit realisations

PATCH /api/course-unit-realisations/v1/import/legacy

Description

Patch imports with lenient legacy validation

Parameters

Type Name Description Schema

Body

patchEntitites
required

patchEntitites

< PatchEntity > array

Responses

HTTP Code Description Schema

200

OK

No Content

204

No Content

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

Consumes

  • application/json

Produces

  • */*

Tags

  • import

Stream course unit realisations

GET /api/course-unit-realisations/v1/stream

Description

Entities can be exported as a stream in modification order, and the stream can be left open to listen for changes. Duplicates are possible if entities are modified several times.

Parameters

Type Name Description Schema Default

Query

follow
optional

Return entities modified after (exclusive comparison) this modification ordinal Alternate parameter with sinceTime. This is the recommended option.

boolean

"false"

Query

since
optional

Return entities modified after (exclusive comparison) this modification ordinal Alternate parameter with sinceTime. This is the recommended option.

integer (int64)

Query

sinceTime
optional

Return entities modified after (exclusive comparison) this ISO-8601 time. Alternate parameter with since. This is the not recommended but sometimes necessary option.

string (date-time)

Responses

HTTP Code Description Schema

200

OK

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Produces

  • */*

Tags

  • export

Get course unit realisation

GET /api/course-unit-realisations/v1/{courseUnitRealisationId}

Parameters

Type Name Description Schema

Path

courseUnitRealisationId
required

courseUnitRealisationId

string (otmid)

Responses

HTTP Code Description Schema

200

OK

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Produces

  • application/json

Tags

  • export

Get course units

GET /api/course-units/v1

Description

They are fetched by their groupId. Documents in DRAFT and ACTIVE states are fetched.

Parameters

Type Name Description Schema

Query

groupId
required

groupId

string (otmid)

Responses

HTTP Code Description Schema

200

OK

< CourseUnit > array

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Produces

  • application/json

Tags

  • export

Delete course units

POST /api/course-units/v1/batch-delete

Description

Delete a batch of course units by id or groupId

Parameters

Type Name Description Schema

Body

deleteBatch
required

deleteBatch

Responses

HTTP Code Description Schema

200

OK

No Content

201

Created

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes

  • application/json

Produces

  • */*

Tags

  • import

Example HTTP request

POST /api/course-units/v1/batch-delete HTTP/1.1
Content-Type: application/json
Accept: application/json
Authorization: Basic c3BlY3RyZS5pOnRlc3QxMjM=
Content-Length: 81
Host: localhost:8080

{
  "ids" : [ "otm-3f45c752-1a4b-4639-8189-1d8a2d6b94e4" ],
  "groupIds" : null
}

Example HTTP response

HTTP/1.1 200 OK
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY

Example Curl request

$ curl 'http://localhost:8080/api/course-units/v1/batch-delete' -i -u 'spectre.i:test123' -X POST \
    -H 'Content-Type: application/json' \
    -H 'Accept: application/json' \
    -d '{
  "ids" : [ "otm-3f45c752-1a4b-4639-8189-1d8a2d6b94e4" ],
  "groupIds" : null
}'

Example HTTP request

POST /api/course-units/v1/batch-delete HTTP/1.1
Content-Type: application/json
Accept: application/json
Authorization: Basic c3BlY3RyZS5pOnRlc3QxMjM=
Content-Length: 81
Host: localhost:8080

{
  "ids" : [ "otm-3f45c752-1a4b-4639-8189-1d8a2d6b94e4" ],
  "groupIds" : null
}

Example HTTP response

HTTP/1.1 200 OK
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY

Example Curl request

$ curl 'http://localhost:8080/api/course-units/v1/batch-delete' -i -u 'spectre.i:test123' -X POST \
    -H 'Content-Type: application/json' \
    -H 'Accept: application/json' \
    -d '{
  "ids" : [ "otm-3f45c752-1a4b-4639-8189-1d8a2d6b94e4" ],
  "groupIds" : null
}'

Find course unit versions by group id and curriculum period id

GET /api/course-units/v1/by-group-id

Description

NOTE! This is not an exact and deterministic search. It returns a single version representing each group id. By default ACTIVE course units are preferred over DRAFT course units and DELETED versions are the last resort, unless document states are limited using the documentStates parameter or preferByState parameter. Order of the course units is not guaranteed. Curriculum period id is not mandatory. When curriculum id is not given or the given curriculum does not contain all versions, search will use active and valid curricula starting from current proceeding to the future and then into the past in order to find versions.

Parameters

Type Name Description Schema Default

Query

curriculumPeriodId
optional

Curriculum period id. Return versions which belong to this curriculum period.

string (otmid)

Query

documentStates
optional

Return Course units only in given Document states.

< enum (DRAFT, ACTIVE, DELETED) > array(multi)

Query

groupId
optional

List of group ids whose course unit versions we are interested in.

< string (otmid) > array(multi)

Query

preferByState
optional

Prefer course units by state in the order ACTIVE, DRAFT, DELETED.

boolean

"true"

Query

universityId
optional

University whose course units are preferred.

string (otmid)

Responses

HTTP Code Description Schema

200

OK

< CourseUnit > array

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Produces

  • application/json

Tags

  • export

Export course units

GET /api/course-units/v1/export

Description

Entities can be exported in modification order based on one of two separate ways of specifying the starting point.With the 'since' parameter (recommended): an integer key (modification ordinal), which is different for every modification of the entity table. The ordinals are guaranteed to increase for each modification, but not guaranteed to be concecutive.With the 'sinceTime' parameter: an ISO-8601 timestamp. SinceTime is only supported for the case when the modification ordinal is not known by the exporter. In actual practice, if efficient export of all data is desired, the greatest modification ordinal from the previous export must be remembered and used as the since parameter for the next export. Both the since and sinceTime parameters are exclusive: if in one export you get the modification ordinals 3, 4 and 5, the next query should be export?since=5 and then you get the ordinals 6, 7, 8, etc.

Parameters

Type Name Description Schema

Query

limit
optional

Maximum number of course units to return. May return less, either because there are not enough change items, or because of internal limits. If limit is higher than 10 000, returns only 10 000 items.

integer (int32)

Query

since
optional

Return course units modified after (exclusive comparison) this modification ordinal (increasing value within Kori). Alternate parameter with sinceTime. This is the recommended option.

integer (int64)

Query

sinceTime
optional

Return course units modified after (exclusive comparison) this ISO-8601 time. Alternate parameter with since. This is the not recommended but sometimes necessary option.

string (date-time)

Responses

HTTP Code Description Schema

200

OK

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Produces

  • application/json

Tags

  • export

Example HTTP request

GET /api/course-units/v1/export?since=25884&limit=5 HTTP/1.1
Accept: application/json
Authorization: Basic c3BlY3RyZS5lOnRlc3QxMjM=
Host: localhost:8080

Example HTTP response

HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 2657

{
  "greatestOrdinal" : 25926,
  "hasMore" : false,
  "entities" : [ {
    "metadata" : {
      "revision" : 1,
      "createdBy" : "spectre-course-unit-admin-user",
      "createdOn" : "2020-11-19T08:38:21.810548",
      "lastModifiedBy" : "spectre-course-unit-admin-user",
      "lastModifiedOn" : "2020-11-19T08:38:21.810661",
      "modificationOrdinal" : 25926
    },
    "documentState" : "DRAFT",
    "id" : "otm-cfea16cd-bea2-406b-bfb8-28e6955d5655",
    "universityOrgIds" : [ "the-spectre" ],
    "groupId" : "otm-cfea16cd-bea2-406b-bfb8-28e6955d5655",
    "approvalState" : "urn:code:approval-state-type:not-ready",
    "credits" : {
      "min" : 0,
      "max" : 100
    },
    "completionMethods" : [ ],
    "assessmentItemOrder" : null,
    "substitutions" : [ ],
    "name" : {
      "fi" : "Opintojakso, jonka koodi on Koodi-xyzzynen-otm-cfea16cd-bea2-406b-bfb8-28e6955d5655"
    },
    "code" : "Koodi-xyzzynen-otm-cfea16cd-bea2-406b-bfb8-28e6955d5655",
    "abbreviation" : null,
    "validityPeriod" : {
      "startDate" : "1970-01-04"
    },
    "gradeScaleId" : "hy-0-5",
    "tweetText" : null,
    "outcomes" : null,
    "prerequisites" : null,
    "content" : null,
    "additional" : null,
    "learningMaterial" : null,
    "literature" : [ {
      "type" : "LiteratureName",
      "name" : "Raamattu",
      "localId" : "40d8ae2d-2b34-41f4-8de7-522eb476de58"
    }, {
      "type" : "LiteratureReference",
      "url" : "http://www.example.com",
      "localId" : "5ac2aedc-fc02-4ff7-92ce-38ed89071e2a"
    } ],
    "searchTags" : [ "kala", "meemi" ],
    "categoryTags" : [ ],
    "recommendedFormalPrerequisites" : [ ],
    "compulsoryFormalPrerequisites" : [ ],
    "studyFields" : [ "urn:code:study-field:2002-0" ],
    "studyLevel" : "urn:code:study-level:basic-studies",
    "courseUnitType" : "urn:code:course-unit-type:regular",
    "subject" : null,
    "cefrLevel" : null,
    "responsibilityInfos" : [ {
      "text" : {
        "fi" : "Jaska"
      },
      "personId" : null,
      "roleUrn" : "urn:code:module-responsibility-info-type:responsible-teacher",
      "validityPeriod" : { }
    } ],
    "organisations" : [ {
      "organisationId" : "the-spectre",
      "educationalInstitutionUrn" : null,
      "roleUrn" : "urn:code:organisation-role:responsible-organisation",
      "share" : 1,
      "validityPeriod" : { }
    } ],
    "possibleAttainmentLanguages" : [ "urn:code:language:fi" ],
    "equivalentCoursesInfo" : {
      "fi" : "*Ruhahaa*"
    },
    "curriculumPeriodIds" : [ "otm-test-curriculum-period-2015-2016" ],
    "customCodeUrns" : null,
    "inclusionApplicationInstruction" : null
  } ]
}

Example Curl request

$ curl 'http://localhost:8080/api/course-units/v1/export?since=25884&limit=5' -i -u 'spectre.e:test123' -X GET \
    -H 'Accept: application/json'

Example HTTP request

GET /api/course-units/v1/export?since=25884&limit=5 HTTP/1.1
Accept: application/json
Authorization: Basic c3BlY3RyZS5lOnRlc3QxMjM=
Host: localhost:8080

Example HTTP response

HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 2657

{
  "greatestOrdinal" : 25926,
  "hasMore" : false,
  "entities" : [ {
    "metadata" : {
      "revision" : 1,
      "createdBy" : "spectre-course-unit-admin-user",
      "createdOn" : "2020-11-19T08:38:21.810548",
      "lastModifiedBy" : "spectre-course-unit-admin-user",
      "lastModifiedOn" : "2020-11-19T08:38:21.810661",
      "modificationOrdinal" : 25926
    },
    "documentState" : "DRAFT",
    "id" : "otm-cfea16cd-bea2-406b-bfb8-28e6955d5655",
    "universityOrgIds" : [ "the-spectre" ],
    "groupId" : "otm-cfea16cd-bea2-406b-bfb8-28e6955d5655",
    "approvalState" : "urn:code:approval-state-type:not-ready",
    "credits" : {
      "min" : 0,
      "max" : 100
    },
    "completionMethods" : [ ],
    "assessmentItemOrder" : null,
    "substitutions" : [ ],
    "name" : {
      "fi" : "Opintojakso, jonka koodi on Koodi-xyzzynen-otm-cfea16cd-bea2-406b-bfb8-28e6955d5655"
    },
    "code" : "Koodi-xyzzynen-otm-cfea16cd-bea2-406b-bfb8-28e6955d5655",
    "abbreviation" : null,
    "validityPeriod" : {
      "startDate" : "1970-01-04"
    },
    "gradeScaleId" : "hy-0-5",
    "tweetText" : null,
    "outcomes" : null,
    "prerequisites" : null,
    "content" : null,
    "additional" : null,
    "learningMaterial" : null,
    "literature" : [ {
      "type" : "LiteratureName",
      "name" : "Raamattu",
      "localId" : "40d8ae2d-2b34-41f4-8de7-522eb476de58"
    }, {
      "type" : "LiteratureReference",
      "url" : "http://www.example.com",
      "localId" : "5ac2aedc-fc02-4ff7-92ce-38ed89071e2a"
    } ],
    "searchTags" : [ "kala", "meemi" ],
    "categoryTags" : [ ],
    "recommendedFormalPrerequisites" : [ ],
    "compulsoryFormalPrerequisites" : [ ],
    "studyFields" : [ "urn:code:study-field:2002-0" ],
    "studyLevel" : "urn:code:study-level:basic-studies",
    "courseUnitType" : "urn:code:course-unit-type:regular",
    "subject" : null,
    "cefrLevel" : null,
    "responsibilityInfos" : [ {
      "text" : {
        "fi" : "Jaska"
      },
      "personId" : null,
      "roleUrn" : "urn:code:module-responsibility-info-type:responsible-teacher",
      "validityPeriod" : { }
    } ],
    "organisations" : [ {
      "organisationId" : "the-spectre",
      "educationalInstitutionUrn" : null,
      "roleUrn" : "urn:code:organisation-role:responsible-organisation",
      "share" : 1,
      "validityPeriod" : { }
    } ],
    "possibleAttainmentLanguages" : [ "urn:code:language:fi" ],
    "equivalentCoursesInfo" : {
      "fi" : "*Ruhahaa*"
    },
    "curriculumPeriodIds" : [ "otm-test-curriculum-period-2015-2016" ],
    "customCodeUrns" : null,
    "inclusionApplicationInstruction" : null
  } ]
}

Example Curl request

$ curl 'http://localhost:8080/api/course-units/v1/export?since=25884&limit=5' -i -u 'spectre.e:test123' -X GET \
    -H 'Accept: application/json'

Import course units

POST /api/course-units/v1/import

Parameters

Type Name Description Schema

Body

courseUnits
required

courseUnits

< CourseUnit > array

Responses

HTTP Code Description Schema

200

OK

No Content

201

Created

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes

  • application/json

Produces

  • */*

Tags

  • import

Patch course units

PATCH /api/course-units/v1/import

Description

Patch imports with strict validation

Parameters

Type Name Description Schema

Body

patchEntities
required

patchEntities

< PatchEntity > array

Responses

HTTP Code Description Schema

200

OK

No Content

204

No Content

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

Consumes

  • application/json

Produces

  • */*

Tags

  • import

Import legacy course units

POST /api/course-units/v1/import/legacy

Description

Import with a lenient legacy validation

Parameters

Type Name Description Schema

Body

courseUnits
required

courseUnits

< CourseUnit > array

Responses

HTTP Code Description Schema

200

OK

No Content

201

Created

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes

  • application/json

Produces

  • */*

Tags

  • import

Example HTTP request

POST /api/course-units/v1/import/legacy HTTP/1.1
Content-Type: application/json
Authorization: Basic c3BlY3RyZS5pOnRlc3QxMjM=
Content-Length: 2106
Host: localhost:8080

[ {
  "metadata" : null,
  "id" : "otm-67b113cb-d29a-4763-9505-c8f81a668b8e",
  "universityOrgIds" : [ "the-spectre" ],
  "groupId" : "otm-67b113cb-d29a-4763-9505-c8f81a668b8e",
  "approvalState" : "urn:code:approval-state-type:not-ready",
  "credits" : null,
  "completionMethods" : [ ],
  "assessmentItemOrder" : null,
  "substitutions" : [ ],
  "name" : {
    "fi" : "Opintojakso, jonka koodi on Koodi-xyzzynen-otm-67b113cb-d29a-4763-9505-c8f81a668b8e"
  },
  "code" : "Koodi-xyzzynen-otm-67b113cb-d29a-4763-9505-c8f81a668b8e",
  "abbreviation" : null,
  "validityPeriod" : {
    "startDate" : "1970-01-04"
  },
  "gradeScaleId" : null,
  "tweetText" : null,
  "outcomes" : null,
  "prerequisites" : null,
  "content" : null,
  "additional" : null,
  "learningMaterial" : null,
  "literature" : [ {
    "type" : "LiteratureName",
    "name" : "Raamattu",
    "localId" : "a14fd313-e451-453d-933c-e17fe0892716"
  }, {
    "type" : "LiteratureReference",
    "url" : "http://www.example.com",
    "localId" : "c5475f71-cc22-4fea-b513-b076e7ad4426"
  } ],
  "searchTags" : [ "kala", "meemi" ],
  "categoryTags" : [ ],
  "recommendedFormalPrerequisites" : [ ],
  "compulsoryFormalPrerequisites" : [ ],
  "studyFields" : [ "urn:code:study-field:2002-0" ],
  "studyLevel" : "urn:code:study-level:basic-studies",
  "courseUnitType" : "urn:code:course-unit-type:regular",
  "subject" : null,
  "cefrLevel" : null,
  "responsibilityInfos" : [ {
    "text" : {
      "fi" : "Jaska"
    },
    "personId" : null,
    "roleUrn" : "urn:code:module-responsibility-info-type:responsible-teacher",
    "validityPeriod" : { }
  } ],
  "organisations" : [ {
    "organisationId" : "the-spectre",
    "educationalInstitutionUrn" : null,
    "roleUrn" : "urn:code:organisation-role:responsible-organisation",
    "share" : 1,
    "validityPeriod" : { }
  } ],
  "possibleAttainmentLanguages" : [ "urn:code:language:fi" ],
  "equivalentCoursesInfo" : {
    "fi" : "*Ruhahaa*"
  },
  "curriculumPeriodIds" : [ "otm-test-curriculum-period-2015-2016" ],
  "customCodeUrns" : null,
  "inclusionApplicationInstruction" : null
} ]

Example HTTP response

HTTP/1.1 200 OK
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY

Example Curl request

$ curl 'http://localhost:8080/api/course-units/v1/import/legacy' -i -u 'spectre.i:test123' -X POST \
    -H 'Content-Type: application/json' \
    -d '[ {
  "metadata" : null,
  "id" : "otm-67b113cb-d29a-4763-9505-c8f81a668b8e",
  "universityOrgIds" : [ "the-spectre" ],
  "groupId" : "otm-67b113cb-d29a-4763-9505-c8f81a668b8e",
  "approvalState" : "urn:code:approval-state-type:not-ready",
  "credits" : null,
  "completionMethods" : [ ],
  "assessmentItemOrder" : null,
  "substitutions" : [ ],
  "name" : {
    "fi" : "Opintojakso, jonka koodi on Koodi-xyzzynen-otm-67b113cb-d29a-4763-9505-c8f81a668b8e"
  },
  "code" : "Koodi-xyzzynen-otm-67b113cb-d29a-4763-9505-c8f81a668b8e",
  "abbreviation" : null,
  "validityPeriod" : {
    "startDate" : "1970-01-04"
  },
  "gradeScaleId" : null,
  "tweetText" : null,
  "outcomes" : null,
  "prerequisites" : null,
  "content" : null,
  "additional" : null,
  "learningMaterial" : null,
  "literature" : [ {
    "type" : "LiteratureName",
    "name" : "Raamattu",
    "localId" : "a14fd313-e451-453d-933c-e17fe0892716"
  }, {
    "type" : "LiteratureReference",
    "url" : "http://www.example.com",
    "localId" : "c5475f71-cc22-4fea-b513-b076e7ad4426"
  } ],
  "searchTags" : [ "kala", "meemi" ],
  "categoryTags" : [ ],
  "recommendedFormalPrerequisites" : [ ],
  "compulsoryFormalPrerequisites" : [ ],
  "studyFields" : [ "urn:code:study-field:2002-0" ],
  "studyLevel" : "urn:code:study-level:basic-studies",
  "courseUnitType" : "urn:code:course-unit-type:regular",
  "subject" : null,
  "cefrLevel" : null,
  "responsibilityInfos" : [ {
    "text" : {
      "fi" : "Jaska"
    },
    "personId" : null,
    "roleUrn" : "urn:code:module-responsibility-info-type:responsible-teacher",
    "validityPeriod" : { }
  } ],
  "organisations" : [ {
    "organisationId" : "the-spectre",
    "educationalInstitutionUrn" : null,
    "roleUrn" : "urn:code:organisation-role:responsible-organisation",
    "share" : 1,
    "validityPeriod" : { }
  } ],
  "possibleAttainmentLanguages" : [ "urn:code:language:fi" ],
  "equivalentCoursesInfo" : {
    "fi" : "*Ruhahaa*"
  },
  "curriculumPeriodIds" : [ "otm-test-curriculum-period-2015-2016" ],
  "customCodeUrns" : null,
  "inclusionApplicationInstruction" : null
} ]'

Example HTTP request

POST /api/course-units/v1/import/legacy HTTP/1.1
Content-Type: application/json
Authorization: Basic c3BlY3RyZS5pOnRlc3QxMjM=
Content-Length: 2106
Host: localhost:8080

[ {
  "metadata" : null,
  "id" : "otm-67b113cb-d29a-4763-9505-c8f81a668b8e",
  "universityOrgIds" : [ "the-spectre" ],
  "groupId" : "otm-67b113cb-d29a-4763-9505-c8f81a668b8e",
  "approvalState" : "urn:code:approval-state-type:not-ready",
  "credits" : null,
  "completionMethods" : [ ],
  "assessmentItemOrder" : null,
  "substitutions" : [ ],
  "name" : {
    "fi" : "Opintojakso, jonka koodi on Koodi-xyzzynen-otm-67b113cb-d29a-4763-9505-c8f81a668b8e"
  },
  "code" : "Koodi-xyzzynen-otm-67b113cb-d29a-4763-9505-c8f81a668b8e",
  "abbreviation" : null,
  "validityPeriod" : {
    "startDate" : "1970-01-04"
  },
  "gradeScaleId" : null,
  "tweetText" : null,
  "outcomes" : null,
  "prerequisites" : null,
  "content" : null,
  "additional" : null,
  "learningMaterial" : null,
  "literature" : [ {
    "type" : "LiteratureName",
    "name" : "Raamattu",
    "localId" : "a14fd313-e451-453d-933c-e17fe0892716"
  }, {
    "type" : "LiteratureReference",
    "url" : "http://www.example.com",
    "localId" : "c5475f71-cc22-4fea-b513-b076e7ad4426"
  } ],
  "searchTags" : [ "kala", "meemi" ],
  "categoryTags" : [ ],
  "recommendedFormalPrerequisites" : [ ],
  "compulsoryFormalPrerequisites" : [ ],
  "studyFields" : [ "urn:code:study-field:2002-0" ],
  "studyLevel" : "urn:code:study-level:basic-studies",
  "courseUnitType" : "urn:code:course-unit-type:regular",
  "subject" : null,
  "cefrLevel" : null,
  "responsibilityInfos" : [ {
    "text" : {
      "fi" : "Jaska"
    },
    "personId" : null,
    "roleUrn" : "urn:code:module-responsibility-info-type:responsible-teacher",
    "validityPeriod" : { }
  } ],
  "organisations" : [ {
    "organisationId" : "the-spectre",
    "educationalInstitutionUrn" : null,
    "roleUrn" : "urn:code:organisation-role:responsible-organisation",
    "share" : 1,
    "validityPeriod" : { }
  } ],
  "possibleAttainmentLanguages" : [ "urn:code:language:fi" ],
  "equivalentCoursesInfo" : {
    "fi" : "*Ruhahaa*"
  },
  "curriculumPeriodIds" : [ "otm-test-curriculum-period-2015-2016" ],
  "customCodeUrns" : null,
  "inclusionApplicationInstruction" : null
} ]

Example HTTP response

HTTP/1.1 200 OK
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY

Example Curl request

$ curl 'http://localhost:8080/api/course-units/v1/import/legacy' -i -u 'spectre.i:test123' -X POST \
    -H 'Content-Type: application/json' \
    -d '[ {
  "metadata" : null,
  "id" : "otm-67b113cb-d29a-4763-9505-c8f81a668b8e",
  "universityOrgIds" : [ "the-spectre" ],
  "groupId" : "otm-67b113cb-d29a-4763-9505-c8f81a668b8e",
  "approvalState" : "urn:code:approval-state-type:not-ready",
  "credits" : null,
  "completionMethods" : [ ],
  "assessmentItemOrder" : null,
  "substitutions" : [ ],
  "name" : {
    "fi" : "Opintojakso, jonka koodi on Koodi-xyzzynen-otm-67b113cb-d29a-4763-9505-c8f81a668b8e"
  },
  "code" : "Koodi-xyzzynen-otm-67b113cb-d29a-4763-9505-c8f81a668b8e",
  "abbreviation" : null,
  "validityPeriod" : {
    "startDate" : "1970-01-04"
  },
  "gradeScaleId" : null,
  "tweetText" : null,
  "outcomes" : null,
  "prerequisites" : null,
  "content" : null,
  "additional" : null,
  "learningMaterial" : null,
  "literature" : [ {
    "type" : "LiteratureName",
    "name" : "Raamattu",
    "localId" : "a14fd313-e451-453d-933c-e17fe0892716"
  }, {
    "type" : "LiteratureReference",
    "url" : "http://www.example.com",
    "localId" : "c5475f71-cc22-4fea-b513-b076e7ad4426"
  } ],
  "searchTags" : [ "kala", "meemi" ],
  "categoryTags" : [ ],
  "recommendedFormalPrerequisites" : [ ],
  "compulsoryFormalPrerequisites" : [ ],
  "studyFields" : [ "urn:code:study-field:2002-0" ],
  "studyLevel" : "urn:code:study-level:basic-studies",
  "courseUnitType" : "urn:code:course-unit-type:regular",
  "subject" : null,
  "cefrLevel" : null,
  "responsibilityInfos" : [ {
    "text" : {
      "fi" : "Jaska"
    },
    "personId" : null,
    "roleUrn" : "urn:code:module-responsibility-info-type:responsible-teacher",
    "validityPeriod" : { }
  } ],
  "organisations" : [ {
    "organisationId" : "the-spectre",
    "educationalInstitutionUrn" : null,
    "roleUrn" : "urn:code:organisation-role:responsible-organisation",
    "share" : 1,
    "validityPeriod" : { }
  } ],
  "possibleAttainmentLanguages" : [ "urn:code:language:fi" ],
  "equivalentCoursesInfo" : {
    "fi" : "*Ruhahaa*"
  },
  "curriculumPeriodIds" : [ "otm-test-curriculum-period-2015-2016" ],
  "customCodeUrns" : null,
  "inclusionApplicationInstruction" : null
} ]'

Patch legacy course units

PATCH /api/course-units/v1/import/legacy

Description

Patch imports with lenient legacy validation

Parameters

Type Name Description Schema

Body

patchEntities
required

patchEntities

< PatchEntity > array

Responses

HTTP Code Description Schema

200

OK

No Content

204

No Content

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

Consumes

  • application/json

Produces

  • */*

Tags

  • import

Stream course units

GET /api/course-units/v1/stream

Description

Entities can be exported as a stream in modification order, and the stream can be left open to listen for changes. Duplicates are possible if entities are modified several times.

Parameters

Type Name Description Schema Default

Query

follow
optional

Return modified messages after modified after (exclusive comparison) this modification ordinal Alternate parameter with sinceTime. This is the recommended option.

boolean

"false"

Query

since
optional

Return messages modified after (exclusive comparison) this modification ordinal Alternate parameter with sinceTime. This is the recommended option.

integer (int64)

Query

sinceTime
optional

Return messages modified after (exclusive comparison) this ISO-8601 time. Alternate parameter with since. This is the not recommended but sometimes necessary option.

string (date-time)

Responses

HTTP Code Description Schema

200

OK

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Produces

  • */*

Tags

  • export

Get course unit

GET /api/course-units/v1/{courseUnitId}

Description

Course unit is fetched by its id. The document state of the course unit does not affect the operation, i.e. even DELETED course units can be exported, they just have "documentState": "DELETED".

Parameters

Type Name Description Schema

Path

courseUnitId
required

courseUnitId

string (otmid)

Responses

HTTP Code Description Schema

200

OK

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Produces

  • application/json

Tags

  • export

Export curriculum periods

GET /api/curriculum-periods/v1/export

Description

Entities can be exported in modification order based on one of two separate ways of specifying the starting point.With the 'since' parameter (recommended): an integer key (modification ordinal), which is different for every modification of the entity table. The ordinals are guaranteed to increase for each modification, but not guaranteed to be concecutive.With the 'sinceTime' parameter: an ISO-8601 timestamp. SinceTime is only supported for the case when the modification ordinal is not known by the exporter. In actual practice, if efficient export of all data is desired, the greatest modification ordinal from the previous export must be remembered and used as the since parameter for the next export. Both the since and sinceTime parameters are exclusive: if in one export you get the modification ordinals 3, 4 and 5, the next query should be export?since=5 and then you get the ordinals 6, 7, 8, etc.

Parameters

Type Name Description Schema

Query

limit
optional

Maximum number of curriculum periods to return. May return less, either because there are not enough change items, or because of internal limits. If limit is higher than 10 000, returns only 10 000 items.

integer (int32)

Query

since
optional

Return curriculum periods modified after (exclusive comparison) this modification ordinal (increasing value within Kori). Alternate parameter with sinceTime. This is the recommended option.

integer (int64)

Query

sinceTime
optional

Return curriculum periods modified after (exclusive comparison) this ISO-8601 time. Alternate parameter with since. This is the not recommended but sometimes necessary option.

string (date-time)

Responses

HTTP Code Description Schema

200

OK

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Produces

  • application/json

Tags

  • export

Example HTTP request

GET /api/curriculum-periods/v1/export?since=36255&limit=5 HTTP/1.1
Accept: application/json
Host: localhost:8080

Example HTTP response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 675

{
  "greatestOrdinal" : 36257,
  "hasMore" : false,
  "entities" : [ {
    "metadata" : {
      "revision" : 1,
      "createdBy" : "arska",
      "createdOn" : "2020-11-19T08:38:44.009501",
      "lastModifiedBy" : "arska",
      "lastModifiedOn" : "2020-11-19T08:38:44.009617",
      "modificationOrdinal" : 36257
    },
    "documentState" : "ACTIVE",
    "id" : "otm-fa1053b6-4d85-47c9-b0bf-637f60991e2a",
    "universityOrgId" : "the-spectre",
    "name" : {
      "fi" : "Opetussuunnitelmakausi 2015-2016"
    },
    "abbreviation" : {
      "fi" : "2015-2016"
    },
    "activePeriod" : {
      "startDate" : "2015-08-01",
      "endDate" : "2016-08-01"
    }
  } ]
}

Example Curl request

$ curl 'http://localhost:8080/api/curriculum-periods/v1/export?since=36255&limit=5' -i -X GET \
    -H 'Accept: application/json'

Example HTTP request

GET /api/curriculum-periods/v1/export?since=36255&limit=5 HTTP/1.1
Accept: application/json
Host: localhost:8080

Example HTTP response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 675

{
  "greatestOrdinal" : 36257,
  "hasMore" : false,
  "entities" : [ {
    "metadata" : {
      "revision" : 1,
      "createdBy" : "arska",
      "createdOn" : "2020-11-19T08:38:44.009501",
      "lastModifiedBy" : "arska",
      "lastModifiedOn" : "2020-11-19T08:38:44.009617",
      "modificationOrdinal" : 36257
    },
    "documentState" : "ACTIVE",
    "id" : "otm-fa1053b6-4d85-47c9-b0bf-637f60991e2a",
    "universityOrgId" : "the-spectre",
    "name" : {
      "fi" : "Opetussuunnitelmakausi 2015-2016"
    },
    "abbreviation" : {
      "fi" : "2015-2016"
    },
    "activePeriod" : {
      "startDate" : "2015-08-01",
      "endDate" : "2016-08-01"
    }
  } ]
}

Example Curl request

$ curl 'http://localhost:8080/api/curriculum-periods/v1/export?since=36255&limit=5' -i -X GET \
    -H 'Accept: application/json'

Import curriculum periods

POST /api/curriculum-periods/v1/import

Parameters

Type Name Description Schema

Body

curriculumPeriods
required

curriculumPeriods

< CurriculumPeriod > array

Responses

HTTP Code Description Schema

200

OK

No Content

201

Created

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes

  • application/json

Produces

  • application/json

Tags

  • import

Example HTTP request

POST /api/curriculum-periods/v1/import HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 6892
Host: localhost:8080

[ {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-1900-2008",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 1900-2008 (108v)"
  },
  "abbreviation" : {
    "fi" : "1900-2008"
  },
  "activePeriod" : {
    "startDate" : "1900-08-01",
    "endDate" : "2008-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2008-2009",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2008-2009 (1v)"
  },
  "abbreviation" : {
    "fi" : "2008-2009"
  },
  "activePeriod" : {
    "startDate" : "2008-08-01",
    "endDate" : "2009-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2009-2010",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2009-2010 (1v)"
  },
  "abbreviation" : {
    "fi" : "2009-2010"
  },
  "activePeriod" : {
    "startDate" : "2009-08-01",
    "endDate" : "2010-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2010-2011",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2010-2011 (1v)"
  },
  "abbreviation" : {
    "fi" : "2010-2011"
  },
  "activePeriod" : {
    "startDate" : "2010-08-01",
    "endDate" : "2011-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2011-2012",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2011-2012 (1v)"
  },
  "abbreviation" : {
    "fi" : "2011-2012"
  },
  "activePeriod" : {
    "startDate" : "2011-08-01",
    "endDate" : "2012-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2012-2015",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2012-2015 (3v)"
  },
  "abbreviation" : {
    "fi" : "2012-2015"
  },
  "activePeriod" : {
    "startDate" : "2012-08-01",
    "endDate" : "2015-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2015-2016",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2015-2016 (1v)"
  },
  "abbreviation" : {
    "fi" : "2015-2016"
  },
  "activePeriod" : {
    "startDate" : "2015-08-01",
    "endDate" : "2016-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2016-2017",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2016-2017 (1v)"
  },
  "abbreviation" : {
    "fi" : "2016-2017"
  },
  "activePeriod" : {
    "startDate" : "2016-08-01",
    "endDate" : "2017-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2017-2018",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2017-2018 (1v)"
  },
  "abbreviation" : {
    "fi" : "2017-2018"
  },
  "activePeriod" : {
    "startDate" : "2017-08-01",
    "endDate" : "2018-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2018-2019",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2018-2019 (1v)"
  },
  "abbreviation" : {
    "fi" : "2018-2019"
  },
  "activePeriod" : {
    "startDate" : "2018-08-01",
    "endDate" : "2019-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2019-2020",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2019-2020 (1v)"
  },
  "abbreviation" : {
    "fi" : "2019-2020"
  },
  "activePeriod" : {
    "startDate" : "2019-08-01",
    "endDate" : "2020-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2020-2021",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2020-2021 (1v)"
  },
  "abbreviation" : {
    "fi" : "2020-2021"
  },
  "activePeriod" : {
    "startDate" : "2020-08-01",
    "endDate" : "2021-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2021-2022",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2021-2022 (1v)"
  },
  "abbreviation" : {
    "fi" : "2021-2022"
  },
  "activePeriod" : {
    "startDate" : "2021-08-01",
    "endDate" : "2022-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2022-2023",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2022-2023 (1v)"
  },
  "abbreviation" : {
    "fi" : "2022-2023"
  },
  "activePeriod" : {
    "startDate" : "2022-08-01",
    "endDate" : "2023-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2023-2024",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2023-2024 (1v)"
  },
  "abbreviation" : {
    "fi" : "2023-2024"
  },
  "activePeriod" : {
    "startDate" : "2023-08-01",
    "endDate" : "2024-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2024-2025",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2024-2025 (1v)"
  },
  "abbreviation" : {
    "fi" : "2024-2025"
  },
  "activePeriod" : {
    "startDate" : "2024-08-01",
    "endDate" : "2025-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2025-2026",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2025-2026 (1v)"
  },
  "abbreviation" : {
    "fi" : "2025-2026"
  },
  "activePeriod" : {
    "startDate" : "2025-08-01",
    "endDate" : "2026-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2026-2027",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2026-2027 (1v)"
  },
  "abbreviation" : {
    "fi" : "2026-2027"
  },
  "activePeriod" : {
    "startDate" : "2026-08-01",
    "endDate" : "2027-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2027-2028",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2027-2028 (1v)"
  },
  "abbreviation" : {
    "fi" : "2027-2028"
  },
  "activePeriod" : {
    "startDate" : "2027-08-01",
    "endDate" : "2028-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2028-2029",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2028-2029 (1v)"
  },
  "abbreviation" : {
    "fi" : "2028-2029"
  },
  "activePeriod" : {
    "startDate" : "2028-08-01",
    "endDate" : "2029-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2029-2030",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2029-2030 (1v)"
  },
  "abbreviation" : {
    "fi" : "2029-2030"
  },
  "activePeriod" : {
    "startDate" : "2029-08-01",
    "endDate" : "2030-08-01"
  }
} ]

Example HTTP response

HTTP/1.1 200 OK

Example Curl request

$ curl 'http://localhost:8080/api/curriculum-periods/v1/import' -i -X POST \
    -H 'Content-Type: application/json' \
    -H 'Accept: application/json' \
    -d '[ {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-1900-2008",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 1900-2008 (108v)"
  },
  "abbreviation" : {
    "fi" : "1900-2008"
  },
  "activePeriod" : {
    "startDate" : "1900-08-01",
    "endDate" : "2008-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2008-2009",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2008-2009 (1v)"
  },
  "abbreviation" : {
    "fi" : "2008-2009"
  },
  "activePeriod" : {
    "startDate" : "2008-08-01",
    "endDate" : "2009-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2009-2010",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2009-2010 (1v)"
  },
  "abbreviation" : {
    "fi" : "2009-2010"
  },
  "activePeriod" : {
    "startDate" : "2009-08-01",
    "endDate" : "2010-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2010-2011",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2010-2011 (1v)"
  },
  "abbreviation" : {
    "fi" : "2010-2011"
  },
  "activePeriod" : {
    "startDate" : "2010-08-01",
    "endDate" : "2011-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2011-2012",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2011-2012 (1v)"
  },
  "abbreviation" : {
    "fi" : "2011-2012"
  },
  "activePeriod" : {
    "startDate" : "2011-08-01",
    "endDate" : "2012-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2012-2015",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2012-2015 (3v)"
  },
  "abbreviation" : {
    "fi" : "2012-2015"
  },
  "activePeriod" : {
    "startDate" : "2012-08-01",
    "endDate" : "2015-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2015-2016",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2015-2016 (1v)"
  },
  "abbreviation" : {
    "fi" : "2015-2016"
  },
  "activePeriod" : {
    "startDate" : "2015-08-01",
    "endDate" : "2016-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2016-2017",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2016-2017 (1v)"
  },
  "abbreviation" : {
    "fi" : "2016-2017"
  },
  "activePeriod" : {
    "startDate" : "2016-08-01",
    "endDate" : "2017-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2017-2018",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2017-2018 (1v)"
  },
  "abbreviation" : {
    "fi" : "2017-2018"
  },
  "activePeriod" : {
    "startDate" : "2017-08-01",
    "endDate" : "2018-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2018-2019",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2018-2019 (1v)"
  },
  "abbreviation" : {
    "fi" : "2018-2019"
  },
  "activePeriod" : {
    "startDate" : "2018-08-01",
    "endDate" : "2019-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2019-2020",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2019-2020 (1v)"
  },
  "abbreviation" : {
    "fi" : "2019-2020"
  },
  "activePeriod" : {
    "startDate" : "2019-08-01",
    "endDate" : "2020-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2020-2021",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2020-2021 (1v)"
  },
  "abbreviation" : {
    "fi" : "2020-2021"
  },
  "activePeriod" : {
    "startDate" : "2020-08-01",
    "endDate" : "2021-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2021-2022",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2021-2022 (1v)"
  },
  "abbreviation" : {
    "fi" : "2021-2022"
  },
  "activePeriod" : {
    "startDate" : "2021-08-01",
    "endDate" : "2022-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2022-2023",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2022-2023 (1v)"
  },
  "abbreviation" : {
    "fi" : "2022-2023"
  },
  "activePeriod" : {
    "startDate" : "2022-08-01",
    "endDate" : "2023-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2023-2024",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2023-2024 (1v)"
  },
  "abbreviation" : {
    "fi" : "2023-2024"
  },
  "activePeriod" : {
    "startDate" : "2023-08-01",
    "endDate" : "2024-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2024-2025",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2024-2025 (1v)"
  },
  "abbreviation" : {
    "fi" : "2024-2025"
  },
  "activePeriod" : {
    "startDate" : "2024-08-01",
    "endDate" : "2025-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2025-2026",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2025-2026 (1v)"
  },
  "abbreviation" : {
    "fi" : "2025-2026"
  },
  "activePeriod" : {
    "startDate" : "2025-08-01",
    "endDate" : "2026-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2026-2027",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2026-2027 (1v)"
  },
  "abbreviation" : {
    "fi" : "2026-2027"
  },
  "activePeriod" : {
    "startDate" : "2026-08-01",
    "endDate" : "2027-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2027-2028",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2027-2028 (1v)"
  },
  "abbreviation" : {
    "fi" : "2027-2028"
  },
  "activePeriod" : {
    "startDate" : "2027-08-01",
    "endDate" : "2028-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2028-2029",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2028-2029 (1v)"
  },
  "abbreviation" : {
    "fi" : "2028-2029"
  },
  "activePeriod" : {
    "startDate" : "2028-08-01",
    "endDate" : "2029-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2029-2030",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2029-2030 (1v)"
  },
  "abbreviation" : {
    "fi" : "2029-2030"
  },
  "activePeriod" : {
    "startDate" : "2029-08-01",
    "endDate" : "2030-08-01"
  }
} ]'

Example HTTP request

POST /api/curriculum-periods/v1/import HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 6892
Host: localhost:8080

[ {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-1900-2008",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 1900-2008 (108v)"
  },
  "abbreviation" : {
    "fi" : "1900-2008"
  },
  "activePeriod" : {
    "startDate" : "1900-08-01",
    "endDate" : "2008-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2008-2009",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2008-2009 (1v)"
  },
  "abbreviation" : {
    "fi" : "2008-2009"
  },
  "activePeriod" : {
    "startDate" : "2008-08-01",
    "endDate" : "2009-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2009-2010",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2009-2010 (1v)"
  },
  "abbreviation" : {
    "fi" : "2009-2010"
  },
  "activePeriod" : {
    "startDate" : "2009-08-01",
    "endDate" : "2010-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2010-2011",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2010-2011 (1v)"
  },
  "abbreviation" : {
    "fi" : "2010-2011"
  },
  "activePeriod" : {
    "startDate" : "2010-08-01",
    "endDate" : "2011-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2011-2012",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2011-2012 (1v)"
  },
  "abbreviation" : {
    "fi" : "2011-2012"
  },
  "activePeriod" : {
    "startDate" : "2011-08-01",
    "endDate" : "2012-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2012-2015",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2012-2015 (3v)"
  },
  "abbreviation" : {
    "fi" : "2012-2015"
  },
  "activePeriod" : {
    "startDate" : "2012-08-01",
    "endDate" : "2015-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2015-2016",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2015-2016 (1v)"
  },
  "abbreviation" : {
    "fi" : "2015-2016"
  },
  "activePeriod" : {
    "startDate" : "2015-08-01",
    "endDate" : "2016-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2016-2017",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2016-2017 (1v)"
  },
  "abbreviation" : {
    "fi" : "2016-2017"
  },
  "activePeriod" : {
    "startDate" : "2016-08-01",
    "endDate" : "2017-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2017-2018",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2017-2018 (1v)"
  },
  "abbreviation" : {
    "fi" : "2017-2018"
  },
  "activePeriod" : {
    "startDate" : "2017-08-01",
    "endDate" : "2018-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2018-2019",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2018-2019 (1v)"
  },
  "abbreviation" : {
    "fi" : "2018-2019"
  },
  "activePeriod" : {
    "startDate" : "2018-08-01",
    "endDate" : "2019-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2019-2020",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2019-2020 (1v)"
  },
  "abbreviation" : {
    "fi" : "2019-2020"
  },
  "activePeriod" : {
    "startDate" : "2019-08-01",
    "endDate" : "2020-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2020-2021",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2020-2021 (1v)"
  },
  "abbreviation" : {
    "fi" : "2020-2021"
  },
  "activePeriod" : {
    "startDate" : "2020-08-01",
    "endDate" : "2021-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2021-2022",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2021-2022 (1v)"
  },
  "abbreviation" : {
    "fi" : "2021-2022"
  },
  "activePeriod" : {
    "startDate" : "2021-08-01",
    "endDate" : "2022-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2022-2023",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2022-2023 (1v)"
  },
  "abbreviation" : {
    "fi" : "2022-2023"
  },
  "activePeriod" : {
    "startDate" : "2022-08-01",
    "endDate" : "2023-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2023-2024",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2023-2024 (1v)"
  },
  "abbreviation" : {
    "fi" : "2023-2024"
  },
  "activePeriod" : {
    "startDate" : "2023-08-01",
    "endDate" : "2024-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2024-2025",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2024-2025 (1v)"
  },
  "abbreviation" : {
    "fi" : "2024-2025"
  },
  "activePeriod" : {
    "startDate" : "2024-08-01",
    "endDate" : "2025-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2025-2026",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2025-2026 (1v)"
  },
  "abbreviation" : {
    "fi" : "2025-2026"
  },
  "activePeriod" : {
    "startDate" : "2025-08-01",
    "endDate" : "2026-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2026-2027",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2026-2027 (1v)"
  },
  "abbreviation" : {
    "fi" : "2026-2027"
  },
  "activePeriod" : {
    "startDate" : "2026-08-01",
    "endDate" : "2027-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2027-2028",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2027-2028 (1v)"
  },
  "abbreviation" : {
    "fi" : "2027-2028"
  },
  "activePeriod" : {
    "startDate" : "2027-08-01",
    "endDate" : "2028-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2028-2029",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2028-2029 (1v)"
  },
  "abbreviation" : {
    "fi" : "2028-2029"
  },
  "activePeriod" : {
    "startDate" : "2028-08-01",
    "endDate" : "2029-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2029-2030",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2029-2030 (1v)"
  },
  "abbreviation" : {
    "fi" : "2029-2030"
  },
  "activePeriod" : {
    "startDate" : "2029-08-01",
    "endDate" : "2030-08-01"
  }
} ]

Example HTTP response

HTTP/1.1 200 OK

Example Curl request

$ curl 'http://localhost:8080/api/curriculum-periods/v1/import' -i -X POST \
    -H 'Content-Type: application/json' \
    -H 'Accept: application/json' \
    -d '[ {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-1900-2008",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 1900-2008 (108v)"
  },
  "abbreviation" : {
    "fi" : "1900-2008"
  },
  "activePeriod" : {
    "startDate" : "1900-08-01",
    "endDate" : "2008-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2008-2009",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2008-2009 (1v)"
  },
  "abbreviation" : {
    "fi" : "2008-2009"
  },
  "activePeriod" : {
    "startDate" : "2008-08-01",
    "endDate" : "2009-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2009-2010",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2009-2010 (1v)"
  },
  "abbreviation" : {
    "fi" : "2009-2010"
  },
  "activePeriod" : {
    "startDate" : "2009-08-01",
    "endDate" : "2010-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2010-2011",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2010-2011 (1v)"
  },
  "abbreviation" : {
    "fi" : "2010-2011"
  },
  "activePeriod" : {
    "startDate" : "2010-08-01",
    "endDate" : "2011-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2011-2012",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2011-2012 (1v)"
  },
  "abbreviation" : {
    "fi" : "2011-2012"
  },
  "activePeriod" : {
    "startDate" : "2011-08-01",
    "endDate" : "2012-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2012-2015",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2012-2015 (3v)"
  },
  "abbreviation" : {
    "fi" : "2012-2015"
  },
  "activePeriod" : {
    "startDate" : "2012-08-01",
    "endDate" : "2015-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2015-2016",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2015-2016 (1v)"
  },
  "abbreviation" : {
    "fi" : "2015-2016"
  },
  "activePeriod" : {
    "startDate" : "2015-08-01",
    "endDate" : "2016-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2016-2017",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2016-2017 (1v)"
  },
  "abbreviation" : {
    "fi" : "2016-2017"
  },
  "activePeriod" : {
    "startDate" : "2016-08-01",
    "endDate" : "2017-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2017-2018",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2017-2018 (1v)"
  },
  "abbreviation" : {
    "fi" : "2017-2018"
  },
  "activePeriod" : {
    "startDate" : "2017-08-01",
    "endDate" : "2018-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2018-2019",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2018-2019 (1v)"
  },
  "abbreviation" : {
    "fi" : "2018-2019"
  },
  "activePeriod" : {
    "startDate" : "2018-08-01",
    "endDate" : "2019-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2019-2020",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2019-2020 (1v)"
  },
  "abbreviation" : {
    "fi" : "2019-2020"
  },
  "activePeriod" : {
    "startDate" : "2019-08-01",
    "endDate" : "2020-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2020-2021",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2020-2021 (1v)"
  },
  "abbreviation" : {
    "fi" : "2020-2021"
  },
  "activePeriod" : {
    "startDate" : "2020-08-01",
    "endDate" : "2021-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2021-2022",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2021-2022 (1v)"
  },
  "abbreviation" : {
    "fi" : "2021-2022"
  },
  "activePeriod" : {
    "startDate" : "2021-08-01",
    "endDate" : "2022-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2022-2023",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2022-2023 (1v)"
  },
  "abbreviation" : {
    "fi" : "2022-2023"
  },
  "activePeriod" : {
    "startDate" : "2022-08-01",
    "endDate" : "2023-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2023-2024",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2023-2024 (1v)"
  },
  "abbreviation" : {
    "fi" : "2023-2024"
  },
  "activePeriod" : {
    "startDate" : "2023-08-01",
    "endDate" : "2024-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2024-2025",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2024-2025 (1v)"
  },
  "abbreviation" : {
    "fi" : "2024-2025"
  },
  "activePeriod" : {
    "startDate" : "2024-08-01",
    "endDate" : "2025-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2025-2026",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2025-2026 (1v)"
  },
  "abbreviation" : {
    "fi" : "2025-2026"
  },
  "activePeriod" : {
    "startDate" : "2025-08-01",
    "endDate" : "2026-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2026-2027",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2026-2027 (1v)"
  },
  "abbreviation" : {
    "fi" : "2026-2027"
  },
  "activePeriod" : {
    "startDate" : "2026-08-01",
    "endDate" : "2027-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2027-2028",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2027-2028 (1v)"
  },
  "abbreviation" : {
    "fi" : "2027-2028"
  },
  "activePeriod" : {
    "startDate" : "2027-08-01",
    "endDate" : "2028-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2028-2029",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2028-2029 (1v)"
  },
  "abbreviation" : {
    "fi" : "2028-2029"
  },
  "activePeriod" : {
    "startDate" : "2028-08-01",
    "endDate" : "2029-08-01"
  }
}, {
  "metadata" : null,
  "id" : "hy-test-curriculum-period-2029-2030",
  "universityOrgId" : "hy-university-root-id",
  "name" : {
    "fi" : "HY opetussuunnitelmakausi 2029-2030 (1v)"
  },
  "abbreviation" : {
    "fi" : "2029-2030"
  },
  "activePeriod" : {
    "startDate" : "2029-08-01",
    "endDate" : "2030-08-01"
  }
} ]'

Export disclosure authorization categories

GET /api/disclosure-categories/v1/export

Parameters

Type Name Description Schema

Query

limit
optional

Maximum number of disclosure authorization categories to return. May return less, either because there are not enough change items, or because of internal limits. If limit is higher than 10 000, returns only 10 000 items.

integer (int32)

Query

since
optional

Return disclosure authorization categories modified after (exclusive comparison) this modification ordinal (increasing value within Ori). Alternate parameter with sinceTime.

integer (int64)

Query

sinceTime
optional

Return disclosure authorization categories modified after (exclusive comparison) this ISO-8601 time. Alternate parameter with since. This is the not recommended but sometimes necessary option.

string (date-time)

Responses

HTTP Code Description Schema

200

OK

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Produces

  • application/json

Tags

  • export

Import disclosure authorization categories

POST /api/disclosure-categories/v1/import

Parameters

Type Name Description Schema

Body

disclosureAuthorizationCategories
required

disclosureAuthorizationCategories

Responses

HTTP Code Description Schema

200

OK

No Content

201

Created

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes

  • application/json

Produces

  • application/json

Tags

  • import

Get educations

GET /api/educations/v1

Description

Educations are fetched by their groupId. Documents in DRAFT and ACTIVE states are fetched.

Parameters

Type Name Description Schema

Query

groupId
required

groupId

string (otmid)

Responses

HTTP Code Description Schema

200

OK

< Education > array

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Produces

  • application/json

Tags

  • export

Export educations

GET /api/educations/v1/export

Description

Entities can be exported in modification order based on one of two separate ways of specifying the starting point.With the 'since' parameter (recommended): an integer key (modification ordinal), which is different for every modification of the entity table. The ordinals are guaranteed to increase for each modification, but not guaranteed to be concecutive.With the 'sinceTime' parameter: an ISO-8601 timestamp. SinceTime is only supported for the case when the modification ordinal is not known by the exporter. In actual practice, if efficient export of all data is desired, the greatest modification ordinal from the previous export must be remembered and used as the since parameter for the next export. Both the since and sinceTime parameters are exclusive: if in one export you get the modification ordinals 3, 4 and 5, the next query should be export?since=5 and then you get the ordinals 6, 7, 8, etc.

Parameters

Type Name Description Schema

Query

limit
optional

Maximum number of study educations to return. May return less, either because there are not enough change items, or because of internal limits. If limit is higher than 10 000, returns only 10 000 items.

integer (int32)

Query

since
optional

Return study educations modified after (exclusive comparison) this modification ordinal (increasing value within Kori). Alternate parameter with sinceTime. This is the recommended option.

integer (int64)

Query

sinceTime
optional

Return study educations modified after (exclusive comparison) this ISO-8601 time. Alternate parameter with since. This is the not recommended but sometimes necessary option.

string (date-time)

Responses

HTTP Code Description Schema

200

OK

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Produces

  • application/json

Tags

  • export

Example HTTP request

GET /api/educations/v1/export?since=39429&limit=5 HTTP/1.1
Accept: application/json
Authorization: Basic c3BlY3RyZS5lOnRlc3QxMjM=
Host: localhost:8080

Example HTTP response

HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 2918

{
  "greatestOrdinal" : 39430,
  "hasMore" : false,
  "entities" : [ {
    "metadata" : {
      "revision" : 1,
      "createdBy" : "spectre-edu-admin-user",
      "createdOn" : "2020-11-19T08:38:51.150450",
      "lastModifiedBy" : "spectre-edu-admin-user",
      "lastModifiedOn" : "2020-11-19T08:38:51.150552",
      "modificationOrdinal" : 39430
    },
    "documentState" : "DRAFT",
    "id" : "otm-9aac8c3d-0734-4a8a-9053-ab4e763812b7",
    "universityOrgIds" : [ "the-spectre" ],
    "groupId" : "otm-9aac8c3d-0734-4a8a-9053-ab4e763812b7",
    "name" : {
      "fi" : "Nimi educationille xyzzy"
    },
    "validityPeriod" : {
      "startDate" : "1970-01-01",
      "endDate" : "2071-12-04"
    },
    "code" : "Lyhenne educationille plaa",
    "educationType" : "urn:code:education-type:degree-education:masters-degree",
    "specialisationStudiesClassificationUrn" : null,
    "studyFields" : [ "urn:code:study-field:2002-2" ],
    "organisations" : [ {
      "organisationId" : "the-spectre",
      "educationalInstitutionUrn" : null,
      "roleUrn" : "urn:code:organisation-role:responsible-organisation",
      "share" : 1,
      "validityPeriod" : { }
    } ],
    "attainmentLanguages" : [ "urn:code:language:fi" ],
    "educationLocationUrn" : "urn:code:municipality:491",
    "outcomes" : null,
    "responsibilityInfos" : [ {
      "text" : null,
      "personId" : "test-person",
      "roleUrn" : "urn:code:education-responsibility-info-type:academic-responsibility",
      "validityPeriod" : { }
    } ],
    "structure" : {
      "phase1" : {
        "name" : {
          "fi" : "Alempi tutkinto"
        },
        "options" : [ {
          "localId" : "da5989e4-9a1e-4cf6-8eb1-40fb1fbabc22",
          "moduleGroupId" : "test-dp-1",
          "childOptions" : [ ],
          "acceptanceType" : "AUTOMATIC",
          "childNaming" : "urn:code:education-option-naming-type:specialisation",
          "degreeTitleUrn" : null,
          "educationClassificationUrn" : null
        } ]
      },
      "phase2" : null,
      "learningOpportunities" : [ {
        "localId" : "0d3674bc-9f5e-4fe3-b47f-58e15b919090",
        "name" : {
          "fi" : "Kouluttautumismahdollisuus 1"
        },
        "allowedPaths" : [ {
          "educationPhase1GroupId" : "test-dp-1"
        } ],
        "admissionTargetIds" : [ ],
        "phase1EducationClassificationUrn" : "urn:code:education-classification:koulutus_655404",
        "phase2EducationClassificationUrn" : null
      } ]
    },
    "defaultStudyRightExpirationRulesUrn" : "urn:code:study-right-expiration-rules:eternal",
    "defaultDecreeOnUniversityDegreesUrn" : "urn:code:decree-on-university-degrees:decree-2005",
    "studyRightExtensionInstructions" : null,
    "type" : "Education",
    "rule" : {
      "type" : "ModuleRule",
      "localId" : "0fb41430-d303-456f-9f60-7cdb05525739",
      "moduleGroupId" : "test-dp-1"
    }
  } ]
}

Example Curl request

$ curl 'http://localhost:8080/api/educations/v1/export?since=39429&limit=5' -i -u 'spectre.e:test123' -X GET \
    -H 'Accept: application/json'

Example HTTP request

GET /api/educations/v1/export?since=39429&limit=5 HTTP/1.1
Accept: application/json
Authorization: Basic c3BlY3RyZS5lOnRlc3QxMjM=
Host: localhost:8080

Example HTTP response

HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 2918

{
  "greatestOrdinal" : 39430,
  "hasMore" : false,
  "entities" : [ {
    "metadata" : {
      "revision" : 1,
      "createdBy" : "spectre-edu-admin-user",
      "createdOn" : "2020-11-19T08:38:51.150450",
      "lastModifiedBy" : "spectre-edu-admin-user",
      "lastModifiedOn" : "2020-11-19T08:38:51.150552",
      "modificationOrdinal" : 39430
    },
    "documentState" : "DRAFT",
    "id" : "otm-9aac8c3d-0734-4a8a-9053-ab4e763812b7",
    "universityOrgIds" : [ "the-spectre" ],
    "groupId" : "otm-9aac8c3d-0734-4a8a-9053-ab4e763812b7",
    "name" : {
      "fi" : "Nimi educationille xyzzy"
    },
    "validityPeriod" : {
      "startDate" : "1970-01-01",
      "endDate" : "2071-12-04"
    },
    "code" : "Lyhenne educationille plaa",
    "educationType" : "urn:code:education-type:degree-education:masters-degree",
    "specialisationStudiesClassificationUrn" : null,
    "studyFields" : [ "urn:code:study-field:2002-2" ],
    "organisations" : [ {
      "organisationId" : "the-spectre",
      "educationalInstitutionUrn" : null,
      "roleUrn" : "urn:code:organisation-role:responsible-organisation",
      "share" : 1,
      "validityPeriod" : { }
    } ],
    "attainmentLanguages" : [ "urn:code:language:fi" ],
    "educationLocationUrn" : "urn:code:municipality:491",
    "outcomes" : null,
    "responsibilityInfos" : [ {
      "text" : null,
      "personId" : "test-person",
      "roleUrn" : "urn:code:education-responsibility-info-type:academic-responsibility",
      "validityPeriod" : { }
    } ],
    "structure" : {
      "phase1" : {
        "name" : {
          "fi" : "Alempi tutkinto"
        },
        "options" : [ {
          "localId" : "da5989e4-9a1e-4cf6-8eb1-40fb1fbabc22",
          "moduleGroupId" : "test-dp-1",
          "childOptions" : [ ],
          "acceptanceType" : "AUTOMATIC",
          "childNaming" : "urn:code:education-option-naming-type:specialisation",
          "degreeTitleUrn" : null,
          "educationClassificationUrn" : null
        } ]
      },
      "phase2" : null,
      "learningOpportunities" : [ {
        "localId" : "0d3674bc-9f5e-4fe3-b47f-58e15b919090",
        "name" : {
          "fi" : "Kouluttautumismahdollisuus 1"
        },
        "allowedPaths" : [ {
          "educationPhase1GroupId" : "test-dp-1"
        } ],
        "admissionTargetIds" : [ ],
        "phase1EducationClassificationUrn" : "urn:code:education-classification:koulutus_655404",
        "phase2EducationClassificationUrn" : null
      } ]
    },
    "defaultStudyRightExpirationRulesUrn" : "urn:code:study-right-expiration-rules:eternal",
    "defaultDecreeOnUniversityDegreesUrn" : "urn:code:decree-on-university-degrees:decree-2005",
    "studyRightExtensionInstructions" : null,
    "type" : "Education",
    "rule" : {
      "type" : "ModuleRule",
      "localId" : "0fb41430-d303-456f-9f60-7cdb05525739",
      "moduleGroupId" : "test-dp-1"
    }
  } ]
}

Example Curl request

$ curl 'http://localhost:8080/api/educations/v1/export?since=39429&limit=5' -i -u 'spectre.e:test123' -X GET \
    -H 'Accept: application/json'

Import educations

POST /api/educations/v1/import

Description

Import with strict validation

Parameters

Type Name Description Schema

Body

educations
required

educations

< Education > array

Responses

HTTP Code Description Schema

200

OK

No Content

201

Created

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes

  • application/json

Produces

  • */*

Tags

  • import

Example HTTP request

POST /api/educations/v1/import HTTP/1.1
Content-Type: application/json
Authorization: Basic c3BlY3RyZS5pOnRlc3QxMjM=
Content-Length: 2358
Host: localhost:8080

[ {
  "metadata" : null,
  "id" : "otm-236dc0b3-3b56-4941-9128-b56b4324e2f8",
  "universityOrgIds" : [ "the-spectre" ],
  "groupId" : "otm-236dc0b3-3b56-4941-9128-b56b4324e2f8",
  "name" : {
    "fi" : "TEol FM"
  },
  "validityPeriod" : {
    "startDate" : "1970-01-01",
    "endDate" : "2071-12-03"
  },
  "code" : "CODE-1361611547",
  "educationType" : "urn:code:education-type:degree-education:masters-degree",
  "specialisationStudiesClassificationUrn" : null,
  "studyFields" : [ "urn:code:study-field:2002-0" ],
  "organisations" : [ {
    "organisationId" : "the-spectre",
    "educationalInstitutionUrn" : null,
    "roleUrn" : "urn:code:organisation-role:responsible-organisation",
    "share" : 1.0,
    "validityPeriod" : { }
  } ],
  "attainmentLanguages" : [ "urn:code:language:fi" ],
  "educationLocationUrn" : null,
  "outcomes" : null,
  "responsibilityInfos" : [ {
    "text" : null,
    "personId" : "otm-harri",
    "roleUrn" : "urn:code:education-responsibility-info-type:academic-responsibility",
    "validityPeriod" : { }
  } ],
  "structure" : {
    "phase1" : {
      "name" : {
        "fi" : "Alempi tutkinto"
      },
      "options" : [ {
        "localId" : "edu-option-60",
        "moduleGroupId" : "otm-testi-dp-TeM",
        "childOptions" : [ ],
        "acceptanceType" : "AUTOMATIC",
        "childNaming" : "urn:code:education-option-naming-type:specialisation",
        "degreeTitleUrn" : null,
        "educationClassificationUrn" : null
      } ]
    },
    "phase2" : null,
    "learningOpportunities" : [ {
      "localId" : "localId-121240778413203640",
      "name" : {
        "fi" : "Learning opportunity one two three"
      },
      "allowedPaths" : [ {
        "educationPhase1GroupId" : "otm-testi-dp-TeM"
      } ],
      "admissionTargetIds" : [ ],
      "phase1EducationClassificationUrn" : "urn:code:education-classification:koulutus_623112",
      "phase2EducationClassificationUrn" : null
    } ]
  },
  "defaultStudyRightExpirationRulesUrn" : "urn:code:study-right-expiration-rules:no-automatic-calculation",
  "defaultDecreeOnUniversityDegreesUrn" : "urn:code:decree-on-university-degrees:decree-2005",
  "studyRightExtensionInstructions" : null,
  "type" : "Education",
  "rule" : {
    "type" : "ModuleRule",
    "localId" : "edu-rule-1912038915",
    "moduleGroupId" : "otm-testi-dp-TeM"
  }
} ]

Example HTTP response

HTTP/1.1 200 OK
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY

Example Curl request

$ curl 'http://localhost:8080/api/educations/v1/import' -i -u 'spectre.i:test123' -X POST \
    -H 'Content-Type: application/json' \
    -d '[ {
  "metadata" : null,
  "id" : "otm-236dc0b3-3b56-4941-9128-b56b4324e2f8",
  "universityOrgIds" : [ "the-spectre" ],
  "groupId" : "otm-236dc0b3-3b56-4941-9128-b56b4324e2f8",
  "name" : {
    "fi" : "TEol FM"
  },
  "validityPeriod" : {
    "startDate" : "1970-01-01",
    "endDate" : "2071-12-03"
  },
  "code" : "CODE-1361611547",
  "educationType" : "urn:code:education-type:degree-education:masters-degree",
  "specialisationStudiesClassificationUrn" : null,
  "studyFields" : [ "urn:code:study-field:2002-0" ],
  "organisations" : [ {
    "organisationId" : "the-spectre",
    "educationalInstitutionUrn" : null,
    "roleUrn" : "urn:code:organisation-role:responsible-organisation",
    "share" : 1.0,
    "validityPeriod" : { }
  } ],
  "attainmentLanguages" : [ "urn:code:language:fi" ],
  "educationLocationUrn" : null,
  "outcomes" : null,
  "responsibilityInfos" : [ {
    "text" : null,
    "personId" : "otm-harri",
    "roleUrn" : "urn:code:education-responsibility-info-type:academic-responsibility",
    "validityPeriod" : { }
  } ],
  "structure" : {
    "phase1" : {
      "name" : {
        "fi" : "Alempi tutkinto"
      },
      "options" : [ {
        "localId" : "edu-option-60",
        "moduleGroupId" : "otm-testi-dp-TeM",
        "childOptions" : [ ],
        "acceptanceType" : "AUTOMATIC",
        "childNaming" : "urn:code:education-option-naming-type:specialisation",
        "degreeTitleUrn" : null,
        "educationClassificationUrn" : null
      } ]
    },
    "phase2" : null,
    "learningOpportunities" : [ {
      "localId" : "localId-121240778413203640",
      "name" : {
        "fi" : "Learning opportunity one two three"
      },
      "allowedPaths" : [ {
        "educationPhase1GroupId" : "otm-testi-dp-TeM"
      } ],
      "admissionTargetIds" : [ ],
      "phase1EducationClassificationUrn" : "urn:code:education-classification:koulutus_623112",
      "phase2EducationClassificationUrn" : null
    } ]
  },
  "defaultStudyRightExpirationRulesUrn" : "urn:code:study-right-expiration-rules:no-automatic-calculation",
  "defaultDecreeOnUniversityDegreesUrn" : "urn:code:decree-on-university-degrees:decree-2005",
  "studyRightExtensionInstructions" : null,
  "type" : "Education",
  "rule" : {
    "type" : "ModuleRule",
    "localId" : "edu-rule-1912038915",
    "moduleGroupId" : "otm-testi-dp-TeM"
  }
} ]'

Example HTTP request

POST /api/educations/v1/import HTTP/1.1
Content-Type: application/json
Authorization: Basic c3BlY3RyZS5pOnRlc3QxMjM=
Content-Length: 2358
Host: localhost:8080

[ {
  "metadata" : null,
  "id" : "otm-236dc0b3-3b56-4941-9128-b56b4324e2f8",
  "universityOrgIds" : [ "the-spectre" ],
  "groupId" : "otm-236dc0b3-3b56-4941-9128-b56b4324e2f8",
  "name" : {
    "fi" : "TEol FM"
  },
  "validityPeriod" : {
    "startDate" : "1970-01-01",
    "endDate" : "2071-12-03"
  },
  "code" : "CODE-1361611547",
  "educationType" : "urn:code:education-type:degree-education:masters-degree",
  "specialisationStudiesClassificationUrn" : null,
  "studyFields" : [ "urn:code:study-field:2002-0" ],
  "organisations" : [ {
    "organisationId" : "the-spectre",
    "educationalInstitutionUrn" : null,
    "roleUrn" : "urn:code:organisation-role:responsible-organisation",
    "share" : 1.0,
    "validityPeriod" : { }
  } ],
  "attainmentLanguages" : [ "urn:code:language:fi" ],
  "educationLocationUrn" : null,
  "outcomes" : null,
  "responsibilityInfos" : [ {
    "text" : null,
    "personId" : "otm-harri",
    "roleUrn" : "urn:code:education-responsibility-info-type:academic-responsibility",
    "validityPeriod" : { }
  } ],
  "structure" : {
    "phase1" : {
      "name" : {
        "fi" : "Alempi tutkinto"
      },
      "options" : [ {
        "localId" : "edu-option-60",
        "moduleGroupId" : "otm-testi-dp-TeM",
        "childOptions" : [ ],
        "acceptanceType" : "AUTOMATIC",
        "childNaming" : "urn:code:education-option-naming-type:specialisation",
        "degreeTitleUrn" : null,
        "educationClassificationUrn" : null
      } ]
    },
    "phase2" : null,
    "learningOpportunities" : [ {
      "localId" : "localId-121240778413203640",
      "name" : {
        "fi" : "Learning opportunity one two three"
      },
      "allowedPaths" : [ {
        "educationPhase1GroupId" : "otm-testi-dp-TeM"
      } ],
      "admissionTargetIds" : [ ],
      "phase1EducationClassificationUrn" : "urn:code:education-classification:koulutus_623112",
      "phase2EducationClassificationUrn" : null
    } ]
  },
  "defaultStudyRightExpirationRulesUrn" : "urn:code:study-right-expiration-rules:no-automatic-calculation",
  "defaultDecreeOnUniversityDegreesUrn" : "urn:code:decree-on-university-degrees:decree-2005",
  "studyRightExtensionInstructions" : null,
  "type" : "Education",
  "rule" : {
    "type" : "ModuleRule",
    "localId" : "edu-rule-1912038915",
    "moduleGroupId" : "otm-testi-dp-TeM"
  }
} ]

Example HTTP response

HTTP/1.1 200 OK
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY

Example Curl request

$ curl 'http://localhost:8080/api/educations/v1/import' -i -u 'spectre.i:test123' -X POST \
    -H 'Content-Type: application/json' \
    -d '[ {
  "metadata" : null,
  "id" : "otm-236dc0b3-3b56-4941-9128-b56b4324e2f8",
  "universityOrgIds" : [ "the-spectre" ],
  "groupId" : "otm-236dc0b3-3b56-4941-9128-b56b4324e2f8",
  "name" : {
    "fi" : "TEol FM"
  },
  "validityPeriod" : {
    "startDate" : "1970-01-01",
    "endDate" : "2071-12-03"
  },
  "code" : "CODE-1361611547",
  "educationType" : "urn:code:education-type:degree-education:masters-degree",
  "specialisationStudiesClassificationUrn" : null,
  "studyFields" : [ "urn:code:study-field:2002-0" ],
  "organisations" : [ {
    "organisationId" : "the-spectre",
    "educationalInstitutionUrn" : null,
    "roleUrn" : "urn:code:organisation-role:responsible-organisation",
    "share" : 1.0,
    "validityPeriod" : { }
  } ],
  "attainmentLanguages" : [ "urn:code:language:fi" ],
  "educationLocationUrn" : null,
  "outcomes" : null,
  "responsibilityInfos" : [ {
    "text" : null,
    "personId" : "otm-harri",
    "roleUrn" : "urn:code:education-responsibility-info-type:academic-responsibility",
    "validityPeriod" : { }
  } ],
  "structure" : {
    "phase1" : {
      "name" : {
        "fi" : "Alempi tutkinto"
      },
      "options" : [ {
        "localId" : "edu-option-60",
        "moduleGroupId" : "otm-testi-dp-TeM",
        "childOptions" : [ ],
        "acceptanceType" : "AUTOMATIC",
        "childNaming" : "urn:code:education-option-naming-type:specialisation",
        "degreeTitleUrn" : null,
        "educationClassificationUrn" : null
      } ]
    },
    "phase2" : null,
    "learningOpportunities" : [ {
      "localId" : "localId-121240778413203640",
      "name" : {
        "fi" : "Learning opportunity one two three"
      },
      "allowedPaths" : [ {
        "educationPhase1GroupId" : "otm-testi-dp-TeM"
      } ],
      "admissionTargetIds" : [ ],
      "phase1EducationClassificationUrn" : "urn:code:education-classification:koulutus_623112",
      "phase2EducationClassificationUrn" : null
    } ]
  },
  "defaultStudyRightExpirationRulesUrn" : "urn:code:study-right-expiration-rules:no-automatic-calculation",
  "defaultDecreeOnUniversityDegreesUrn" : "urn:code:decree-on-university-degrees:decree-2005",
  "studyRightExtensionInstructions" : null,
  "type" : "Education",
  "rule" : {
    "type" : "ModuleRule",
    "localId" : "edu-rule-1912038915",
    "moduleGroupId" : "otm-testi-dp-TeM"
  }
} ]'

Import legacy educations

POST /api/educations/v1/import/legacy

Description

Imports with a lenient legacy validation

Parameters

Type Name Description Schema

Body

educations
required

educations

< Education > array

Responses

HTTP Code Description Schema

200

OK

No Content

201

Created

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes

  • application/json

Produces

  • */*

Tags

  • import

Example HTTP request

POST /api/educations/v1/import/legacy HTTP/1.1
Content-Type: application/json
Authorization: Basic c3BlY3RyZS5pOnRlc3QxMjM=
Content-Length: 1962
Host: localhost:8080

[ {
  "metadata" : null,
  "id" : "otm-f170b3be-ea57-4dfe-b5ec-28988fe70ffe",
  "universityOrgIds" : [ "the-spectre" ],
  "groupId" : "otm-f170b3be-ea57-4dfe-b5ec-28988fe70ffe",
  "name" : {
    "fi" : "TEol FM"
  },
  "validityPeriod" : {
    "startDate" : "1970-01-01",
    "endDate" : "2071-12-03"
  },
  "code" : "CODE--1503664046",
  "educationType" : "urn:code:education-type:degree-education:masters-degree",
  "specialisationStudiesClassificationUrn" : null,
  "studyFields" : null,
  "organisations" : null,
  "attainmentLanguages" : [ "urn:code:language:fi" ],
  "educationLocationUrn" : null,
  "outcomes" : null,
  "responsibilityInfos" : [ ],
  "structure" : {
    "phase1" : {
      "name" : {
        "fi" : "Alempi tutkinto"
      },
      "options" : [ {
        "localId" : "edu-option-63",
        "moduleGroupId" : "otm-testi-dp-TeM",
        "childOptions" : [ ],
        "acceptanceType" : "AUTOMATIC",
        "childNaming" : "urn:code:education-option-naming-type:specialisation",
        "degreeTitleUrn" : null,
        "educationClassificationUrn" : null
      } ]
    },
    "phase2" : null,
    "learningOpportunities" : [ {
      "localId" : "localId-121240778413203640",
      "name" : {
        "fi" : "Learning opportunity one two three"
      },
      "allowedPaths" : [ {
        "educationPhase1GroupId" : "otm-testi-dp-TeM"
      } ],
      "admissionTargetIds" : [ ],
      "phase1EducationClassificationUrn" : "urn:code:education-classification:koulutus_623112",
      "phase2EducationClassificationUrn" : null
    } ]
  },
  "defaultStudyRightExpirationRulesUrn" : "urn:code:study-right-expiration-rules:no-automatic-calculation",
  "defaultDecreeOnUniversityDegreesUrn" : "urn:code:decree-on-university-degrees:decree-2005",
  "studyRightExtensionInstructions" : null,
  "type" : "Education",
  "rule" : {
    "type" : "ModuleRule",
    "localId" : "edu-rule--1477114686",
    "moduleGroupId" : "otm-testi-dp-TeM"
  }
} ]

Example HTTP response

HTTP/1.1 200 OK
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY

Example Curl request

$ curl 'http://localhost:8080/api/educations/v1/import/legacy' -i -u 'spectre.i:test123' -X POST \
    -H 'Content-Type: application/json' \
    -d '[ {
  "metadata" : null,
  "id" : "otm-f170b3be-ea57-4dfe-b5ec-28988fe70ffe",
  "universityOrgIds" : [ "the-spectre" ],
  "groupId" : "otm-f170b3be-ea57-4dfe-b5ec-28988fe70ffe",
  "name" : {
    "fi" : "TEol FM"
  },
  "validityPeriod" : {
    "startDate" : "1970-01-01",
    "endDate" : "2071-12-03"
  },
  "code" : "CODE--1503664046",
  "educationType" : "urn:code:education-type:degree-education:masters-degree",
  "specialisationStudiesClassificationUrn" : null,
  "studyFields" : null,
  "organisations" : null,
  "attainmentLanguages" : [ "urn:code:language:fi" ],
  "educationLocationUrn" : null,
  "outcomes" : null,
  "responsibilityInfos" : [ ],
  "structure" : {
    "phase1" : {
      "name" : {
        "fi" : "Alempi tutkinto"
      },
      "options" : [ {
        "localId" : "edu-option-63",
        "moduleGroupId" : "otm-testi-dp-TeM",
        "childOptions" : [ ],
        "acceptanceType" : "AUTOMATIC",
        "childNaming" : "urn:code:education-option-naming-type:specialisation",
        "degreeTitleUrn" : null,
        "educationClassificationUrn" : null
      } ]
    },
    "phase2" : null,
    "learningOpportunities" : [ {
      "localId" : "localId-121240778413203640",
      "name" : {
        "fi" : "Learning opportunity one two three"
      },
      "allowedPaths" : [ {
        "educationPhase1GroupId" : "otm-testi-dp-TeM"
      } ],
      "admissionTargetIds" : [ ],
      "phase1EducationClassificationUrn" : "urn:code:education-classification:koulutus_623112",
      "phase2EducationClassificationUrn" : null
    } ]
  },
  "defaultStudyRightExpirationRulesUrn" : "urn:code:study-right-expiration-rules:no-automatic-calculation",
  "defaultDecreeOnUniversityDegreesUrn" : "urn:code:decree-on-university-degrees:decree-2005",
  "studyRightExtensionInstructions" : null,
  "type" : "Education",
  "rule" : {
    "type" : "ModuleRule",
    "localId" : "edu-rule--1477114686",
    "moduleGroupId" : "otm-testi-dp-TeM"
  }
} ]'

Example HTTP request

POST /api/educations/v1/import/legacy HTTP/1.1
Content-Type: application/json
Authorization: Basic c3BlY3RyZS5pOnRlc3QxMjM=
Content-Length: 1962
Host: localhost:8080

[ {
  "metadata" : null,
  "id" : "otm-f170b3be-ea57-4dfe-b5ec-28988fe70ffe",
  "universityOrgIds" : [ "the-spectre" ],
  "groupId" : "otm-f170b3be-ea57-4dfe-b5ec-28988fe70ffe",
  "name" : {
    "fi" : "TEol FM"
  },
  "validityPeriod" : {
    "startDate" : "1970-01-01",
    "endDate" : "2071-12-03"
  },
  "code" : "CODE--1503664046",
  "educationType" : "urn:code:education-type:degree-education:masters-degree",
  "specialisationStudiesClassificationUrn" : null,
  "studyFields" : null,
  "organisations" : null,
  "attainmentLanguages" : [ "urn:code:language:fi" ],
  "educationLocationUrn" : null,
  "outcomes" : null,
  "responsibilityInfos" : [ ],
  "structure" : {
    "phase1" : {
      "name" : {
        "fi" : "Alempi tutkinto"
      },
      "options" : [ {
        "localId" : "edu-option-63",
        "moduleGroupId" : "otm-testi-dp-TeM",
        "childOptions" : [ ],
        "acceptanceType" : "AUTOMATIC",
        "childNaming" : "urn:code:education-option-naming-type:specialisation",
        "degreeTitleUrn" : null,
        "educationClassificationUrn" : null
      } ]
    },
    "phase2" : null,
    "learningOpportunities" : [ {
      "localId" : "localId-121240778413203640",
      "name" : {
        "fi" : "Learning opportunity one two three"
      },
      "allowedPaths" : [ {
        "educationPhase1GroupId" : "otm-testi-dp-TeM"
      } ],
      "admissionTargetIds" : [ ],
      "phase1EducationClassificationUrn" : "urn:code:education-classification:koulutus_623112",
      "phase2EducationClassificationUrn" : null
    } ]
  },
  "defaultStudyRightExpirationRulesUrn" : "urn:code:study-right-expiration-rules:no-automatic-calculation",
  "defaultDecreeOnUniversityDegreesUrn" : "urn:code:decree-on-university-degrees:decree-2005",
  "studyRightExtensionInstructions" : null,
  "type" : "Education",
  "rule" : {
    "type" : "ModuleRule",
    "localId" : "edu-rule--1477114686",
    "moduleGroupId" : "otm-testi-dp-TeM"
  }
} ]

Example HTTP response

HTTP/1.1 200 OK
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY

Example Curl request

$ curl 'http://localhost:8080/api/educations/v1/import/legacy' -i -u 'spectre.i:test123' -X POST \
    -H 'Content-Type: application/json' \
    -d '[ {
  "metadata" : null,
  "id" : "otm-f170b3be-ea57-4dfe-b5ec-28988fe70ffe",
  "universityOrgIds" : [ "the-spectre" ],
  "groupId" : "otm-f170b3be-ea57-4dfe-b5ec-28988fe70ffe",
  "name" : {
    "fi" : "TEol FM"
  },
  "validityPeriod" : {
    "startDate" : "1970-01-01",
    "endDate" : "2071-12-03"
  },
  "code" : "CODE--1503664046",
  "educationType" : "urn:code:education-type:degree-education:masters-degree",
  "specialisationStudiesClassificationUrn" : null,
  "studyFields" : null,
  "organisations" : null,
  "attainmentLanguages" : [ "urn:code:language:fi" ],
  "educationLocationUrn" : null,
  "outcomes" : null,
  "responsibilityInfos" : [ ],
  "structure" : {
    "phase1" : {
      "name" : {
        "fi" : "Alempi tutkinto"
      },
      "options" : [ {
        "localId" : "edu-option-63",
        "moduleGroupId" : "otm-testi-dp-TeM",
        "childOptions" : [ ],
        "acceptanceType" : "AUTOMATIC",
        "childNaming" : "urn:code:education-option-naming-type:specialisation",
        "degreeTitleUrn" : null,
        "educationClassificationUrn" : null
      } ]
    },
    "phase2" : null,
    "learningOpportunities" : [ {
      "localId" : "localId-121240778413203640",
      "name" : {
        "fi" : "Learning opportunity one two three"
      },
      "allowedPaths" : [ {
        "educationPhase1GroupId" : "otm-testi-dp-TeM"
      } ],
      "admissionTargetIds" : [ ],
      "phase1EducationClassificationUrn" : "urn:code:education-classification:koulutus_623112",
      "phase2EducationClassificationUrn" : null
    } ]
  },
  "defaultStudyRightExpirationRulesUrn" : "urn:code:study-right-expiration-rules:no-automatic-calculation",
  "defaultDecreeOnUniversityDegreesUrn" : "urn:code:decree-on-university-degrees:decree-2005",
  "studyRightExtensionInstructions" : null,
  "type" : "Education",
  "rule" : {
    "type" : "ModuleRule",
    "localId" : "edu-rule--1477114686",
    "moduleGroupId" : "otm-testi-dp-TeM"
  }
} ]'

Get education

GET /api/educations/v1/{educationId}

Description

Education is fetched by its id. The document state of the education does not affect the operation, i.e. even DELETED educations can be exported, they just have "documentState": "DELETED".

Parameters

Type Name Description Schema

Path

educationId
required

educationId

string (otmid)

Responses

HTTP Code Description Schema

200

OK

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Produces

  • application/json

Tags

  • export

Export enrolment questionnaires

GET /api/enrolment-questionnaires/v1/export

Parameters

Type Name Description Schema

Query

limit
optional

Maximum number of enrolment questionnaires to return. May return less, either because there are not enough change items, or because of internal limits. If limit is higher than 10 000, returns only 10 000 items.

integer (int32)

Query

since
optional

Return enrolment questionnaires modified after (exclusive comparison) this modification ordinal (increasing value within KORI). Alternate parameter with sinceTime. This is the recommended option.

integer (int64)

Query

sinceTime
optional

Return enrolment questionnaires modified after (exclusive comparison) this ISO-8601 time. Alternate parameter with since. This is the not recommended but sometimes necessary option.

string (date-time)

Responses

HTTP Code Description Schema

200

OK

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Produces

  • application/json

Tags

  • export

Import enrolment questionnaires

POST /api/enrolment-questionnaires/v1/import

Parameters

Type Name Description Schema

Body

enrolmentQuestionnaires
required

enrolmentQuestionnaires

Responses

HTTP Code Description Schema

200

OK

No Content

201

Created

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes

  • application/json

Produces

  • */*

Tags

  • import

Import grade scales

POST /api/grade-scales/v1/import

Parameters

Type Name Description Schema

Body

gradeScales
required

gradeScales

< GradeScale > array

Responses

HTTP Code Description Schema

200

OK

No Content

201

Created

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes

  • application/json

Produces

  • application/json

Tags

  • import

Example HTTP request

POST /api/grade-scales/v1/import HTTP/1.1
Content-Type: application/json
Content-Length: 32855
Host: localhost:8080

[ {
  "metadata" : null,
  "id" : "hy-0-5",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "fail",
      "fi" : "hylätty",
      "sv" : "underkänd"
    },
    "abbreviation" : {
      "en" : "0",
      "fi" : "0",
      "sv" : "0"
    },
    "numericCorrespondence" : 0.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "passable",
      "fi" : "välttävä",
      "sv" : "försvarlig"
    },
    "abbreviation" : {
      "en" : "1",
      "fi" : "1",
      "sv" : "1"
    },
    "numericCorrespondence" : 1.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "satisfactory",
      "fi" : "tyydyttävä",
      "sv" : "nöjaktig"
    },
    "abbreviation" : {
      "en" : "2",
      "fi" : "2",
      "sv" : "2"
    },
    "numericCorrespondence" : 2.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "good",
      "fi" : "hyvä",
      "sv" : "god"
    },
    "abbreviation" : {
      "en" : "3",
      "fi" : "3",
      "sv" : "3"
    },
    "numericCorrespondence" : 3.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "very good",
      "fi" : "kiitettävä",
      "sv" : "berömlig"
    },
    "abbreviation" : {
      "en" : "4",
      "fi" : "4",
      "sv" : "4"
    },
    "numericCorrespondence" : 4.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "utmärkt",
      "fi" : "erinomainen",
      "sv" : "excellent"
    },
    "abbreviation" : {
      "en" : "5",
      "fi" : "5",
      "sv" : "5"
    },
    "numericCorrespondence" : 5.0
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "fi" : "Yleinen asteikko, 0-5"
  },
  "abbreviation" : {
    "en" : "0-5",
    "fi" : "0-5",
    "sv" : "0-5"
  }
}, {
  "metadata" : null,
  "id" : "jyu-0-5",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "fail",
      "fi" : "hylätty",
      "sv" : "underkänd"
    },
    "abbreviation" : {
      "en" : "0",
      "fi" : "0",
      "sv" : "0"
    },
    "numericCorrespondence" : 0.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "passable",
      "fi" : "välttävä",
      "sv" : "försvarlig"
    },
    "abbreviation" : {
      "en" : "1",
      "fi" : "1",
      "sv" : "1"
    },
    "numericCorrespondence" : 1.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "satisfactory",
      "fi" : "tyydyttävä",
      "sv" : "nöjaktig"
    },
    "abbreviation" : {
      "en" : "2",
      "fi" : "2",
      "sv" : "2"
    },
    "numericCorrespondence" : 2.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "good",
      "fi" : "hyvä",
      "sv" : "god"
    },
    "abbreviation" : {
      "en" : "3",
      "fi" : "3",
      "sv" : "3"
    },
    "numericCorrespondence" : 3.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "very good",
      "fi" : "kiitettävä",
      "sv" : "berömlig"
    },
    "abbreviation" : {
      "en" : "4",
      "fi" : "4",
      "sv" : "4"
    },
    "numericCorrespondence" : 4.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "utmärkt",
      "fi" : "erinomainen",
      "sv" : "excellent"
    },
    "abbreviation" : {
      "en" : "5",
      "fi" : "5",
      "sv" : "5"
    },
    "numericCorrespondence" : 5.0
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "fi" : "Yleinen asteikko, 0-5"
  },
  "abbreviation" : {
    "en" : "0-5",
    "fi" : "0-5",
    "sv" : "0-5"
  }
}, {
  "metadata" : null,
  "id" : "aalto-hyl-5",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "Fail",
      "fi" : "Hylätty",
      "sv" : "Underkänd"
    },
    "abbreviation" : {
      "en" : "Hyl.",
      "fi" : "Hyl.",
      "sv" : "Hyl."
    },
    "numericCorrespondence" : 0.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "passable",
      "fi" : "välttävä",
      "sv" : "försvarlig"
    },
    "abbreviation" : {
      "en" : "1",
      "fi" : "1",
      "sv" : "1"
    },
    "numericCorrespondence" : 1.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "satisfactory",
      "fi" : "tyydyttävä",
      "sv" : "nöjaktig"
    },
    "abbreviation" : {
      "en" : "2",
      "fi" : "2",
      "sv" : "2"
    },
    "numericCorrespondence" : 2.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "good",
      "fi" : "hyvä",
      "sv" : "god"
    },
    "abbreviation" : {
      "en" : "3",
      "fi" : "3",
      "sv" : "3"
    },
    "numericCorrespondence" : 3.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "very good",
      "fi" : "kiitettävä",
      "sv" : "berömlig"
    },
    "abbreviation" : {
      "en" : "4",
      "fi" : "4",
      "sv" : "4"
    },
    "numericCorrespondence" : 4.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "utmärkt",
      "fi" : "erinomainen",
      "sv" : "excellent"
    },
    "abbreviation" : {
      "en" : "5",
      "fi" : "5",
      "sv" : "5"
    },
    "numericCorrespondence" : 5.0
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "fi" : "Yleinen asteikko, Hylätty-5"
  },
  "abbreviation" : {
    "en" : "Hyl-5",
    "fi" : "Hyl-5",
    "sv" : "Hyl-5"
  }
}, {
  "metadata" : null,
  "id" : "tay-hyl-5",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "Fail",
      "fi" : "Hylätty",
      "sv" : "Underkänd"
    },
    "abbreviation" : {
      "en" : "Hyl.",
      "fi" : "Hyl.",
      "sv" : "Hyl."
    },
    "numericCorrespondence" : 0.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "passable",
      "fi" : "välttävä",
      "sv" : "försvarlig"
    },
    "abbreviation" : {
      "en" : "1",
      "fi" : "1",
      "sv" : "1"
    },
    "numericCorrespondence" : 1.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "satisfactory",
      "fi" : "tyydyttävä",
      "sv" : "nöjaktig"
    },
    "abbreviation" : {
      "en" : "2",
      "fi" : "2",
      "sv" : "2"
    },
    "numericCorrespondence" : 2.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "good",
      "fi" : "hyvä",
      "sv" : "god"
    },
    "abbreviation" : {
      "en" : "3",
      "fi" : "3",
      "sv" : "3"
    },
    "numericCorrespondence" : 3.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "very good",
      "fi" : "kiitettävä",
      "sv" : "berömlig"
    },
    "abbreviation" : {
      "en" : "4",
      "fi" : "4",
      "sv" : "4"
    },
    "numericCorrespondence" : 4.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "utmärkt",
      "fi" : "erinomainen",
      "sv" : "excellent"
    },
    "abbreviation" : {
      "en" : "5",
      "fi" : "5",
      "sv" : "5"
    },
    "numericCorrespondence" : 5.0
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "fi" : "Yleinen asteikko, Hylätty-5"
  },
  "abbreviation" : {
    "en" : "Hyl-5",
    "fi" : "Hyl-5",
    "sv" : "Hyl-5"
  }
}, {
  "metadata" : null,
  "id" : "hy-hyl-hyv",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "Underkänd",
      "fi" : "Hylätty",
      "sv" : "Fail"
    },
    "abbreviation" : {
      "en" : "Fail",
      "fi" : "Hyl.",
      "sv" : "UG"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Godkänd",
      "fi" : "Hyväksytty",
      "sv" : "Pass"
    },
    "abbreviation" : {
      "en" : "Pass",
      "fi" : "Hyv.",
      "sv" : "G"
    },
    "numericCorrespondence" : null
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "fi" : "Hylätty-Hyväksytty -asteikko"
  },
  "abbreviation" : {
    "en" : "Hyl-Hyv",
    "fi" : "Hyl-Hyv",
    "sv" : "Hyl-Hyv"
  }
}, {
  "metadata" : null,
  "id" : "tay-hyl-hyv",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "Underkänd",
      "fi" : "Hylätty",
      "sv" : "Fail"
    },
    "abbreviation" : {
      "en" : "Fail",
      "fi" : "Hyl.",
      "sv" : "UG"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Godkänd",
      "fi" : "Hyväksytty",
      "sv" : "Pass"
    },
    "abbreviation" : {
      "en" : "Pass",
      "fi" : "Hyv.",
      "sv" : "G"
    },
    "numericCorrespondence" : null
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "fi" : "Hylätty-Hyväksytty -asteikko"
  },
  "abbreviation" : {
    "en" : "Hyl-Hyv",
    "fi" : "Hyl-Hyv",
    "sv" : "Hyl-Hyv"
  }
}, {
  "metadata" : null,
  "id" : "jyu-hyl-hyv",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "Underkänd",
      "fi" : "Hylätty",
      "sv" : "Fail"
    },
    "abbreviation" : {
      "en" : "Fail",
      "fi" : "Hyl.",
      "sv" : "UG"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Godkänd",
      "fi" : "Hyväksytty",
      "sv" : "Pass"
    },
    "abbreviation" : {
      "en" : "Pass",
      "fi" : "Hyv.",
      "sv" : "G"
    },
    "numericCorrespondence" : null
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "fi" : "Hylätty-Hyväksytty -asteikko"
  },
  "abbreviation" : {
    "en" : "Hyl-Hyv",
    "fi" : "Hyl-Hyv",
    "sv" : "Hyl-Hyv"
  }
}, {
  "metadata" : null,
  "id" : "aalto-hyl-hyv",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "Underkänd",
      "fi" : "Hylätty",
      "sv" : "Fail"
    },
    "abbreviation" : {
      "en" : "Fail",
      "fi" : "Hyl.",
      "sv" : "UG"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Godkänd",
      "fi" : "Hyväksytty",
      "sv" : "Pass"
    },
    "abbreviation" : {
      "en" : "Pass",
      "fi" : "Hyv.",
      "sv" : "G"
    },
    "numericCorrespondence" : null
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "fi" : "Hylätty-Hyväksytty -asteikko"
  },
  "abbreviation" : {
    "en" : "Hyl-Hyv",
    "fi" : "Hyl-Hyv",
    "sv" : "Hyl-Hyv"
  }
}, {
  "metadata" : null,
  "id" : "hy-hyl-kh",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "Underkänd",
      "fi" : "Hylätty",
      "sv" : "Fail"
    },
    "abbreviation" : {
      "en" : "Fail",
      "fi" : "Hyl.",
      "sv" : "UG"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Godkänd",
      "fi" : "Hyväksytty",
      "sv" : "Pass"
    },
    "abbreviation" : {
      "en" : "Pass",
      "fi" : "Hyv.",
      "sv" : "G"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Med beröm godkänd",
      "fi" : "Kiittäen hyväksytty",
      "sv" : "Pass with Distinction"
    },
    "abbreviation" : {
      "en" : "PasD",
      "fi" : "KH",
      "sv" : "MBG"
    },
    "numericCorrespondence" : null
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "fi" : "Hylätty-Hyväksytty-Kiittäen hyväksytty"
  },
  "abbreviation" : {
    "en" : "Hyl-KH",
    "fi" : "Hyl-KH",
    "sv" : "Hyl-KH"
  }
}, {
  "metadata" : null,
  "id" : "jyu-hyl-kh",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "Underkänd",
      "fi" : "Hylätty",
      "sv" : "Fail"
    },
    "abbreviation" : {
      "en" : "Fail",
      "fi" : "Hyl.",
      "sv" : "UG"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Godkänd",
      "fi" : "Hyväksytty",
      "sv" : "Pass"
    },
    "abbreviation" : {
      "en" : "Pass",
      "fi" : "Hyv.",
      "sv" : "G"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Med beröm godkänd",
      "fi" : "Kiittäen hyväksytty",
      "sv" : "Pass with Distinction"
    },
    "abbreviation" : {
      "en" : "PasD",
      "fi" : "KH",
      "sv" : "MBG"
    },
    "numericCorrespondence" : null
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "fi" : "Hylätty-Hyväksytty-Kiittäen hyväksytty"
  },
  "abbreviation" : {
    "en" : "Hyl-KH",
    "fi" : "Hyl-KH",
    "sv" : "Hyl-KH"
  }
}, {
  "metadata" : null,
  "id" : "aalto-hyl-kh",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "Underkänd",
      "fi" : "Hylätty",
      "sv" : "Fail"
    },
    "abbreviation" : {
      "en" : "Fail",
      "fi" : "Hyl.",
      "sv" : "0"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Godkänd",
      "fi" : "Hyväksytty",
      "sv" : "Pass"
    },
    "abbreviation" : {
      "en" : "Pass",
      "fi" : "Hyv.",
      "sv" : "G"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Med beröm godkänd",
      "fi" : "Kiittäen hyväksytty",
      "sv" : "Pass with Distinction"
    },
    "abbreviation" : {
      "en" : "PasD",
      "fi" : "KH",
      "sv" : "MBG"
    },
    "numericCorrespondence" : null
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "fi" : "Hylätty-Hyväksytty-Kiittäen hyväksytty"
  },
  "abbreviation" : {
    "en" : "Hyl-KH",
    "fi" : "Hyl-KH",
    "sv" : "Hyl-KH"
  }
}, {
  "metadata" : null,
  "id" : "aalto-toinen-kotim",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "Underkänd",
      "fi" : "Hylätty",
      "sv" : "Fail"
    },
    "abbreviation" : {
      "en" : "Fail",
      "fi" : "Hyl.",
      "sv" : "0"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Nöjaktiga insikter",
      "fi" : "Tyydyttävät tiedot",
      "sv" : "Satisfactory"
    },
    "abbreviation" : {
      "en" : "SAT",
      "fi" : "TT",
      "sv" : "NI"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Goda insikter",
      "fi" : "Hyvät tiedot",
      "sv" : "Good"
    },
    "abbreviation" : {
      "en" : "G",
      "fi" : "HT",
      "sv" : "GI"
    },
    "numericCorrespondence" : null
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "fi" : "Toisen kotimaisen kielen arvosana-asteikko"
  },
  "abbreviation" : {
    "en" : "Toinen kotimainen",
    "fi" : "Toinen kotimainen",
    "sv" : "Toinen kotimainen"
  }
}, {
  "metadata" : null,
  "id" : "hy-toinen-kotim",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "Underkänd",
      "fi" : "Hylätty",
      "sv" : "Fail"
    },
    "abbreviation" : {
      "en" : "Fail",
      "fi" : "Hyl.",
      "sv" : "0"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Nöjaktiga insikter",
      "fi" : "Tyydyttävät tiedot",
      "sv" : "Satisfactory"
    },
    "abbreviation" : {
      "en" : "SAT",
      "fi" : "TT",
      "sv" : "NI"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Goda insikter",
      "fi" : "Hyvät tiedot",
      "sv" : "Good"
    },
    "abbreviation" : {
      "en" : "G",
      "fi" : "HT",
      "sv" : "GI"
    },
    "numericCorrespondence" : null
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "fi" : "Toisen kotimaisen kielen arvosana-asteikko"
  },
  "abbreviation" : {
    "en" : "Toinen kotimainen",
    "fi" : "Toinen kotimainen",
    "sv" : "Toinen kotimainen"
  }
}, {
  "metadata" : null,
  "id" : "jyu-toinen-kotim",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "Underkänd",
      "fi" : "Hylätty",
      "sv" : "Fail"
    },
    "abbreviation" : {
      "en" : "Fail",
      "fi" : "Hyl.",
      "sv" : "0"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Nöjaktiga insikter",
      "fi" : "Tyydyttävät tiedot",
      "sv" : "Satisfactory"
    },
    "abbreviation" : {
      "en" : "SAT",
      "fi" : "TT",
      "sv" : "NI"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Goda insikter",
      "fi" : "Hyvät tiedot",
      "sv" : "Good"
    },
    "abbreviation" : {
      "en" : "G",
      "fi" : "HT",
      "sv" : "GI"
    },
    "numericCorrespondence" : null
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "fi" : "Toisen kotimaisen kielen arvosana-asteikko"
  },
  "abbreviation" : {
    "en" : "Toinen kotimainen",
    "fi" : "Toinen kotimainen",
    "sv" : "Toinen kotimainen"
  }
}, {
  "metadata" : null,
  "id" : "tay-toinen-kotim",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "Underkänd",
      "fi" : "Hylätty",
      "sv" : "Fail"
    },
    "abbreviation" : {
      "en" : "Fail",
      "fi" : "Hyl.",
      "sv" : "0"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Nöjaktiga insikter",
      "fi" : "Tyydyttävät tiedot",
      "sv" : "Satisfactory"
    },
    "abbreviation" : {
      "en" : "SAT",
      "fi" : "TT",
      "sv" : "NI"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Goda insikter",
      "fi" : "Hyvät tiedot",
      "sv" : "Good"
    },
    "abbreviation" : {
      "en" : "G",
      "fi" : "HT",
      "sv" : "GI"
    },
    "numericCorrespondence" : null
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "fi" : "Toisen kotimaisen kielen arvosana-asteikko"
  },
  "abbreviation" : {
    "en" : "Toinen kotimainen",
    "fi" : "Toinen kotimainen",
    "sv" : "Toinen kotimainen"
  }
}, {
  "metadata" : null,
  "id" : "hy-7-portainen",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "Improbatur",
      "fi" : "Improbatur",
      "sv" : "Improbatur"
    },
    "abbreviation" : {
      "en" : "I",
      "fi" : "I",
      "sv" : "I"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Approbatur",
      "fi" : "Approbatur",
      "sv" : "Approbatur"
    },
    "abbreviation" : {
      "en" : "A",
      "fi" : "A",
      "sv" : "A"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Lubenter Approbatur",
      "fi" : "Lubenter approbatur",
      "sv" : "Lubenter approbatur"
    },
    "abbreviation" : {
      "en" : "LA",
      "fi" : "LA",
      "sv" : "LA"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Non Sine Laude Approbatur",
      "fi" : "Non sine laude approbatur",
      "sv" : "Non sine laude approbatur"
    },
    "abbreviation" : {
      "en" : "NSLA",
      "fi" : "NSLA",
      "sv" : "NSLA"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Cum Laude Approbatur",
      "fi" : "Cum laude approbatur",
      "sv" : "Cum laude approbatur"
    },
    "abbreviation" : {
      "en" : "CL",
      "fi" : "CL",
      "sv" : "CL"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Magna Cum Laude Approbatur",
      "fi" : "Magna cum laude approbatur",
      "sv" : "Magna cum laude approbatur"
    },
    "abbreviation" : {
      "en" : "MCLA",
      "fi" : "MCLA",
      "sv" : "MCLA"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Eximia Cum Laude Approbatur",
      "fi" : "Eximia cum laude approbatur",
      "sv" : "Eximia cum laude approbatur"
    },
    "abbreviation" : {
      "en" : "ECLA",
      "fi" : "ECLA",
      "sv" : "ECLA"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Laudatur",
      "fi" : "Laudatur",
      "sv" : "Laudatur"
    },
    "abbreviation" : {
      "en" : "L",
      "fi" : "L",
      "sv" : "L"
    },
    "numericCorrespondence" : null
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "en" : "7-portainen asteikko",
    "fi" : "7-portainen asteikko",
    "sv" : "7-portainen asteikko"
  },
  "abbreviation" : {
    "en" : "7-portainen",
    "fi" : "7-portainen",
    "sv" : "7-portainen"
  }
}, {
  "metadata" : null,
  "id" : "tay-7-portainen",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "Improbatur",
      "fi" : "Improbatur",
      "sv" : "Improbatur"
    },
    "abbreviation" : {
      "en" : "I",
      "fi" : "I",
      "sv" : "I"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Approbatur",
      "fi" : "Approbatur",
      "sv" : "Approbatur"
    },
    "abbreviation" : {
      "en" : "A",
      "fi" : "A",
      "sv" : "A"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Lubenter Approbatur",
      "fi" : "Lubenter approbatur",
      "sv" : "Lubenter approbatur"
    },
    "abbreviation" : {
      "en" : "LA",
      "fi" : "LA",
      "sv" : "LA"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Non Sine Laude Approbatur",
      "fi" : "Non sine laude approbatur",
      "sv" : "Non sine laude approbatur"
    },
    "abbreviation" : {
      "en" : "NSLA",
      "fi" : "NSLA",
      "sv" : "NSLA"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Cum Laude Approbatur",
      "fi" : "Cum laude approbatur",
      "sv" : "Cum laude approbatur"
    },
    "abbreviation" : {
      "en" : "CL",
      "fi" : "CL",
      "sv" : "CL"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Magna Cum Laude Approbatur",
      "fi" : "Magna cum laude approbatur",
      "sv" : "Magna cum laude approbatur"
    },
    "abbreviation" : {
      "en" : "MCLA",
      "fi" : "MCLA",
      "sv" : "MCLA"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Eximia Cum Laude Approbatur",
      "fi" : "Eximia cum laude approbatur",
      "sv" : "Eximia cum laude approbatur"
    },
    "abbreviation" : {
      "en" : "ECLA",
      "fi" : "ECLA",
      "sv" : "ECLA"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Laudatur",
      "fi" : "Laudatur",
      "sv" : "Laudatur"
    },
    "abbreviation" : {
      "en" : "L",
      "fi" : "L",
      "sv" : "L"
    },
    "numericCorrespondence" : null
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "en" : "7-portainen asteikko",
    "fi" : "7-portainen asteikko",
    "sv" : "7-portainen asteikko"
  },
  "abbreviation" : {
    "en" : "7-portainen",
    "fi" : "7-portainen",
    "sv" : "7-portainen"
  }
}, {
  "metadata" : null,
  "id" : "aalto-maisteri",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "fi" : "Hylätty"
    },
    "abbreviation" : {
      "fi" : "HYL"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "fi" : "Hyväksytty"
    },
    "abbreviation" : {
      "fi" : "HYV"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "fi" : "Oivallisesti"
    },
    "abbreviation" : {
      "fi" : "OIV"
    },
    "numericCorrespondence" : null
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "fi" : "Maisteritutkinnon asteikko"
  },
  "abbreviation" : {
    "fi" : "Maisteritutkinnon asteikko"
  }
}, {
  "metadata" : null,
  "id" : "aalto-kandi",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "fi" : "Hylätty"
    },
    "abbreviation" : {
      "fi" : "HYL"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "fi" : "Hyväksytty"
    },
    "abbreviation" : {
      "fi" : "HYV"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "fi" : "Erinomaisesti"
    },
    "abbreviation" : {
      "fi" : "ER"
    },
    "numericCorrespondence" : null
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "fi" : "Kandidaatintutkinnon asteikko"
  },
  "abbreviation" : {
    "fi" : "Kandidaatintutkinnon asteikko"
  }
}, {
  "metadata" : null,
  "id" : "otm-test-numeric",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "0",
      "fi" : "0"
    },
    "abbreviation" : {
      "en" : "0",
      "fi" : "0"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "1",
      "fi" : "1"
    },
    "abbreviation" : {
      "en" : "1",
      "fi" : "1"
    },
    "numericCorrespondence" : 1.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "2",
      "fi" : "2"
    },
    "abbreviation" : {
      "en" : "2",
      "fi" : "2"
    },
    "numericCorrespondence" : 2.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "3",
      "fi" : "3"
    },
    "abbreviation" : {
      "en" : "3",
      "fi" : "3"
    },
    "numericCorrespondence" : 3.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "4",
      "fi" : "4"
    },
    "abbreviation" : {
      "en" : "4",
      "fi" : "4"
    },
    "numericCorrespondence" : 4.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "5",
      "fi" : "5"
    },
    "abbreviation" : {
      "en" : "5",
      "fi" : "5"
    },
    "numericCorrespondence" : 5.0
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "en" : "Numeric grade scale 1-5",
    "fi" : "Numeerinen arviointiasteikko 1-5"
  },
  "abbreviation" : {
    "en" : "1-5",
    "fi" : "1-5"
  }
}, {
  "metadata" : null,
  "id" : "otm-test-latin",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "Improbatur",
      "fi" : "Improbatur"
    },
    "abbreviation" : {
      "en" : "I",
      "fi" : "I"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Approbatur",
      "fi" : "Approbatur"
    },
    "abbreviation" : {
      "en" : "A",
      "fi" : "A"
    },
    "numericCorrespondence" : 1.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Lubenter Approbatur",
      "fi" : "Lubenter approbatur"
    },
    "abbreviation" : {
      "en" : "LA",
      "fi" : "LA"
    },
    "numericCorrespondence" : 1.667
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Non Sine Laude Approbatur",
      "fi" : "Non sine laude approbatur"
    },
    "abbreviation" : {
      "en" : "NSLA",
      "fi" : "NSLA"
    },
    "numericCorrespondence" : 2.333
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Cum Laude Approbatur",
      "fi" : "Cum laude approbatur"
    },
    "abbreviation" : {
      "en" : "CL",
      "fi" : "CL"
    },
    "numericCorrespondence" : 3.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Magna Cum Laude Approbatur",
      "fi" : "Magna cum laude approbatur"
    },
    "abbreviation" : {
      "en" : "MCLA",
      "fi" : "MCLA"
    },
    "numericCorrespondence" : 3.667
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Eximia Cum Laude Approbatur",
      "fi" : "Eximia cum laude approbatur"
    },
    "abbreviation" : {
      "en" : "ECLA",
      "fi" : "ECLA"
    },
    "numericCorrespondence" : 4.333
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Laudatur",
      "fi" : "Laudatur"
    },
    "abbreviation" : {
      "en" : "L",
      "fi" : "L"
    },
    "numericCorrespondence" : 5.0
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "en" : "Latin grade scale",
    "fi" : "Latinankielinen arviointiasteikko"
  },
  "abbreviation" : {
    "en" : "lat",
    "fi" : "lat"
  }
}, {
  "metadata" : null,
  "id" : "otm-test-two-tier",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "Improbatur",
      "fi" : "Hylätty"
    },
    "abbreviation" : {
      "en" : "fail",
      "fi" : "fail"
    },
    "numericCorrespondence" : 0.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Passed",
      "fi" : "Hyväksytty"
    },
    "abbreviation" : {
      "en" : "ok",
      "fi" : "ok"
    },
    "numericCorrespondence" : 1.0
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "en" : "two-tier grade scale",
    "fi" : "2-portainen arviointiasteikko"
  },
  "abbreviation" : {
    "en" : "2tier",
    "fi" : "2tier"
  }
}, {
  "metadata" : null,
  "id" : "otm-4-10",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "4",
      "fi" : "4"
    },
    "abbreviation" : {
      "en" : "4",
      "fi" : "4"
    },
    "numericCorrespondence" : 4.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "5",
      "fi" : "5"
    },
    "abbreviation" : {
      "en" : "5",
      "fi" : "5"
    },
    "numericCorrespondence" : 5.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "6",
      "fi" : "6"
    },
    "abbreviation" : {
      "en" : "6",
      "fi" : "6"
    },
    "numericCorrespondence" : 6.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "7",
      "fi" : "7"
    },
    "abbreviation" : {
      "en" : "7",
      "fi" : "7"
    },
    "numericCorrespondence" : 7.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "8",
      "fi" : "8"
    },
    "abbreviation" : {
      "en" : "8",
      "fi" : "8"
    },
    "numericCorrespondence" : 8.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "9",
      "fi" : "9"
    },
    "abbreviation" : {
      "en" : "9",
      "fi" : "9"
    },
    "numericCorrespondence" : 9.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "10",
      "fi" : "10"
    },
    "abbreviation" : {
      "en" : "10",
      "fi" : "10"
    },
    "numericCorrespondence" : 10.0
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "en" : "4-10 grade scale",
    "fi" : "4-10 Asteikko"
  },
  "abbreviation" : {
    "en" : "4-10",
    "fi" : "4-10"
  }
} ]

Example HTTP response

HTTP/1.1 200 OK

Example Curl request

$ curl 'http://localhost:8080/api/grade-scales/v1/import' -i -X POST \
    -H 'Content-Type: application/json' \
    -d '[ {
  "metadata" : null,
  "id" : "hy-0-5",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "fail",
      "fi" : "hylätty",
      "sv" : "underkänd"
    },
    "abbreviation" : {
      "en" : "0",
      "fi" : "0",
      "sv" : "0"
    },
    "numericCorrespondence" : 0.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "passable",
      "fi" : "välttävä",
      "sv" : "försvarlig"
    },
    "abbreviation" : {
      "en" : "1",
      "fi" : "1",
      "sv" : "1"
    },
    "numericCorrespondence" : 1.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "satisfactory",
      "fi" : "tyydyttävä",
      "sv" : "nöjaktig"
    },
    "abbreviation" : {
      "en" : "2",
      "fi" : "2",
      "sv" : "2"
    },
    "numericCorrespondence" : 2.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "good",
      "fi" : "hyvä",
      "sv" : "god"
    },
    "abbreviation" : {
      "en" : "3",
      "fi" : "3",
      "sv" : "3"
    },
    "numericCorrespondence" : 3.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "very good",
      "fi" : "kiitettävä",
      "sv" : "berömlig"
    },
    "abbreviation" : {
      "en" : "4",
      "fi" : "4",
      "sv" : "4"
    },
    "numericCorrespondence" : 4.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "utmärkt",
      "fi" : "erinomainen",
      "sv" : "excellent"
    },
    "abbreviation" : {
      "en" : "5",
      "fi" : "5",
      "sv" : "5"
    },
    "numericCorrespondence" : 5.0
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "fi" : "Yleinen asteikko, 0-5"
  },
  "abbreviation" : {
    "en" : "0-5",
    "fi" : "0-5",
    "sv" : "0-5"
  }
}, {
  "metadata" : null,
  "id" : "jyu-0-5",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "fail",
      "fi" : "hylätty",
      "sv" : "underkänd"
    },
    "abbreviation" : {
      "en" : "0",
      "fi" : "0",
      "sv" : "0"
    },
    "numericCorrespondence" : 0.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "passable",
      "fi" : "välttävä",
      "sv" : "försvarlig"
    },
    "abbreviation" : {
      "en" : "1",
      "fi" : "1",
      "sv" : "1"
    },
    "numericCorrespondence" : 1.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "satisfactory",
      "fi" : "tyydyttävä",
      "sv" : "nöjaktig"
    },
    "abbreviation" : {
      "en" : "2",
      "fi" : "2",
      "sv" : "2"
    },
    "numericCorrespondence" : 2.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "good",
      "fi" : "hyvä",
      "sv" : "god"
    },
    "abbreviation" : {
      "en" : "3",
      "fi" : "3",
      "sv" : "3"
    },
    "numericCorrespondence" : 3.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "very good",
      "fi" : "kiitettävä",
      "sv" : "berömlig"
    },
    "abbreviation" : {
      "en" : "4",
      "fi" : "4",
      "sv" : "4"
    },
    "numericCorrespondence" : 4.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "utmärkt",
      "fi" : "erinomainen",
      "sv" : "excellent"
    },
    "abbreviation" : {
      "en" : "5",
      "fi" : "5",
      "sv" : "5"
    },
    "numericCorrespondence" : 5.0
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "fi" : "Yleinen asteikko, 0-5"
  },
  "abbreviation" : {
    "en" : "0-5",
    "fi" : "0-5",
    "sv" : "0-5"
  }
}, {
  "metadata" : null,
  "id" : "aalto-hyl-5",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "Fail",
      "fi" : "Hylätty",
      "sv" : "Underkänd"
    },
    "abbreviation" : {
      "en" : "Hyl.",
      "fi" : "Hyl.",
      "sv" : "Hyl."
    },
    "numericCorrespondence" : 0.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "passable",
      "fi" : "välttävä",
      "sv" : "försvarlig"
    },
    "abbreviation" : {
      "en" : "1",
      "fi" : "1",
      "sv" : "1"
    },
    "numericCorrespondence" : 1.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "satisfactory",
      "fi" : "tyydyttävä",
      "sv" : "nöjaktig"
    },
    "abbreviation" : {
      "en" : "2",
      "fi" : "2",
      "sv" : "2"
    },
    "numericCorrespondence" : 2.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "good",
      "fi" : "hyvä",
      "sv" : "god"
    },
    "abbreviation" : {
      "en" : "3",
      "fi" : "3",
      "sv" : "3"
    },
    "numericCorrespondence" : 3.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "very good",
      "fi" : "kiitettävä",
      "sv" : "berömlig"
    },
    "abbreviation" : {
      "en" : "4",
      "fi" : "4",
      "sv" : "4"
    },
    "numericCorrespondence" : 4.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "utmärkt",
      "fi" : "erinomainen",
      "sv" : "excellent"
    },
    "abbreviation" : {
      "en" : "5",
      "fi" : "5",
      "sv" : "5"
    },
    "numericCorrespondence" : 5.0
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "fi" : "Yleinen asteikko, Hylätty-5"
  },
  "abbreviation" : {
    "en" : "Hyl-5",
    "fi" : "Hyl-5",
    "sv" : "Hyl-5"
  }
}, {
  "metadata" : null,
  "id" : "tay-hyl-5",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "Fail",
      "fi" : "Hylätty",
      "sv" : "Underkänd"
    },
    "abbreviation" : {
      "en" : "Hyl.",
      "fi" : "Hyl.",
      "sv" : "Hyl."
    },
    "numericCorrespondence" : 0.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "passable",
      "fi" : "välttävä",
      "sv" : "försvarlig"
    },
    "abbreviation" : {
      "en" : "1",
      "fi" : "1",
      "sv" : "1"
    },
    "numericCorrespondence" : 1.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "satisfactory",
      "fi" : "tyydyttävä",
      "sv" : "nöjaktig"
    },
    "abbreviation" : {
      "en" : "2",
      "fi" : "2",
      "sv" : "2"
    },
    "numericCorrespondence" : 2.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "good",
      "fi" : "hyvä",
      "sv" : "god"
    },
    "abbreviation" : {
      "en" : "3",
      "fi" : "3",
      "sv" : "3"
    },
    "numericCorrespondence" : 3.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "very good",
      "fi" : "kiitettävä",
      "sv" : "berömlig"
    },
    "abbreviation" : {
      "en" : "4",
      "fi" : "4",
      "sv" : "4"
    },
    "numericCorrespondence" : 4.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "utmärkt",
      "fi" : "erinomainen",
      "sv" : "excellent"
    },
    "abbreviation" : {
      "en" : "5",
      "fi" : "5",
      "sv" : "5"
    },
    "numericCorrespondence" : 5.0
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "fi" : "Yleinen asteikko, Hylätty-5"
  },
  "abbreviation" : {
    "en" : "Hyl-5",
    "fi" : "Hyl-5",
    "sv" : "Hyl-5"
  }
}, {
  "metadata" : null,
  "id" : "hy-hyl-hyv",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "Underkänd",
      "fi" : "Hylätty",
      "sv" : "Fail"
    },
    "abbreviation" : {
      "en" : "Fail",
      "fi" : "Hyl.",
      "sv" : "UG"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Godkänd",
      "fi" : "Hyväksytty",
      "sv" : "Pass"
    },
    "abbreviation" : {
      "en" : "Pass",
      "fi" : "Hyv.",
      "sv" : "G"
    },
    "numericCorrespondence" : null
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "fi" : "Hylätty-Hyväksytty -asteikko"
  },
  "abbreviation" : {
    "en" : "Hyl-Hyv",
    "fi" : "Hyl-Hyv",
    "sv" : "Hyl-Hyv"
  }
}, {
  "metadata" : null,
  "id" : "tay-hyl-hyv",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "Underkänd",
      "fi" : "Hylätty",
      "sv" : "Fail"
    },
    "abbreviation" : {
      "en" : "Fail",
      "fi" : "Hyl.",
      "sv" : "UG"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Godkänd",
      "fi" : "Hyväksytty",
      "sv" : "Pass"
    },
    "abbreviation" : {
      "en" : "Pass",
      "fi" : "Hyv.",
      "sv" : "G"
    },
    "numericCorrespondence" : null
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "fi" : "Hylätty-Hyväksytty -asteikko"
  },
  "abbreviation" : {
    "en" : "Hyl-Hyv",
    "fi" : "Hyl-Hyv",
    "sv" : "Hyl-Hyv"
  }
}, {
  "metadata" : null,
  "id" : "jyu-hyl-hyv",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "Underkänd",
      "fi" : "Hylätty",
      "sv" : "Fail"
    },
    "abbreviation" : {
      "en" : "Fail",
      "fi" : "Hyl.",
      "sv" : "UG"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Godkänd",
      "fi" : "Hyväksytty",
      "sv" : "Pass"
    },
    "abbreviation" : {
      "en" : "Pass",
      "fi" : "Hyv.",
      "sv" : "G"
    },
    "numericCorrespondence" : null
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "fi" : "Hylätty-Hyväksytty -asteikko"
  },
  "abbreviation" : {
    "en" : "Hyl-Hyv",
    "fi" : "Hyl-Hyv",
    "sv" : "Hyl-Hyv"
  }
}, {
  "metadata" : null,
  "id" : "aalto-hyl-hyv",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "Underkänd",
      "fi" : "Hylätty",
      "sv" : "Fail"
    },
    "abbreviation" : {
      "en" : "Fail",
      "fi" : "Hyl.",
      "sv" : "UG"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Godkänd",
      "fi" : "Hyväksytty",
      "sv" : "Pass"
    },
    "abbreviation" : {
      "en" : "Pass",
      "fi" : "Hyv.",
      "sv" : "G"
    },
    "numericCorrespondence" : null
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "fi" : "Hylätty-Hyväksytty -asteikko"
  },
  "abbreviation" : {
    "en" : "Hyl-Hyv",
    "fi" : "Hyl-Hyv",
    "sv" : "Hyl-Hyv"
  }
}, {
  "metadata" : null,
  "id" : "hy-hyl-kh",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "Underkänd",
      "fi" : "Hylätty",
      "sv" : "Fail"
    },
    "abbreviation" : {
      "en" : "Fail",
      "fi" : "Hyl.",
      "sv" : "UG"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Godkänd",
      "fi" : "Hyväksytty",
      "sv" : "Pass"
    },
    "abbreviation" : {
      "en" : "Pass",
      "fi" : "Hyv.",
      "sv" : "G"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Med beröm godkänd",
      "fi" : "Kiittäen hyväksytty",
      "sv" : "Pass with Distinction"
    },
    "abbreviation" : {
      "en" : "PasD",
      "fi" : "KH",
      "sv" : "MBG"
    },
    "numericCorrespondence" : null
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "fi" : "Hylätty-Hyväksytty-Kiittäen hyväksytty"
  },
  "abbreviation" : {
    "en" : "Hyl-KH",
    "fi" : "Hyl-KH",
    "sv" : "Hyl-KH"
  }
}, {
  "metadata" : null,
  "id" : "jyu-hyl-kh",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "Underkänd",
      "fi" : "Hylätty",
      "sv" : "Fail"
    },
    "abbreviation" : {
      "en" : "Fail",
      "fi" : "Hyl.",
      "sv" : "UG"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Godkänd",
      "fi" : "Hyväksytty",
      "sv" : "Pass"
    },
    "abbreviation" : {
      "en" : "Pass",
      "fi" : "Hyv.",
      "sv" : "G"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Med beröm godkänd",
      "fi" : "Kiittäen hyväksytty",
      "sv" : "Pass with Distinction"
    },
    "abbreviation" : {
      "en" : "PasD",
      "fi" : "KH",
      "sv" : "MBG"
    },
    "numericCorrespondence" : null
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "fi" : "Hylätty-Hyväksytty-Kiittäen hyväksytty"
  },
  "abbreviation" : {
    "en" : "Hyl-KH",
    "fi" : "Hyl-KH",
    "sv" : "Hyl-KH"
  }
}, {
  "metadata" : null,
  "id" : "aalto-hyl-kh",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "Underkänd",
      "fi" : "Hylätty",
      "sv" : "Fail"
    },
    "abbreviation" : {
      "en" : "Fail",
      "fi" : "Hyl.",
      "sv" : "0"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Godkänd",
      "fi" : "Hyväksytty",
      "sv" : "Pass"
    },
    "abbreviation" : {
      "en" : "Pass",
      "fi" : "Hyv.",
      "sv" : "G"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Med beröm godkänd",
      "fi" : "Kiittäen hyväksytty",
      "sv" : "Pass with Distinction"
    },
    "abbreviation" : {
      "en" : "PasD",
      "fi" : "KH",
      "sv" : "MBG"
    },
    "numericCorrespondence" : null
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "fi" : "Hylätty-Hyväksytty-Kiittäen hyväksytty"
  },
  "abbreviation" : {
    "en" : "Hyl-KH",
    "fi" : "Hyl-KH",
    "sv" : "Hyl-KH"
  }
}, {
  "metadata" : null,
  "id" : "aalto-toinen-kotim",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "Underkänd",
      "fi" : "Hylätty",
      "sv" : "Fail"
    },
    "abbreviation" : {
      "en" : "Fail",
      "fi" : "Hyl.",
      "sv" : "0"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Nöjaktiga insikter",
      "fi" : "Tyydyttävät tiedot",
      "sv" : "Satisfactory"
    },
    "abbreviation" : {
      "en" : "SAT",
      "fi" : "TT",
      "sv" : "NI"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Goda insikter",
      "fi" : "Hyvät tiedot",
      "sv" : "Good"
    },
    "abbreviation" : {
      "en" : "G",
      "fi" : "HT",
      "sv" : "GI"
    },
    "numericCorrespondence" : null
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "fi" : "Toisen kotimaisen kielen arvosana-asteikko"
  },
  "abbreviation" : {
    "en" : "Toinen kotimainen",
    "fi" : "Toinen kotimainen",
    "sv" : "Toinen kotimainen"
  }
}, {
  "metadata" : null,
  "id" : "hy-toinen-kotim",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "Underkänd",
      "fi" : "Hylätty",
      "sv" : "Fail"
    },
    "abbreviation" : {
      "en" : "Fail",
      "fi" : "Hyl.",
      "sv" : "0"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Nöjaktiga insikter",
      "fi" : "Tyydyttävät tiedot",
      "sv" : "Satisfactory"
    },
    "abbreviation" : {
      "en" : "SAT",
      "fi" : "TT",
      "sv" : "NI"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Goda insikter",
      "fi" : "Hyvät tiedot",
      "sv" : "Good"
    },
    "abbreviation" : {
      "en" : "G",
      "fi" : "HT",
      "sv" : "GI"
    },
    "numericCorrespondence" : null
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "fi" : "Toisen kotimaisen kielen arvosana-asteikko"
  },
  "abbreviation" : {
    "en" : "Toinen kotimainen",
    "fi" : "Toinen kotimainen",
    "sv" : "Toinen kotimainen"
  }
}, {
  "metadata" : null,
  "id" : "jyu-toinen-kotim",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "Underkänd",
      "fi" : "Hylätty",
      "sv" : "Fail"
    },
    "abbreviation" : {
      "en" : "Fail",
      "fi" : "Hyl.",
      "sv" : "0"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Nöjaktiga insikter",
      "fi" : "Tyydyttävät tiedot",
      "sv" : "Satisfactory"
    },
    "abbreviation" : {
      "en" : "SAT",
      "fi" : "TT",
      "sv" : "NI"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Goda insikter",
      "fi" : "Hyvät tiedot",
      "sv" : "Good"
    },
    "abbreviation" : {
      "en" : "G",
      "fi" : "HT",
      "sv" : "GI"
    },
    "numericCorrespondence" : null
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "fi" : "Toisen kotimaisen kielen arvosana-asteikko"
  },
  "abbreviation" : {
    "en" : "Toinen kotimainen",
    "fi" : "Toinen kotimainen",
    "sv" : "Toinen kotimainen"
  }
}, {
  "metadata" : null,
  "id" : "tay-toinen-kotim",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "Underkänd",
      "fi" : "Hylätty",
      "sv" : "Fail"
    },
    "abbreviation" : {
      "en" : "Fail",
      "fi" : "Hyl.",
      "sv" : "0"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Nöjaktiga insikter",
      "fi" : "Tyydyttävät tiedot",
      "sv" : "Satisfactory"
    },
    "abbreviation" : {
      "en" : "SAT",
      "fi" : "TT",
      "sv" : "NI"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Goda insikter",
      "fi" : "Hyvät tiedot",
      "sv" : "Good"
    },
    "abbreviation" : {
      "en" : "G",
      "fi" : "HT",
      "sv" : "GI"
    },
    "numericCorrespondence" : null
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "fi" : "Toisen kotimaisen kielen arvosana-asteikko"
  },
  "abbreviation" : {
    "en" : "Toinen kotimainen",
    "fi" : "Toinen kotimainen",
    "sv" : "Toinen kotimainen"
  }
}, {
  "metadata" : null,
  "id" : "hy-7-portainen",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "Improbatur",
      "fi" : "Improbatur",
      "sv" : "Improbatur"
    },
    "abbreviation" : {
      "en" : "I",
      "fi" : "I",
      "sv" : "I"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Approbatur",
      "fi" : "Approbatur",
      "sv" : "Approbatur"
    },
    "abbreviation" : {
      "en" : "A",
      "fi" : "A",
      "sv" : "A"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Lubenter Approbatur",
      "fi" : "Lubenter approbatur",
      "sv" : "Lubenter approbatur"
    },
    "abbreviation" : {
      "en" : "LA",
      "fi" : "LA",
      "sv" : "LA"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Non Sine Laude Approbatur",
      "fi" : "Non sine laude approbatur",
      "sv" : "Non sine laude approbatur"
    },
    "abbreviation" : {
      "en" : "NSLA",
      "fi" : "NSLA",
      "sv" : "NSLA"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Cum Laude Approbatur",
      "fi" : "Cum laude approbatur",
      "sv" : "Cum laude approbatur"
    },
    "abbreviation" : {
      "en" : "CL",
      "fi" : "CL",
      "sv" : "CL"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Magna Cum Laude Approbatur",
      "fi" : "Magna cum laude approbatur",
      "sv" : "Magna cum laude approbatur"
    },
    "abbreviation" : {
      "en" : "MCLA",
      "fi" : "MCLA",
      "sv" : "MCLA"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Eximia Cum Laude Approbatur",
      "fi" : "Eximia cum laude approbatur",
      "sv" : "Eximia cum laude approbatur"
    },
    "abbreviation" : {
      "en" : "ECLA",
      "fi" : "ECLA",
      "sv" : "ECLA"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Laudatur",
      "fi" : "Laudatur",
      "sv" : "Laudatur"
    },
    "abbreviation" : {
      "en" : "L",
      "fi" : "L",
      "sv" : "L"
    },
    "numericCorrespondence" : null
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "en" : "7-portainen asteikko",
    "fi" : "7-portainen asteikko",
    "sv" : "7-portainen asteikko"
  },
  "abbreviation" : {
    "en" : "7-portainen",
    "fi" : "7-portainen",
    "sv" : "7-portainen"
  }
}, {
  "metadata" : null,
  "id" : "tay-7-portainen",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "Improbatur",
      "fi" : "Improbatur",
      "sv" : "Improbatur"
    },
    "abbreviation" : {
      "en" : "I",
      "fi" : "I",
      "sv" : "I"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Approbatur",
      "fi" : "Approbatur",
      "sv" : "Approbatur"
    },
    "abbreviation" : {
      "en" : "A",
      "fi" : "A",
      "sv" : "A"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Lubenter Approbatur",
      "fi" : "Lubenter approbatur",
      "sv" : "Lubenter approbatur"
    },
    "abbreviation" : {
      "en" : "LA",
      "fi" : "LA",
      "sv" : "LA"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Non Sine Laude Approbatur",
      "fi" : "Non sine laude approbatur",
      "sv" : "Non sine laude approbatur"
    },
    "abbreviation" : {
      "en" : "NSLA",
      "fi" : "NSLA",
      "sv" : "NSLA"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Cum Laude Approbatur",
      "fi" : "Cum laude approbatur",
      "sv" : "Cum laude approbatur"
    },
    "abbreviation" : {
      "en" : "CL",
      "fi" : "CL",
      "sv" : "CL"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Magna Cum Laude Approbatur",
      "fi" : "Magna cum laude approbatur",
      "sv" : "Magna cum laude approbatur"
    },
    "abbreviation" : {
      "en" : "MCLA",
      "fi" : "MCLA",
      "sv" : "MCLA"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Eximia Cum Laude Approbatur",
      "fi" : "Eximia cum laude approbatur",
      "sv" : "Eximia cum laude approbatur"
    },
    "abbreviation" : {
      "en" : "ECLA",
      "fi" : "ECLA",
      "sv" : "ECLA"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Laudatur",
      "fi" : "Laudatur",
      "sv" : "Laudatur"
    },
    "abbreviation" : {
      "en" : "L",
      "fi" : "L",
      "sv" : "L"
    },
    "numericCorrespondence" : null
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "en" : "7-portainen asteikko",
    "fi" : "7-portainen asteikko",
    "sv" : "7-portainen asteikko"
  },
  "abbreviation" : {
    "en" : "7-portainen",
    "fi" : "7-portainen",
    "sv" : "7-portainen"
  }
}, {
  "metadata" : null,
  "id" : "aalto-maisteri",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "fi" : "Hylätty"
    },
    "abbreviation" : {
      "fi" : "HYL"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "fi" : "Hyväksytty"
    },
    "abbreviation" : {
      "fi" : "HYV"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "fi" : "Oivallisesti"
    },
    "abbreviation" : {
      "fi" : "OIV"
    },
    "numericCorrespondence" : null
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "fi" : "Maisteritutkinnon asteikko"
  },
  "abbreviation" : {
    "fi" : "Maisteritutkinnon asteikko"
  }
}, {
  "metadata" : null,
  "id" : "aalto-kandi",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "fi" : "Hylätty"
    },
    "abbreviation" : {
      "fi" : "HYL"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "fi" : "Hyväksytty"
    },
    "abbreviation" : {
      "fi" : "HYV"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "fi" : "Erinomaisesti"
    },
    "abbreviation" : {
      "fi" : "ER"
    },
    "numericCorrespondence" : null
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "fi" : "Kandidaatintutkinnon asteikko"
  },
  "abbreviation" : {
    "fi" : "Kandidaatintutkinnon asteikko"
  }
}, {
  "metadata" : null,
  "id" : "otm-test-numeric",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "0",
      "fi" : "0"
    },
    "abbreviation" : {
      "en" : "0",
      "fi" : "0"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "1",
      "fi" : "1"
    },
    "abbreviation" : {
      "en" : "1",
      "fi" : "1"
    },
    "numericCorrespondence" : 1.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "2",
      "fi" : "2"
    },
    "abbreviation" : {
      "en" : "2",
      "fi" : "2"
    },
    "numericCorrespondence" : 2.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "3",
      "fi" : "3"
    },
    "abbreviation" : {
      "en" : "3",
      "fi" : "3"
    },
    "numericCorrespondence" : 3.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "4",
      "fi" : "4"
    },
    "abbreviation" : {
      "en" : "4",
      "fi" : "4"
    },
    "numericCorrespondence" : 4.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "5",
      "fi" : "5"
    },
    "abbreviation" : {
      "en" : "5",
      "fi" : "5"
    },
    "numericCorrespondence" : 5.0
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "en" : "Numeric grade scale 1-5",
    "fi" : "Numeerinen arviointiasteikko 1-5"
  },
  "abbreviation" : {
    "en" : "1-5",
    "fi" : "1-5"
  }
}, {
  "metadata" : null,
  "id" : "otm-test-latin",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "Improbatur",
      "fi" : "Improbatur"
    },
    "abbreviation" : {
      "en" : "I",
      "fi" : "I"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Approbatur",
      "fi" : "Approbatur"
    },
    "abbreviation" : {
      "en" : "A",
      "fi" : "A"
    },
    "numericCorrespondence" : 1.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Lubenter Approbatur",
      "fi" : "Lubenter approbatur"
    },
    "abbreviation" : {
      "en" : "LA",
      "fi" : "LA"
    },
    "numericCorrespondence" : 1.667
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Non Sine Laude Approbatur",
      "fi" : "Non sine laude approbatur"
    },
    "abbreviation" : {
      "en" : "NSLA",
      "fi" : "NSLA"
    },
    "numericCorrespondence" : 2.333
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Cum Laude Approbatur",
      "fi" : "Cum laude approbatur"
    },
    "abbreviation" : {
      "en" : "CL",
      "fi" : "CL"
    },
    "numericCorrespondence" : 3.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Magna Cum Laude Approbatur",
      "fi" : "Magna cum laude approbatur"
    },
    "abbreviation" : {
      "en" : "MCLA",
      "fi" : "MCLA"
    },
    "numericCorrespondence" : 3.667
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Eximia Cum Laude Approbatur",
      "fi" : "Eximia cum laude approbatur"
    },
    "abbreviation" : {
      "en" : "ECLA",
      "fi" : "ECLA"
    },
    "numericCorrespondence" : 4.333
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Laudatur",
      "fi" : "Laudatur"
    },
    "abbreviation" : {
      "en" : "L",
      "fi" : "L"
    },
    "numericCorrespondence" : 5.0
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "en" : "Latin grade scale",
    "fi" : "Latinankielinen arviointiasteikko"
  },
  "abbreviation" : {
    "en" : "lat",
    "fi" : "lat"
  }
}, {
  "metadata" : null,
  "id" : "otm-test-two-tier",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "Improbatur",
      "fi" : "Hylätty"
    },
    "abbreviation" : {
      "en" : "fail",
      "fi" : "fail"
    },
    "numericCorrespondence" : 0.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Passed",
      "fi" : "Hyväksytty"
    },
    "abbreviation" : {
      "en" : "ok",
      "fi" : "ok"
    },
    "numericCorrespondence" : 1.0
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "en" : "two-tier grade scale",
    "fi" : "2-portainen arviointiasteikko"
  },
  "abbreviation" : {
    "en" : "2tier",
    "fi" : "2tier"
  }
}, {
  "metadata" : null,
  "id" : "otm-4-10",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "4",
      "fi" : "4"
    },
    "abbreviation" : {
      "en" : "4",
      "fi" : "4"
    },
    "numericCorrespondence" : 4.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "5",
      "fi" : "5"
    },
    "abbreviation" : {
      "en" : "5",
      "fi" : "5"
    },
    "numericCorrespondence" : 5.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "6",
      "fi" : "6"
    },
    "abbreviation" : {
      "en" : "6",
      "fi" : "6"
    },
    "numericCorrespondence" : 6.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "7",
      "fi" : "7"
    },
    "abbreviation" : {
      "en" : "7",
      "fi" : "7"
    },
    "numericCorrespondence" : 7.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "8",
      "fi" : "8"
    },
    "abbreviation" : {
      "en" : "8",
      "fi" : "8"
    },
    "numericCorrespondence" : 8.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "9",
      "fi" : "9"
    },
    "abbreviation" : {
      "en" : "9",
      "fi" : "9"
    },
    "numericCorrespondence" : 9.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "10",
      "fi" : "10"
    },
    "abbreviation" : {
      "en" : "10",
      "fi" : "10"
    },
    "numericCorrespondence" : 10.0
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "en" : "4-10 grade scale",
    "fi" : "4-10 Asteikko"
  },
  "abbreviation" : {
    "en" : "4-10",
    "fi" : "4-10"
  }
} ]'

Example HTTP request

POST /api/grade-scales/v1/import HTTP/1.1
Content-Type: application/json
Content-Length: 32855
Host: localhost:8080

[ {
  "metadata" : null,
  "id" : "hy-0-5",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "fail",
      "fi" : "hylätty",
      "sv" : "underkänd"
    },
    "abbreviation" : {
      "en" : "0",
      "fi" : "0",
      "sv" : "0"
    },
    "numericCorrespondence" : 0.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "passable",
      "fi" : "välttävä",
      "sv" : "försvarlig"
    },
    "abbreviation" : {
      "en" : "1",
      "fi" : "1",
      "sv" : "1"
    },
    "numericCorrespondence" : 1.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "satisfactory",
      "fi" : "tyydyttävä",
      "sv" : "nöjaktig"
    },
    "abbreviation" : {
      "en" : "2",
      "fi" : "2",
      "sv" : "2"
    },
    "numericCorrespondence" : 2.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "good",
      "fi" : "hyvä",
      "sv" : "god"
    },
    "abbreviation" : {
      "en" : "3",
      "fi" : "3",
      "sv" : "3"
    },
    "numericCorrespondence" : 3.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "very good",
      "fi" : "kiitettävä",
      "sv" : "berömlig"
    },
    "abbreviation" : {
      "en" : "4",
      "fi" : "4",
      "sv" : "4"
    },
    "numericCorrespondence" : 4.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "utmärkt",
      "fi" : "erinomainen",
      "sv" : "excellent"
    },
    "abbreviation" : {
      "en" : "5",
      "fi" : "5",
      "sv" : "5"
    },
    "numericCorrespondence" : 5.0
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "fi" : "Yleinen asteikko, 0-5"
  },
  "abbreviation" : {
    "en" : "0-5",
    "fi" : "0-5",
    "sv" : "0-5"
  }
}, {
  "metadata" : null,
  "id" : "jyu-0-5",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "fail",
      "fi" : "hylätty",
      "sv" : "underkänd"
    },
    "abbreviation" : {
      "en" : "0",
      "fi" : "0",
      "sv" : "0"
    },
    "numericCorrespondence" : 0.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "passable",
      "fi" : "välttävä",
      "sv" : "försvarlig"
    },
    "abbreviation" : {
      "en" : "1",
      "fi" : "1",
      "sv" : "1"
    },
    "numericCorrespondence" : 1.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "satisfactory",
      "fi" : "tyydyttävä",
      "sv" : "nöjaktig"
    },
    "abbreviation" : {
      "en" : "2",
      "fi" : "2",
      "sv" : "2"
    },
    "numericCorrespondence" : 2.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "good",
      "fi" : "hyvä",
      "sv" : "god"
    },
    "abbreviation" : {
      "en" : "3",
      "fi" : "3",
      "sv" : "3"
    },
    "numericCorrespondence" : 3.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "very good",
      "fi" : "kiitettävä",
      "sv" : "berömlig"
    },
    "abbreviation" : {
      "en" : "4",
      "fi" : "4",
      "sv" : "4"
    },
    "numericCorrespondence" : 4.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "utmärkt",
      "fi" : "erinomainen",
      "sv" : "excellent"
    },
    "abbreviation" : {
      "en" : "5",
      "fi" : "5",
      "sv" : "5"
    },
    "numericCorrespondence" : 5.0
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "fi" : "Yleinen asteikko, 0-5"
  },
  "abbreviation" : {
    "en" : "0-5",
    "fi" : "0-5",
    "sv" : "0-5"
  }
}, {
  "metadata" : null,
  "id" : "aalto-hyl-5",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "Fail",
      "fi" : "Hylätty",
      "sv" : "Underkänd"
    },
    "abbreviation" : {
      "en" : "Hyl.",
      "fi" : "Hyl.",
      "sv" : "Hyl."
    },
    "numericCorrespondence" : 0.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "passable",
      "fi" : "välttävä",
      "sv" : "försvarlig"
    },
    "abbreviation" : {
      "en" : "1",
      "fi" : "1",
      "sv" : "1"
    },
    "numericCorrespondence" : 1.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "satisfactory",
      "fi" : "tyydyttävä",
      "sv" : "nöjaktig"
    },
    "abbreviation" : {
      "en" : "2",
      "fi" : "2",
      "sv" : "2"
    },
    "numericCorrespondence" : 2.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "good",
      "fi" : "hyvä",
      "sv" : "god"
    },
    "abbreviation" : {
      "en" : "3",
      "fi" : "3",
      "sv" : "3"
    },
    "numericCorrespondence" : 3.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "very good",
      "fi" : "kiitettävä",
      "sv" : "berömlig"
    },
    "abbreviation" : {
      "en" : "4",
      "fi" : "4",
      "sv" : "4"
    },
    "numericCorrespondence" : 4.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "utmärkt",
      "fi" : "erinomainen",
      "sv" : "excellent"
    },
    "abbreviation" : {
      "en" : "5",
      "fi" : "5",
      "sv" : "5"
    },
    "numericCorrespondence" : 5.0
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "fi" : "Yleinen asteikko, Hylätty-5"
  },
  "abbreviation" : {
    "en" : "Hyl-5",
    "fi" : "Hyl-5",
    "sv" : "Hyl-5"
  }
}, {
  "metadata" : null,
  "id" : "tay-hyl-5",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "Fail",
      "fi" : "Hylätty",
      "sv" : "Underkänd"
    },
    "abbreviation" : {
      "en" : "Hyl.",
      "fi" : "Hyl.",
      "sv" : "Hyl."
    },
    "numericCorrespondence" : 0.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "passable",
      "fi" : "välttävä",
      "sv" : "försvarlig"
    },
    "abbreviation" : {
      "en" : "1",
      "fi" : "1",
      "sv" : "1"
    },
    "numericCorrespondence" : 1.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "satisfactory",
      "fi" : "tyydyttävä",
      "sv" : "nöjaktig"
    },
    "abbreviation" : {
      "en" : "2",
      "fi" : "2",
      "sv" : "2"
    },
    "numericCorrespondence" : 2.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "good",
      "fi" : "hyvä",
      "sv" : "god"
    },
    "abbreviation" : {
      "en" : "3",
      "fi" : "3",
      "sv" : "3"
    },
    "numericCorrespondence" : 3.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "very good",
      "fi" : "kiitettävä",
      "sv" : "berömlig"
    },
    "abbreviation" : {
      "en" : "4",
      "fi" : "4",
      "sv" : "4"
    },
    "numericCorrespondence" : 4.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "utmärkt",
      "fi" : "erinomainen",
      "sv" : "excellent"
    },
    "abbreviation" : {
      "en" : "5",
      "fi" : "5",
      "sv" : "5"
    },
    "numericCorrespondence" : 5.0
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "fi" : "Yleinen asteikko, Hylätty-5"
  },
  "abbreviation" : {
    "en" : "Hyl-5",
    "fi" : "Hyl-5",
    "sv" : "Hyl-5"
  }
}, {
  "metadata" : null,
  "id" : "hy-hyl-hyv",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "Underkänd",
      "fi" : "Hylätty",
      "sv" : "Fail"
    },
    "abbreviation" : {
      "en" : "Fail",
      "fi" : "Hyl.",
      "sv" : "UG"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Godkänd",
      "fi" : "Hyväksytty",
      "sv" : "Pass"
    },
    "abbreviation" : {
      "en" : "Pass",
      "fi" : "Hyv.",
      "sv" : "G"
    },
    "numericCorrespondence" : null
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "fi" : "Hylätty-Hyväksytty -asteikko"
  },
  "abbreviation" : {
    "en" : "Hyl-Hyv",
    "fi" : "Hyl-Hyv",
    "sv" : "Hyl-Hyv"
  }
}, {
  "metadata" : null,
  "id" : "tay-hyl-hyv",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "Underkänd",
      "fi" : "Hylätty",
      "sv" : "Fail"
    },
    "abbreviation" : {
      "en" : "Fail",
      "fi" : "Hyl.",
      "sv" : "UG"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Godkänd",
      "fi" : "Hyväksytty",
      "sv" : "Pass"
    },
    "abbreviation" : {
      "en" : "Pass",
      "fi" : "Hyv.",
      "sv" : "G"
    },
    "numericCorrespondence" : null
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "fi" : "Hylätty-Hyväksytty -asteikko"
  },
  "abbreviation" : {
    "en" : "Hyl-Hyv",
    "fi" : "Hyl-Hyv",
    "sv" : "Hyl-Hyv"
  }
}, {
  "metadata" : null,
  "id" : "jyu-hyl-hyv",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "Underkänd",
      "fi" : "Hylätty",
      "sv" : "Fail"
    },
    "abbreviation" : {
      "en" : "Fail",
      "fi" : "Hyl.",
      "sv" : "UG"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Godkänd",
      "fi" : "Hyväksytty",
      "sv" : "Pass"
    },
    "abbreviation" : {
      "en" : "Pass",
      "fi" : "Hyv.",
      "sv" : "G"
    },
    "numericCorrespondence" : null
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "fi" : "Hylätty-Hyväksytty -asteikko"
  },
  "abbreviation" : {
    "en" : "Hyl-Hyv",
    "fi" : "Hyl-Hyv",
    "sv" : "Hyl-Hyv"
  }
}, {
  "metadata" : null,
  "id" : "aalto-hyl-hyv",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "Underkänd",
      "fi" : "Hylätty",
      "sv" : "Fail"
    },
    "abbreviation" : {
      "en" : "Fail",
      "fi" : "Hyl.",
      "sv" : "UG"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Godkänd",
      "fi" : "Hyväksytty",
      "sv" : "Pass"
    },
    "abbreviation" : {
      "en" : "Pass",
      "fi" : "Hyv.",
      "sv" : "G"
    },
    "numericCorrespondence" : null
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "fi" : "Hylätty-Hyväksytty -asteikko"
  },
  "abbreviation" : {
    "en" : "Hyl-Hyv",
    "fi" : "Hyl-Hyv",
    "sv" : "Hyl-Hyv"
  }
}, {
  "metadata" : null,
  "id" : "hy-hyl-kh",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "Underkänd",
      "fi" : "Hylätty",
      "sv" : "Fail"
    },
    "abbreviation" : {
      "en" : "Fail",
      "fi" : "Hyl.",
      "sv" : "UG"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Godkänd",
      "fi" : "Hyväksytty",
      "sv" : "Pass"
    },
    "abbreviation" : {
      "en" : "Pass",
      "fi" : "Hyv.",
      "sv" : "G"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Med beröm godkänd",
      "fi" : "Kiittäen hyväksytty",
      "sv" : "Pass with Distinction"
    },
    "abbreviation" : {
      "en" : "PasD",
      "fi" : "KH",
      "sv" : "MBG"
    },
    "numericCorrespondence" : null
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "fi" : "Hylätty-Hyväksytty-Kiittäen hyväksytty"
  },
  "abbreviation" : {
    "en" : "Hyl-KH",
    "fi" : "Hyl-KH",
    "sv" : "Hyl-KH"
  }
}, {
  "metadata" : null,
  "id" : "jyu-hyl-kh",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "Underkänd",
      "fi" : "Hylätty",
      "sv" : "Fail"
    },
    "abbreviation" : {
      "en" : "Fail",
      "fi" : "Hyl.",
      "sv" : "UG"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Godkänd",
      "fi" : "Hyväksytty",
      "sv" : "Pass"
    },
    "abbreviation" : {
      "en" : "Pass",
      "fi" : "Hyv.",
      "sv" : "G"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Med beröm godkänd",
      "fi" : "Kiittäen hyväksytty",
      "sv" : "Pass with Distinction"
    },
    "abbreviation" : {
      "en" : "PasD",
      "fi" : "KH",
      "sv" : "MBG"
    },
    "numericCorrespondence" : null
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "fi" : "Hylätty-Hyväksytty-Kiittäen hyväksytty"
  },
  "abbreviation" : {
    "en" : "Hyl-KH",
    "fi" : "Hyl-KH",
    "sv" : "Hyl-KH"
  }
}, {
  "metadata" : null,
  "id" : "aalto-hyl-kh",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "Underkänd",
      "fi" : "Hylätty",
      "sv" : "Fail"
    },
    "abbreviation" : {
      "en" : "Fail",
      "fi" : "Hyl.",
      "sv" : "0"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Godkänd",
      "fi" : "Hyväksytty",
      "sv" : "Pass"
    },
    "abbreviation" : {
      "en" : "Pass",
      "fi" : "Hyv.",
      "sv" : "G"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Med beröm godkänd",
      "fi" : "Kiittäen hyväksytty",
      "sv" : "Pass with Distinction"
    },
    "abbreviation" : {
      "en" : "PasD",
      "fi" : "KH",
      "sv" : "MBG"
    },
    "numericCorrespondence" : null
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "fi" : "Hylätty-Hyväksytty-Kiittäen hyväksytty"
  },
  "abbreviation" : {
    "en" : "Hyl-KH",
    "fi" : "Hyl-KH",
    "sv" : "Hyl-KH"
  }
}, {
  "metadata" : null,
  "id" : "aalto-toinen-kotim",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "Underkänd",
      "fi" : "Hylätty",
      "sv" : "Fail"
    },
    "abbreviation" : {
      "en" : "Fail",
      "fi" : "Hyl.",
      "sv" : "0"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Nöjaktiga insikter",
      "fi" : "Tyydyttävät tiedot",
      "sv" : "Satisfactory"
    },
    "abbreviation" : {
      "en" : "SAT",
      "fi" : "TT",
      "sv" : "NI"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Goda insikter",
      "fi" : "Hyvät tiedot",
      "sv" : "Good"
    },
    "abbreviation" : {
      "en" : "G",
      "fi" : "HT",
      "sv" : "GI"
    },
    "numericCorrespondence" : null
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "fi" : "Toisen kotimaisen kielen arvosana-asteikko"
  },
  "abbreviation" : {
    "en" : "Toinen kotimainen",
    "fi" : "Toinen kotimainen",
    "sv" : "Toinen kotimainen"
  }
}, {
  "metadata" : null,
  "id" : "hy-toinen-kotim",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "Underkänd",
      "fi" : "Hylätty",
      "sv" : "Fail"
    },
    "abbreviation" : {
      "en" : "Fail",
      "fi" : "Hyl.",
      "sv" : "0"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Nöjaktiga insikter",
      "fi" : "Tyydyttävät tiedot",
      "sv" : "Satisfactory"
    },
    "abbreviation" : {
      "en" : "SAT",
      "fi" : "TT",
      "sv" : "NI"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Goda insikter",
      "fi" : "Hyvät tiedot",
      "sv" : "Good"
    },
    "abbreviation" : {
      "en" : "G",
      "fi" : "HT",
      "sv" : "GI"
    },
    "numericCorrespondence" : null
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "fi" : "Toisen kotimaisen kielen arvosana-asteikko"
  },
  "abbreviation" : {
    "en" : "Toinen kotimainen",
    "fi" : "Toinen kotimainen",
    "sv" : "Toinen kotimainen"
  }
}, {
  "metadata" : null,
  "id" : "jyu-toinen-kotim",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "Underkänd",
      "fi" : "Hylätty",
      "sv" : "Fail"
    },
    "abbreviation" : {
      "en" : "Fail",
      "fi" : "Hyl.",
      "sv" : "0"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Nöjaktiga insikter",
      "fi" : "Tyydyttävät tiedot",
      "sv" : "Satisfactory"
    },
    "abbreviation" : {
      "en" : "SAT",
      "fi" : "TT",
      "sv" : "NI"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Goda insikter",
      "fi" : "Hyvät tiedot",
      "sv" : "Good"
    },
    "abbreviation" : {
      "en" : "G",
      "fi" : "HT",
      "sv" : "GI"
    },
    "numericCorrespondence" : null
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "fi" : "Toisen kotimaisen kielen arvosana-asteikko"
  },
  "abbreviation" : {
    "en" : "Toinen kotimainen",
    "fi" : "Toinen kotimainen",
    "sv" : "Toinen kotimainen"
  }
}, {
  "metadata" : null,
  "id" : "tay-toinen-kotim",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "Underkänd",
      "fi" : "Hylätty",
      "sv" : "Fail"
    },
    "abbreviation" : {
      "en" : "Fail",
      "fi" : "Hyl.",
      "sv" : "0"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Nöjaktiga insikter",
      "fi" : "Tyydyttävät tiedot",
      "sv" : "Satisfactory"
    },
    "abbreviation" : {
      "en" : "SAT",
      "fi" : "TT",
      "sv" : "NI"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Goda insikter",
      "fi" : "Hyvät tiedot",
      "sv" : "Good"
    },
    "abbreviation" : {
      "en" : "G",
      "fi" : "HT",
      "sv" : "GI"
    },
    "numericCorrespondence" : null
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "fi" : "Toisen kotimaisen kielen arvosana-asteikko"
  },
  "abbreviation" : {
    "en" : "Toinen kotimainen",
    "fi" : "Toinen kotimainen",
    "sv" : "Toinen kotimainen"
  }
}, {
  "metadata" : null,
  "id" : "hy-7-portainen",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "Improbatur",
      "fi" : "Improbatur",
      "sv" : "Improbatur"
    },
    "abbreviation" : {
      "en" : "I",
      "fi" : "I",
      "sv" : "I"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Approbatur",
      "fi" : "Approbatur",
      "sv" : "Approbatur"
    },
    "abbreviation" : {
      "en" : "A",
      "fi" : "A",
      "sv" : "A"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Lubenter Approbatur",
      "fi" : "Lubenter approbatur",
      "sv" : "Lubenter approbatur"
    },
    "abbreviation" : {
      "en" : "LA",
      "fi" : "LA",
      "sv" : "LA"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Non Sine Laude Approbatur",
      "fi" : "Non sine laude approbatur",
      "sv" : "Non sine laude approbatur"
    },
    "abbreviation" : {
      "en" : "NSLA",
      "fi" : "NSLA",
      "sv" : "NSLA"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Cum Laude Approbatur",
      "fi" : "Cum laude approbatur",
      "sv" : "Cum laude approbatur"
    },
    "abbreviation" : {
      "en" : "CL",
      "fi" : "CL",
      "sv" : "CL"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Magna Cum Laude Approbatur",
      "fi" : "Magna cum laude approbatur",
      "sv" : "Magna cum laude approbatur"
    },
    "abbreviation" : {
      "en" : "MCLA",
      "fi" : "MCLA",
      "sv" : "MCLA"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Eximia Cum Laude Approbatur",
      "fi" : "Eximia cum laude approbatur",
      "sv" : "Eximia cum laude approbatur"
    },
    "abbreviation" : {
      "en" : "ECLA",
      "fi" : "ECLA",
      "sv" : "ECLA"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Laudatur",
      "fi" : "Laudatur",
      "sv" : "Laudatur"
    },
    "abbreviation" : {
      "en" : "L",
      "fi" : "L",
      "sv" : "L"
    },
    "numericCorrespondence" : null
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "en" : "7-portainen asteikko",
    "fi" : "7-portainen asteikko",
    "sv" : "7-portainen asteikko"
  },
  "abbreviation" : {
    "en" : "7-portainen",
    "fi" : "7-portainen",
    "sv" : "7-portainen"
  }
}, {
  "metadata" : null,
  "id" : "tay-7-portainen",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "Improbatur",
      "fi" : "Improbatur",
      "sv" : "Improbatur"
    },
    "abbreviation" : {
      "en" : "I",
      "fi" : "I",
      "sv" : "I"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Approbatur",
      "fi" : "Approbatur",
      "sv" : "Approbatur"
    },
    "abbreviation" : {
      "en" : "A",
      "fi" : "A",
      "sv" : "A"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Lubenter Approbatur",
      "fi" : "Lubenter approbatur",
      "sv" : "Lubenter approbatur"
    },
    "abbreviation" : {
      "en" : "LA",
      "fi" : "LA",
      "sv" : "LA"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Non Sine Laude Approbatur",
      "fi" : "Non sine laude approbatur",
      "sv" : "Non sine laude approbatur"
    },
    "abbreviation" : {
      "en" : "NSLA",
      "fi" : "NSLA",
      "sv" : "NSLA"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Cum Laude Approbatur",
      "fi" : "Cum laude approbatur",
      "sv" : "Cum laude approbatur"
    },
    "abbreviation" : {
      "en" : "CL",
      "fi" : "CL",
      "sv" : "CL"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Magna Cum Laude Approbatur",
      "fi" : "Magna cum laude approbatur",
      "sv" : "Magna cum laude approbatur"
    },
    "abbreviation" : {
      "en" : "MCLA",
      "fi" : "MCLA",
      "sv" : "MCLA"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Eximia Cum Laude Approbatur",
      "fi" : "Eximia cum laude approbatur",
      "sv" : "Eximia cum laude approbatur"
    },
    "abbreviation" : {
      "en" : "ECLA",
      "fi" : "ECLA",
      "sv" : "ECLA"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Laudatur",
      "fi" : "Laudatur",
      "sv" : "Laudatur"
    },
    "abbreviation" : {
      "en" : "L",
      "fi" : "L",
      "sv" : "L"
    },
    "numericCorrespondence" : null
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "en" : "7-portainen asteikko",
    "fi" : "7-portainen asteikko",
    "sv" : "7-portainen asteikko"
  },
  "abbreviation" : {
    "en" : "7-portainen",
    "fi" : "7-portainen",
    "sv" : "7-portainen"
  }
}, {
  "metadata" : null,
  "id" : "aalto-maisteri",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "fi" : "Hylätty"
    },
    "abbreviation" : {
      "fi" : "HYL"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "fi" : "Hyväksytty"
    },
    "abbreviation" : {
      "fi" : "HYV"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "fi" : "Oivallisesti"
    },
    "abbreviation" : {
      "fi" : "OIV"
    },
    "numericCorrespondence" : null
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "fi" : "Maisteritutkinnon asteikko"
  },
  "abbreviation" : {
    "fi" : "Maisteritutkinnon asteikko"
  }
}, {
  "metadata" : null,
  "id" : "aalto-kandi",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "fi" : "Hylätty"
    },
    "abbreviation" : {
      "fi" : "HYL"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "fi" : "Hyväksytty"
    },
    "abbreviation" : {
      "fi" : "HYV"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "fi" : "Erinomaisesti"
    },
    "abbreviation" : {
      "fi" : "ER"
    },
    "numericCorrespondence" : null
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "fi" : "Kandidaatintutkinnon asteikko"
  },
  "abbreviation" : {
    "fi" : "Kandidaatintutkinnon asteikko"
  }
}, {
  "metadata" : null,
  "id" : "otm-test-numeric",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "0",
      "fi" : "0"
    },
    "abbreviation" : {
      "en" : "0",
      "fi" : "0"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "1",
      "fi" : "1"
    },
    "abbreviation" : {
      "en" : "1",
      "fi" : "1"
    },
    "numericCorrespondence" : 1.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "2",
      "fi" : "2"
    },
    "abbreviation" : {
      "en" : "2",
      "fi" : "2"
    },
    "numericCorrespondence" : 2.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "3",
      "fi" : "3"
    },
    "abbreviation" : {
      "en" : "3",
      "fi" : "3"
    },
    "numericCorrespondence" : 3.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "4",
      "fi" : "4"
    },
    "abbreviation" : {
      "en" : "4",
      "fi" : "4"
    },
    "numericCorrespondence" : 4.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "5",
      "fi" : "5"
    },
    "abbreviation" : {
      "en" : "5",
      "fi" : "5"
    },
    "numericCorrespondence" : 5.0
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "en" : "Numeric grade scale 1-5",
    "fi" : "Numeerinen arviointiasteikko 1-5"
  },
  "abbreviation" : {
    "en" : "1-5",
    "fi" : "1-5"
  }
}, {
  "metadata" : null,
  "id" : "otm-test-latin",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "Improbatur",
      "fi" : "Improbatur"
    },
    "abbreviation" : {
      "en" : "I",
      "fi" : "I"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Approbatur",
      "fi" : "Approbatur"
    },
    "abbreviation" : {
      "en" : "A",
      "fi" : "A"
    },
    "numericCorrespondence" : 1.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Lubenter Approbatur",
      "fi" : "Lubenter approbatur"
    },
    "abbreviation" : {
      "en" : "LA",
      "fi" : "LA"
    },
    "numericCorrespondence" : 1.667
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Non Sine Laude Approbatur",
      "fi" : "Non sine laude approbatur"
    },
    "abbreviation" : {
      "en" : "NSLA",
      "fi" : "NSLA"
    },
    "numericCorrespondence" : 2.333
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Cum Laude Approbatur",
      "fi" : "Cum laude approbatur"
    },
    "abbreviation" : {
      "en" : "CL",
      "fi" : "CL"
    },
    "numericCorrespondence" : 3.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Magna Cum Laude Approbatur",
      "fi" : "Magna cum laude approbatur"
    },
    "abbreviation" : {
      "en" : "MCLA",
      "fi" : "MCLA"
    },
    "numericCorrespondence" : 3.667
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Eximia Cum Laude Approbatur",
      "fi" : "Eximia cum laude approbatur"
    },
    "abbreviation" : {
      "en" : "ECLA",
      "fi" : "ECLA"
    },
    "numericCorrespondence" : 4.333
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Laudatur",
      "fi" : "Laudatur"
    },
    "abbreviation" : {
      "en" : "L",
      "fi" : "L"
    },
    "numericCorrespondence" : 5.0
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "en" : "Latin grade scale",
    "fi" : "Latinankielinen arviointiasteikko"
  },
  "abbreviation" : {
    "en" : "lat",
    "fi" : "lat"
  }
}, {
  "metadata" : null,
  "id" : "otm-test-two-tier",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "Improbatur",
      "fi" : "Hylätty"
    },
    "abbreviation" : {
      "en" : "fail",
      "fi" : "fail"
    },
    "numericCorrespondence" : 0.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Passed",
      "fi" : "Hyväksytty"
    },
    "abbreviation" : {
      "en" : "ok",
      "fi" : "ok"
    },
    "numericCorrespondence" : 1.0
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "en" : "two-tier grade scale",
    "fi" : "2-portainen arviointiasteikko"
  },
  "abbreviation" : {
    "en" : "2tier",
    "fi" : "2tier"
  }
}, {
  "metadata" : null,
  "id" : "otm-4-10",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "4",
      "fi" : "4"
    },
    "abbreviation" : {
      "en" : "4",
      "fi" : "4"
    },
    "numericCorrespondence" : 4.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "5",
      "fi" : "5"
    },
    "abbreviation" : {
      "en" : "5",
      "fi" : "5"
    },
    "numericCorrespondence" : 5.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "6",
      "fi" : "6"
    },
    "abbreviation" : {
      "en" : "6",
      "fi" : "6"
    },
    "numericCorrespondence" : 6.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "7",
      "fi" : "7"
    },
    "abbreviation" : {
      "en" : "7",
      "fi" : "7"
    },
    "numericCorrespondence" : 7.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "8",
      "fi" : "8"
    },
    "abbreviation" : {
      "en" : "8",
      "fi" : "8"
    },
    "numericCorrespondence" : 8.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "9",
      "fi" : "9"
    },
    "abbreviation" : {
      "en" : "9",
      "fi" : "9"
    },
    "numericCorrespondence" : 9.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "10",
      "fi" : "10"
    },
    "abbreviation" : {
      "en" : "10",
      "fi" : "10"
    },
    "numericCorrespondence" : 10.0
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "en" : "4-10 grade scale",
    "fi" : "4-10 Asteikko"
  },
  "abbreviation" : {
    "en" : "4-10",
    "fi" : "4-10"
  }
} ]

Example HTTP response

HTTP/1.1 200 OK

Example Curl request

$ curl 'http://localhost:8080/api/grade-scales/v1/import' -i -X POST \
    -H 'Content-Type: application/json' \
    -d '[ {
  "metadata" : null,
  "id" : "hy-0-5",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "fail",
      "fi" : "hylätty",
      "sv" : "underkänd"
    },
    "abbreviation" : {
      "en" : "0",
      "fi" : "0",
      "sv" : "0"
    },
    "numericCorrespondence" : 0.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "passable",
      "fi" : "välttävä",
      "sv" : "försvarlig"
    },
    "abbreviation" : {
      "en" : "1",
      "fi" : "1",
      "sv" : "1"
    },
    "numericCorrespondence" : 1.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "satisfactory",
      "fi" : "tyydyttävä",
      "sv" : "nöjaktig"
    },
    "abbreviation" : {
      "en" : "2",
      "fi" : "2",
      "sv" : "2"
    },
    "numericCorrespondence" : 2.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "good",
      "fi" : "hyvä",
      "sv" : "god"
    },
    "abbreviation" : {
      "en" : "3",
      "fi" : "3",
      "sv" : "3"
    },
    "numericCorrespondence" : 3.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "very good",
      "fi" : "kiitettävä",
      "sv" : "berömlig"
    },
    "abbreviation" : {
      "en" : "4",
      "fi" : "4",
      "sv" : "4"
    },
    "numericCorrespondence" : 4.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "utmärkt",
      "fi" : "erinomainen",
      "sv" : "excellent"
    },
    "abbreviation" : {
      "en" : "5",
      "fi" : "5",
      "sv" : "5"
    },
    "numericCorrespondence" : 5.0
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "fi" : "Yleinen asteikko, 0-5"
  },
  "abbreviation" : {
    "en" : "0-5",
    "fi" : "0-5",
    "sv" : "0-5"
  }
}, {
  "metadata" : null,
  "id" : "jyu-0-5",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "fail",
      "fi" : "hylätty",
      "sv" : "underkänd"
    },
    "abbreviation" : {
      "en" : "0",
      "fi" : "0",
      "sv" : "0"
    },
    "numericCorrespondence" : 0.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "passable",
      "fi" : "välttävä",
      "sv" : "försvarlig"
    },
    "abbreviation" : {
      "en" : "1",
      "fi" : "1",
      "sv" : "1"
    },
    "numericCorrespondence" : 1.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "satisfactory",
      "fi" : "tyydyttävä",
      "sv" : "nöjaktig"
    },
    "abbreviation" : {
      "en" : "2",
      "fi" : "2",
      "sv" : "2"
    },
    "numericCorrespondence" : 2.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "good",
      "fi" : "hyvä",
      "sv" : "god"
    },
    "abbreviation" : {
      "en" : "3",
      "fi" : "3",
      "sv" : "3"
    },
    "numericCorrespondence" : 3.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "very good",
      "fi" : "kiitettävä",
      "sv" : "berömlig"
    },
    "abbreviation" : {
      "en" : "4",
      "fi" : "4",
      "sv" : "4"
    },
    "numericCorrespondence" : 4.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "utmärkt",
      "fi" : "erinomainen",
      "sv" : "excellent"
    },
    "abbreviation" : {
      "en" : "5",
      "fi" : "5",
      "sv" : "5"
    },
    "numericCorrespondence" : 5.0
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "fi" : "Yleinen asteikko, 0-5"
  },
  "abbreviation" : {
    "en" : "0-5",
    "fi" : "0-5",
    "sv" : "0-5"
  }
}, {
  "metadata" : null,
  "id" : "aalto-hyl-5",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "Fail",
      "fi" : "Hylätty",
      "sv" : "Underkänd"
    },
    "abbreviation" : {
      "en" : "Hyl.",
      "fi" : "Hyl.",
      "sv" : "Hyl."
    },
    "numericCorrespondence" : 0.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "passable",
      "fi" : "välttävä",
      "sv" : "försvarlig"
    },
    "abbreviation" : {
      "en" : "1",
      "fi" : "1",
      "sv" : "1"
    },
    "numericCorrespondence" : 1.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "satisfactory",
      "fi" : "tyydyttävä",
      "sv" : "nöjaktig"
    },
    "abbreviation" : {
      "en" : "2",
      "fi" : "2",
      "sv" : "2"
    },
    "numericCorrespondence" : 2.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "good",
      "fi" : "hyvä",
      "sv" : "god"
    },
    "abbreviation" : {
      "en" : "3",
      "fi" : "3",
      "sv" : "3"
    },
    "numericCorrespondence" : 3.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "very good",
      "fi" : "kiitettävä",
      "sv" : "berömlig"
    },
    "abbreviation" : {
      "en" : "4",
      "fi" : "4",
      "sv" : "4"
    },
    "numericCorrespondence" : 4.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "utmärkt",
      "fi" : "erinomainen",
      "sv" : "excellent"
    },
    "abbreviation" : {
      "en" : "5",
      "fi" : "5",
      "sv" : "5"
    },
    "numericCorrespondence" : 5.0
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "fi" : "Yleinen asteikko, Hylätty-5"
  },
  "abbreviation" : {
    "en" : "Hyl-5",
    "fi" : "Hyl-5",
    "sv" : "Hyl-5"
  }
}, {
  "metadata" : null,
  "id" : "tay-hyl-5",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "Fail",
      "fi" : "Hylätty",
      "sv" : "Underkänd"
    },
    "abbreviation" : {
      "en" : "Hyl.",
      "fi" : "Hyl.",
      "sv" : "Hyl."
    },
    "numericCorrespondence" : 0.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "passable",
      "fi" : "välttävä",
      "sv" : "försvarlig"
    },
    "abbreviation" : {
      "en" : "1",
      "fi" : "1",
      "sv" : "1"
    },
    "numericCorrespondence" : 1.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "satisfactory",
      "fi" : "tyydyttävä",
      "sv" : "nöjaktig"
    },
    "abbreviation" : {
      "en" : "2",
      "fi" : "2",
      "sv" : "2"
    },
    "numericCorrespondence" : 2.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "good",
      "fi" : "hyvä",
      "sv" : "god"
    },
    "abbreviation" : {
      "en" : "3",
      "fi" : "3",
      "sv" : "3"
    },
    "numericCorrespondence" : 3.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "very good",
      "fi" : "kiitettävä",
      "sv" : "berömlig"
    },
    "abbreviation" : {
      "en" : "4",
      "fi" : "4",
      "sv" : "4"
    },
    "numericCorrespondence" : 4.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "utmärkt",
      "fi" : "erinomainen",
      "sv" : "excellent"
    },
    "abbreviation" : {
      "en" : "5",
      "fi" : "5",
      "sv" : "5"
    },
    "numericCorrespondence" : 5.0
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "fi" : "Yleinen asteikko, Hylätty-5"
  },
  "abbreviation" : {
    "en" : "Hyl-5",
    "fi" : "Hyl-5",
    "sv" : "Hyl-5"
  }
}, {
  "metadata" : null,
  "id" : "hy-hyl-hyv",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "Underkänd",
      "fi" : "Hylätty",
      "sv" : "Fail"
    },
    "abbreviation" : {
      "en" : "Fail",
      "fi" : "Hyl.",
      "sv" : "UG"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Godkänd",
      "fi" : "Hyväksytty",
      "sv" : "Pass"
    },
    "abbreviation" : {
      "en" : "Pass",
      "fi" : "Hyv.",
      "sv" : "G"
    },
    "numericCorrespondence" : null
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "fi" : "Hylätty-Hyväksytty -asteikko"
  },
  "abbreviation" : {
    "en" : "Hyl-Hyv",
    "fi" : "Hyl-Hyv",
    "sv" : "Hyl-Hyv"
  }
}, {
  "metadata" : null,
  "id" : "tay-hyl-hyv",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "Underkänd",
      "fi" : "Hylätty",
      "sv" : "Fail"
    },
    "abbreviation" : {
      "en" : "Fail",
      "fi" : "Hyl.",
      "sv" : "UG"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Godkänd",
      "fi" : "Hyväksytty",
      "sv" : "Pass"
    },
    "abbreviation" : {
      "en" : "Pass",
      "fi" : "Hyv.",
      "sv" : "G"
    },
    "numericCorrespondence" : null
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "fi" : "Hylätty-Hyväksytty -asteikko"
  },
  "abbreviation" : {
    "en" : "Hyl-Hyv",
    "fi" : "Hyl-Hyv",
    "sv" : "Hyl-Hyv"
  }
}, {
  "metadata" : null,
  "id" : "jyu-hyl-hyv",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "Underkänd",
      "fi" : "Hylätty",
      "sv" : "Fail"
    },
    "abbreviation" : {
      "en" : "Fail",
      "fi" : "Hyl.",
      "sv" : "UG"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Godkänd",
      "fi" : "Hyväksytty",
      "sv" : "Pass"
    },
    "abbreviation" : {
      "en" : "Pass",
      "fi" : "Hyv.",
      "sv" : "G"
    },
    "numericCorrespondence" : null
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "fi" : "Hylätty-Hyväksytty -asteikko"
  },
  "abbreviation" : {
    "en" : "Hyl-Hyv",
    "fi" : "Hyl-Hyv",
    "sv" : "Hyl-Hyv"
  }
}, {
  "metadata" : null,
  "id" : "aalto-hyl-hyv",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "Underkänd",
      "fi" : "Hylätty",
      "sv" : "Fail"
    },
    "abbreviation" : {
      "en" : "Fail",
      "fi" : "Hyl.",
      "sv" : "UG"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Godkänd",
      "fi" : "Hyväksytty",
      "sv" : "Pass"
    },
    "abbreviation" : {
      "en" : "Pass",
      "fi" : "Hyv.",
      "sv" : "G"
    },
    "numericCorrespondence" : null
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "fi" : "Hylätty-Hyväksytty -asteikko"
  },
  "abbreviation" : {
    "en" : "Hyl-Hyv",
    "fi" : "Hyl-Hyv",
    "sv" : "Hyl-Hyv"
  }
}, {
  "metadata" : null,
  "id" : "hy-hyl-kh",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "Underkänd",
      "fi" : "Hylätty",
      "sv" : "Fail"
    },
    "abbreviation" : {
      "en" : "Fail",
      "fi" : "Hyl.",
      "sv" : "UG"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Godkänd",
      "fi" : "Hyväksytty",
      "sv" : "Pass"
    },
    "abbreviation" : {
      "en" : "Pass",
      "fi" : "Hyv.",
      "sv" : "G"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Med beröm godkänd",
      "fi" : "Kiittäen hyväksytty",
      "sv" : "Pass with Distinction"
    },
    "abbreviation" : {
      "en" : "PasD",
      "fi" : "KH",
      "sv" : "MBG"
    },
    "numericCorrespondence" : null
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "fi" : "Hylätty-Hyväksytty-Kiittäen hyväksytty"
  },
  "abbreviation" : {
    "en" : "Hyl-KH",
    "fi" : "Hyl-KH",
    "sv" : "Hyl-KH"
  }
}, {
  "metadata" : null,
  "id" : "jyu-hyl-kh",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "Underkänd",
      "fi" : "Hylätty",
      "sv" : "Fail"
    },
    "abbreviation" : {
      "en" : "Fail",
      "fi" : "Hyl.",
      "sv" : "UG"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Godkänd",
      "fi" : "Hyväksytty",
      "sv" : "Pass"
    },
    "abbreviation" : {
      "en" : "Pass",
      "fi" : "Hyv.",
      "sv" : "G"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Med beröm godkänd",
      "fi" : "Kiittäen hyväksytty",
      "sv" : "Pass with Distinction"
    },
    "abbreviation" : {
      "en" : "PasD",
      "fi" : "KH",
      "sv" : "MBG"
    },
    "numericCorrespondence" : null
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "fi" : "Hylätty-Hyväksytty-Kiittäen hyväksytty"
  },
  "abbreviation" : {
    "en" : "Hyl-KH",
    "fi" : "Hyl-KH",
    "sv" : "Hyl-KH"
  }
}, {
  "metadata" : null,
  "id" : "aalto-hyl-kh",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "Underkänd",
      "fi" : "Hylätty",
      "sv" : "Fail"
    },
    "abbreviation" : {
      "en" : "Fail",
      "fi" : "Hyl.",
      "sv" : "0"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Godkänd",
      "fi" : "Hyväksytty",
      "sv" : "Pass"
    },
    "abbreviation" : {
      "en" : "Pass",
      "fi" : "Hyv.",
      "sv" : "G"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Med beröm godkänd",
      "fi" : "Kiittäen hyväksytty",
      "sv" : "Pass with Distinction"
    },
    "abbreviation" : {
      "en" : "PasD",
      "fi" : "KH",
      "sv" : "MBG"
    },
    "numericCorrespondence" : null
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "fi" : "Hylätty-Hyväksytty-Kiittäen hyväksytty"
  },
  "abbreviation" : {
    "en" : "Hyl-KH",
    "fi" : "Hyl-KH",
    "sv" : "Hyl-KH"
  }
}, {
  "metadata" : null,
  "id" : "aalto-toinen-kotim",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "Underkänd",
      "fi" : "Hylätty",
      "sv" : "Fail"
    },
    "abbreviation" : {
      "en" : "Fail",
      "fi" : "Hyl.",
      "sv" : "0"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Nöjaktiga insikter",
      "fi" : "Tyydyttävät tiedot",
      "sv" : "Satisfactory"
    },
    "abbreviation" : {
      "en" : "SAT",
      "fi" : "TT",
      "sv" : "NI"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Goda insikter",
      "fi" : "Hyvät tiedot",
      "sv" : "Good"
    },
    "abbreviation" : {
      "en" : "G",
      "fi" : "HT",
      "sv" : "GI"
    },
    "numericCorrespondence" : null
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "fi" : "Toisen kotimaisen kielen arvosana-asteikko"
  },
  "abbreviation" : {
    "en" : "Toinen kotimainen",
    "fi" : "Toinen kotimainen",
    "sv" : "Toinen kotimainen"
  }
}, {
  "metadata" : null,
  "id" : "hy-toinen-kotim",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "Underkänd",
      "fi" : "Hylätty",
      "sv" : "Fail"
    },
    "abbreviation" : {
      "en" : "Fail",
      "fi" : "Hyl.",
      "sv" : "0"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Nöjaktiga insikter",
      "fi" : "Tyydyttävät tiedot",
      "sv" : "Satisfactory"
    },
    "abbreviation" : {
      "en" : "SAT",
      "fi" : "TT",
      "sv" : "NI"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Goda insikter",
      "fi" : "Hyvät tiedot",
      "sv" : "Good"
    },
    "abbreviation" : {
      "en" : "G",
      "fi" : "HT",
      "sv" : "GI"
    },
    "numericCorrespondence" : null
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "fi" : "Toisen kotimaisen kielen arvosana-asteikko"
  },
  "abbreviation" : {
    "en" : "Toinen kotimainen",
    "fi" : "Toinen kotimainen",
    "sv" : "Toinen kotimainen"
  }
}, {
  "metadata" : null,
  "id" : "jyu-toinen-kotim",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "Underkänd",
      "fi" : "Hylätty",
      "sv" : "Fail"
    },
    "abbreviation" : {
      "en" : "Fail",
      "fi" : "Hyl.",
      "sv" : "0"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Nöjaktiga insikter",
      "fi" : "Tyydyttävät tiedot",
      "sv" : "Satisfactory"
    },
    "abbreviation" : {
      "en" : "SAT",
      "fi" : "TT",
      "sv" : "NI"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Goda insikter",
      "fi" : "Hyvät tiedot",
      "sv" : "Good"
    },
    "abbreviation" : {
      "en" : "G",
      "fi" : "HT",
      "sv" : "GI"
    },
    "numericCorrespondence" : null
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "fi" : "Toisen kotimaisen kielen arvosana-asteikko"
  },
  "abbreviation" : {
    "en" : "Toinen kotimainen",
    "fi" : "Toinen kotimainen",
    "sv" : "Toinen kotimainen"
  }
}, {
  "metadata" : null,
  "id" : "tay-toinen-kotim",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "Underkänd",
      "fi" : "Hylätty",
      "sv" : "Fail"
    },
    "abbreviation" : {
      "en" : "Fail",
      "fi" : "Hyl.",
      "sv" : "0"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Nöjaktiga insikter",
      "fi" : "Tyydyttävät tiedot",
      "sv" : "Satisfactory"
    },
    "abbreviation" : {
      "en" : "SAT",
      "fi" : "TT",
      "sv" : "NI"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Goda insikter",
      "fi" : "Hyvät tiedot",
      "sv" : "Good"
    },
    "abbreviation" : {
      "en" : "G",
      "fi" : "HT",
      "sv" : "GI"
    },
    "numericCorrespondence" : null
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "fi" : "Toisen kotimaisen kielen arvosana-asteikko"
  },
  "abbreviation" : {
    "en" : "Toinen kotimainen",
    "fi" : "Toinen kotimainen",
    "sv" : "Toinen kotimainen"
  }
}, {
  "metadata" : null,
  "id" : "hy-7-portainen",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "Improbatur",
      "fi" : "Improbatur",
      "sv" : "Improbatur"
    },
    "abbreviation" : {
      "en" : "I",
      "fi" : "I",
      "sv" : "I"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Approbatur",
      "fi" : "Approbatur",
      "sv" : "Approbatur"
    },
    "abbreviation" : {
      "en" : "A",
      "fi" : "A",
      "sv" : "A"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Lubenter Approbatur",
      "fi" : "Lubenter approbatur",
      "sv" : "Lubenter approbatur"
    },
    "abbreviation" : {
      "en" : "LA",
      "fi" : "LA",
      "sv" : "LA"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Non Sine Laude Approbatur",
      "fi" : "Non sine laude approbatur",
      "sv" : "Non sine laude approbatur"
    },
    "abbreviation" : {
      "en" : "NSLA",
      "fi" : "NSLA",
      "sv" : "NSLA"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Cum Laude Approbatur",
      "fi" : "Cum laude approbatur",
      "sv" : "Cum laude approbatur"
    },
    "abbreviation" : {
      "en" : "CL",
      "fi" : "CL",
      "sv" : "CL"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Magna Cum Laude Approbatur",
      "fi" : "Magna cum laude approbatur",
      "sv" : "Magna cum laude approbatur"
    },
    "abbreviation" : {
      "en" : "MCLA",
      "fi" : "MCLA",
      "sv" : "MCLA"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Eximia Cum Laude Approbatur",
      "fi" : "Eximia cum laude approbatur",
      "sv" : "Eximia cum laude approbatur"
    },
    "abbreviation" : {
      "en" : "ECLA",
      "fi" : "ECLA",
      "sv" : "ECLA"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Laudatur",
      "fi" : "Laudatur",
      "sv" : "Laudatur"
    },
    "abbreviation" : {
      "en" : "L",
      "fi" : "L",
      "sv" : "L"
    },
    "numericCorrespondence" : null
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "en" : "7-portainen asteikko",
    "fi" : "7-portainen asteikko",
    "sv" : "7-portainen asteikko"
  },
  "abbreviation" : {
    "en" : "7-portainen",
    "fi" : "7-portainen",
    "sv" : "7-portainen"
  }
}, {
  "metadata" : null,
  "id" : "tay-7-portainen",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "Improbatur",
      "fi" : "Improbatur",
      "sv" : "Improbatur"
    },
    "abbreviation" : {
      "en" : "I",
      "fi" : "I",
      "sv" : "I"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Approbatur",
      "fi" : "Approbatur",
      "sv" : "Approbatur"
    },
    "abbreviation" : {
      "en" : "A",
      "fi" : "A",
      "sv" : "A"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Lubenter Approbatur",
      "fi" : "Lubenter approbatur",
      "sv" : "Lubenter approbatur"
    },
    "abbreviation" : {
      "en" : "LA",
      "fi" : "LA",
      "sv" : "LA"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Non Sine Laude Approbatur",
      "fi" : "Non sine laude approbatur",
      "sv" : "Non sine laude approbatur"
    },
    "abbreviation" : {
      "en" : "NSLA",
      "fi" : "NSLA",
      "sv" : "NSLA"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Cum Laude Approbatur",
      "fi" : "Cum laude approbatur",
      "sv" : "Cum laude approbatur"
    },
    "abbreviation" : {
      "en" : "CL",
      "fi" : "CL",
      "sv" : "CL"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Magna Cum Laude Approbatur",
      "fi" : "Magna cum laude approbatur",
      "sv" : "Magna cum laude approbatur"
    },
    "abbreviation" : {
      "en" : "MCLA",
      "fi" : "MCLA",
      "sv" : "MCLA"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Eximia Cum Laude Approbatur",
      "fi" : "Eximia cum laude approbatur",
      "sv" : "Eximia cum laude approbatur"
    },
    "abbreviation" : {
      "en" : "ECLA",
      "fi" : "ECLA",
      "sv" : "ECLA"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Laudatur",
      "fi" : "Laudatur",
      "sv" : "Laudatur"
    },
    "abbreviation" : {
      "en" : "L",
      "fi" : "L",
      "sv" : "L"
    },
    "numericCorrespondence" : null
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "en" : "7-portainen asteikko",
    "fi" : "7-portainen asteikko",
    "sv" : "7-portainen asteikko"
  },
  "abbreviation" : {
    "en" : "7-portainen",
    "fi" : "7-portainen",
    "sv" : "7-portainen"
  }
}, {
  "metadata" : null,
  "id" : "aalto-maisteri",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "fi" : "Hylätty"
    },
    "abbreviation" : {
      "fi" : "HYL"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "fi" : "Hyväksytty"
    },
    "abbreviation" : {
      "fi" : "HYV"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "fi" : "Oivallisesti"
    },
    "abbreviation" : {
      "fi" : "OIV"
    },
    "numericCorrespondence" : null
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "fi" : "Maisteritutkinnon asteikko"
  },
  "abbreviation" : {
    "fi" : "Maisteritutkinnon asteikko"
  }
}, {
  "metadata" : null,
  "id" : "aalto-kandi",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "fi" : "Hylätty"
    },
    "abbreviation" : {
      "fi" : "HYL"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "fi" : "Hyväksytty"
    },
    "abbreviation" : {
      "fi" : "HYV"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "fi" : "Erinomaisesti"
    },
    "abbreviation" : {
      "fi" : "ER"
    },
    "numericCorrespondence" : null
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "fi" : "Kandidaatintutkinnon asteikko"
  },
  "abbreviation" : {
    "fi" : "Kandidaatintutkinnon asteikko"
  }
}, {
  "metadata" : null,
  "id" : "otm-test-numeric",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "0",
      "fi" : "0"
    },
    "abbreviation" : {
      "en" : "0",
      "fi" : "0"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "1",
      "fi" : "1"
    },
    "abbreviation" : {
      "en" : "1",
      "fi" : "1"
    },
    "numericCorrespondence" : 1.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "2",
      "fi" : "2"
    },
    "abbreviation" : {
      "en" : "2",
      "fi" : "2"
    },
    "numericCorrespondence" : 2.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "3",
      "fi" : "3"
    },
    "abbreviation" : {
      "en" : "3",
      "fi" : "3"
    },
    "numericCorrespondence" : 3.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "4",
      "fi" : "4"
    },
    "abbreviation" : {
      "en" : "4",
      "fi" : "4"
    },
    "numericCorrespondence" : 4.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "5",
      "fi" : "5"
    },
    "abbreviation" : {
      "en" : "5",
      "fi" : "5"
    },
    "numericCorrespondence" : 5.0
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "en" : "Numeric grade scale 1-5",
    "fi" : "Numeerinen arviointiasteikko 1-5"
  },
  "abbreviation" : {
    "en" : "1-5",
    "fi" : "1-5"
  }
}, {
  "metadata" : null,
  "id" : "otm-test-latin",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "Improbatur",
      "fi" : "Improbatur"
    },
    "abbreviation" : {
      "en" : "I",
      "fi" : "I"
    },
    "numericCorrespondence" : null
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Approbatur",
      "fi" : "Approbatur"
    },
    "abbreviation" : {
      "en" : "A",
      "fi" : "A"
    },
    "numericCorrespondence" : 1.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Lubenter Approbatur",
      "fi" : "Lubenter approbatur"
    },
    "abbreviation" : {
      "en" : "LA",
      "fi" : "LA"
    },
    "numericCorrespondence" : 1.667
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Non Sine Laude Approbatur",
      "fi" : "Non sine laude approbatur"
    },
    "abbreviation" : {
      "en" : "NSLA",
      "fi" : "NSLA"
    },
    "numericCorrespondence" : 2.333
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Cum Laude Approbatur",
      "fi" : "Cum laude approbatur"
    },
    "abbreviation" : {
      "en" : "CL",
      "fi" : "CL"
    },
    "numericCorrespondence" : 3.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Magna Cum Laude Approbatur",
      "fi" : "Magna cum laude approbatur"
    },
    "abbreviation" : {
      "en" : "MCLA",
      "fi" : "MCLA"
    },
    "numericCorrespondence" : 3.667
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Eximia Cum Laude Approbatur",
      "fi" : "Eximia cum laude approbatur"
    },
    "abbreviation" : {
      "en" : "ECLA",
      "fi" : "ECLA"
    },
    "numericCorrespondence" : 4.333
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Laudatur",
      "fi" : "Laudatur"
    },
    "abbreviation" : {
      "en" : "L",
      "fi" : "L"
    },
    "numericCorrespondence" : 5.0
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "en" : "Latin grade scale",
    "fi" : "Latinankielinen arviointiasteikko"
  },
  "abbreviation" : {
    "en" : "lat",
    "fi" : "lat"
  }
}, {
  "metadata" : null,
  "id" : "otm-test-two-tier",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "Improbatur",
      "fi" : "Hylätty"
    },
    "abbreviation" : {
      "en" : "fail",
      "fi" : "fail"
    },
    "numericCorrespondence" : 0.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "Passed",
      "fi" : "Hyväksytty"
    },
    "abbreviation" : {
      "en" : "ok",
      "fi" : "ok"
    },
    "numericCorrespondence" : 1.0
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "en" : "two-tier grade scale",
    "fi" : "2-portainen arviointiasteikko"
  },
  "abbreviation" : {
    "en" : "2tier",
    "fi" : "2tier"
  }
}, {
  "metadata" : null,
  "id" : "otm-4-10",
  "grades" : [ {
    "localId" : 0,
    "passed" : false,
    "name" : {
      "en" : "4",
      "fi" : "4"
    },
    "abbreviation" : {
      "en" : "4",
      "fi" : "4"
    },
    "numericCorrespondence" : 4.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "5",
      "fi" : "5"
    },
    "abbreviation" : {
      "en" : "5",
      "fi" : "5"
    },
    "numericCorrespondence" : 5.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "6",
      "fi" : "6"
    },
    "abbreviation" : {
      "en" : "6",
      "fi" : "6"
    },
    "numericCorrespondence" : 6.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "7",
      "fi" : "7"
    },
    "abbreviation" : {
      "en" : "7",
      "fi" : "7"
    },
    "numericCorrespondence" : 7.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "8",
      "fi" : "8"
    },
    "abbreviation" : {
      "en" : "8",
      "fi" : "8"
    },
    "numericCorrespondence" : 8.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "9",
      "fi" : "9"
    },
    "abbreviation" : {
      "en" : "9",
      "fi" : "9"
    },
    "numericCorrespondence" : 9.0
  }, {
    "localId" : 0,
    "passed" : true,
    "name" : {
      "en" : "10",
      "fi" : "10"
    },
    "abbreviation" : {
      "en" : "10",
      "fi" : "10"
    },
    "numericCorrespondence" : 10.0
  } ],
  "validityPeriod" : {
    "startDate" : "1900-01-01"
  },
  "additionalInfo" : null,
  "helpText" : null,
  "name" : {
    "en" : "4-10 grade scale",
    "fi" : "4-10 Asteikko"
  },
  "abbreviation" : {
    "en" : "4-10",
    "fi" : "4-10"
  }
} ]'

Get import log entries. Return max 10000 oldest entries, ordered by import date ascending.

GET /api/import-log

Parameters

Type Name Description Schema

Query

sinceTime
optional

sinceTime

string (date-time)

Responses

HTTP Code Description Schema

200

OK

< ImportLog > array

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Produces

  • application/json

Tags

  • import

Example HTTP request

GET /api/import-log HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080

Example HTTP response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 2030

[ {
  "batchId" : null,
  "connectionId" : null,
  "dataFilename" : null,
  "dataSha" : "foobar",
  "durationMs" : 500,
  "exportDate" : null,
  "httpStatus" : null,
  "id" : 0,
  "importDate" : null,
  "objectCount" : null,
  "queryString" : null,
  "remoteAddress" : null,
  "sender" : null,
  "status" : null,
  "statusDetails" : null,
  "statusMessage" : null,
  "university" : null,
  "universityMessage" : null,
  "universityOrgIds" : [ "hy-university-root-id" ],
  "url" : null,
  "userName" : null
}, {
  "batchId" : null,
  "connectionId" : null,
  "dataFilename" : null,
  "dataSha" : "foobar",
  "durationMs" : 500,
  "exportDate" : null,
  "httpStatus" : null,
  "id" : 1,
  "importDate" : null,
  "objectCount" : null,
  "queryString" : null,
  "remoteAddress" : null,
  "sender" : null,
  "status" : null,
  "statusDetails" : null,
  "statusMessage" : null,
  "university" : null,
  "universityMessage" : null,
  "universityOrgIds" : [ "hy-university-root-id" ],
  "url" : null,
  "userName" : null
}, {
  "batchId" : null,
  "connectionId" : null,
  "dataFilename" : null,
  "dataSha" : "foobar",
  "durationMs" : 500,
  "exportDate" : null,
  "httpStatus" : null,
  "id" : 2,
  "importDate" : null,
  "objectCount" : null,
  "queryString" : null,
  "remoteAddress" : null,
  "sender" : null,
  "status" : null,
  "statusDetails" : null,
  "statusMessage" : null,
  "university" : null,
  "universityMessage" : null,
  "universityOrgIds" : [ "hy-university-root-id" ],
  "url" : null,
  "userName" : null
}, {
  "batchId" : null,
  "connectionId" : null,
  "dataFilename" : null,
  "dataSha" : "foobar",
  "durationMs" : 500,
  "exportDate" : null,
  "httpStatus" : null,
  "id" : 3,
  "importDate" : null,
  "objectCount" : null,
  "queryString" : null,
  "remoteAddress" : null,
  "sender" : null,
  "status" : null,
  "statusDetails" : null,
  "statusMessage" : null,
  "university" : null,
  "universityMessage" : null,
  "universityOrgIds" : [ "hy-university-root-id" ],
  "url" : null,
  "userName" : null
} ]

Example Curl request

$ curl 'http://localhost:8080/api/import-log' -i -X GET \
    -H 'Content-Type: application/json' \
    -H 'Accept: application/json'

Example HTTP request

GET /api/import-log HTTP/1.1
Content-Type: application/json
Accept: application/json
Host: localhost:8080

Example HTTP response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 2030

[ {
  "batchId" : null,
  "connectionId" : null,
  "dataFilename" : null,
  "dataSha" : "foobar",
  "durationMs" : 500,
  "exportDate" : null,
  "httpStatus" : null,
  "id" : 0,
  "importDate" : null,
  "objectCount" : null,
  "queryString" : null,
  "remoteAddress" : null,
  "sender" : null,
  "status" : null,
  "statusDetails" : null,
  "statusMessage" : null,
  "university" : null,
  "universityMessage" : null,
  "universityOrgIds" : [ "hy-university-root-id" ],
  "url" : null,
  "userName" : null
}, {
  "batchId" : null,
  "connectionId" : null,
  "dataFilename" : null,
  "dataSha" : "foobar",
  "durationMs" : 500,
  "exportDate" : null,
  "httpStatus" : null,
  "id" : 1,
  "importDate" : null,
  "objectCount" : null,
  "queryString" : null,
  "remoteAddress" : null,
  "sender" : null,
  "status" : null,
  "statusDetails" : null,
  "statusMessage" : null,
  "university" : null,
  "universityMessage" : null,
  "universityOrgIds" : [ "hy-university-root-id" ],
  "url" : null,
  "userName" : null
}, {
  "batchId" : null,
  "connectionId" : null,
  "dataFilename" : null,
  "dataSha" : "foobar",
  "durationMs" : 500,
  "exportDate" : null,
  "httpStatus" : null,
  "id" : 2,
  "importDate" : null,
  "objectCount" : null,
  "queryString" : null,
  "remoteAddress" : null,
  "sender" : null,
  "status" : null,
  "statusDetails" : null,
  "statusMessage" : null,
  "university" : null,
  "universityMessage" : null,
  "universityOrgIds" : [ "hy-university-root-id" ],
  "url" : null,
  "userName" : null
}, {
  "batchId" : null,
  "connectionId" : null,
  "dataFilename" : null,
  "dataSha" : "foobar",
  "durationMs" : 500,
  "exportDate" : null,
  "httpStatus" : null,
  "id" : 3,
  "importDate" : null,
  "objectCount" : null,
  "queryString" : null,
  "remoteAddress" : null,
  "sender" : null,
  "status" : null,
  "statusDetails" : null,
  "statusMessage" : null,
  "university" : null,
  "universityMessage" : null,
  "universityOrgIds" : [ "hy-university-root-id" ],
  "url" : null,
  "userName" : null
} ]

Example Curl request

$ curl 'http://localhost:8080/api/import-log' -i -X GET \
    -H 'Content-Type: application/json' \
    -H 'Accept: application/json'

Export international contractual degree agreements

GET /api/international-contractual-degree-agreements/v1/export

Description

Entities can be exported in modification order based on one of two separate ways of specifying the starting point.With the 'since' parameter (recommended): an integer key (modification ordinal), which is different for every modification of the entity table. The ordinals are guaranteed to increase for each modification, but not guaranteed to be concecutive.With the 'sinceTime' parameter: an ISO-8601 timestamp. SinceTime is only supported for the case when the modification ordinal is not known by the exporter. In actual practice, if efficient export of all data is desired, the greatest modification ordinal from the previous export must be remembered and used as the since parameter for the next export. Both the since and sinceTime parameters are exclusive: if in one export you get the modification ordinals 3, 4 and 5, the next query should be export?since=5 and then you get the ordinals 6, 7, 8, etc.

Parameters

Type Name Description Schema

Query

limit
optional

Maximum number of international contractual degree agreements to return. May return less, either because there are not enough change items, or because of internal limits. If limit is higher than 10 000, returns only 10 000 items.

integer (int32)

Query

since
optional

Return international contractual degree agreements modified after (exclusive comparison) this modification ordinal (increasing value within Ori). Alternate parameter with sinceTime. This is the recommended option.

integer (int64)

Query

sinceTime
optional

Return international contractual degree agreements modified after (exclusive comparison) this ISO-8601 time. Alternate parameter with since. This is the not recommended but sometimes necessary option.

string (date-time)

Responses

HTTP Code Description Schema

200

OK

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Produces

  • application/json

Tags

  • export

Import international contractual degree agreements

POST /api/international-contractual-degree-agreements/v1/import

Parameters

Type Name Description Schema

Body

internationalContractualDegreeAgreements
required

internationalContractualDegreeAgreements

Responses

HTTP Code Description Schema

200

OK

No Content

201

Created

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes

  • application/json

Produces

  • */*

Tags

  • import

Export locations

GET /api/locations/v1/export

Description

Entities can be exported in modification order based on one of two separate ways of specifying the starting point.With the 'since' parameter (recommended): an integer key (modification ordinal), which is different for every modification of the entity table. The ordinals are guaranteed to increase for each modification, but not guaranteed to be concecutive.With the 'sinceTime' parameter: an ISO-8601 timestamp. SinceTime is only supported for the case when the modification ordinal is not known by the exporter. In actual practice, if efficient export of all data is desired, the greatest modification ordinal from the previous export must be remembered and used as the since parameter for the next export. Both the since and sinceTime parameters are exclusive: if in one export you get the modification ordinals 3, 4 and 5, the next query should be export?since=5 and then you get the ordinals 6, 7, 8, etc.

Parameters

Type Name Description Schema

Query

limit
optional

Maximum number of locations to return. May return less, either because there are not enough change items, or because of internal limits. If limit is higher than 10 000, returns only 10 000 items.

integer (int32)

Query

since
optional

Return locations modified after (exclusive comparison) this modification ordinal (increasing value within Kori). Alternate parameter with sinceTime. This is the recommended option.

integer (int64)

Query

sinceTime
optional

Return locations modified after (exclusive comparison) this ISO-8601 time. Alternate parameter with since. This is the not recommended but sometimes necessary option.

string (date-time)

Responses

HTTP Code Description Schema

200

OK

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Produces

  • application/json

Tags

  • export

Example HTTP request

GET /api/locations/v1/export?since=40544&limit=5 HTTP/1.1
Accept: application/json
Authorization: Basic c3BlY3RyZS5lOnRlc3QxMjM=
Host: localhost:8080

Example HTTP response

HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 692

{
  "greatestOrdinal" : 40548,
  "hasMore" : false,
  "entities" : [ {
    "metadata" : {
      "revision" : 1,
      "createdBy" : "arska",
      "createdOn" : "2020-11-19T08:38:53.361773",
      "lastModifiedBy" : "arska",
      "lastModifiedOn" : "2020-11-19T08:38:53.361870",
      "modificationOrdinal" : 40548
    },
    "documentState" : "ACTIVE",
    "id" : "otm-2b30ab88-64c5-4f52-98db-06e1665b36c8",
    "universityOrgIds" : [ "the-spectre" ],
    "name" : {
      "fi" : "Location 2020-11-19T08:38:53.360587",
      "sv" : "Location 2020-11-19T08:38:53.360587"
    },
    "capacity" : 15,
    "buildingId" : "otm-b1802792-33fc-4aff-b3eb-994423f6f14c",
    "building" : null
  } ]
}

Example Curl request

$ curl 'http://localhost:8080/api/locations/v1/export?since=40544&limit=5' -i -u 'spectre.e:test123' -X GET \
    -H 'Accept: application/json'

Example HTTP request

GET /api/locations/v1/export?since=40544&limit=5 HTTP/1.1
Accept: application/json
Authorization: Basic c3BlY3RyZS5lOnRlc3QxMjM=
Host: localhost:8080

Example HTTP response

HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 692

{
  "greatestOrdinal" : 40548,
  "hasMore" : false,
  "entities" : [ {
    "metadata" : {
      "revision" : 1,
      "createdBy" : "arska",
      "createdOn" : "2020-11-19T08:38:53.361773",
      "lastModifiedBy" : "arska",
      "lastModifiedOn" : "2020-11-19T08:38:53.361870",
      "modificationOrdinal" : 40548
    },
    "documentState" : "ACTIVE",
    "id" : "otm-2b30ab88-64c5-4f52-98db-06e1665b36c8",
    "universityOrgIds" : [ "the-spectre" ],
    "name" : {
      "fi" : "Location 2020-11-19T08:38:53.360587",
      "sv" : "Location 2020-11-19T08:38:53.360587"
    },
    "capacity" : 15,
    "buildingId" : "otm-b1802792-33fc-4aff-b3eb-994423f6f14c",
    "building" : null
  } ]
}

Example Curl request

$ curl 'http://localhost:8080/api/locations/v1/export?since=40544&limit=5' -i -u 'spectre.e:test123' -X GET \
    -H 'Accept: application/json'

Import locations

POST /api/locations/v1/import

Parameters

Type Name Description Schema

Body

locations
required

locations

< Location > array

Responses

HTTP Code Description Schema

200

OK

No Content

201

Created

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes

  • application/json

Produces

  • */*

Tags

  • import

Example HTTP request

POST /api/locations/v1/import HTTP/1.1
Content-Type: application/json
Authorization: Basic c3BlY3RyZS5pOnRlc3QxMjM=
Content-Length: 1245
Host: localhost:8080

[ {
  "metadata" : null,
  "id" : "otm-ed567b6b-92ac-4267-9bb7-1f8b1877abba",
  "universityOrgIds" : [ "the-spectre" ],
  "name" : {
    "en" : "Computer room",
    "fi" : "ATK-huone",
    "sv" : "ADB-rum"
  },
  "capacity" : 15,
  "buildingId" : "otm-ed567b6b-72ac-4267-9bb7-1f8b1877cb74",
  "building" : null
}, {
  "metadata" : null,
  "id" : "otm-82577521-22a8-4a42-b54a-96e549af2e21",
  "universityOrgIds" : [ "the-spectre" ],
  "name" : {
    "en" : "Class 10a",
    "fi" : "Luokka 10a",
    "sv" : "Klass 10a"
  },
  "capacity" : 15,
  "buildingId" : "otm-155b685f-2a5e-401a-90c5-167d35101764",
  "building" : null
}, {
  "metadata" : null,
  "id" : "otm-987d362f-cdfe-4b90-95bc-f47cbb309ed9",
  "universityOrgIds" : [ "the-spectre" ],
  "name" : {
    "en" : "Auditorium",
    "fi" : "Auditorio",
    "sv" : "Auditorium"
  },
  "capacity" : 15,
  "buildingId" : "otm-5029f514-b78c-4135-a354-9866fa472016",
  "building" : null
}, {
  "metadata" : null,
  "id" : "otm-987d362f-cdfe-4b90-88bc-f47cbb309eff",
  "universityOrgIds" : [ "the-spectre" ],
  "name" : {
    "en" : "Class 5a",
    "fi" : "Luokka 5a",
    "sv" : "Klass 5a"
  },
  "capacity" : 15,
  "buildingId" : "otm-5029f514-b78c-4135-a354-9866fa472016",
  "building" : null
} ]

Example HTTP response

HTTP/1.1 200 OK
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY

Example Curl request

$ curl 'http://localhost:8080/api/locations/v1/import' -i -u 'spectre.i:test123' -X POST \
    -H 'Content-Type: application/json' \
    -d '[ {
  "metadata" : null,
  "id" : "otm-ed567b6b-92ac-4267-9bb7-1f8b1877abba",
  "universityOrgIds" : [ "the-spectre" ],
  "name" : {
    "en" : "Computer room",
    "fi" : "ATK-huone",
    "sv" : "ADB-rum"
  },
  "capacity" : 15,
  "buildingId" : "otm-ed567b6b-72ac-4267-9bb7-1f8b1877cb74",
  "building" : null
}, {
  "metadata" : null,
  "id" : "otm-82577521-22a8-4a42-b54a-96e549af2e21",
  "universityOrgIds" : [ "the-spectre" ],
  "name" : {
    "en" : "Class 10a",
    "fi" : "Luokka 10a",
    "sv" : "Klass 10a"
  },
  "capacity" : 15,
  "buildingId" : "otm-155b685f-2a5e-401a-90c5-167d35101764",
  "building" : null
}, {
  "metadata" : null,
  "id" : "otm-987d362f-cdfe-4b90-95bc-f47cbb309ed9",
  "universityOrgIds" : [ "the-spectre" ],
  "name" : {
    "en" : "Auditorium",
    "fi" : "Auditorio",
    "sv" : "Auditorium"
  },
  "capacity" : 15,
  "buildingId" : "otm-5029f514-b78c-4135-a354-9866fa472016",
  "building" : null
}, {
  "metadata" : null,
  "id" : "otm-987d362f-cdfe-4b90-88bc-f47cbb309eff",
  "universityOrgIds" : [ "the-spectre" ],
  "name" : {
    "en" : "Class 5a",
    "fi" : "Luokka 5a",
    "sv" : "Klass 5a"
  },
  "capacity" : 15,
  "buildingId" : "otm-5029f514-b78c-4135-a354-9866fa472016",
  "building" : null
} ]'

Example HTTP request

POST /api/locations/v1/import HTTP/1.1
Content-Type: application/json
Authorization: Basic c3BlY3RyZS5pOnRlc3QxMjM=
Content-Length: 1245
Host: localhost:8080

[ {
  "metadata" : null,
  "id" : "otm-ed567b6b-92ac-4267-9bb7-1f8b1877abba",
  "universityOrgIds" : [ "the-spectre" ],
  "name" : {
    "en" : "Computer room",
    "fi" : "ATK-huone",
    "sv" : "ADB-rum"
  },
  "capacity" : 15,
  "buildingId" : "otm-ed567b6b-72ac-4267-9bb7-1f8b1877cb74",
  "building" : null
}, {
  "metadata" : null,
  "id" : "otm-82577521-22a8-4a42-b54a-96e549af2e21",
  "universityOrgIds" : [ "the-spectre" ],
  "name" : {
    "en" : "Class 10a",
    "fi" : "Luokka 10a",
    "sv" : "Klass 10a"
  },
  "capacity" : 15,
  "buildingId" : "otm-155b685f-2a5e-401a-90c5-167d35101764",
  "building" : null
}, {
  "metadata" : null,
  "id" : "otm-987d362f-cdfe-4b90-95bc-f47cbb309ed9",
  "universityOrgIds" : [ "the-spectre" ],
  "name" : {
    "en" : "Auditorium",
    "fi" : "Auditorio",
    "sv" : "Auditorium"
  },
  "capacity" : 15,
  "buildingId" : "otm-5029f514-b78c-4135-a354-9866fa472016",
  "building" : null
}, {
  "metadata" : null,
  "id" : "otm-987d362f-cdfe-4b90-88bc-f47cbb309eff",
  "universityOrgIds" : [ "the-spectre" ],
  "name" : {
    "en" : "Class 5a",
    "fi" : "Luokka 5a",
    "sv" : "Klass 5a"
  },
  "capacity" : 15,
  "buildingId" : "otm-5029f514-b78c-4135-a354-9866fa472016",
  "building" : null
} ]

Example HTTP response

HTTP/1.1 200 OK
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY

Example Curl request

$ curl 'http://localhost:8080/api/locations/v1/import' -i -u 'spectre.i:test123' -X POST \
    -H 'Content-Type: application/json' \
    -d '[ {
  "metadata" : null,
  "id" : "otm-ed567b6b-92ac-4267-9bb7-1f8b1877abba",
  "universityOrgIds" : [ "the-spectre" ],
  "name" : {
    "en" : "Computer room",
    "fi" : "ATK-huone",
    "sv" : "ADB-rum"
  },
  "capacity" : 15,
  "buildingId" : "otm-ed567b6b-72ac-4267-9bb7-1f8b1877cb74",
  "building" : null
}, {
  "metadata" : null,
  "id" : "otm-82577521-22a8-4a42-b54a-96e549af2e21",
  "universityOrgIds" : [ "the-spectre" ],
  "name" : {
    "en" : "Class 10a",
    "fi" : "Luokka 10a",
    "sv" : "Klass 10a"
  },
  "capacity" : 15,
  "buildingId" : "otm-155b685f-2a5e-401a-90c5-167d35101764",
  "building" : null
}, {
  "metadata" : null,
  "id" : "otm-987d362f-cdfe-4b90-95bc-f47cbb309ed9",
  "universityOrgIds" : [ "the-spectre" ],
  "name" : {
    "en" : "Auditorium",
    "fi" : "Auditorio",
    "sv" : "Auditorium"
  },
  "capacity" : 15,
  "buildingId" : "otm-5029f514-b78c-4135-a354-9866fa472016",
  "building" : null
}, {
  "metadata" : null,
  "id" : "otm-987d362f-cdfe-4b90-88bc-f47cbb309eff",
  "universityOrgIds" : [ "the-spectre" ],
  "name" : {
    "en" : "Class 5a",
    "fi" : "Luokka 5a",
    "sv" : "Klass 5a"
  },
  "capacity" : 15,
  "buildingId" : "otm-5029f514-b78c-4135-a354-9866fa472016",
  "building" : null
} ]'

Get location

GET /api/locations/v1/{locationId}

Parameters

Type Name Description Schema

Path

locationId
required

locationId

string (otmid)

Responses

HTTP Code Description Schema

200

OK

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Produces

  • application/json

Tags

  • export

Export mass exam sessions

GET /api/mass-exam-sessions/v1/export

Description

Entities can be exported in modification order based on one of two separate ways of specifying the starting point. With the 'since' parameter (recommended): an integer key (modification ordinal), which is different for every modification of the entity table. The ordinals are guaranteed to increase for each modification, but not guaranteed to be consecutive. With the 'sinceTime' parameter: an ISO-8601 timestamp. SinceTime is only supported for the case when the modification ordinal is not known by the exporter. In actual practice, if efficient export of all data is desired, the greatest modification ordinal from the previous export must be remembered and used as the since parameter for the next export. Both the since and sinceTime parameters are exclusive: if in one export you get the modification ordinals 3, 4 and 5, the next query should be export?since=5 and then you get the ordinals 6, 7, 8, etc.

Parameters

Type Name Description Schema

Query

limit
optional

Maximum number of mass exam sessions to return. May return less, either because there are not enough items, or because of internal limits. If limit is higher than 10 000, returns only 10 000 items.

integer (int32)

Query

since
optional

Return mass exam sessions modified after (exclusive comparison) this modification ordinal (increasing value within Kori). Alternate parameter with sinceTime. This is the recommended option.

integer (int64)

Query

sinceTime
optional

Return mass exam sessions modified after (exclusive comparison) this ISO-8601 time. Alternate parameter with since. This is the not recommended but sometimes necessary option.

string (date-time)

Responses

HTTP Code Description Schema

200

OK

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Produces

  • application/json

Tags

  • export

Import mass exam sessions

POST /api/mass-exam-sessions/v1/import

Description

Import active mass exam sessions with strict validation.

Parameters

Type Name Description Schema

Body

sessions
required

sessions

< MassExamSession > array

Responses

HTTP Code Description Schema

200

OK

No Content

201

Created

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes

  • application/json

Produces

  • */*

Tags

  • import

Get modules

GET /api/modules/v1

Description

Modules are fetched by their groupId. Modules of all types (DegreeProgramme, StudyModule, GroupingModule) in DRAFT and ACTIVE states are fetched.

Parameters

Type Name Description Schema

Query

groupId
required

groupId

string (otmid)

Responses

HTTP Code Description Schema

200

OK

< Module > array

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Produces

  • application/json

Tags

  • export

Delete modules

POST /api/modules/v1/batch-delete

Description

Delete a batch of modules by id or groupId.

Parameters

Type Name Description Schema

Body

deleteBatch
required

deleteBatch

Responses

HTTP Code Description Schema

200

OK

No Content

201

Created

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes

  • application/json

Produces

  • */*

Tags

  • import

Find module versions by group id and curriculum period id

GET /api/modules/v1/by-group-id

Description

NOTE! This is not an exact and deterministic search. It returns a single version representing each group id. ACTIVE modules are preferred over DRAFT modules and DELETED versions are the last resort, unless document states are limited using the documentStates parameter. Order of the modules is not guaranteed. Curriculum period id is not mandatory. When curriculum id is not given or the given curriculum does not contain all versions, search will use active and valid curricula starting from current proceeding to the future and then into the past in order to find versions.

Parameters

Type Name Description Schema Default

Query

curriculumPeriodId
optional

Curriculum period id. Return versions which belong to this curriculum period.

string (otmid)

Query

documentStates
optional

Return modules only in given Document states.

< enum (DRAFT, ACTIVE, DELETED) > array(multi)

Query

groupId
optional

List of group ids whose module versions we are interested in.

< string (otmid) > array(multi)

Query

preferByState
optional

Prefer modules by state in the order ACTIVE, DRAFT, DELETED.

boolean

"true"

Query

universityId
optional

University whose modules are preferred.

string (otmid)

Responses

HTTP Code Description Schema

200

OK

< Module > array

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Produces

  • application/json

Tags

  • export

Export modules

GET /api/modules/v1/export

Description

Entities can be exported in modification order based on one of two separate ways of specifying the starting point.With the 'since' parameter (recommended): an integer key (modification ordinal), which is different for every modification of the entity table. The ordinals are guaranteed to increase for each modification, but not guaranteed to be concecutive.With the 'sinceTime' parameter: an ISO-8601 timestamp. SinceTime is only supported for the case when the modification ordinal is not known by the exporter. In actual practice, if efficient export of all data is desired, the greatest modification ordinal from the previous export must be remembered and used as the since parameter for the next export. Both the since and sinceTime parameters are exclusive: if in one export you get the modification ordinals 3, 4 and 5, the next query should be export?since=5 and then you get the ordinals 6, 7, 8, etc.

Parameters

Type Name Description Schema

Query

limit
optional

Maximum number of study modules to return. May return less, either because there are not enough change items, or because of internal limits. If limit is higher than 10 000, returns only 10 000 items.

integer (int32)

Query

since
optional

Return study modules modified after (exclusive comparison) this modification ordinal (increasing value within Kori). Alternate parameter with sinceTime. This is the recommended option.

integer (int64)

Query

sinceTime
optional

Return study modules modified after (exclusive comparison) this ISO-8601 time. Alternate parameter with since. This is the not recommended but sometimes necessary option.

string (date-time)

Responses

HTTP Code Description Schema

200

OK

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Produces

  • application/json

Tags

  • export

Import modules

POST /api/modules/v1/import

Description

Import with strict validation

Parameters

Type Name Description Schema

Body

modules
required

modules

< Module > array

Responses

HTTP Code Description Schema

200

OK

No Content

201

Created

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes

  • application/json

Produces

  • */*

Tags

  • import

Example HTTP request

POST /api/modules/v1/import HTTP/1.1
Content-Type: application/json
Content-Length: 3801
Host: localhost:8080

[ {
  "metadata" : null,
  "id" : "otm-969608b0-996c-4277-8e10-014717894cb9",
  "universityOrgIds" : [ "the-spectre" ],
  "groupId" : "otm-969608b0-996c-4277-8e10-014717894cb9",
  "name" : {
    "fi" : "Module that has ID otm-969608b0-996c-4277-8e10-014717894cb9"
  },
  "moduleContentApprovalRequired" : false,
  "code" : "code-xyzzy-otm-969608b0-996c-4277-8e10-014717894cb9",
  "targetCredits" : {
    "min" : 0,
    "max" : 10
  },
  "curriculumPeriodIds" : [ "otm-test-curriculum-period-2015-2016" ],
  "approvalState" : "urn:code:approval-state-type:not-ready",
  "validityPeriod" : {
    "startDate" : "2015-12-24",
    "endDate" : "2015-12-25"
  },
  "contentDescription" : null,
  "additionalInfo" : {
    "fi" : "lisätietoa"
  },
  "responsibilityInfos" : [ {
    "text" : null,
    "personId" : "otm-test-user-96",
    "roleUrn" : "urn:code:module-responsibility-info-type:responsible-teacher",
    "validityPeriod" : { }
  } ],
  "organisations" : [ {
    "organisationId" : "the-spectre",
    "educationalInstitutionUrn" : null,
    "roleUrn" : "urn:code:organisation-role:responsible-organisation",
    "share" : 1,
    "validityPeriod" : { }
  } ],
  "inclusionApplicationInstruction" : null,
  "tweetText" : null,
  "degreeProgramTypeUrn" : "urn:code:degree-program-type:bachelors-degree",
  "degreeTitleUrns" : [ "urn:code:degree-title:tutkintonimikekk_012" ],
  "degreeLanguageUrns" : [ "urn:code:official-language:fi" ],
  "studyFields" : [ "urn:code:study-field:2002-0" ],
  "educationClassificationUrns" : [ "urn:code:education-classification:koulutus_361252" ],
  "educationLocationUrns" : [ ],
  "gradeScaleId" : "hy-0-5",
  "customCodeUrns" : null,
  "learningOutcomes" : null,
  "tuitionFee" : null,
  "type" : "DegreeProgramme",
  "rule" : {
    "type" : "AnyCourseUnitRule",
    "localId" : "799370d7-ba80-4364-88d4-663314db2962"
  }
}, {
  "metadata" : null,
  "id" : "otm-b587639d-1f0b-490c-9695-3bb341e38e8b",
  "universityOrgIds" : [ "the-spectre" ],
  "groupId" : "otm-b587639d-1f0b-490c-9695-3bb341e38e8b",
  "name" : {
    "fi" : "Module that has ID otm-b587639d-1f0b-490c-9695-3bb341e38e8b"
  },
  "moduleContentApprovalRequired" : false,
  "code" : "code-xyzzy-otm-b587639d-1f0b-490c-9695-3bb341e38e8b",
  "targetCredits" : {
    "min" : 0,
    "max" : 10
  },
  "curriculumPeriodIds" : [ "otm-test-curriculum-period-2015-2016" ],
  "approvalState" : "urn:code:approval-state-type:not-ready",
  "validityPeriod" : {
    "startDate" : "2015-12-24",
    "endDate" : "2015-12-25"
  },
  "contentDescription" : null,
  "additionalInfo" : {
    "fi" : "lisätietoa"
  },
  "responsibilityInfos" : [ {
    "text" : null,
    "personId" : "otm-test-user-96",
    "roleUrn" : "urn:code:module-responsibility-info-type:responsible-teacher",
    "validityPeriod" : { }
  } ],
  "organisations" : [ {
    "organisationId" : "the-spectre",
    "educationalInstitutionUrn" : null,
    "roleUrn" : "urn:code:organisation-role:responsible-organisation",
    "share" : 1,
    "validityPeriod" : { }
  } ],
  "inclusionApplicationInstruction" : null,
  "abbreviation" : null,
  "tweetText" : null,
  "outcomes" : null,
  "prerequisites" : null,
  "substitutions" : null,
  "searchTags" : [ ],
  "studyLevel" : "urn:code:study-level:intermediate-studies",
  "possibleAttainmentLanguages" : [ "urn:code:official-language:fi" ],
  "studyFields" : [ "urn:code:study-field:2002-0" ],
  "graded" : true,
  "gradeScaleId" : "hy-0-5",
  "customCodeUrns" : null,
  "contentFilter" : null,
  "studyRightSelectionType" : "urn:code:study-right-selection-type:none",
  "minorStudyRightAcceptanceType" : null,
  "minorStudyRightApplicationInstructions" : null,
  "type" : "StudyModule",
  "rule" : {
    "type" : "AnyCourseUnitRule",
    "localId" : "9f64cbfa-f545-429c-aaf6-925af5323348"
  }
} ]

Example HTTP response

HTTP/1.1 200 OK

Example Curl request

$ curl 'http://localhost:8080/api/modules/v1/import' -i -X POST \
    -H 'Content-Type: application/json' \
    -d '[ {
  "metadata" : null,
  "id" : "otm-969608b0-996c-4277-8e10-014717894cb9",
  "universityOrgIds" : [ "the-spectre" ],
  "groupId" : "otm-969608b0-996c-4277-8e10-014717894cb9",
  "name" : {
    "fi" : "Module that has ID otm-969608b0-996c-4277-8e10-014717894cb9"
  },
  "moduleContentApprovalRequired" : false,
  "code" : "code-xyzzy-otm-969608b0-996c-4277-8e10-014717894cb9",
  "targetCredits" : {
    "min" : 0,
    "max" : 10
  },
  "curriculumPeriodIds" : [ "otm-test-curriculum-period-2015-2016" ],
  "approvalState" : "urn:code:approval-state-type:not-ready",
  "validityPeriod" : {
    "startDate" : "2015-12-24",
    "endDate" : "2015-12-25"
  },
  "contentDescription" : null,
  "additionalInfo" : {
    "fi" : "lisätietoa"
  },
  "responsibilityInfos" : [ {
    "text" : null,
    "personId" : "otm-test-user-96",
    "roleUrn" : "urn:code:module-responsibility-info-type:responsible-teacher",
    "validityPeriod" : { }
  } ],
  "organisations" : [ {
    "organisationId" : "the-spectre",
    "educationalInstitutionUrn" : null,
    "roleUrn" : "urn:code:organisation-role:responsible-organisation",
    "share" : 1,
    "validityPeriod" : { }
  } ],
  "inclusionApplicationInstruction" : null,
  "tweetText" : null,
  "degreeProgramTypeUrn" : "urn:code:degree-program-type:bachelors-degree",
  "degreeTitleUrns" : [ "urn:code:degree-title:tutkintonimikekk_012" ],
  "degreeLanguageUrns" : [ "urn:code:official-language:fi" ],
  "studyFields" : [ "urn:code:study-field:2002-0" ],
  "educationClassificationUrns" : [ "urn:code:education-classification:koulutus_361252" ],
  "educationLocationUrns" : [ ],
  "gradeScaleId" : "hy-0-5",
  "customCodeUrns" : null,
  "learningOutcomes" : null,
  "tuitionFee" : null,
  "type" : "DegreeProgramme",
  "rule" : {
    "type" : "AnyCourseUnitRule",
    "localId" : "799370d7-ba80-4364-88d4-663314db2962"
  }
}, {
  "metadata" : null,
  "id" : "otm-b587639d-1f0b-490c-9695-3bb341e38e8b",
  "universityOrgIds" : [ "the-spectre" ],
  "groupId" : "otm-b587639d-1f0b-490c-9695-3bb341e38e8b",
  "name" : {
    "fi" : "Module that has ID otm-b587639d-1f0b-490c-9695-3bb341e38e8b"
  },
  "moduleContentApprovalRequired" : false,
  "code" : "code-xyzzy-otm-b587639d-1f0b-490c-9695-3bb341e38e8b",
  "targetCredits" : {
    "min" : 0,
    "max" : 10
  },
  "curriculumPeriodIds" : [ "otm-test-curriculum-period-2015-2016" ],
  "approvalState" : "urn:code:approval-state-type:not-ready",
  "validityPeriod" : {
    "startDate" : "2015-12-24",
    "endDate" : "2015-12-25"
  },
  "contentDescription" : null,
  "additionalInfo" : {
    "fi" : "lisätietoa"
  },
  "responsibilityInfos" : [ {
    "text" : null,
    "personId" : "otm-test-user-96",
    "roleUrn" : "urn:code:module-responsibility-info-type:responsible-teacher",
    "validityPeriod" : { }
  } ],
  "organisations" : [ {
    "organisationId" : "the-spectre",
    "educationalInstitutionUrn" : null,
    "roleUrn" : "urn:code:organisation-role:responsible-organisation",
    "share" : 1,
    "validityPeriod" : { }
  } ],
  "inclusionApplicationInstruction" : null,
  "abbreviation" : null,
  "tweetText" : null,
  "outcomes" : null,
  "prerequisites" : null,
  "substitutions" : null,
  "searchTags" : [ ],
  "studyLevel" : "urn:code:study-level:intermediate-studies",
  "possibleAttainmentLanguages" : [ "urn:code:official-language:fi" ],
  "studyFields" : [ "urn:code:study-field:2002-0" ],
  "graded" : true,
  "gradeScaleId" : "hy-0-5",
  "customCodeUrns" : null,
  "contentFilter" : null,
  "studyRightSelectionType" : "urn:code:study-right-selection-type:none",
  "minorStudyRightAcceptanceType" : null,
  "minorStudyRightApplicationInstructions" : null,
  "type" : "StudyModule",
  "rule" : {
    "type" : "AnyCourseUnitRule",
    "localId" : "9f64cbfa-f545-429c-aaf6-925af5323348"
  }
} ]'

Example HTTP request

POST /api/modules/v1/import HTTP/1.1
Content-Type: application/json
Content-Length: 3801
Host: localhost:8080

[ {
  "metadata" : null,
  "id" : "otm-969608b0-996c-4277-8e10-014717894cb9",
  "universityOrgIds" : [ "the-spectre" ],
  "groupId" : "otm-969608b0-996c-4277-8e10-014717894cb9",
  "name" : {
    "fi" : "Module that has ID otm-969608b0-996c-4277-8e10-014717894cb9"
  },
  "moduleContentApprovalRequired" : false,
  "code" : "code-xyzzy-otm-969608b0-996c-4277-8e10-014717894cb9",
  "targetCredits" : {
    "min" : 0,
    "max" : 10
  },
  "curriculumPeriodIds" : [ "otm-test-curriculum-period-2015-2016" ],
  "approvalState" : "urn:code:approval-state-type:not-ready",
  "validityPeriod" : {
    "startDate" : "2015-12-24",
    "endDate" : "2015-12-25"
  },
  "contentDescription" : null,
  "additionalInfo" : {
    "fi" : "lisätietoa"
  },
  "responsibilityInfos" : [ {
    "text" : null,
    "personId" : "otm-test-user-96",
    "roleUrn" : "urn:code:module-responsibility-info-type:responsible-teacher",
    "validityPeriod" : { }
  } ],
  "organisations" : [ {
    "organisationId" : "the-spectre",
    "educationalInstitutionUrn" : null,
    "roleUrn" : "urn:code:organisation-role:responsible-organisation",
    "share" : 1,
    "validityPeriod" : { }
  } ],
  "inclusionApplicationInstruction" : null,
  "tweetText" : null,
  "degreeProgramTypeUrn" : "urn:code:degree-program-type:bachelors-degree",
  "degreeTitleUrns" : [ "urn:code:degree-title:tutkintonimikekk_012" ],
  "degreeLanguageUrns" : [ "urn:code:official-language:fi" ],
  "studyFields" : [ "urn:code:study-field:2002-0" ],
  "educationClassificationUrns" : [ "urn:code:education-classification:koulutus_361252" ],
  "educationLocationUrns" : [ ],
  "gradeScaleId" : "hy-0-5",
  "customCodeUrns" : null,
  "learningOutcomes" : null,
  "tuitionFee" : null,
  "type" : "DegreeProgramme",
  "rule" : {
    "type" : "AnyCourseUnitRule",
    "localId" : "799370d7-ba80-4364-88d4-663314db2962"
  }
}, {
  "metadata" : null,
  "id" : "otm-b587639d-1f0b-490c-9695-3bb341e38e8b",
  "universityOrgIds" : [ "the-spectre" ],
  "groupId" : "otm-b587639d-1f0b-490c-9695-3bb341e38e8b",
  "name" : {
    "fi" : "Module that has ID otm-b587639d-1f0b-490c-9695-3bb341e38e8b"
  },
  "moduleContentApprovalRequired" : false,
  "code" : "code-xyzzy-otm-b587639d-1f0b-490c-9695-3bb341e38e8b",
  "targetCredits" : {
    "min" : 0,
    "max" : 10
  },
  "curriculumPeriodIds" : [ "otm-test-curriculum-period-2015-2016" ],
  "approvalState" : "urn:code:approval-state-type:not-ready",
  "validityPeriod" : {
    "startDate" : "2015-12-24",
    "endDate" : "2015-12-25"
  },
  "contentDescription" : null,
  "additionalInfo" : {
    "fi" : "lisätietoa"
  },
  "responsibilityInfos" : [ {
    "text" : null,
    "personId" : "otm-test-user-96",
    "roleUrn" : "urn:code:module-responsibility-info-type:responsible-teacher",
    "validityPeriod" : { }
  } ],
  "organisations" : [ {
    "organisationId" : "the-spectre",
    "educationalInstitutionUrn" : null,
    "roleUrn" : "urn:code:organisation-role:responsible-organisation",
    "share" : 1,
    "validityPeriod" : { }
  } ],
  "inclusionApplicationInstruction" : null,
  "abbreviation" : null,
  "tweetText" : null,
  "outcomes" : null,
  "prerequisites" : null,
  "substitutions" : null,
  "searchTags" : [ ],
  "studyLevel" : "urn:code:study-level:intermediate-studies",
  "possibleAttainmentLanguages" : [ "urn:code:official-language:fi" ],
  "studyFields" : [ "urn:code:study-field:2002-0" ],
  "graded" : true,
  "gradeScaleId" : "hy-0-5",
  "customCodeUrns" : null,
  "contentFilter" : null,
  "studyRightSelectionType" : "urn:code:study-right-selection-type:none",
  "minorStudyRightAcceptanceType" : null,
  "minorStudyRightApplicationInstructions" : null,
  "type" : "StudyModule",
  "rule" : {
    "type" : "AnyCourseUnitRule",
    "localId" : "9f64cbfa-f545-429c-aaf6-925af5323348"
  }
} ]

Example HTTP response

HTTP/1.1 200 OK

Example Curl request

$ curl 'http://localhost:8080/api/modules/v1/import' -i -X POST \
    -H 'Content-Type: application/json' \
    -d '[ {
  "metadata" : null,
  "id" : "otm-969608b0-996c-4277-8e10-014717894cb9",
  "universityOrgIds" : [ "the-spectre" ],
  "groupId" : "otm-969608b0-996c-4277-8e10-014717894cb9",
  "name" : {
    "fi" : "Module that has ID otm-969608b0-996c-4277-8e10-014717894cb9"
  },
  "moduleContentApprovalRequired" : false,
  "code" : "code-xyzzy-otm-969608b0-996c-4277-8e10-014717894cb9",
  "targetCredits" : {
    "min" : 0,
    "max" : 10
  },
  "curriculumPeriodIds" : [ "otm-test-curriculum-period-2015-2016" ],
  "approvalState" : "urn:code:approval-state-type:not-ready",
  "validityPeriod" : {
    "startDate" : "2015-12-24",
    "endDate" : "2015-12-25"
  },
  "contentDescription" : null,
  "additionalInfo" : {
    "fi" : "lisätietoa"
  },
  "responsibilityInfos" : [ {
    "text" : null,
    "personId" : "otm-test-user-96",
    "roleUrn" : "urn:code:module-responsibility-info-type:responsible-teacher",
    "validityPeriod" : { }
  } ],
  "organisations" : [ {
    "organisationId" : "the-spectre",
    "educationalInstitutionUrn" : null,
    "roleUrn" : "urn:code:organisation-role:responsible-organisation",
    "share" : 1,
    "validityPeriod" : { }
  } ],
  "inclusionApplicationInstruction" : null,
  "tweetText" : null,
  "degreeProgramTypeUrn" : "urn:code:degree-program-type:bachelors-degree",
  "degreeTitleUrns" : [ "urn:code:degree-title:tutkintonimikekk_012" ],
  "degreeLanguageUrns" : [ "urn:code:official-language:fi" ],
  "studyFields" : [ "urn:code:study-field:2002-0" ],
  "educationClassificationUrns" : [ "urn:code:education-classification:koulutus_361252" ],
  "educationLocationUrns" : [ ],
  "gradeScaleId" : "hy-0-5",
  "customCodeUrns" : null,
  "learningOutcomes" : null,
  "tuitionFee" : null,
  "type" : "DegreeProgramme",
  "rule" : {
    "type" : "AnyCourseUnitRule",
    "localId" : "799370d7-ba80-4364-88d4-663314db2962"
  }
}, {
  "metadata" : null,
  "id" : "otm-b587639d-1f0b-490c-9695-3bb341e38e8b",
  "universityOrgIds" : [ "the-spectre" ],
  "groupId" : "otm-b587639d-1f0b-490c-9695-3bb341e38e8b",
  "name" : {
    "fi" : "Module that has ID otm-b587639d-1f0b-490c-9695-3bb341e38e8b"
  },
  "moduleContentApprovalRequired" : false,
  "code" : "code-xyzzy-otm-b587639d-1f0b-490c-9695-3bb341e38e8b",
  "targetCredits" : {
    "min" : 0,
    "max" : 10
  },
  "curriculumPeriodIds" : [ "otm-test-curriculum-period-2015-2016" ],
  "approvalState" : "urn:code:approval-state-type:not-ready",
  "validityPeriod" : {
    "startDate" : "2015-12-24",
    "endDate" : "2015-12-25"
  },
  "contentDescription" : null,
  "additionalInfo" : {
    "fi" : "lisätietoa"
  },
  "responsibilityInfos" : [ {
    "text" : null,
    "personId" : "otm-test-user-96",
    "roleUrn" : "urn:code:module-responsibility-info-type:responsible-teacher",
    "validityPeriod" : { }
  } ],
  "organisations" : [ {
    "organisationId" : "the-spectre",
    "educationalInstitutionUrn" : null,
    "roleUrn" : "urn:code:organisation-role:responsible-organisation",
    "share" : 1,
    "validityPeriod" : { }
  } ],
  "inclusionApplicationInstruction" : null,
  "abbreviation" : null,
  "tweetText" : null,
  "outcomes" : null,
  "prerequisites" : null,
  "substitutions" : null,
  "searchTags" : [ ],
  "studyLevel" : "urn:code:study-level:intermediate-studies",
  "possibleAttainmentLanguages" : [ "urn:code:official-language:fi" ],
  "studyFields" : [ "urn:code:study-field:2002-0" ],
  "graded" : true,
  "gradeScaleId" : "hy-0-5",
  "customCodeUrns" : null,
  "contentFilter" : null,
  "studyRightSelectionType" : "urn:code:study-right-selection-type:none",
  "minorStudyRightAcceptanceType" : null,
  "minorStudyRightApplicationInstructions" : null,
  "type" : "StudyModule",
  "rule" : {
    "type" : "AnyCourseUnitRule",
    "localId" : "9f64cbfa-f545-429c-aaf6-925af5323348"
  }
} ]'

Patch modules

PATCH /api/modules/v1/import

Description

Patch import with strict validation

Parameters

Type Name Description Schema

Body

patchEntities
required

patchEntities

< PatchEntity > array

Responses

HTTP Code Description Schema

200

OK

No Content

204

No Content

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

Consumes

  • application/json

Produces

  • */*

Tags

  • import

Import legacy modules

POST /api/modules/v1/import/legacy

Description

Import with a lenient legacy validation

Parameters

Type Name Description Schema

Body

modules
required

modules

< Module > array

Responses

HTTP Code Description Schema

200

OK

No Content

201

Created

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes

  • application/json

Produces

  • */*

Tags

  • import

Example HTTP request

POST /api/modules/v1/import/legacy HTTP/1.1
Content-Type: application/json
Content-Length: 3752
Host: localhost:8080

[ {
  "metadata" : null,
  "id" : "otm-47938699-ab40-46fd-ae85-422280af4ce5",
  "universityOrgIds" : [ "the-spectre" ],
  "groupId" : "otm-47938699-ab40-46fd-ae85-422280af4ce5",
  "name" : {
    "fi" : "Module that has ID otm-47938699-ab40-46fd-ae85-422280af4ce5"
  },
  "moduleContentApprovalRequired" : false,
  "code" : null,
  "targetCredits" : {
    "min" : 0,
    "max" : 10
  },
  "curriculumPeriodIds" : [ "otm-test-curriculum-period-2015-2016" ],
  "approvalState" : "urn:code:approval-state-type:not-ready",
  "validityPeriod" : {
    "startDate" : "1970-01-01",
    "endDate" : "2071-12-04"
  },
  "contentDescription" : null,
  "additionalInfo" : {
    "fi" : "lisätietoa"
  },
  "responsibilityInfos" : [ {
    "text" : null,
    "personId" : "otm-test-user-96",
    "roleUrn" : "urn:code:module-responsibility-info-type:responsible-teacher",
    "validityPeriod" : { }
  } ],
  "organisations" : [ {
    "organisationId" : "the-spectre",
    "educationalInstitutionUrn" : null,
    "roleUrn" : "urn:code:organisation-role:responsible-organisation",
    "share" : 1,
    "validityPeriod" : { }
  } ],
  "inclusionApplicationInstruction" : null,
  "tweetText" : null,
  "degreeProgramTypeUrn" : "urn:code:degree-program-type:bachelors-degree",
  "degreeTitleUrns" : [ "urn:code:degree-title:tutkintonimikekk_012" ],
  "degreeLanguageUrns" : [ "urn:code:official-language:fi" ],
  "studyFields" : [ "urn:code:study-field:2002-0" ],
  "educationClassificationUrns" : [ "urn:code:education-classification:koulutus_361252" ],
  "educationLocationUrns" : [ ],
  "gradeScaleId" : "hy-0-5",
  "customCodeUrns" : null,
  "learningOutcomes" : null,
  "tuitionFee" : null,
  "type" : "DegreeProgramme",
  "rule" : {
    "type" : "AnyCourseUnitRule",
    "localId" : "be0813d7-3815-42e9-b735-934bdd19443a"
  }
}, {
  "metadata" : null,
  "id" : "otm-cb83a52d-4e79-4be4-bf89-4b0f3665ad66",
  "universityOrgIds" : [ "the-spectre" ],
  "groupId" : "otm-cb83a52d-4e79-4be4-bf89-4b0f3665ad66",
  "name" : {
    "fi" : "Module that has ID otm-cb83a52d-4e79-4be4-bf89-4b0f3665ad66"
  },
  "moduleContentApprovalRequired" : false,
  "code" : "code-xyzzy-otm-cb83a52d-4e79-4be4-bf89-4b0f3665ad66",
  "targetCredits" : {
    "min" : 0,
    "max" : 10
  },
  "curriculumPeriodIds" : [ "otm-test-curriculum-period-2015-2016" ],
  "approvalState" : "urn:code:approval-state-type:not-ready",
  "validityPeriod" : {
    "startDate" : "1970-01-01",
    "endDate" : "2071-12-04"
  },
  "contentDescription" : null,
  "additionalInfo" : {
    "fi" : "lisätietoa"
  },
  "responsibilityInfos" : [ {
    "text" : null,
    "personId" : "otm-test-user-96",
    "roleUrn" : "urn:code:module-responsibility-info-type:responsible-teacher",
    "validityPeriod" : { }
  } ],
  "organisations" : [ {
    "organisationId" : "the-spectre",
    "educationalInstitutionUrn" : null,
    "roleUrn" : "urn:code:organisation-role:responsible-organisation",
    "share" : 1,
    "validityPeriod" : { }
  } ],
  "inclusionApplicationInstruction" : null,
  "abbreviation" : null,
  "tweetText" : null,
  "outcomes" : null,
  "prerequisites" : null,
  "substitutions" : null,
  "searchTags" : [ ],
  "studyLevel" : "urn:code:study-level:intermediate-studies",
  "possibleAttainmentLanguages" : [ "urn:code:official-language:fi" ],
  "studyFields" : [ "urn:code:study-field:2002-0" ],
  "graded" : true,
  "gradeScaleId" : "hy-0-5",
  "customCodeUrns" : null,
  "contentFilter" : null,
  "studyRightSelectionType" : "urn:code:study-right-selection-type:none",
  "minorStudyRightAcceptanceType" : null,
  "minorStudyRightApplicationInstructions" : null,
  "type" : "StudyModule",
  "rule" : {
    "type" : "AnyCourseUnitRule",
    "localId" : "a71f287e-3e65-4747-839b-3b94bfa608ae"
  }
} ]

Example HTTP response

HTTP/1.1 200 OK

Example Curl request

$ curl 'http://localhost:8080/api/modules/v1/import/legacy' -i -X POST \
    -H 'Content-Type: application/json' \
    -d '[ {
  "metadata" : null,
  "id" : "otm-47938699-ab40-46fd-ae85-422280af4ce5",
  "universityOrgIds" : [ "the-spectre" ],
  "groupId" : "otm-47938699-ab40-46fd-ae85-422280af4ce5",
  "name" : {
    "fi" : "Module that has ID otm-47938699-ab40-46fd-ae85-422280af4ce5"
  },
  "moduleContentApprovalRequired" : false,
  "code" : null,
  "targetCredits" : {
    "min" : 0,
    "max" : 10
  },
  "curriculumPeriodIds" : [ "otm-test-curriculum-period-2015-2016" ],
  "approvalState" : "urn:code:approval-state-type:not-ready",
  "validityPeriod" : {
    "startDate" : "1970-01-01",
    "endDate" : "2071-12-04"
  },
  "contentDescription" : null,
  "additionalInfo" : {
    "fi" : "lisätietoa"
  },
  "responsibilityInfos" : [ {
    "text" : null,
    "personId" : "otm-test-user-96",
    "roleUrn" : "urn:code:module-responsibility-info-type:responsible-teacher",
    "validityPeriod" : { }
  } ],
  "organisations" : [ {
    "organisationId" : "the-spectre",
    "educationalInstitutionUrn" : null,
    "roleUrn" : "urn:code:organisation-role:responsible-organisation",
    "share" : 1,
    "validityPeriod" : { }
  } ],
  "inclusionApplicationInstruction" : null,
  "tweetText" : null,
  "degreeProgramTypeUrn" : "urn:code:degree-program-type:bachelors-degree",
  "degreeTitleUrns" : [ "urn:code:degree-title:tutkintonimikekk_012" ],
  "degreeLanguageUrns" : [ "urn:code:official-language:fi" ],
  "studyFields" : [ "urn:code:study-field:2002-0" ],
  "educationClassificationUrns" : [ "urn:code:education-classification:koulutus_361252" ],
  "educationLocationUrns" : [ ],
  "gradeScaleId" : "hy-0-5",
  "customCodeUrns" : null,
  "learningOutcomes" : null,
  "tuitionFee" : null,
  "type" : "DegreeProgramme",
  "rule" : {
    "type" : "AnyCourseUnitRule",
    "localId" : "be0813d7-3815-42e9-b735-934bdd19443a"
  }
}, {
  "metadata" : null,
  "id" : "otm-cb83a52d-4e79-4be4-bf89-4b0f3665ad66",
  "universityOrgIds" : [ "the-spectre" ],
  "groupId" : "otm-cb83a52d-4e79-4be4-bf89-4b0f3665ad66",
  "name" : {
    "fi" : "Module that has ID otm-cb83a52d-4e79-4be4-bf89-4b0f3665ad66"
  },
  "moduleContentApprovalRequired" : false,
  "code" : "code-xyzzy-otm-cb83a52d-4e79-4be4-bf89-4b0f3665ad66",
  "targetCredits" : {
    "min" : 0,
    "max" : 10
  },
  "curriculumPeriodIds" : [ "otm-test-curriculum-period-2015-2016" ],
  "approvalState" : "urn:code:approval-state-type:not-ready",
  "validityPeriod" : {
    "startDate" : "1970-01-01",
    "endDate" : "2071-12-04"
  },
  "contentDescription" : null,
  "additionalInfo" : {
    "fi" : "lisätietoa"
  },
  "responsibilityInfos" : [ {
    "text" : null,
    "personId" : "otm-test-user-96",
    "roleUrn" : "urn:code:module-responsibility-info-type:responsible-teacher",
    "validityPeriod" : { }
  } ],
  "organisations" : [ {
    "organisationId" : "the-spectre",
    "educationalInstitutionUrn" : null,
    "roleUrn" : "urn:code:organisation-role:responsible-organisation",
    "share" : 1,
    "validityPeriod" : { }
  } ],
  "inclusionApplicationInstruction" : null,
  "abbreviation" : null,
  "tweetText" : null,
  "outcomes" : null,
  "prerequisites" : null,
  "substitutions" : null,
  "searchTags" : [ ],
  "studyLevel" : "urn:code:study-level:intermediate-studies",
  "possibleAttainmentLanguages" : [ "urn:code:official-language:fi" ],
  "studyFields" : [ "urn:code:study-field:2002-0" ],
  "graded" : true,
  "gradeScaleId" : "hy-0-5",
  "customCodeUrns" : null,
  "contentFilter" : null,
  "studyRightSelectionType" : "urn:code:study-right-selection-type:none",
  "minorStudyRightAcceptanceType" : null,
  "minorStudyRightApplicationInstructions" : null,
  "type" : "StudyModule",
  "rule" : {
    "type" : "AnyCourseUnitRule",
    "localId" : "a71f287e-3e65-4747-839b-3b94bfa608ae"
  }
} ]'

Example HTTP request

POST /api/modules/v1/import/legacy HTTP/1.1
Content-Type: application/json
Content-Length: 3752
Host: localhost:8080

[ {
  "metadata" : null,
  "id" : "otm-47938699-ab40-46fd-ae85-422280af4ce5",
  "universityOrgIds" : [ "the-spectre" ],
  "groupId" : "otm-47938699-ab40-46fd-ae85-422280af4ce5",
  "name" : {
    "fi" : "Module that has ID otm-47938699-ab40-46fd-ae85-422280af4ce5"
  },
  "moduleContentApprovalRequired" : false,
  "code" : null,
  "targetCredits" : {
    "min" : 0,
    "max" : 10
  },
  "curriculumPeriodIds" : [ "otm-test-curriculum-period-2015-2016" ],
  "approvalState" : "urn:code:approval-state-type:not-ready",
  "validityPeriod" : {
    "startDate" : "1970-01-01",
    "endDate" : "2071-12-04"
  },
  "contentDescription" : null,
  "additionalInfo" : {
    "fi" : "lisätietoa"
  },
  "responsibilityInfos" : [ {
    "text" : null,
    "personId" : "otm-test-user-96",
    "roleUrn" : "urn:code:module-responsibility-info-type:responsible-teacher",
    "validityPeriod" : { }
  } ],
  "organisations" : [ {
    "organisationId" : "the-spectre",
    "educationalInstitutionUrn" : null,
    "roleUrn" : "urn:code:organisation-role:responsible-organisation",
    "share" : 1,
    "validityPeriod" : { }
  } ],
  "inclusionApplicationInstruction" : null,
  "tweetText" : null,
  "degreeProgramTypeUrn" : "urn:code:degree-program-type:bachelors-degree",
  "degreeTitleUrns" : [ "urn:code:degree-title:tutkintonimikekk_012" ],
  "degreeLanguageUrns" : [ "urn:code:official-language:fi" ],
  "studyFields" : [ "urn:code:study-field:2002-0" ],
  "educationClassificationUrns" : [ "urn:code:education-classification:koulutus_361252" ],
  "educationLocationUrns" : [ ],
  "gradeScaleId" : "hy-0-5",
  "customCodeUrns" : null,
  "learningOutcomes" : null,
  "tuitionFee" : null,
  "type" : "DegreeProgramme",
  "rule" : {
    "type" : "AnyCourseUnitRule",
    "localId" : "be0813d7-3815-42e9-b735-934bdd19443a"
  }
}, {
  "metadata" : null,
  "id" : "otm-cb83a52d-4e79-4be4-bf89-4b0f3665ad66",
  "universityOrgIds" : [ "the-spectre" ],
  "groupId" : "otm-cb83a52d-4e79-4be4-bf89-4b0f3665ad66",
  "name" : {
    "fi" : "Module that has ID otm-cb83a52d-4e79-4be4-bf89-4b0f3665ad66"
  },
  "moduleContentApprovalRequired" : false,
  "code" : "code-xyzzy-otm-cb83a52d-4e79-4be4-bf89-4b0f3665ad66",
  "targetCredits" : {
    "min" : 0,
    "max" : 10
  },
  "curriculumPeriodIds" : [ "otm-test-curriculum-period-2015-2016" ],
  "approvalState" : "urn:code:approval-state-type:not-ready",
  "validityPeriod" : {
    "startDate" : "1970-01-01",
    "endDate" : "2071-12-04"
  },
  "contentDescription" : null,
  "additionalInfo" : {
    "fi" : "lisätietoa"
  },
  "responsibilityInfos" : [ {
    "text" : null,
    "personId" : "otm-test-user-96",
    "roleUrn" : "urn:code:module-responsibility-info-type:responsible-teacher",
    "validityPeriod" : { }
  } ],
  "organisations" : [ {
    "organisationId" : "the-spectre",
    "educationalInstitutionUrn" : null,
    "roleUrn" : "urn:code:organisation-role:responsible-organisation",
    "share" : 1,
    "validityPeriod" : { }
  } ],
  "inclusionApplicationInstruction" : null,
  "abbreviation" : null,
  "tweetText" : null,
  "outcomes" : null,
  "prerequisites" : null,
  "substitutions" : null,
  "searchTags" : [ ],
  "studyLevel" : "urn:code:study-level:intermediate-studies",
  "possibleAttainmentLanguages" : [ "urn:code:official-language:fi" ],
  "studyFields" : [ "urn:code:study-field:2002-0" ],
  "graded" : true,
  "gradeScaleId" : "hy-0-5",
  "customCodeUrns" : null,
  "contentFilter" : null,
  "studyRightSelectionType" : "urn:code:study-right-selection-type:none",
  "minorStudyRightAcceptanceType" : null,
  "minorStudyRightApplicationInstructions" : null,
  "type" : "StudyModule",
  "rule" : {
    "type" : "AnyCourseUnitRule",
    "localId" : "a71f287e-3e65-4747-839b-3b94bfa608ae"
  }
} ]

Example HTTP response

HTTP/1.1 200 OK

Example Curl request

$ curl 'http://localhost:8080/api/modules/v1/import/legacy' -i -X POST \
    -H 'Content-Type: application/json' \
    -d '[ {
  "metadata" : null,
  "id" : "otm-47938699-ab40-46fd-ae85-422280af4ce5",
  "universityOrgIds" : [ "the-spectre" ],
  "groupId" : "otm-47938699-ab40-46fd-ae85-422280af4ce5",
  "name" : {
    "fi" : "Module that has ID otm-47938699-ab40-46fd-ae85-422280af4ce5"
  },
  "moduleContentApprovalRequired" : false,
  "code" : null,
  "targetCredits" : {
    "min" : 0,
    "max" : 10
  },
  "curriculumPeriodIds" : [ "otm-test-curriculum-period-2015-2016" ],
  "approvalState" : "urn:code:approval-state-type:not-ready",
  "validityPeriod" : {
    "startDate" : "1970-01-01",
    "endDate" : "2071-12-04"
  },
  "contentDescription" : null,
  "additionalInfo" : {
    "fi" : "lisätietoa"
  },
  "responsibilityInfos" : [ {
    "text" : null,
    "personId" : "otm-test-user-96",
    "roleUrn" : "urn:code:module-responsibility-info-type:responsible-teacher",
    "validityPeriod" : { }
  } ],
  "organisations" : [ {
    "organisationId" : "the-spectre",
    "educationalInstitutionUrn" : null,
    "roleUrn" : "urn:code:organisation-role:responsible-organisation",
    "share" : 1,
    "validityPeriod" : { }
  } ],
  "inclusionApplicationInstruction" : null,
  "tweetText" : null,
  "degreeProgramTypeUrn" : "urn:code:degree-program-type:bachelors-degree",
  "degreeTitleUrns" : [ "urn:code:degree-title:tutkintonimikekk_012" ],
  "degreeLanguageUrns" : [ "urn:code:official-language:fi" ],
  "studyFields" : [ "urn:code:study-field:2002-0" ],
  "educationClassificationUrns" : [ "urn:code:education-classification:koulutus_361252" ],
  "educationLocationUrns" : [ ],
  "gradeScaleId" : "hy-0-5",
  "customCodeUrns" : null,
  "learningOutcomes" : null,
  "tuitionFee" : null,
  "type" : "DegreeProgramme",
  "rule" : {
    "type" : "AnyCourseUnitRule",
    "localId" : "be0813d7-3815-42e9-b735-934bdd19443a"
  }
}, {
  "metadata" : null,
  "id" : "otm-cb83a52d-4e79-4be4-bf89-4b0f3665ad66",
  "universityOrgIds" : [ "the-spectre" ],
  "groupId" : "otm-cb83a52d-4e79-4be4-bf89-4b0f3665ad66",
  "name" : {
    "fi" : "Module that has ID otm-cb83a52d-4e79-4be4-bf89-4b0f3665ad66"
  },
  "moduleContentApprovalRequired" : false,
  "code" : "code-xyzzy-otm-cb83a52d-4e79-4be4-bf89-4b0f3665ad66",
  "targetCredits" : {
    "min" : 0,
    "max" : 10
  },
  "curriculumPeriodIds" : [ "otm-test-curriculum-period-2015-2016" ],
  "approvalState" : "urn:code:approval-state-type:not-ready",
  "validityPeriod" : {
    "startDate" : "1970-01-01",
    "endDate" : "2071-12-04"
  },
  "contentDescription" : null,
  "additionalInfo" : {
    "fi" : "lisätietoa"
  },
  "responsibilityInfos" : [ {
    "text" : null,
    "personId" : "otm-test-user-96",
    "roleUrn" : "urn:code:module-responsibility-info-type:responsible-teacher",
    "validityPeriod" : { }
  } ],
  "organisations" : [ {
    "organisationId" : "the-spectre",
    "educationalInstitutionUrn" : null,
    "roleUrn" : "urn:code:organisation-role:responsible-organisation",
    "share" : 1,
    "validityPeriod" : { }
  } ],
  "inclusionApplicationInstruction" : null,
  "abbreviation" : null,
  "tweetText" : null,
  "outcomes" : null,
  "prerequisites" : null,
  "substitutions" : null,
  "searchTags" : [ ],
  "studyLevel" : "urn:code:study-level:intermediate-studies",
  "possibleAttainmentLanguages" : [ "urn:code:official-language:fi" ],
  "studyFields" : [ "urn:code:study-field:2002-0" ],
  "graded" : true,
  "gradeScaleId" : "hy-0-5",
  "customCodeUrns" : null,
  "contentFilter" : null,
  "studyRightSelectionType" : "urn:code:study-right-selection-type:none",
  "minorStudyRightAcceptanceType" : null,
  "minorStudyRightApplicationInstructions" : null,
  "type" : "StudyModule",
  "rule" : {
    "type" : "AnyCourseUnitRule",
    "localId" : "a71f287e-3e65-4747-839b-3b94bfa608ae"
  }
} ]'

Patch legacy modules

PATCH /api/modules/v1/import/legacy

Description

Patch import with lenient legacy validation

Parameters

Type Name Description Schema

Body

patchEntities
required

patchEntities

< PatchEntity > array

Responses

HTTP Code Description Schema

200

OK

No Content

204

No Content

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

Consumes

  • application/json

Produces

  • */*

Tags

  • import

Get module

GET /api/modules/v1/{moduleId}

Description

Get is keyed by its module id. This information is public, and the operation succeeds even with no authentication. Modules of all types (DegreeProgramme, StudyModule, GroupingModule) can be fetched, and the document state of the module does not affect the operation, i.e. even DELETED modules can be exported, they just have "documentState": "DELETED". Public export operations are allowed to get new fields without updating the version tag, but changes to existing fields are considered breaking changes and thus cause a new export endpoint with a new version tag to be introduced.

Parameters

Type Name Description Schema

Path

moduleId
required

moduleId

string (otmid)

Responses

HTTP Code Description Schema

200

OK

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Produces

  • application/json

Tags

  • export

Export open university products

GET /api/open-university-products/v1/export

Description

Entities can be exported in modification order based on one of two separate ways of specifying the starting point.With the 'since' parameter (recommended): an integer key (modification ordinal), which is different for every modification of the entity table. The ordinals are guaranteed to increase for each modification, but not guaranteed to be concecutive.With the 'sinceTime' parameter: an ISO-8601 timestamp. SinceTime is only supported for the case when the modification ordinal is not known by the exporter. In actual practice, if efficient export of all data is desired, the greatest modification ordinal from the previous export must be remembered and used as the since parameter for the next export. Both the since and sinceTime parameters are exclusive: if in one export you get the modification ordinals 3, 4 and 5, the next query should be export?since=5 and then you get the ordinals 6, 7, 8, etc.

Parameters

Type Name Description Schema

Query

limit
optional

Maximum number of products to return. May return less, either because there are not enough change items, or because of internal limits. If limit is higher than 10 000, returns only 10 000 items.

integer (int32)

Query

since
optional

Return products modified after (exclusive comparison) this modification ordinal (increasing value within Kori). Alternate parameter with sinceTime. This is the recommended option.

integer (int64)

Query

sinceTime
optional

Return products modified after (exclusive comparison) this ISO-8601 time. Alternate parameter with since. This is the not recommended but sometimes necessary option.

string (date-time)

Responses

HTTP Code Description Schema

200

OK

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Produces

  • application/json

Tags

  • export

Import open university products

POST /api/open-university-products/v1/import

Parameters

Type Name Description Schema

Body

products
required

products

Responses

HTTP Code Description Schema

200

OK

No Content

201

Created

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes

  • application/json

Produces

  • */*

Tags

  • import

Stream open university products

GET /api/open-university-products/v1/stream

Description

Entities can be exported as a stream in modification order, and the stream can be left open to listen for changes. Duplicates are possible if entities are modified several times.

Parameters

Type Name Description Schema Default

Query

follow
optional

Return modified messages after modified after (exclusive comparison) this modification ordinal Alternate parameter with sinceTime. This is the recommended option.

boolean

"false"

Query

since
optional

Return messages modified after (exclusive comparison) this modification ordinal Alternate parameter with sinceTime. This is the recommended option.

integer (int64)

Query

sinceTime
optional

Return messages modified after (exclusive comparison) this ISO-8601 time. Alternate parameter with since. This is the not recommended but sometimes necessary option.

string (date-time)

Responses

HTTP Code Description Schema

200

OK

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Produces

  • */*

Tags

  • export

Create or update list of organisation settings (internal)

POST /api/organisation-settings/for-university/{universityOrgId}

Description

Create or update list of organisation settings for university. Because of the dynamic nature of the OrganisationSettings object, please do the update by fetching and modifying the current settings

Parameters

Type Name Description Schema

Path

universityOrgId
required

University organisation id

string (otmid)

Body

organisationSettings
required

organisationSettings

Responses

HTTP Code Description Schema

200

OK

No Content

201

Created

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes

  • application/json

Produces

  • application/json

Tags

  • import

Fetch list of organisation settings (internal)

GET /api/organisation-settings/for-university/{universityOrgId}

Description

Fetch list of organisation settings by university organisation id

Parameters

Type Name Description Schema

Path

universityOrgId
required

University organisation id

string (otmid)

Responses

HTTP Code Description Schema

200

OK

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Produces

  • application/json

Tags

  • organisation-settings-controller

Create or update list of organisation settings

POST /api/organisation-settings/v1/for-university/{universityOrgId}

Description

Create or update list of organisation settings for university. Because of the dynamic nature of the OrganisationSettings object, please do the update by fetching and modifying the current settings

Parameters

Type Name Description Schema

Path

universityOrgId
required

University organisation id

string (otmid)

Body

organisationSettings
required

organisationSettings

Responses

HTTP Code Description Schema

200

OK

No Content

201

Created

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes

  • application/json

Produces

  • application/json

Tags

  • import

Fetch list of organisation settings

GET /api/organisation-settings/v1/for-university/{universityOrgId}

Description

Fetch list of organisation settings by university organisation id

Parameters

Type Name Description Schema

Path

universityOrgId
required

University organisation id

string (otmid)

Responses

HTTP Code Description Schema

200

OK

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Produces

  • application/json

Tags

  • export

Import organisations v1

POST /api/organisations/v1/import

Description

This is V1 interface with snapshot

Parameters

Type Name Description Schema

Body

organisationsV1
required

organisationsV1

< OrganisationV1 > array

Responses

HTTP Code Description Schema

200

OK

No Content

201

Created

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes

  • application/json

Produces

  • application/json

Tags

  • import

Example HTTP request

POST /api/organisations/v1/import HTTP/1.1
Content-Type: application/json
Content-Length: 1809
Host: localhost:8080

[ {
  "metadata" : null,
  "documentState" : "ACTIVE",
  "id" : "otm-c8bfead2-aff0-4f31-8846-40beebcc6dbd",
  "snapshot" : {
    "universityOrgId" : "otm-c8bfead2-aff0-4f31-8846-40beebcc6dbd",
    "parentId" : null,
    "predecessorIds" : [ ],
    "code" : "org-code-1",
    "name" : {
      "en" : "Became valid 15 days ago-en",
      "fi" : "Became valid 15 days ago",
      "sv" : "Became valid 15 days ago-sv"
    },
    "abbreviation" : null,
    "status" : "ACTIVE",
    "educationalInstitutionUrn" : "urn:code:educational-institution:42:12345"
  },
  "snapshotDateTime" : "2020-11-04T08:39:04.894887"
}, {
  "metadata" : null,
  "documentState" : "ACTIVE",
  "id" : "otm-75cdd9ee-a06b-44a9-ac15-4c9486f2dfe9",
  "snapshot" : {
    "universityOrgId" : "otm-c8bfead2-aff0-4f31-8846-40beebcc6dbd",
    "parentId" : "otm-c8bfead2-aff0-4f31-8846-40beebcc6dbd",
    "predecessorIds" : [ ],
    "code" : "org-code-2",
    "name" : {
      "en" : "name abc-en",
      "fi" : "name abc",
      "sv" : "name abc-sv"
    },
    "abbreviation" : null,
    "status" : "ACTIVE",
    "educationalInstitutionUrn" : "urn:code:educational-institution:42:12345"
  },
  "snapshotDateTime" : "2020-05-19T08:39:04.894874"
}, {
  "metadata" : null,
  "documentState" : "ACTIVE",
  "id" : "otm-c18c8528-29a2-4b63-a846-b8ae2b201890",
  "snapshot" : {
    "universityOrgId" : "otm-c8bfead2-aff0-4f31-8846-40beebcc6dbd",
    "parentId" : "otm-c8bfead2-aff0-4f31-8846-40beebcc6dbd",
    "predecessorIds" : [ ],
    "code" : "org-code-3",
    "name" : {
      "en" : "name 123-en",
      "fi" : "name 123",
      "sv" : "name 123-sv"
    },
    "abbreviation" : null,
    "status" : "ACTIVE",
    "educationalInstitutionUrn" : "urn:code:educational-institution:42:12345"
  },
  "snapshotDateTime" : "2020-05-19T08:39:04.894874"
} ]

Example HTTP response

HTTP/1.1 200 OK

Example Curl request

$ curl 'http://localhost:8080/api/organisations/v1/import' -i -X POST \
    -H 'Content-Type: application/json' \
    -d '[ {
  "metadata" : null,
  "documentState" : "ACTIVE",
  "id" : "otm-c8bfead2-aff0-4f31-8846-40beebcc6dbd",
  "snapshot" : {
    "universityOrgId" : "otm-c8bfead2-aff0-4f31-8846-40beebcc6dbd",
    "parentId" : null,
    "predecessorIds" : [ ],
    "code" : "org-code-1",
    "name" : {
      "en" : "Became valid 15 days ago-en",
      "fi" : "Became valid 15 days ago",
      "sv" : "Became valid 15 days ago-sv"
    },
    "abbreviation" : null,
    "status" : "ACTIVE",
    "educationalInstitutionUrn" : "urn:code:educational-institution:42:12345"
  },
  "snapshotDateTime" : "2020-11-04T08:39:04.894887"
}, {
  "metadata" : null,
  "documentState" : "ACTIVE",
  "id" : "otm-75cdd9ee-a06b-44a9-ac15-4c9486f2dfe9",
  "snapshot" : {
    "universityOrgId" : "otm-c8bfead2-aff0-4f31-8846-40beebcc6dbd",
    "parentId" : "otm-c8bfead2-aff0-4f31-8846-40beebcc6dbd",
    "predecessorIds" : [ ],
    "code" : "org-code-2",
    "name" : {
      "en" : "name abc-en",
      "fi" : "name abc",
      "sv" : "name abc-sv"
    },
    "abbreviation" : null,
    "status" : "ACTIVE",
    "educationalInstitutionUrn" : "urn:code:educational-institution:42:12345"
  },
  "snapshotDateTime" : "2020-05-19T08:39:04.894874"
}, {
  "metadata" : null,
  "documentState" : "ACTIVE",
  "id" : "otm-c18c8528-29a2-4b63-a846-b8ae2b201890",
  "snapshot" : {
    "universityOrgId" : "otm-c8bfead2-aff0-4f31-8846-40beebcc6dbd",
    "parentId" : "otm-c8bfead2-aff0-4f31-8846-40beebcc6dbd",
    "predecessorIds" : [ ],
    "code" : "org-code-3",
    "name" : {
      "en" : "name 123-en",
      "fi" : "name 123",
      "sv" : "name 123-sv"
    },
    "abbreviation" : null,
    "status" : "ACTIVE",
    "educationalInstitutionUrn" : "urn:code:educational-institution:42:12345"
  },
  "snapshotDateTime" : "2020-05-19T08:39:04.894874"
} ]'

Example HTTP request

POST /api/organisations/v1/import HTTP/1.1
Content-Type: application/json
Content-Length: 1809
Host: localhost:8080

[ {
  "metadata" : null,
  "documentState" : "ACTIVE",
  "id" : "otm-c8bfead2-aff0-4f31-8846-40beebcc6dbd",
  "snapshot" : {
    "universityOrgId" : "otm-c8bfead2-aff0-4f31-8846-40beebcc6dbd",
    "parentId" : null,
    "predecessorIds" : [ ],
    "code" : "org-code-1",
    "name" : {
      "en" : "Became valid 15 days ago-en",
      "fi" : "Became valid 15 days ago",
      "sv" : "Became valid 15 days ago-sv"
    },
    "abbreviation" : null,
    "status" : "ACTIVE",
    "educationalInstitutionUrn" : "urn:code:educational-institution:42:12345"
  },
  "snapshotDateTime" : "2020-11-04T08:39:04.894887"
}, {
  "metadata" : null,
  "documentState" : "ACTIVE",
  "id" : "otm-75cdd9ee-a06b-44a9-ac15-4c9486f2dfe9",
  "snapshot" : {
    "universityOrgId" : "otm-c8bfead2-aff0-4f31-8846-40beebcc6dbd",
    "parentId" : "otm-c8bfead2-aff0-4f31-8846-40beebcc6dbd",
    "predecessorIds" : [ ],
    "code" : "org-code-2",
    "name" : {
      "en" : "name abc-en",
      "fi" : "name abc",
      "sv" : "name abc-sv"
    },
    "abbreviation" : null,
    "status" : "ACTIVE",
    "educationalInstitutionUrn" : "urn:code:educational-institution:42:12345"
  },
  "snapshotDateTime" : "2020-05-19T08:39:04.894874"
}, {
  "metadata" : null,
  "documentState" : "ACTIVE",
  "id" : "otm-c18c8528-29a2-4b63-a846-b8ae2b201890",
  "snapshot" : {
    "universityOrgId" : "otm-c8bfead2-aff0-4f31-8846-40beebcc6dbd",
    "parentId" : "otm-c8bfead2-aff0-4f31-8846-40beebcc6dbd",
    "predecessorIds" : [ ],
    "code" : "org-code-3",
    "name" : {
      "en" : "name 123-en",
      "fi" : "name 123",
      "sv" : "name 123-sv"
    },
    "abbreviation" : null,
    "status" : "ACTIVE",
    "educationalInstitutionUrn" : "urn:code:educational-institution:42:12345"
  },
  "snapshotDateTime" : "2020-05-19T08:39:04.894874"
} ]

Example HTTP response

HTTP/1.1 200 OK

Example Curl request

$ curl 'http://localhost:8080/api/organisations/v1/import' -i -X POST \
    -H 'Content-Type: application/json' \
    -d '[ {
  "metadata" : null,
  "documentState" : "ACTIVE",
  "id" : "otm-c8bfead2-aff0-4f31-8846-40beebcc6dbd",
  "snapshot" : {
    "universityOrgId" : "otm-c8bfead2-aff0-4f31-8846-40beebcc6dbd",
    "parentId" : null,
    "predecessorIds" : [ ],
    "code" : "org-code-1",
    "name" : {
      "en" : "Became valid 15 days ago-en",
      "fi" : "Became valid 15 days ago",
      "sv" : "Became valid 15 days ago-sv"
    },
    "abbreviation" : null,
    "status" : "ACTIVE",
    "educationalInstitutionUrn" : "urn:code:educational-institution:42:12345"
  },
  "snapshotDateTime" : "2020-11-04T08:39:04.894887"
}, {
  "metadata" : null,
  "documentState" : "ACTIVE",
  "id" : "otm-75cdd9ee-a06b-44a9-ac15-4c9486f2dfe9",
  "snapshot" : {
    "universityOrgId" : "otm-c8bfead2-aff0-4f31-8846-40beebcc6dbd",
    "parentId" : "otm-c8bfead2-aff0-4f31-8846-40beebcc6dbd",
    "predecessorIds" : [ ],
    "code" : "org-code-2",
    "name" : {
      "en" : "name abc-en",
      "fi" : "name abc",
      "sv" : "name abc-sv"
    },
    "abbreviation" : null,
    "status" : "ACTIVE",
    "educationalInstitutionUrn" : "urn:code:educational-institution:42:12345"
  },
  "snapshotDateTime" : "2020-05-19T08:39:04.894874"
}, {
  "metadata" : null,
  "documentState" : "ACTIVE",
  "id" : "otm-c18c8528-29a2-4b63-a846-b8ae2b201890",
  "snapshot" : {
    "universityOrgId" : "otm-c8bfead2-aff0-4f31-8846-40beebcc6dbd",
    "parentId" : "otm-c8bfead2-aff0-4f31-8846-40beebcc6dbd",
    "predecessorIds" : [ ],
    "code" : "org-code-3",
    "name" : {
      "en" : "name 123-en",
      "fi" : "name 123",
      "sv" : "name 123-sv"
    },
    "abbreviation" : null,
    "status" : "ACTIVE",
    "educationalInstitutionUrn" : "urn:code:educational-institution:42:12345"
  },
  "snapshotDateTime" : "2020-05-19T08:39:04.894874"
} ]'

Export organisations

GET /api/organisations/v2/export

Description

Entities can be exported in modification order based on one of two separate ways of specifying the starting point.With the 'since' parameter (recommended): an integer key (modification ordinal), which is different for every modification of the entity table. The ordinals are guaranteed to increase for each modification, but not guaranteed to be concecutive.With the 'sinceTime' parameter: an ISO-8601 timestamp. SinceTime is only supported for the case when the modification ordinal is not known by the exporter. In actual practice, if efficient export of all data is desired, the greatest modification ordinal from the previous export must be remembered and used as the since parameter for the next export. Both the since and sinceTime parameters are exclusive: if in one export you get the modification ordinals 3, 4 and 5, the next query should be export?since=5 and then you get the ordinals 6, 7, 8, etc.

Parameters

Type Name Description Schema

Query

limit
optional

Maximum number of organisations to return. May return less, either because there are not enough change items, or because of internal limits. If limit is higher than 10 000, returns only 10 000 items.

integer (int32)

Query

since
optional

Return organisations modified after (exclusive comparison) this modification ordinal (increasing value within Kori). Alternate parameter with sinceTime. This is the recommended option.

integer (int64)

Query

sinceTime
optional

Return organisations modified after (exclusive comparison) this ISO-8601 time. Alternate parameter with since. This is the not recommended but sometimes necessary option.

string (date-time)

Responses

HTTP Code Description Schema

200

OK

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Produces

  • application/json

Tags

  • export

Import organisations

POST /api/organisations/v2/import

Parameters

Type Name Description Schema

Body

organisations
required

organisations

< Organisation > array

Responses

HTTP Code Description Schema

200

OK

No Content

201

Created

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes

  • application/json

Produces

  • application/json

Tags

  • import

Example HTTP request

POST /api/organisations/v2/import HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 1711
Host: localhost:8080

[ {
  "metadata" : null,
  "documentState" : "ACTIVE",
  "id" : "otm-bf322432-f315-4389-b90a-bf29a84d5b82",
  "snapshotDateTime" : "2021-11-19T08:39:04.370880",
  "universityOrgId" : "the-spectre",
  "parentId" : "otm-e2a9a5b4-7af8-4f2a-9afa-2ea5fdfef81e",
  "predecessorIds" : [ "otm-4b0ce7b1-5005-4200-a645-83a33d6012a5", "otm-fa80659d-5e48-4dda-9ded-ba263576bb4d" ],
  "code" : "AO",
  "name" : {
    "en" : "A ja O yhdistetty uudestaan-en",
    "fi" : "A ja O yhdistetty uudestaan",
    "sv" : "A ja O yhdistetty uudestaan-sv"
  },
  "abbreviation" : null,
  "status" : "ACTIVE",
  "educationalInstitutionUrn" : "urn:code:educational-institution:42:12345"
}, {
  "metadata" : null,
  "documentState" : "ACTIVE",
  "id" : "otm-fa80659d-5e48-4dda-9ded-ba263576bb4d",
  "snapshotDateTime" : "2021-11-19T08:39:04.370880",
  "universityOrgId" : "the-spectre",
  "parentId" : "otm-e2a9a5b4-7af8-4f2a-9afa-2ea5fdfef81e",
  "predecessorIds" : [ ],
  "code" : "A",
  "name" : {
    "en" : "A mergetty-en",
    "fi" : "A mergetty",
    "sv" : "A mergetty-sv"
  },
  "abbreviation" : null,
  "status" : "INACTIVE",
  "educationalInstitutionUrn" : "urn:code:educational-institution:42:12345"
}, {
  "metadata" : null,
  "documentState" : "ACTIVE",
  "id" : "otm-4b0ce7b1-5005-4200-a645-83a33d6012a5",
  "snapshotDateTime" : "2021-11-19T08:39:04.370880",
  "universityOrgId" : "the-spectre",
  "parentId" : "otm-e2a9a5b4-7af8-4f2a-9afa-2ea5fdfef81e",
  "predecessorIds" : [ ],
  "code" : "O",
  "name" : {
    "en" : "O mergetty-en",
    "fi" : "O mergetty",
    "sv" : "O mergetty-sv"
  },
  "abbreviation" : null,
  "status" : "INACTIVE",
  "educationalInstitutionUrn" : "urn:code:educational-institution:42:12345"
} ]

Example HTTP response

HTTP/1.1 200 OK

Example Curl request

$ curl 'http://localhost:8080/api/organisations/v2/import' -i -X POST \
    -H 'Content-Type: application/json' \
    -H 'Accept: application/json' \
    -d '[ {
  "metadata" : null,
  "documentState" : "ACTIVE",
  "id" : "otm-bf322432-f315-4389-b90a-bf29a84d5b82",
  "snapshotDateTime" : "2021-11-19T08:39:04.370880",
  "universityOrgId" : "the-spectre",
  "parentId" : "otm-e2a9a5b4-7af8-4f2a-9afa-2ea5fdfef81e",
  "predecessorIds" : [ "otm-4b0ce7b1-5005-4200-a645-83a33d6012a5", "otm-fa80659d-5e48-4dda-9ded-ba263576bb4d" ],
  "code" : "AO",
  "name" : {
    "en" : "A ja O yhdistetty uudestaan-en",
    "fi" : "A ja O yhdistetty uudestaan",
    "sv" : "A ja O yhdistetty uudestaan-sv"
  },
  "abbreviation" : null,
  "status" : "ACTIVE",
  "educationalInstitutionUrn" : "urn:code:educational-institution:42:12345"
}, {
  "metadata" : null,
  "documentState" : "ACTIVE",
  "id" : "otm-fa80659d-5e48-4dda-9ded-ba263576bb4d",
  "snapshotDateTime" : "2021-11-19T08:39:04.370880",
  "universityOrgId" : "the-spectre",
  "parentId" : "otm-e2a9a5b4-7af8-4f2a-9afa-2ea5fdfef81e",
  "predecessorIds" : [ ],
  "code" : "A",
  "name" : {
    "en" : "A mergetty-en",
    "fi" : "A mergetty",
    "sv" : "A mergetty-sv"
  },
  "abbreviation" : null,
  "status" : "INACTIVE",
  "educationalInstitutionUrn" : "urn:code:educational-institution:42:12345"
}, {
  "metadata" : null,
  "documentState" : "ACTIVE",
  "id" : "otm-4b0ce7b1-5005-4200-a645-83a33d6012a5",
  "snapshotDateTime" : "2021-11-19T08:39:04.370880",
  "universityOrgId" : "the-spectre",
  "parentId" : "otm-e2a9a5b4-7af8-4f2a-9afa-2ea5fdfef81e",
  "predecessorIds" : [ ],
  "code" : "O",
  "name" : {
    "en" : "O mergetty-en",
    "fi" : "O mergetty",
    "sv" : "O mergetty-sv"
  },
  "abbreviation" : null,
  "status" : "INACTIVE",
  "educationalInstitutionUrn" : "urn:code:educational-institution:42:12345"
} ]'

Example HTTP request

POST /api/organisations/v2/import HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 1711
Host: localhost:8080

[ {
  "metadata" : null,
  "documentState" : "ACTIVE",
  "id" : "otm-bf322432-f315-4389-b90a-bf29a84d5b82",
  "snapshotDateTime" : "2021-11-19T08:39:04.370880",
  "universityOrgId" : "the-spectre",
  "parentId" : "otm-e2a9a5b4-7af8-4f2a-9afa-2ea5fdfef81e",
  "predecessorIds" : [ "otm-4b0ce7b1-5005-4200-a645-83a33d6012a5", "otm-fa80659d-5e48-4dda-9ded-ba263576bb4d" ],
  "code" : "AO",
  "name" : {
    "en" : "A ja O yhdistetty uudestaan-en",
    "fi" : "A ja O yhdistetty uudestaan",
    "sv" : "A ja O yhdistetty uudestaan-sv"
  },
  "abbreviation" : null,
  "status" : "ACTIVE",
  "educationalInstitutionUrn" : "urn:code:educational-institution:42:12345"
}, {
  "metadata" : null,
  "documentState" : "ACTIVE",
  "id" : "otm-fa80659d-5e48-4dda-9ded-ba263576bb4d",
  "snapshotDateTime" : "2021-11-19T08:39:04.370880",
  "universityOrgId" : "the-spectre",
  "parentId" : "otm-e2a9a5b4-7af8-4f2a-9afa-2ea5fdfef81e",
  "predecessorIds" : [ ],
  "code" : "A",
  "name" : {
    "en" : "A mergetty-en",
    "fi" : "A mergetty",
    "sv" : "A mergetty-sv"
  },
  "abbreviation" : null,
  "status" : "INACTIVE",
  "educationalInstitutionUrn" : "urn:code:educational-institution:42:12345"
}, {
  "metadata" : null,
  "documentState" : "ACTIVE",
  "id" : "otm-4b0ce7b1-5005-4200-a645-83a33d6012a5",
  "snapshotDateTime" : "2021-11-19T08:39:04.370880",
  "universityOrgId" : "the-spectre",
  "parentId" : "otm-e2a9a5b4-7af8-4f2a-9afa-2ea5fdfef81e",
  "predecessorIds" : [ ],
  "code" : "O",
  "name" : {
    "en" : "O mergetty-en",
    "fi" : "O mergetty",
    "sv" : "O mergetty-sv"
  },
  "abbreviation" : null,
  "status" : "INACTIVE",
  "educationalInstitutionUrn" : "urn:code:educational-institution:42:12345"
} ]

Example HTTP response

HTTP/1.1 200 OK

Example Curl request

$ curl 'http://localhost:8080/api/organisations/v2/import' -i -X POST \
    -H 'Content-Type: application/json' \
    -H 'Accept: application/json' \
    -d '[ {
  "metadata" : null,
  "documentState" : "ACTIVE",
  "id" : "otm-bf322432-f315-4389-b90a-bf29a84d5b82",
  "snapshotDateTime" : "2021-11-19T08:39:04.370880",
  "universityOrgId" : "the-spectre",
  "parentId" : "otm-e2a9a5b4-7af8-4f2a-9afa-2ea5fdfef81e",
  "predecessorIds" : [ "otm-4b0ce7b1-5005-4200-a645-83a33d6012a5", "otm-fa80659d-5e48-4dda-9ded-ba263576bb4d" ],
  "code" : "AO",
  "name" : {
    "en" : "A ja O yhdistetty uudestaan-en",
    "fi" : "A ja O yhdistetty uudestaan",
    "sv" : "A ja O yhdistetty uudestaan-sv"
  },
  "abbreviation" : null,
  "status" : "ACTIVE",
  "educationalInstitutionUrn" : "urn:code:educational-institution:42:12345"
}, {
  "metadata" : null,
  "documentState" : "ACTIVE",
  "id" : "otm-fa80659d-5e48-4dda-9ded-ba263576bb4d",
  "snapshotDateTime" : "2021-11-19T08:39:04.370880",
  "universityOrgId" : "the-spectre",
  "parentId" : "otm-e2a9a5b4-7af8-4f2a-9afa-2ea5fdfef81e",
  "predecessorIds" : [ ],
  "code" : "A",
  "name" : {
    "en" : "A mergetty-en",
    "fi" : "A mergetty",
    "sv" : "A mergetty-sv"
  },
  "abbreviation" : null,
  "status" : "INACTIVE",
  "educationalInstitutionUrn" : "urn:code:educational-institution:42:12345"
}, {
  "metadata" : null,
  "documentState" : "ACTIVE",
  "id" : "otm-4b0ce7b1-5005-4200-a645-83a33d6012a5",
  "snapshotDateTime" : "2021-11-19T08:39:04.370880",
  "universityOrgId" : "the-spectre",
  "parentId" : "otm-e2a9a5b4-7af8-4f2a-9afa-2ea5fdfef81e",
  "predecessorIds" : [ ],
  "code" : "O",
  "name" : {
    "en" : "O mergetty-en",
    "fi" : "O mergetty",
    "sv" : "O mergetty-sv"
  },
  "abbreviation" : null,
  "status" : "INACTIVE",
  "educationalInstitutionUrn" : "urn:code:educational-institution:42:12345"
} ]'

Export payment categories

GET /api/payment-categories/v1/export

Description

Entities can be exported in modification order based on one of two separate ways of specifying the starting point. With the 'since' parameter (recommended): an integer key (modification ordinal), which is different for every modification of the entity table. The ordinals are guaranteed to increase for each modification, but not guaranteed to be consecutive. With the 'sinceTime' parameter: an ISO-8601 timestamp. SinceTime is only supported for the case when the modification ordinal is not known by the exporter. In actual practice, if efficient export of all data is desired, the greatest modification ordinal from the previous export must be remembered and used as the since parameter for the next export. Both the since and sinceTime parameters are exclusive: if in one export you get the modification ordinals 3, 4 and 5, the next query should be export?since=5 and then you get the ordinals 6, 7, 8, etc.

Parameters

Type Name Description Schema

Query

limit
optional

The maximum amount of results to return

integer (int32)

Query

sinceOrdinal
optional

sinceOrdinal

integer (int64)

Query

sinceTime
optional

sinceTime

string (date-time)

Responses

HTTP Code Description Schema

200

OK

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Produces

  • application/json

Tags

  • export

Import payment categories

POST /api/payment-categories/v1/import

Parameters

Type Name Description Schema

Body

categories
required

categories

< PaymentCategory > array

Responses

HTTP Code Description Schema

200

OK

No Content

201

Created

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes

  • application/json

Produces

  • */*

Tags

  • import

Export persons

GET /api/persons/v1/export

Description

Entities can be exported in modification order based on one of two separate ways of specifying the starting point.With the 'since' parameter (recommended): an integer key (modification ordinal), which is different for every modification of the entity table. The ordinals are guaranteed to increase for each modification, but not guaranteed to be concecutive.With the 'sinceTime' parameter: an ISO-8601 timestamp. SinceTime is only supported for the case when the modification ordinal is not known by the exporter. In actual practice, if efficient export of all data is desired, the greatest modification ordinal from the previous export must be remembered and used as the since parameter for the next export. Both the since and sinceTime parameters are exclusive: if in one export you get the modification ordinals 3, 4 and 5, the next query should be export?since=5 and then you get the ordinals 6, 7, 8, etc.

Parameters

Type Name Description Schema

Query

limit
optional

Maximum number of public persons to return. May return less, either because there are not enough change items, or because of internal limits. If limit is higher than 10 000, returns only 10 000 items.

integer (int32)

Query

since
optional

Return public persons modified after (exclusive comparison) this modification ordinal (increasing value within Ori). Alternate parameter with sinceTime. This is the recommended option.

integer (int64)

Query

sinceTime
optional

Return public persons modified after (exclusive comparison) this ISO-8601 time. Alternate parameter with since. This is the not recommended but sometimes necessary option.

string (date-time)

Responses

HTTP Code Description Schema

200

OK

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Produces

  • application/json

Tags

  • export

Import persons

POST /api/persons/v1/import

Parameters

Type Name Description Schema

Body

persons
required

persons

< PublicPerson > array

Responses

HTTP Code Description Schema

200

OK

No Content

201

Created

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes

  • application/json

Produces

  • */*

Tags

  • import

Example HTTP request

POST /api/persons/v1/import HTTP/1.1
Content-Type: application/json
Accept: application/json
Authorization: Basic aHkuaTp0ZXN0MTIz
Content-Length: 957
Host: localhost:8080

[ {
  "metadata" : null,
  "id" : "otm-43b44277-f310-4888-860d-f9063b3029c4",
  "universityOrgIds" : [ "hy-university-root-id" ],
  "firstName" : "Uusi",
  "lastName" : "Ihminen",
  "emailAddress" : "sposti@ss.fi",
  "titles" : [ ]
}, {
  "metadata" : null,
  "id" : "otm-0662055d-2662-4d8c-9651-367b550b0270",
  "universityOrgIds" : [ "hy-university-root-id" ],
  "firstName" : "Matti",
  "lastName" : "Matala",
  "emailAddress" : "mm@pp.fi",
  "titles" : [ ]
}, {
  "metadata" : null,
  "id" : "otm-a4654fd4-4ad1-4f2e-b2ff-a005c2db1947",
  "universityOrgIds" : [ "hy-university-root-id" ],
  "firstName" : "Pertti",
  "lastName" : "Peltola",
  "emailAddress" : "pp@pp.fi",
  "titles" : [ {
    "fi" : "Suurmestari"
  } ]
}, {
  "metadata" : null,
  "id" : "otm-39ac9fbb-ea6f-48ba-a1ee-6fa8fceeb0b8",
  "universityOrgIds" : [ "hy-university-root-id" ],
  "firstName" : "Pertti",
  "lastName" : "Palola",
  "emailAddress" : "pap@pp.fi",
  "titles" : [ ]
} ]

Example HTTP response

HTTP/1.1 200 OK
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY

Example Curl request

$ curl 'http://localhost:8080/api/persons/v1/import' -i -u 'hy.i:test123' -X POST \
    -H 'Content-Type: application/json' \
    -H 'Accept: application/json' \
    -d '[ {
  "metadata" : null,
  "id" : "otm-43b44277-f310-4888-860d-f9063b3029c4",
  "universityOrgIds" : [ "hy-university-root-id" ],
  "firstName" : "Uusi",
  "lastName" : "Ihminen",
  "emailAddress" : "sposti@ss.fi",
  "titles" : [ ]
}, {
  "metadata" : null,
  "id" : "otm-0662055d-2662-4d8c-9651-367b550b0270",
  "universityOrgIds" : [ "hy-university-root-id" ],
  "firstName" : "Matti",
  "lastName" : "Matala",
  "emailAddress" : "mm@pp.fi",
  "titles" : [ ]
}, {
  "metadata" : null,
  "id" : "otm-a4654fd4-4ad1-4f2e-b2ff-a005c2db1947",
  "universityOrgIds" : [ "hy-university-root-id" ],
  "firstName" : "Pertti",
  "lastName" : "Peltola",
  "emailAddress" : "pp@pp.fi",
  "titles" : [ {
    "fi" : "Suurmestari"
  } ]
}, {
  "metadata" : null,
  "id" : "otm-39ac9fbb-ea6f-48ba-a1ee-6fa8fceeb0b8",
  "universityOrgIds" : [ "hy-university-root-id" ],
  "firstName" : "Pertti",
  "lastName" : "Palola",
  "emailAddress" : "pap@pp.fi",
  "titles" : [ ]
} ]'

Example HTTP request

POST /api/persons/v1/import HTTP/1.1
Content-Type: application/json
Accept: application/json
Authorization: Basic aHkuaTp0ZXN0MTIz
Content-Length: 957
Host: localhost:8080

[ {
  "metadata" : null,
  "id" : "otm-43b44277-f310-4888-860d-f9063b3029c4",
  "universityOrgIds" : [ "hy-university-root-id" ],
  "firstName" : "Uusi",
  "lastName" : "Ihminen",
  "emailAddress" : "sposti@ss.fi",
  "titles" : [ ]
}, {
  "metadata" : null,
  "id" : "otm-0662055d-2662-4d8c-9651-367b550b0270",
  "universityOrgIds" : [ "hy-university-root-id" ],
  "firstName" : "Matti",
  "lastName" : "Matala",
  "emailAddress" : "mm@pp.fi",
  "titles" : [ ]
}, {
  "metadata" : null,
  "id" : "otm-a4654fd4-4ad1-4f2e-b2ff-a005c2db1947",
  "universityOrgIds" : [ "hy-university-root-id" ],
  "firstName" : "Pertti",
  "lastName" : "Peltola",
  "emailAddress" : "pp@pp.fi",
  "titles" : [ {
    "fi" : "Suurmestari"
  } ]
}, {
  "metadata" : null,
  "id" : "otm-39ac9fbb-ea6f-48ba-a1ee-6fa8fceeb0b8",
  "universityOrgIds" : [ "hy-university-root-id" ],
  "firstName" : "Pertti",
  "lastName" : "Palola",
  "emailAddress" : "pap@pp.fi",
  "titles" : [ ]
} ]

Example HTTP response

HTTP/1.1 200 OK
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY

Example Curl request

$ curl 'http://localhost:8080/api/persons/v1/import' -i -u 'hy.i:test123' -X POST \
    -H 'Content-Type: application/json' \
    -H 'Accept: application/json' \
    -d '[ {
  "metadata" : null,
  "id" : "otm-43b44277-f310-4888-860d-f9063b3029c4",
  "universityOrgIds" : [ "hy-university-root-id" ],
  "firstName" : "Uusi",
  "lastName" : "Ihminen",
  "emailAddress" : "sposti@ss.fi",
  "titles" : [ ]
}, {
  "metadata" : null,
  "id" : "otm-0662055d-2662-4d8c-9651-367b550b0270",
  "universityOrgIds" : [ "hy-university-root-id" ],
  "firstName" : "Matti",
  "lastName" : "Matala",
  "emailAddress" : "mm@pp.fi",
  "titles" : [ ]
}, {
  "metadata" : null,
  "id" : "otm-a4654fd4-4ad1-4f2e-b2ff-a005c2db1947",
  "universityOrgIds" : [ "hy-university-root-id" ],
  "firstName" : "Pertti",
  "lastName" : "Peltola",
  "emailAddress" : "pp@pp.fi",
  "titles" : [ {
    "fi" : "Suurmestari"
  } ]
}, {
  "metadata" : null,
  "id" : "otm-39ac9fbb-ea6f-48ba-a1ee-6fa8fceeb0b8",
  "universityOrgIds" : [ "hy-university-root-id" ],
  "firstName" : "Pertti",
  "lastName" : "Palola",
  "emailAddress" : "pap@pp.fi",
  "titles" : [ ]
} ]'

Get person

GET /api/persons/v1/{personId}

Parameters

Type Name Description Schema

Path

personId
required

personId

string (otmid)

Responses

HTTP Code Description Schema

200

OK

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Produces

  • application/json

Tags

  • export

Import course unit prerequisites

POST /api/prerequisites/v1/import

Description

Only updates existing course units recommendedFormalPrerequisites and compulsoryFormalPrerequisites.

Parameters

Type Name Description Schema

Body

courseUnitsWithPrerequisites
required

courseUnitsWithPrerequisites

< CourseUnit > array

Responses

HTTP Code Description Schema

200

OK

No Content

201

Created

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes

  • application/json

Produces

  • */*

Tags

  • import

Export Qualifications

GET /api/qualifications/v1/export

Parameters

Type Name Description Schema

Query

  • sinceTime**
    optional

Exclusive

string (date-time)

Query

limit
optional

limit

integer (int32)

Query

since
optional

Exclusive

integer (int64)

Responses

HTTP Code Description Schema

200

OK

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Produces

  • application/json

Tags

  • export

Import Qualifications

POST /api/qualifications/v1/import

Parameters

Type Name Description Schema

Body

qualifications
required

qualifications

< Qualification > array

Responses

HTTP Code Description Schema

200

OK

No Content

201

Created

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes

  • application/json

Produces

  • */*

Tags

  • import

Export study events

GET /api/study-events/v1/export

Description

Entities can be exported in modification order based on one of two separate ways of specifying the starting point.With the 'since' parameter (recommended): an integer key (modification ordinal), which is different for every modification of the entity table. The ordinals are guaranteed to increase for each modification, but not guaranteed to be concecutive.With the 'sinceTime' parameter: an ISO-8601 timestamp. SinceTime is only supported for the case when the modification ordinal is not known by the exporter. In actual practice, if efficient export of all data is desired, the greatest modification ordinal from the previous export must be remembered and used as the since parameter for the next export. Both the since and sinceTime parameters are exclusive: if in one export you get the modification ordinals 3, 4 and 5, the next query should be export?since=5 and then you get the ordinals 6, 7, 8, etc.

Parameters

Type Name Description Schema

Query

limit
optional

Maximum number of study events to return. May return less, either because there are not enough change items, or because of internal limits. If limit is higher than 10 000, returns only 10 000 items.

integer (int32)

Query

since
optional

Return study events modified after (exclusive comparison) this modification ordinal (increasing value within Kori). Alternate parameter with sinceTime. This is the recommended option.

integer (int64)

Query

sinceTime
optional

Return study events modified after (exclusive comparison) this ISO-8601 time. Alternate parameter with since. This is the not recommended but sometimes necessary option.

string (date-time)

Responses

HTTP Code Description Schema

200

OK

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Produces

  • application/json

Tags

  • export

Example HTTP request

GET /api/study-events/v1/export?since=47186&limit=5 HTTP/1.1
Accept: application/json
Authorization: Basic c3BlY3RyZS5lOnRlc3QxMjM=
Host: localhost:8080

Example HTTP response

HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 863

{
  "greatestOrdinal" : 47187,
  "hasMore" : false,
  "entities" : [ {
    "metadata" : {
      "revision" : 1,
      "createdBy" : "arska",
      "createdOn" : "2020-11-19T08:39:07.749414",
      "lastModifiedBy" : "arska",
      "lastModifiedOn" : "2020-11-19T08:39:07.749531",
      "modificationOrdinal" : 47187
    },
    "documentState" : "ACTIVE",
    "id" : "otm-120a5e6e-d523-4279-b599-ed79ccb9ff45",
    "universityOrgIds" : [ "the-spectre" ],
    "primaryCourseUnitRealisationId" : null,
    "name" : {
      "fi" : "StudyEvent 2020-11-19T08:39:07.748772"
    },
    "locationIds" : [ "test-lokaatio-id-001" ],
    "recursEvery" : "WEEKLY",
    "startTime" : "2020-09-26T10:00",
    "duration" : "PT2H",
    "recursUntil" : "2020-12-05",
    "exceptions" : [ "2020-11-28" ],
    "cancellations" : [ ],
    "overrides" : [ ],
    "events" : null
  } ]
}

Example Curl request

$ curl 'http://localhost:8080/api/study-events/v1/export?since=47186&limit=5' -i -u 'spectre.e:test123' -X GET \
    -H 'Accept: application/json'

Example HTTP request

GET /api/study-events/v1/export?since=47186&limit=5 HTTP/1.1
Accept: application/json
Authorization: Basic c3BlY3RyZS5lOnRlc3QxMjM=
Host: localhost:8080

Example HTTP response

HTTP/1.1 200 OK
Content-Type: application/json
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 863

{
  "greatestOrdinal" : 47187,
  "hasMore" : false,
  "entities" : [ {
    "metadata" : {
      "revision" : 1,
      "createdBy" : "arska",
      "createdOn" : "2020-11-19T08:39:07.749414",
      "lastModifiedBy" : "arska",
      "lastModifiedOn" : "2020-11-19T08:39:07.749531",
      "modificationOrdinal" : 47187
    },
    "documentState" : "ACTIVE",
    "id" : "otm-120a5e6e-d523-4279-b599-ed79ccb9ff45",
    "universityOrgIds" : [ "the-spectre" ],
    "primaryCourseUnitRealisationId" : null,
    "name" : {
      "fi" : "StudyEvent 2020-11-19T08:39:07.748772"
    },
    "locationIds" : [ "test-lokaatio-id-001" ],
    "recursEvery" : "WEEKLY",
    "startTime" : "2020-09-26T10:00",
    "duration" : "PT2H",
    "recursUntil" : "2020-12-05",
    "exceptions" : [ "2020-11-28" ],
    "cancellations" : [ ],
    "overrides" : [ ],
    "events" : null
  } ]
}

Example Curl request

$ curl 'http://localhost:8080/api/study-events/v1/export?since=47186&limit=5' -i -u 'spectre.e:test123' -X GET \
    -H 'Accept: application/json'

Import study events

POST /api/study-events/v1/import

Parameters

Type Name Description Schema

Body

studyEvents
required

studyEvents

< StudyEvent > array

Responses

HTTP Code Description Schema

200

OK

No Content

201

Created

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes

  • application/json

Produces

  • application/json

Tags

  • import

Example HTTP request

POST /api/study-events/v1/import HTTP/1.1
Content-Type: application/json
Authorization: Basic c3BlY3RyZS5pOnRlc3QxMjM=
Content-Length: 996
Host: localhost:8080

[ {
  "metadata" : null,
  "id" : "otm-2df1cd51-3698-4ab3-903a-b80fa086c4a9",
  "universityOrgIds" : [ "the-spectre" ],
  "primaryCourseUnitRealisationId" : null,
  "name" : {
    "fi" : "StudyEvent 2020-11-19T08:39:07.175533"
  },
  "locationIds" : [ "test-lokaatio-id-001" ],
  "recursEvery" : "WEEKLY",
  "startTime" : "2020-09-26T10:00",
  "duration" : "PT2H",
  "recursUntil" : "2020-12-05",
  "exceptions" : [ "2020-11-28" ],
  "cancellations" : [ ],
  "overrides" : [ ],
  "events" : null
}, {
  "metadata" : null,
  "id" : "otm-7fd2e800-f897-4d44-a0a3-c5951b2de39b",
  "universityOrgIds" : [ "the-spectre" ],
  "primaryCourseUnitRealisationId" : null,
  "name" : {
    "fi" : "StudyEvent 2020-11-19T08:39:07.175560"
  },
  "locationIds" : [ "test-lokaatio-id-001" ],
  "recursEvery" : "WEEKLY",
  "startTime" : "2020-09-26T10:00",
  "duration" : "PT2H",
  "recursUntil" : "2020-12-05",
  "exceptions" : [ "2020-11-28" ],
  "cancellations" : [ ],
  "overrides" : [ ],
  "events" : null
} ]

Example HTTP response

HTTP/1.1 200 OK
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY

Example Curl request

$ curl 'http://localhost:8080/api/study-events/v1/import' -i -u 'spectre.i:test123' -X POST \
    -H 'Content-Type: application/json' \
    -d '[ {
  "metadata" : null,
  "id" : "otm-2df1cd51-3698-4ab3-903a-b80fa086c4a9",
  "universityOrgIds" : [ "the-spectre" ],
  "primaryCourseUnitRealisationId" : null,
  "name" : {
    "fi" : "StudyEvent 2020-11-19T08:39:07.175533"
  },
  "locationIds" : [ "test-lokaatio-id-001" ],
  "recursEvery" : "WEEKLY",
  "startTime" : "2020-09-26T10:00",
  "duration" : "PT2H",
  "recursUntil" : "2020-12-05",
  "exceptions" : [ "2020-11-28" ],
  "cancellations" : [ ],
  "overrides" : [ ],
  "events" : null
}, {
  "metadata" : null,
  "id" : "otm-7fd2e800-f897-4d44-a0a3-c5951b2de39b",
  "universityOrgIds" : [ "the-spectre" ],
  "primaryCourseUnitRealisationId" : null,
  "name" : {
    "fi" : "StudyEvent 2020-11-19T08:39:07.175560"
  },
  "locationIds" : [ "test-lokaatio-id-001" ],
  "recursEvery" : "WEEKLY",
  "startTime" : "2020-09-26T10:00",
  "duration" : "PT2H",
  "recursUntil" : "2020-12-05",
  "exceptions" : [ "2020-11-28" ],
  "cancellations" : [ ],
  "overrides" : [ ],
  "events" : null
} ]'

Example HTTP request

POST /api/study-events/v1/import HTTP/1.1
Content-Type: application/json
Authorization: Basic c3BlY3RyZS5pOnRlc3QxMjM=
Content-Length: 996
Host: localhost:8080

[ {
  "metadata" : null,
  "id" : "otm-2df1cd51-3698-4ab3-903a-b80fa086c4a9",
  "universityOrgIds" : [ "the-spectre" ],
  "primaryCourseUnitRealisationId" : null,
  "name" : {
    "fi" : "StudyEvent 2020-11-19T08:39:07.175533"
  },
  "locationIds" : [ "test-lokaatio-id-001" ],
  "recursEvery" : "WEEKLY",
  "startTime" : "2020-09-26T10:00",
  "duration" : "PT2H",
  "recursUntil" : "2020-12-05",
  "exceptions" : [ "2020-11-28" ],
  "cancellations" : [ ],
  "overrides" : [ ],
  "events" : null
}, {
  "metadata" : null,
  "id" : "otm-7fd2e800-f897-4d44-a0a3-c5951b2de39b",
  "universityOrgIds" : [ "the-spectre" ],
  "primaryCourseUnitRealisationId" : null,
  "name" : {
    "fi" : "StudyEvent 2020-11-19T08:39:07.175560"
  },
  "locationIds" : [ "test-lokaatio-id-001" ],
  "recursEvery" : "WEEKLY",
  "startTime" : "2020-09-26T10:00",
  "duration" : "PT2H",
  "recursUntil" : "2020-12-05",
  "exceptions" : [ "2020-11-28" ],
  "cancellations" : [ ],
  "overrides" : [ ],
  "events" : null
} ]

Example HTTP response

HTTP/1.1 200 OK
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY

Example Curl request

$ curl 'http://localhost:8080/api/study-events/v1/import' -i -u 'spectre.i:test123' -X POST \
    -H 'Content-Type: application/json' \
    -d '[ {
  "metadata" : null,
  "id" : "otm-2df1cd51-3698-4ab3-903a-b80fa086c4a9",
  "universityOrgIds" : [ "the-spectre" ],
  "primaryCourseUnitRealisationId" : null,
  "name" : {
    "fi" : "StudyEvent 2020-11-19T08:39:07.175533"
  },
  "locationIds" : [ "test-lokaatio-id-001" ],
  "recursEvery" : "WEEKLY",
  "startTime" : "2020-09-26T10:00",
  "duration" : "PT2H",
  "recursUntil" : "2020-12-05",
  "exceptions" : [ "2020-11-28" ],
  "cancellations" : [ ],
  "overrides" : [ ],
  "events" : null
}, {
  "metadata" : null,
  "id" : "otm-7fd2e800-f897-4d44-a0a3-c5951b2de39b",
  "universityOrgIds" : [ "the-spectre" ],
  "primaryCourseUnitRealisationId" : null,
  "name" : {
    "fi" : "StudyEvent 2020-11-19T08:39:07.175560"
  },
  "locationIds" : [ "test-lokaatio-id-001" ],
  "recursEvery" : "WEEKLY",
  "startTime" : "2020-09-26T10:00",
  "duration" : "PT2H",
  "recursUntil" : "2020-12-05",
  "exceptions" : [ "2020-11-28" ],
  "cancellations" : [ ],
  "overrides" : [ ],
  "events" : null
} ]'

Stream study events

GET /api/study-events/v1/stream

Description

Entities can be exported as a stream in modification order, and the stream can be left open to listen for changes. Duplicates are possible if entities are modified several times.

Parameters

Type Name Description Schema Default

Query

follow
optional

Return entities modified after (exclusive comparison) this modification ordinal Alternate parameter with sinceTime. This is the recommended option.

boolean

"false"

Query

since
optional

Return entities modified after (exclusive comparison) this modification ordinal Alternate parameter with sinceTime. This is the recommended option.

integer (int64)

Query

sinceTime
optional

Return entities modified after (exclusive comparison) this ISO-8601 time. Alternate parameter with since. This is the not recommended but sometimes necessary option.

string (date-time)

Responses

HTTP Code Description Schema

200

OK

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Produces

  • */*

Tags

  • export

Get study event

GET /api/study-events/v1/{studyEventId}

Parameters

Type Name Description Schema

Path

studyEventId
required

studyEventId

string (otmid)

Responses

HTTP Code Description Schema

200

OK

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Produces

  • application/json

Tags

  • export

Export study year templates

GET /api/study-year-templates/v1/export

Description

Entities can be exported in modification order based on one of two separate ways of specifying the starting point.With the 'since' parameter (recommended): an integer key (modification ordinal), which is different for every modification of the entity table. The ordinals are guaranteed to increase for each modification, but not guaranteed to be concecutive.With the 'sinceTime' parameter: an ISO-8601 timestamp. SinceTime is only supported for the case when the modification ordinal is not known by the exporter. In actual practice, if efficient export of all data is desired, the greatest modification ordinal from the previous export must be remembered and used as the since parameter for the next export. Both the since and sinceTime parameters are exclusive: if in one export you get the modification ordinals 3, 4 and 5, the next query should be export?since=5 and then you get the ordinals 6, 7, 8, etc.

Parameters

Type Name Description Schema

Query

limit
optional

Maximum number of study year templates to return. May return less, either because there are not enough change items, or because of internal limits. If limit is higher than 10 000, returns only 10 000 items.

integer (int32)

Query

since
optional

Return study year templates modified after (exclusive comparison) this modification ordinal (increasing value within Kori). Alternate parameter with sinceTime. This is the recommended option.

integer (int64)

Query

sinceTime
optional

Return study year templates modified after (exclusive comparison) this ISO-8601 time. Alternate parameter with since. This is the not recommended but sometimes necessary option.

string (date-time)

Responses

HTTP Code Description Schema

200

OK

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Produces

  • application/json

Tags

  • export

Example HTTP request

GET /api/study-year-templates/v1/export?since=0&limit=5 HTTP/1.1
Accept: application/json
Host: localhost:8080

Example HTTP response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 556

{
  "greatestOrdinal" : 48872,
  "hasMore" : false,
  "entities" : [ {
    "id" : "otm-bee9677c-536e-42a9-bd00-8de74bac4b76",
    "valid" : {
      "startDate" : "2017-01-01",
      "endDate" : "2020-01-01"
    },
    "org" : "the-spectre",
    "studyTerms" : null,
    "metadata" : {
      "revision" : 1,
      "createdBy" : "arska",
      "createdOn" : "2020-11-19T08:39:11.887125",
      "lastModifiedBy" : "arska",
      "lastModifiedOn" : "2020-11-19T08:39:11.887218",
      "modificationOrdinal" : 48872
    },
    "documentState" : "ACTIVE"
  } ]
}

Example Curl request

$ curl 'http://localhost:8080/api/study-year-templates/v1/export?since=0&limit=5' -i -X GET \
    -H 'Accept: application/json'

Example HTTP request

GET /api/study-year-templates/v1/export?since=0&limit=5 HTTP/1.1
Accept: application/json
Host: localhost:8080

Example HTTP response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 556

{
  "greatestOrdinal" : 48872,
  "hasMore" : false,
  "entities" : [ {
    "id" : "otm-bee9677c-536e-42a9-bd00-8de74bac4b76",
    "valid" : {
      "startDate" : "2017-01-01",
      "endDate" : "2020-01-01"
    },
    "org" : "the-spectre",
    "studyTerms" : null,
    "metadata" : {
      "revision" : 1,
      "createdBy" : "arska",
      "createdOn" : "2020-11-19T08:39:11.887125",
      "lastModifiedBy" : "arska",
      "lastModifiedOn" : "2020-11-19T08:39:11.887218",
      "modificationOrdinal" : 48872
    },
    "documentState" : "ACTIVE"
  } ]
}

Example Curl request

$ curl 'http://localhost:8080/api/study-year-templates/v1/export?since=0&limit=5' -i -X GET \
    -H 'Accept: application/json'

Import study year templates

POST /api/study-year-templates/v1/import

Parameters

Type Name Description Schema

Body

studyYearTemplates
required

studyYearTemplates

< StudyYearTemplate > array

Responses

HTTP Code Description Schema

200

OK

No Content

201

Created

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes

  • application/json

Produces

  • */*

Tags

  • import

Example HTTP request

POST /api/study-year-templates/v1/import HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 7970
Host: localhost:8080

[ {
  "id" : "hy-1900",
  "valid" : {
    "startDate" : "1900-08-01",
    "endDate" : "2008-08-01"
  },
  "org" : "hy-university-root-id",
  "studyTerms" : [ {
    "valid" : {
      "startDate" : "1900-08-01",
      "endDate" : "1901-01-01"
    },
    "name" : {
      "en" : "autumn",
      "fi" : "syksy",
      "sv" : "hösten"
    },
    "studyPeriods" : [ {
      "defaultValid" : {
        "startDate" : "1900-08-01",
        "endDate" : "1901-01-01"
      },
      "overrideValidities" : [ ],
      "name" : {
        "fi" : "S"
      },
      "size" : 1,
      "visibleByDefault" : true,
      "includedInTargetCreditsCalculation" : true
    } ]
  }, {
    "valid" : {
      "startDate" : "1901-01-01",
      "endDate" : "1901-08-01"
    },
    "name" : {
      "en" : "spring",
      "fi" : "kevät",
      "sv" : "våren"
    },
    "studyPeriods" : [ {
      "defaultValid" : {
        "startDate" : "1901-01-01",
        "endDate" : "1901-08-01"
      },
      "overrideValidities" : [ ],
      "name" : {
        "fi" : "K"
      },
      "size" : 1,
      "visibleByDefault" : true,
      "includedInTargetCreditsCalculation" : true
    } ]
  } ],
  "metadata" : null
}, {
  "id" : "hy-2008",
  "valid" : {
    "startDate" : "2008-08-01",
    "endDate" : "2030-08-01"
  },
  "org" : "hy-university-root-id",
  "studyTerms" : [ {
    "valid" : {
      "startDate" : "2008-08-01",
      "endDate" : "2009-01-01"
    },
    "name" : {
      "en" : "autumn",
      "fi" : "syksy",
      "sv" : "hösten"
    },
    "studyPeriods" : [ {
      "defaultValid" : {
        "startDate" : "2008-08-01",
        "endDate" : "2008-09-01"
      },
      "overrideValidities" : [ {
        "startDate" : "2008-08-01",
        "endDate" : "2008-09-01"
      }, {
        "startDate" : "2009-08-01",
        "endDate" : "2009-09-07"
      }, {
        "startDate" : "2010-08-01",
        "endDate" : "2010-09-06"
      }, {
        "startDate" : "2011-08-01",
        "endDate" : "2011-09-05"
      }, {
        "startDate" : "2012-08-01",
        "endDate" : "2012-09-03"
      }, {
        "startDate" : "2013-08-01",
        "endDate" : "2013-09-02"
      }, {
        "startDate" : "2014-08-01",
        "endDate" : "2014-09-01"
      }, {
        "startDate" : "2015-08-01",
        "endDate" : "2015-08-31"
      }, {
        "startDate" : "2016-08-01",
        "endDate" : "2016-09-05"
      } ],
      "name" : {
        "en" : "summer",
        "fi" : "kesä",
        "sv" : "sommaren"
      },
      "size" : 1,
      "visibleByDefault" : false,
      "includedInTargetCreditsCalculation" : false
    }, {
      "defaultValid" : {
        "startDate" : "2008-09-01",
        "endDate" : "2008-11-01"
      },
      "overrideValidities" : [ {
        "startDate" : "2008-09-01",
        "endDate" : "2008-10-27"
      }, {
        "startDate" : "2009-09-07",
        "endDate" : "2009-11-02"
      }, {
        "startDate" : "2010-09-06",
        "endDate" : "2010-11-01"
      }, {
        "startDate" : "2011-09-05",
        "endDate" : "2011-10-31"
      }, {
        "startDate" : "2012-09-03",
        "endDate" : "2012-10-29"
      }, {
        "startDate" : "2013-09-02",
        "endDate" : "2013-10-28"
      }, {
        "startDate" : "2014-09-01",
        "endDate" : "2014-10-27"
      }, {
        "startDate" : "2015-08-31",
        "endDate" : "2015-10-26"
      }, {
        "startDate" : "2016-09-05",
        "endDate" : "2016-10-31"
      } ],
      "name" : {
        "fi" : "I"
      },
      "size" : 2,
      "visibleByDefault" : true,
      "includedInTargetCreditsCalculation" : true
    }, {
      "defaultValid" : {
        "startDate" : "2008-11-01",
        "endDate" : "2009-01-01"
      },
      "overrideValidities" : [ {
        "startDate" : "2008-10-27",
        "endDate" : "2009-01-01"
      }, {
        "startDate" : "2009-11-02",
        "endDate" : "2010-01-01"
      }, {
        "startDate" : "2010-11-01",
        "endDate" : "2011-01-01"
      }, {
        "startDate" : "2011-10-31",
        "endDate" : "2012-01-01"
      }, {
        "startDate" : "2012-10-29",
        "endDate" : "2013-01-01"
      }, {
        "startDate" : "2013-10-28",
        "endDate" : "2014-01-01"
      }, {
        "startDate" : "2014-10-27",
        "endDate" : "2015-01-01"
      }, {
        "startDate" : "2015-10-26",
        "endDate" : "2016-01-01"
      }, {
        "startDate" : "2016-10-31",
        "endDate" : "2017-01-01"
      } ],
      "name" : {
        "fi" : "II"
      },
      "size" : 2,
      "visibleByDefault" : true,
      "includedInTargetCreditsCalculation" : true
    } ]
  }, {
    "valid" : {
      "startDate" : "2009-01-01",
      "endDate" : "2009-08-01"
    },
    "name" : {
      "en" : "spring",
      "fi" : "kevät",
      "sv" : "våren"
    },
    "studyPeriods" : [ {
      "defaultValid" : {
        "startDate" : "2009-01-01",
        "endDate" : "2009-03-01"
      },
      "overrideValidities" : [ {
        "startDate" : "2009-01-01",
        "endDate" : "2009-03-09"
      }, {
        "startDate" : "2010-01-01",
        "endDate" : "2010-03-15"
      }, {
        "startDate" : "2011-01-01",
        "endDate" : "2011-03-14"
      }, {
        "startDate" : "2012-01-01",
        "endDate" : "2012-03-12"
      }, {
        "startDate" : "2013-01-01",
        "endDate" : "2013-03-11"
      }, {
        "startDate" : "2014-01-01",
        "endDate" : "2014-03-10"
      }, {
        "startDate" : "2015-01-01",
        "endDate" : "2015-03-09"
      }, {
        "startDate" : "2016-01-01",
        "endDate" : "2016-03-14"
      }, {
        "startDate" : "2017-01-01",
        "endDate" : "2017-03-13"
      } ],
      "name" : {
        "fi" : "III"
      },
      "size" : 2,
      "visibleByDefault" : true,
      "includedInTargetCreditsCalculation" : true
    }, {
      "defaultValid" : {
        "startDate" : "2009-03-01",
        "endDate" : "2009-05-15"
      },
      "overrideValidities" : [ {
        "startDate" : "2009-03-09",
        "endDate" : "2009-05-18"
      }, {
        "startDate" : "2010-03-15",
        "endDate" : "2010-05-24"
      }, {
        "startDate" : "2011-03-14",
        "endDate" : "2011-05-23"
      }, {
        "startDate" : "2012-03-12",
        "endDate" : "2012-05-21"
      }, {
        "startDate" : "2013-03-11",
        "endDate" : "2013-05-20"
      }, {
        "startDate" : "2014-03-10",
        "endDate" : "2014-05-19"
      }, {
        "startDate" : "2015-03-09",
        "endDate" : "2015-05-11"
      }, {
        "startDate" : "2016-03-14",
        "endDate" : "2016-05-16"
      }, {
        "startDate" : "2017-03-13",
        "endDate" : "2017-05-15"
      } ],
      "name" : {
        "fi" : "IV"
      },
      "size" : 2,
      "visibleByDefault" : true,
      "includedInTargetCreditsCalculation" : true
    }, {
      "defaultValid" : {
        "startDate" : "2009-05-15",
        "endDate" : "2009-08-01"
      },
      "overrideValidities" : [ {
        "startDate" : "2009-05-18",
        "endDate" : "2009-08-01"
      }, {
        "startDate" : "2010-05-24",
        "endDate" : "2010-08-01"
      }, {
        "startDate" : "2011-05-23",
        "endDate" : "2011-08-01"
      }, {
        "startDate" : "2012-05-21",
        "endDate" : "2012-08-01"
      }, {
        "startDate" : "2013-05-20",
        "endDate" : "2013-08-01"
      }, {
        "startDate" : "2014-05-19",
        "endDate" : "2014-08-01"
      }, {
        "startDate" : "2015-05-11",
        "endDate" : "2015-08-01"
      }, {
        "startDate" : "2016-05-16",
        "endDate" : "2016-08-01"
      }, {
        "startDate" : "2017-05-15",
        "endDate" : "2017-08-01"
      } ],
      "name" : {
        "en" : "summer",
        "fi" : "kesä",
        "sv" : "sommaren"
      },
      "size" : 1,
      "visibleByDefault" : false,
      "includedInTargetCreditsCalculation" : false
    } ]
  } ],
  "metadata" : null
} ]

Example HTTP response

HTTP/1.1 200 OK

Example Curl request

$ curl 'http://localhost:8080/api/study-year-templates/v1/import' -i -X POST \
    -H 'Content-Type: application/json' \
    -H 'Accept: application/json' \
    -d '[ {
  "id" : "hy-1900",
  "valid" : {
    "startDate" : "1900-08-01",
    "endDate" : "2008-08-01"
  },
  "org" : "hy-university-root-id",
  "studyTerms" : [ {
    "valid" : {
      "startDate" : "1900-08-01",
      "endDate" : "1901-01-01"
    },
    "name" : {
      "en" : "autumn",
      "fi" : "syksy",
      "sv" : "hösten"
    },
    "studyPeriods" : [ {
      "defaultValid" : {
        "startDate" : "1900-08-01",
        "endDate" : "1901-01-01"
      },
      "overrideValidities" : [ ],
      "name" : {
        "fi" : "S"
      },
      "size" : 1,
      "visibleByDefault" : true,
      "includedInTargetCreditsCalculation" : true
    } ]
  }, {
    "valid" : {
      "startDate" : "1901-01-01",
      "endDate" : "1901-08-01"
    },
    "name" : {
      "en" : "spring",
      "fi" : "kevät",
      "sv" : "våren"
    },
    "studyPeriods" : [ {
      "defaultValid" : {
        "startDate" : "1901-01-01",
        "endDate" : "1901-08-01"
      },
      "overrideValidities" : [ ],
      "name" : {
        "fi" : "K"
      },
      "size" : 1,
      "visibleByDefault" : true,
      "includedInTargetCreditsCalculation" : true
    } ]
  } ],
  "metadata" : null
}, {
  "id" : "hy-2008",
  "valid" : {
    "startDate" : "2008-08-01",
    "endDate" : "2030-08-01"
  },
  "org" : "hy-university-root-id",
  "studyTerms" : [ {
    "valid" : {
      "startDate" : "2008-08-01",
      "endDate" : "2009-01-01"
    },
    "name" : {
      "en" : "autumn",
      "fi" : "syksy",
      "sv" : "hösten"
    },
    "studyPeriods" : [ {
      "defaultValid" : {
        "startDate" : "2008-08-01",
        "endDate" : "2008-09-01"
      },
      "overrideValidities" : [ {
        "startDate" : "2008-08-01",
        "endDate" : "2008-09-01"
      }, {
        "startDate" : "2009-08-01",
        "endDate" : "2009-09-07"
      }, {
        "startDate" : "2010-08-01",
        "endDate" : "2010-09-06"
      }, {
        "startDate" : "2011-08-01",
        "endDate" : "2011-09-05"
      }, {
        "startDate" : "2012-08-01",
        "endDate" : "2012-09-03"
      }, {
        "startDate" : "2013-08-01",
        "endDate" : "2013-09-02"
      }, {
        "startDate" : "2014-08-01",
        "endDate" : "2014-09-01"
      }, {
        "startDate" : "2015-08-01",
        "endDate" : "2015-08-31"
      }, {
        "startDate" : "2016-08-01",
        "endDate" : "2016-09-05"
      } ],
      "name" : {
        "en" : "summer",
        "fi" : "kesä",
        "sv" : "sommaren"
      },
      "size" : 1,
      "visibleByDefault" : false,
      "includedInTargetCreditsCalculation" : false
    }, {
      "defaultValid" : {
        "startDate" : "2008-09-01",
        "endDate" : "2008-11-01"
      },
      "overrideValidities" : [ {
        "startDate" : "2008-09-01",
        "endDate" : "2008-10-27"
      }, {
        "startDate" : "2009-09-07",
        "endDate" : "2009-11-02"
      }, {
        "startDate" : "2010-09-06",
        "endDate" : "2010-11-01"
      }, {
        "startDate" : "2011-09-05",
        "endDate" : "2011-10-31"
      }, {
        "startDate" : "2012-09-03",
        "endDate" : "2012-10-29"
      }, {
        "startDate" : "2013-09-02",
        "endDate" : "2013-10-28"
      }, {
        "startDate" : "2014-09-01",
        "endDate" : "2014-10-27"
      }, {
        "startDate" : "2015-08-31",
        "endDate" : "2015-10-26"
      }, {
        "startDate" : "2016-09-05",
        "endDate" : "2016-10-31"
      } ],
      "name" : {
        "fi" : "I"
      },
      "size" : 2,
      "visibleByDefault" : true,
      "includedInTargetCreditsCalculation" : true
    }, {
      "defaultValid" : {
        "startDate" : "2008-11-01",
        "endDate" : "2009-01-01"
      },
      "overrideValidities" : [ {
        "startDate" : "2008-10-27",
        "endDate" : "2009-01-01"
      }, {
        "startDate" : "2009-11-02",
        "endDate" : "2010-01-01"
      }, {
        "startDate" : "2010-11-01",
        "endDate" : "2011-01-01"
      }, {
        "startDate" : "2011-10-31",
        "endDate" : "2012-01-01"
      }, {
        "startDate" : "2012-10-29",
        "endDate" : "2013-01-01"
      }, {
        "startDate" : "2013-10-28",
        "endDate" : "2014-01-01"
      }, {
        "startDate" : "2014-10-27",
        "endDate" : "2015-01-01"
      }, {
        "startDate" : "2015-10-26",
        "endDate" : "2016-01-01"
      }, {
        "startDate" : "2016-10-31",
        "endDate" : "2017-01-01"
      } ],
      "name" : {
        "fi" : "II"
      },
      "size" : 2,
      "visibleByDefault" : true,
      "includedInTargetCreditsCalculation" : true
    } ]
  }, {
    "valid" : {
      "startDate" : "2009-01-01",
      "endDate" : "2009-08-01"
    },
    "name" : {
      "en" : "spring",
      "fi" : "kevät",
      "sv" : "våren"
    },
    "studyPeriods" : [ {
      "defaultValid" : {
        "startDate" : "2009-01-01",
        "endDate" : "2009-03-01"
      },
      "overrideValidities" : [ {
        "startDate" : "2009-01-01",
        "endDate" : "2009-03-09"
      }, {
        "startDate" : "2010-01-01",
        "endDate" : "2010-03-15"
      }, {
        "startDate" : "2011-01-01",
        "endDate" : "2011-03-14"
      }, {
        "startDate" : "2012-01-01",
        "endDate" : "2012-03-12"
      }, {
        "startDate" : "2013-01-01",
        "endDate" : "2013-03-11"
      }, {
        "startDate" : "2014-01-01",
        "endDate" : "2014-03-10"
      }, {
        "startDate" : "2015-01-01",
        "endDate" : "2015-03-09"
      }, {
        "startDate" : "2016-01-01",
        "endDate" : "2016-03-14"
      }, {
        "startDate" : "2017-01-01",
        "endDate" : "2017-03-13"
      } ],
      "name" : {
        "fi" : "III"
      },
      "size" : 2,
      "visibleByDefault" : true,
      "includedInTargetCreditsCalculation" : true
    }, {
      "defaultValid" : {
        "startDate" : "2009-03-01",
        "endDate" : "2009-05-15"
      },
      "overrideValidities" : [ {
        "startDate" : "2009-03-09",
        "endDate" : "2009-05-18"
      }, {
        "startDate" : "2010-03-15",
        "endDate" : "2010-05-24"
      }, {
        "startDate" : "2011-03-14",
        "endDate" : "2011-05-23"
      }, {
        "startDate" : "2012-03-12",
        "endDate" : "2012-05-21"
      }, {
        "startDate" : "2013-03-11",
        "endDate" : "2013-05-20"
      }, {
        "startDate" : "2014-03-10",
        "endDate" : "2014-05-19"
      }, {
        "startDate" : "2015-03-09",
        "endDate" : "2015-05-11"
      }, {
        "startDate" : "2016-03-14",
        "endDate" : "2016-05-16"
      }, {
        "startDate" : "2017-03-13",
        "endDate" : "2017-05-15"
      } ],
      "name" : {
        "fi" : "IV"
      },
      "size" : 2,
      "visibleByDefault" : true,
      "includedInTargetCreditsCalculation" : true
    }, {
      "defaultValid" : {
        "startDate" : "2009-05-15",
        "endDate" : "2009-08-01"
      },
      "overrideValidities" : [ {
        "startDate" : "2009-05-18",
        "endDate" : "2009-08-01"
      }, {
        "startDate" : "2010-05-24",
        "endDate" : "2010-08-01"
      }, {
        "startDate" : "2011-05-23",
        "endDate" : "2011-08-01"
      }, {
        "startDate" : "2012-05-21",
        "endDate" : "2012-08-01"
      }, {
        "startDate" : "2013-05-20",
        "endDate" : "2013-08-01"
      }, {
        "startDate" : "2014-05-19",
        "endDate" : "2014-08-01"
      }, {
        "startDate" : "2015-05-11",
        "endDate" : "2015-08-01"
      }, {
        "startDate" : "2016-05-16",
        "endDate" : "2016-08-01"
      }, {
        "startDate" : "2017-05-15",
        "endDate" : "2017-08-01"
      } ],
      "name" : {
        "en" : "summer",
        "fi" : "kesä",
        "sv" : "sommaren"
      },
      "size" : 1,
      "visibleByDefault" : false,
      "includedInTargetCreditsCalculation" : false
    } ]
  } ],
  "metadata" : null
} ]'

Example HTTP request

POST /api/study-year-templates/v1/import HTTP/1.1
Content-Type: application/json
Accept: application/json
Content-Length: 7970
Host: localhost:8080

[ {
  "id" : "hy-1900",
  "valid" : {
    "startDate" : "1900-08-01",
    "endDate" : "2008-08-01"
  },
  "org" : "hy-university-root-id",
  "studyTerms" : [ {
    "valid" : {
      "startDate" : "1900-08-01",
      "endDate" : "1901-01-01"
    },
    "name" : {
      "en" : "autumn",
      "fi" : "syksy",
      "sv" : "hösten"
    },
    "studyPeriods" : [ {
      "defaultValid" : {
        "startDate" : "1900-08-01",
        "endDate" : "1901-01-01"
      },
      "overrideValidities" : [ ],
      "name" : {
        "fi" : "S"
      },
      "size" : 1,
      "visibleByDefault" : true,
      "includedInTargetCreditsCalculation" : true
    } ]
  }, {
    "valid" : {
      "startDate" : "1901-01-01",
      "endDate" : "1901-08-01"
    },
    "name" : {
      "en" : "spring",
      "fi" : "kevät",
      "sv" : "våren"
    },
    "studyPeriods" : [ {
      "defaultValid" : {
        "startDate" : "1901-01-01",
        "endDate" : "1901-08-01"
      },
      "overrideValidities" : [ ],
      "name" : {
        "fi" : "K"
      },
      "size" : 1,
      "visibleByDefault" : true,
      "includedInTargetCreditsCalculation" : true
    } ]
  } ],
  "metadata" : null
}, {
  "id" : "hy-2008",
  "valid" : {
    "startDate" : "2008-08-01",
    "endDate" : "2030-08-01"
  },
  "org" : "hy-university-root-id",
  "studyTerms" : [ {
    "valid" : {
      "startDate" : "2008-08-01",
      "endDate" : "2009-01-01"
    },
    "name" : {
      "en" : "autumn",
      "fi" : "syksy",
      "sv" : "hösten"
    },
    "studyPeriods" : [ {
      "defaultValid" : {
        "startDate" : "2008-08-01",
        "endDate" : "2008-09-01"
      },
      "overrideValidities" : [ {
        "startDate" : "2008-08-01",
        "endDate" : "2008-09-01"
      }, {
        "startDate" : "2009-08-01",
        "endDate" : "2009-09-07"
      }, {
        "startDate" : "2010-08-01",
        "endDate" : "2010-09-06"
      }, {
        "startDate" : "2011-08-01",
        "endDate" : "2011-09-05"
      }, {
        "startDate" : "2012-08-01",
        "endDate" : "2012-09-03"
      }, {
        "startDate" : "2013-08-01",
        "endDate" : "2013-09-02"
      }, {
        "startDate" : "2014-08-01",
        "endDate" : "2014-09-01"
      }, {
        "startDate" : "2015-08-01",
        "endDate" : "2015-08-31"
      }, {
        "startDate" : "2016-08-01",
        "endDate" : "2016-09-05"
      } ],
      "name" : {
        "en" : "summer",
        "fi" : "kesä",
        "sv" : "sommaren"
      },
      "size" : 1,
      "visibleByDefault" : false,
      "includedInTargetCreditsCalculation" : false
    }, {
      "defaultValid" : {
        "startDate" : "2008-09-01",
        "endDate" : "2008-11-01"
      },
      "overrideValidities" : [ {
        "startDate" : "2008-09-01",
        "endDate" : "2008-10-27"
      }, {
        "startDate" : "2009-09-07",
        "endDate" : "2009-11-02"
      }, {
        "startDate" : "2010-09-06",
        "endDate" : "2010-11-01"
      }, {
        "startDate" : "2011-09-05",
        "endDate" : "2011-10-31"
      }, {
        "startDate" : "2012-09-03",
        "endDate" : "2012-10-29"
      }, {
        "startDate" : "2013-09-02",
        "endDate" : "2013-10-28"
      }, {
        "startDate" : "2014-09-01",
        "endDate" : "2014-10-27"
      }, {
        "startDate" : "2015-08-31",
        "endDate" : "2015-10-26"
      }, {
        "startDate" : "2016-09-05",
        "endDate" : "2016-10-31"
      } ],
      "name" : {
        "fi" : "I"
      },
      "size" : 2,
      "visibleByDefault" : true,
      "includedInTargetCreditsCalculation" : true
    }, {
      "defaultValid" : {
        "startDate" : "2008-11-01",
        "endDate" : "2009-01-01"
      },
      "overrideValidities" : [ {
        "startDate" : "2008-10-27",
        "endDate" : "2009-01-01"
      }, {
        "startDate" : "2009-11-02",
        "endDate" : "2010-01-01"
      }, {
        "startDate" : "2010-11-01",
        "endDate" : "2011-01-01"
      }, {
        "startDate" : "2011-10-31",
        "endDate" : "2012-01-01"
      }, {
        "startDate" : "2012-10-29",
        "endDate" : "2013-01-01"
      }, {
        "startDate" : "2013-10-28",
        "endDate" : "2014-01-01"
      }, {
        "startDate" : "2014-10-27",
        "endDate" : "2015-01-01"
      }, {
        "startDate" : "2015-10-26",
        "endDate" : "2016-01-01"
      }, {
        "startDate" : "2016-10-31",
        "endDate" : "2017-01-01"
      } ],
      "name" : {
        "fi" : "II"
      },
      "size" : 2,
      "visibleByDefault" : true,
      "includedInTargetCreditsCalculation" : true
    } ]
  }, {
    "valid" : {
      "startDate" : "2009-01-01",
      "endDate" : "2009-08-01"
    },
    "name" : {
      "en" : "spring",
      "fi" : "kevät",
      "sv" : "våren"
    },
    "studyPeriods" : [ {
      "defaultValid" : {
        "startDate" : "2009-01-01",
        "endDate" : "2009-03-01"
      },
      "overrideValidities" : [ {
        "startDate" : "2009-01-01",
        "endDate" : "2009-03-09"
      }, {
        "startDate" : "2010-01-01",
        "endDate" : "2010-03-15"
      }, {
        "startDate" : "2011-01-01",
        "endDate" : "2011-03-14"
      }, {
        "startDate" : "2012-01-01",
        "endDate" : "2012-03-12"
      }, {
        "startDate" : "2013-01-01",
        "endDate" : "2013-03-11"
      }, {
        "startDate" : "2014-01-01",
        "endDate" : "2014-03-10"
      }, {
        "startDate" : "2015-01-01",
        "endDate" : "2015-03-09"
      }, {
        "startDate" : "2016-01-01",
        "endDate" : "2016-03-14"
      }, {
        "startDate" : "2017-01-01",
        "endDate" : "2017-03-13"
      } ],
      "name" : {
        "fi" : "III"
      },
      "size" : 2,
      "visibleByDefault" : true,
      "includedInTargetCreditsCalculation" : true
    }, {
      "defaultValid" : {
        "startDate" : "2009-03-01",
        "endDate" : "2009-05-15"
      },
      "overrideValidities" : [ {
        "startDate" : "2009-03-09",
        "endDate" : "2009-05-18"
      }, {
        "startDate" : "2010-03-15",
        "endDate" : "2010-05-24"
      }, {
        "startDate" : "2011-03-14",
        "endDate" : "2011-05-23"
      }, {
        "startDate" : "2012-03-12",
        "endDate" : "2012-05-21"
      }, {
        "startDate" : "2013-03-11",
        "endDate" : "2013-05-20"
      }, {
        "startDate" : "2014-03-10",
        "endDate" : "2014-05-19"
      }, {
        "startDate" : "2015-03-09",
        "endDate" : "2015-05-11"
      }, {
        "startDate" : "2016-03-14",
        "endDate" : "2016-05-16"
      }, {
        "startDate" : "2017-03-13",
        "endDate" : "2017-05-15"
      } ],
      "name" : {
        "fi" : "IV"
      },
      "size" : 2,
      "visibleByDefault" : true,
      "includedInTargetCreditsCalculation" : true
    }, {
      "defaultValid" : {
        "startDate" : "2009-05-15",
        "endDate" : "2009-08-01"
      },
      "overrideValidities" : [ {
        "startDate" : "2009-05-18",
        "endDate" : "2009-08-01"
      }, {
        "startDate" : "2010-05-24",
        "endDate" : "2010-08-01"
      }, {
        "startDate" : "2011-05-23",
        "endDate" : "2011-08-01"
      }, {
        "startDate" : "2012-05-21",
        "endDate" : "2012-08-01"
      }, {
        "startDate" : "2013-05-20",
        "endDate" : "2013-08-01"
      }, {
        "startDate" : "2014-05-19",
        "endDate" : "2014-08-01"
      }, {
        "startDate" : "2015-05-11",
        "endDate" : "2015-08-01"
      }, {
        "startDate" : "2016-05-16",
        "endDate" : "2016-08-01"
      }, {
        "startDate" : "2017-05-15",
        "endDate" : "2017-08-01"
      } ],
      "name" : {
        "en" : "summer",
        "fi" : "kesä",
        "sv" : "sommaren"
      },
      "size" : 1,
      "visibleByDefault" : false,
      "includedInTargetCreditsCalculation" : false
    } ]
  } ],
  "metadata" : null
} ]

Example HTTP response

HTTP/1.1 200 OK

Example Curl request

$ curl 'http://localhost:8080/api/study-year-templates/v1/import' -i -X POST \
    -H 'Content-Type: application/json' \
    -H 'Accept: application/json' \
    -d '[ {
  "id" : "hy-1900",
  "valid" : {
    "startDate" : "1900-08-01",
    "endDate" : "2008-08-01"
  },
  "org" : "hy-university-root-id",
  "studyTerms" : [ {
    "valid" : {
      "startDate" : "1900-08-01",
      "endDate" : "1901-01-01"
    },
    "name" : {
      "en" : "autumn",
      "fi" : "syksy",
      "sv" : "hösten"
    },
    "studyPeriods" : [ {
      "defaultValid" : {
        "startDate" : "1900-08-01",
        "endDate" : "1901-01-01"
      },
      "overrideValidities" : [ ],
      "name" : {
        "fi" : "S"
      },
      "size" : 1,
      "visibleByDefault" : true,
      "includedInTargetCreditsCalculation" : true
    } ]
  }, {
    "valid" : {
      "startDate" : "1901-01-01",
      "endDate" : "1901-08-01"
    },
    "name" : {
      "en" : "spring",
      "fi" : "kevät",
      "sv" : "våren"
    },
    "studyPeriods" : [ {
      "defaultValid" : {
        "startDate" : "1901-01-01",
        "endDate" : "1901-08-01"
      },
      "overrideValidities" : [ ],
      "name" : {
        "fi" : "K"
      },
      "size" : 1,
      "visibleByDefault" : true,
      "includedInTargetCreditsCalculation" : true
    } ]
  } ],
  "metadata" : null
}, {
  "id" : "hy-2008",
  "valid" : {
    "startDate" : "2008-08-01",
    "endDate" : "2030-08-01"
  },
  "org" : "hy-university-root-id",
  "studyTerms" : [ {
    "valid" : {
      "startDate" : "2008-08-01",
      "endDate" : "2009-01-01"
    },
    "name" : {
      "en" : "autumn",
      "fi" : "syksy",
      "sv" : "hösten"
    },
    "studyPeriods" : [ {
      "defaultValid" : {
        "startDate" : "2008-08-01",
        "endDate" : "2008-09-01"
      },
      "overrideValidities" : [ {
        "startDate" : "2008-08-01",
        "endDate" : "2008-09-01"
      }, {
        "startDate" : "2009-08-01",
        "endDate" : "2009-09-07"
      }, {
        "startDate" : "2010-08-01",
        "endDate" : "2010-09-06"
      }, {
        "startDate" : "2011-08-01",
        "endDate" : "2011-09-05"
      }, {
        "startDate" : "2012-08-01",
        "endDate" : "2012-09-03"
      }, {
        "startDate" : "2013-08-01",
        "endDate" : "2013-09-02"
      }, {
        "startDate" : "2014-08-01",
        "endDate" : "2014-09-01"
      }, {
        "startDate" : "2015-08-01",
        "endDate" : "2015-08-31"
      }, {
        "startDate" : "2016-08-01",
        "endDate" : "2016-09-05"
      } ],
      "name" : {
        "en" : "summer",
        "fi" : "kesä",
        "sv" : "sommaren"
      },
      "size" : 1,
      "visibleByDefault" : false,
      "includedInTargetCreditsCalculation" : false
    }, {
      "defaultValid" : {
        "startDate" : "2008-09-01",
        "endDate" : "2008-11-01"
      },
      "overrideValidities" : [ {
        "startDate" : "2008-09-01",
        "endDate" : "2008-10-27"
      }, {
        "startDate" : "2009-09-07",
        "endDate" : "2009-11-02"
      }, {
        "startDate" : "2010-09-06",
        "endDate" : "2010-11-01"
      }, {
        "startDate" : "2011-09-05",
        "endDate" : "2011-10-31"
      }, {
        "startDate" : "2012-09-03",
        "endDate" : "2012-10-29"
      }, {
        "startDate" : "2013-09-02",
        "endDate" : "2013-10-28"
      }, {
        "startDate" : "2014-09-01",
        "endDate" : "2014-10-27"
      }, {
        "startDate" : "2015-08-31",
        "endDate" : "2015-10-26"
      }, {
        "startDate" : "2016-09-05",
        "endDate" : "2016-10-31"
      } ],
      "name" : {
        "fi" : "I"
      },
      "size" : 2,
      "visibleByDefault" : true,
      "includedInTargetCreditsCalculation" : true
    }, {
      "defaultValid" : {
        "startDate" : "2008-11-01",
        "endDate" : "2009-01-01"
      },
      "overrideValidities" : [ {
        "startDate" : "2008-10-27",
        "endDate" : "2009-01-01"
      }, {
        "startDate" : "2009-11-02",
        "endDate" : "2010-01-01"
      }, {
        "startDate" : "2010-11-01",
        "endDate" : "2011-01-01"
      }, {
        "startDate" : "2011-10-31",
        "endDate" : "2012-01-01"
      }, {
        "startDate" : "2012-10-29",
        "endDate" : "2013-01-01"
      }, {
        "startDate" : "2013-10-28",
        "endDate" : "2014-01-01"
      }, {
        "startDate" : "2014-10-27",
        "endDate" : "2015-01-01"
      }, {
        "startDate" : "2015-10-26",
        "endDate" : "2016-01-01"
      }, {
        "startDate" : "2016-10-31",
        "endDate" : "2017-01-01"
      } ],
      "name" : {
        "fi" : "II"
      },
      "size" : 2,
      "visibleByDefault" : true,
      "includedInTargetCreditsCalculation" : true
    } ]
  }, {
    "valid" : {
      "startDate" : "2009-01-01",
      "endDate" : "2009-08-01"
    },
    "name" : {
      "en" : "spring",
      "fi" : "kevät",
      "sv" : "våren"
    },
    "studyPeriods" : [ {
      "defaultValid" : {
        "startDate" : "2009-01-01",
        "endDate" : "2009-03-01"
      },
      "overrideValidities" : [ {
        "startDate" : "2009-01-01",
        "endDate" : "2009-03-09"
      }, {
        "startDate" : "2010-01-01",
        "endDate" : "2010-03-15"
      }, {
        "startDate" : "2011-01-01",
        "endDate" : "2011-03-14"
      }, {
        "startDate" : "2012-01-01",
        "endDate" : "2012-03-12"
      }, {
        "startDate" : "2013-01-01",
        "endDate" : "2013-03-11"
      }, {
        "startDate" : "2014-01-01",
        "endDate" : "2014-03-10"
      }, {
        "startDate" : "2015-01-01",
        "endDate" : "2015-03-09"
      }, {
        "startDate" : "2016-01-01",
        "endDate" : "2016-03-14"
      }, {
        "startDate" : "2017-01-01",
        "endDate" : "2017-03-13"
      } ],
      "name" : {
        "fi" : "III"
      },
      "size" : 2,
      "visibleByDefault" : true,
      "includedInTargetCreditsCalculation" : true
    }, {
      "defaultValid" : {
        "startDate" : "2009-03-01",
        "endDate" : "2009-05-15"
      },
      "overrideValidities" : [ {
        "startDate" : "2009-03-09",
        "endDate" : "2009-05-18"
      }, {
        "startDate" : "2010-03-15",
        "endDate" : "2010-05-24"
      }, {
        "startDate" : "2011-03-14",
        "endDate" : "2011-05-23"
      }, {
        "startDate" : "2012-03-12",
        "endDate" : "2012-05-21"
      }, {
        "startDate" : "2013-03-11",
        "endDate" : "2013-05-20"
      }, {
        "startDate" : "2014-03-10",
        "endDate" : "2014-05-19"
      }, {
        "startDate" : "2015-03-09",
        "endDate" : "2015-05-11"
      }, {
        "startDate" : "2016-03-14",
        "endDate" : "2016-05-16"
      }, {
        "startDate" : "2017-03-13",
        "endDate" : "2017-05-15"
      } ],
      "name" : {
        "fi" : "IV"
      },
      "size" : 2,
      "visibleByDefault" : true,
      "includedInTargetCreditsCalculation" : true
    }, {
      "defaultValid" : {
        "startDate" : "2009-05-15",
        "endDate" : "2009-08-01"
      },
      "overrideValidities" : [ {
        "startDate" : "2009-05-18",
        "endDate" : "2009-08-01"
      }, {
        "startDate" : "2010-05-24",
        "endDate" : "2010-08-01"
      }, {
        "startDate" : "2011-05-23",
        "endDate" : "2011-08-01"
      }, {
        "startDate" : "2012-05-21",
        "endDate" : "2012-08-01"
      }, {
        "startDate" : "2013-05-20",
        "endDate" : "2013-08-01"
      }, {
        "startDate" : "2014-05-19",
        "endDate" : "2014-08-01"
      }, {
        "startDate" : "2015-05-11",
        "endDate" : "2015-08-01"
      }, {
        "startDate" : "2016-05-16",
        "endDate" : "2016-08-01"
      }, {
        "startDate" : "2017-05-15",
        "endDate" : "2017-08-01"
      } ],
      "name" : {
        "en" : "summer",
        "fi" : "kesä",
        "sv" : "sommaren"
      },
      "size" : 1,
      "visibleByDefault" : false,
      "includedInTargetCreditsCalculation" : false
    } ]
  } ],
  "metadata" : null
} ]'

Export study years

GET /api/study-years/v1

Description

Returns a list of study years matching the given request parameters: organisation id, start year and number of years.

May return less than the requested amount of StudyYears if requested years are not known to the system (too far in the past).

Parameters

Type Name Description Schema

Query

firstYear
optional

Return study years from this year onward until number of years has passed.

integer (int32)

Query

numberOfYears
optional

How many years to calculate from the first year on. Should be a positive integer value.

integer (int32)

Query

organisationId
optional

University organisation id of the university which uses and owns these templates.

string (otmid)

Responses

HTTP Code Description Schema

200

OK

< StudyYear > array

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Produces

  • application/json

Tags

  • export

Export term registration requirements

GET /api/term-registration-requirements/v1/export

Description

Entities can be exported in modification order based on one of two separate ways of specifying the starting point. With the 'since' parameter (recommended): an integer key (modification ordinal), which is different for every modification of the entity table. The ordinals are guaranteed to increase for each modification, but not guaranteed to be consecutive. With the 'sinceTime' parameter: an ISO-8601 timestamp. SinceTime is only supported for the case when the modification ordinal is not known by the exporter. In actual practice, if efficient export of all data is desired, the greatest modification ordinal from the previous export must be remembered and used as the since parameter for the next export. Both the since and sinceTime parameters are exclusive: if in one export you get the modification ordinals 3, 4 and 5, the next query should be export?since=5 and then you get the ordinals 6, 7, 8, etc.

Parameters

Type Name Description Schema

Query

limit
optional

The maximum amount of results to return

integer (int32)

Query

sinceOrdinal
optional

sinceOrdinal

integer (int64)

Query

sinceTime
optional

sinceTime

string (date-time)

Responses

HTTP Code Description Schema

200

OK

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Produces

  • application/json

Tags

  • export

Example HTTP request

GET /api/term-registration-requirements/v1/export?sinceOrdinal=0&limit=5 HTTP/1.1
Accept: application/json
Host: localhost:8080

Example HTTP response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 585

{
  "greatestOrdinal" : 48958,
  "hasMore" : false,
  "entities" : [ {
    "requirements" : [ {
      "educationTypeUrn" : "urn:code:education-type:test",
      "studentUnionMembershipFeeRequirement" : "POSSIBLE"
    } ],
    "documentState" : "ACTIVE",
    "metadata" : {
      "revision" : 1,
      "createdBy" : "spectre.e",
      "createdOn" : "2020-11-19T08:39:12.248979",
      "lastModifiedBy" : "spectre.e",
      "lastModifiedOn" : "2020-11-19T08:39:12.249076",
      "modificationOrdinal" : 48958
    },
    "universityOrgId" : "the-spectre",
    "id" : "the-spectre"
  } ]
}

Example Curl request

$ curl 'http://localhost:8080/api/term-registration-requirements/v1/export?sinceOrdinal=0&limit=5' -i -X GET \
    -H 'Accept: application/json'

Example HTTP request

GET /api/term-registration-requirements/v1/export?sinceOrdinal=0&limit=5 HTTP/1.1
Accept: application/json
Host: localhost:8080

Example HTTP response

HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: 585

{
  "greatestOrdinal" : 48958,
  "hasMore" : false,
  "entities" : [ {
    "requirements" : [ {
      "educationTypeUrn" : "urn:code:education-type:test",
      "studentUnionMembershipFeeRequirement" : "POSSIBLE"
    } ],
    "documentState" : "ACTIVE",
    "metadata" : {
      "revision" : 1,
      "createdBy" : "spectre.e",
      "createdOn" : "2020-11-19T08:39:12.248979",
      "lastModifiedBy" : "spectre.e",
      "lastModifiedOn" : "2020-11-19T08:39:12.249076",
      "modificationOrdinal" : 48958
    },
    "universityOrgId" : "the-spectre",
    "id" : "the-spectre"
  } ]
}

Example Curl request

$ curl 'http://localhost:8080/api/term-registration-requirements/v1/export?sinceOrdinal=0&limit=5' -i -X GET \
    -H 'Accept: application/json'

Import term registration requirements

POST /api/term-registration-requirements/v1/import

Parameters

Type Name Description Schema

Body

requirements
required

requirements

Responses

HTTP Code Description Schema

200

OK

No Content

201

Created

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes

  • application/json

Produces

  • */*

Tags

  • import

Example HTTP request

POST /api/term-registration-requirements/v1/import HTTP/1.1
Content-Type: application/json
Content-Length: 261
Host: localhost:8080

[ {
  "requirements" : [ {
    "educationTypeUrn" : "urn:code:education-type:test",
    "studentUnionMembershipFeeRequirement" : "POSSIBLE"
  } ],
  "documentState" : "ACTIVE",
  "metadata" : null,
  "universityOrgId" : "the-spectre",
  "id" : "the-spectre"
} ]

Example HTTP response

HTTP/1.1 200 OK

Example Curl request

$ curl 'http://localhost:8080/api/term-registration-requirements/v1/import' -i -X POST \
    -H 'Content-Type: application/json' \
    -d '[ {
  "requirements" : [ {
    "educationTypeUrn" : "urn:code:education-type:test",
    "studentUnionMembershipFeeRequirement" : "POSSIBLE"
  } ],
  "documentState" : "ACTIVE",
  "metadata" : null,
  "universityOrgId" : "the-spectre",
  "id" : "the-spectre"
} ]'

Example HTTP request

POST /api/term-registration-requirements/v1/import HTTP/1.1
Content-Type: application/json
Content-Length: 261
Host: localhost:8080

[ {
  "requirements" : [ {
    "educationTypeUrn" : "urn:code:education-type:test",
    "studentUnionMembershipFeeRequirement" : "POSSIBLE"
  } ],
  "documentState" : "ACTIVE",
  "metadata" : null,
  "universityOrgId" : "the-spectre",
  "id" : "the-spectre"
} ]

Example HTTP response

HTTP/1.1 200 OK

Example Curl request

$ curl 'http://localhost:8080/api/term-registration-requirements/v1/import' -i -X POST \
    -H 'Content-Type: application/json' \
    -d '[ {
  "requirements" : [ {
    "educationTypeUrn" : "urn:code:education-type:test",
    "studentUnionMembershipFeeRequirement" : "POSSIBLE"
  } ],
  "documentState" : "ACTIVE",
  "metadata" : null,
  "universityOrgId" : "the-spectre",
  "id" : "the-spectre"
} ]'

Export timing templates

GET /api/timing-templates/v1/export

Description

Entities can be exported in modification order based on one of two separate ways of specifying the starting point.With the 'since' parameter (recommended): an integer key (modification ordinal), which is different for every modification of the entity table. The ordinals are guaranteed to increase for each modification, but not guaranteed to be concecutive.With the 'sinceTime' parameter: an ISO-8601 timestamp. SinceTime is only supported for the case when the modification ordinal is not known by the exporter. In actual practice, if efficient export of all data is desired, the greatest modification ordinal from the previous export must be remembered and used as the since parameter for the next export. Both the since and sinceTime parameters are exclusive: if in one export you get the modification ordinals 3, 4 and 5, the next query should be export?since=5 and then you get the ordinals 6, 7, 8, etc.

Parameters

Type Name Description Schema

Query

limit
optional

Maximum number of TimingTemplates to return. May return less, either because there are not enough change items, or because of internal limits. If limit is higher than 10 000, returns only 10 000 items.

integer (int32)

Query

since
optional

Return TimingTemplate modified after (exclusive comparison) this modification ordinal (increasing value within Kori). Alternate parameter with sinceTime. This is the recommended option.

integer (int64)

Query

sinceTime
optional

Return TimingTemplates modified after (exclusive comparison) this ISO-8601 time. Alternate parameter with since. This is the not recommended but sometimes necessary option.

string (date-time)

Responses

HTTP Code Description Schema

200

OK

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Produces

  • application/json

Tags

  • export

Import timing templates

POST /api/timing-templates/v1/import

Parameters

Type Name Description Schema

Body

timingTemplates
required

timingTemplates

< TimingTemplate > array

Responses

HTTP Code Description Schema

200

OK

No Content

201

Created

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes

  • application/json

Produces

  • application/json

Tags

  • import

Save university settings

POST /api/university-settings/v1

Description

Because of the dynamic nature of the UniversitySettings object, please do the update by fetching and modifying the current settings

Parameters

Type Name Description Schema

Body

universitySettings
required

universitySettings

Responses

HTTP Code Description Schema

200

OK

201

Created

No Content

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Consumes

  • application/json

Produces

  • application/json

Tags

  • import

Get university settings

GET /api/university-settings/v1/{universityOrgId}

Description

Fetch by university organisation id

Parameters

Type Name Description Schema

Path

universityOrgId
required

University organisation id

string (otmid)

Responses

HTTP Code Description Schema

200

OK

401

Unauthorized

No Content

403

Forbidden

No Content

404

Not Found

No Content

Produces

  • application/json

Tags

  • export

Definitions

AbstractOneChildRule

Abstract base class of the classes comprising the rule language for describing possible children of modules.

Name Description Validation Schema Example

rule

Child rule which continues specifying the requirements

NotNull

Rule

AbstractPersonRule

Abstract supertype of person rules used as either requirement rules, that must all evaluate to true for a person’s enrolment to be accepted, or ordering rules that are used to determine order of precedence for enrolments, in which they are selected and allocated into study sub groups.

Name Description Validation Schema Example

type

discriminator field

string

Address

Represents addresses for physical locations

Subclasses: FinnishAddress, GenericAddress
discriminator field: type

Name Description Validation Schema Example

countryUrn

Country, as a reference to code book country.

UrnCode(namespace = urn:code:country, onlySyntax = false)
NotNull

string (CountryUrn)

urn:code:country:*

isUserEditable

Set to false to prevent address from being edited in the user interface.

boolean

type

discriminator field

string

AdmissionTarget

Admission target indicates what studies a new student is admitted to.

Class level validation annotations:
* ValidAdmissionTargetCode

Name Description Validation Schema Example

code

Code that identifies this admission target in OILI documents (Hakukohdekoodi)

NotNull

string

description

Description of the admission target

LocalizedStringSize(maxSize = 8000, minSize = 1)

LocalizedString

documentState

State of this object: DRAFT, ACTIVE or DELETED

string (DocumentState)

id

Unique identifier for this object

NotNull

string (otm-id)

otm-12345

studyRightConfirmationType

Indicates whether study right can be confirmed automatically or does it require manual confirmation

string (StudyRightConfirmationType)

universityOrgId

Ids of the university for the object. Automatically resolved based on account details.

NotNull
OrganisationId

string (otm-id)

otm-12345

AnyCourseUnitRule

Accepts any course rule selection. TODO: in the future will be extended with tag-based limitations

AnyModuleRule

Accepts any module selection. TODO: will be extended to support tag-based limitation

ApprovalStateType

Approval State describes the state of the approval process for the object. Note that approval state has no effect on visibility; DocumentState dictates whether the document is published and visible to public e.g. students.

Enumeration of values:
* urn:code:approval-state-type:not-ready
* urn:code:approval-state-type:ready-for-approval
* urn:code:approval-state-type:not-approved
* urn:code:approval-state-type:approved

Name Description Validation Schema Example

APPROVED

Document is approved, and typically also published and visible to public

string (ApprovalStateType)

NOT_APPROVED

Document is ready but not yet approved for publishing

string (ApprovalStateType)

NOT_READY

Not ready, work defining and editing the document is still in progress

string (ApprovalStateType)

READY_FOR_APPROVAL

Document is ready but not yet approved for publishing

string (ApprovalStateType)

AssessmentItem

Represents an abstract, re-occurring exam, lecture course, etc. that the student can pass and get graded for. CourseUnitRealisations are concrete implementations of these.

Class level validation annotations:
* UniversityOrganisations
* ValidAssessmentItemSnapshot

Name Description Validation Schema Example

assessmentItemType

Type of assessment (exam, lecture course, etc)

NotNull
UrnCode(namespace = urn:code:assessment-item-type, onlySyntax = false)

string (AssessmentItemTypeUrn)

urn:code:assessment-item-type:*

contentDescription

A free-form text describing the assessment item.

LocalizedStringSize(maxSize = 8000, minSize = 1)

LocalizedMarkupString

credits

Range of credits that can be attained from this

NotNull [Active]

CreditRange

documentState

State of this object: DRAFT, ACTIVE or DELETED

string (DocumentState)

gradeScaleId

Id of grade scale to be used

NotNull
GradeScaleId

string (otm-id)

otm-12345

grading

Eg. final exam 70%, attendance 30%.

LocalizedStringSize(maxSize = 1024, minSize = 1)

LocalizedString

id

Unique identifier for this object

NotNull

string (otm-id)

otm-12345

learningMaterial

Freeform version of learning material used, if structured "literature" cannot be used

LocalizedStringSize(maxSize = 1024, minSize = 1)

LocalizedMarkupString

literature

Structured version of learning material used

Size(max = 200, min = 0)
ContainsNoNulls

Literature array

name

Typically matches the assessment item type name.

NotNull
LocalizedStringSize(maxSize = 255, minSize = 1)

LocalizedString

nameSpecifier

Typically matches the course unit name, not shown in UI if the context is clear

LocalizedStringSize(maxSize = 255, minSize = 1)

LocalizedString

organisations

Organisations responsible for this in various ways and fractions

NotEmpty
Size(max = 200, min = 0)
ValidSetOfOrganisationRoleShare
ContainsNoNulls

OrganisationRoleShare array

possibleAttainmentLanguages

Defines the attainment languages possible for attainments of this assessment item

UrnCode(namespace = urn:code:language, onlySyntax = false)
ContainsNoNulls

string (LanguageUrn) array

primaryCourseUnitGroupId

GroupId of Primary CourseUnit

NotNull
CourseUnitGroupId

string (otm-id)

otm-12345

responsibilityInfos

Persons and roles responsible for this in various ways and fractions

Size(max = 200, min = 0)
ContainsNoNulls

PersonWithModuleResponsibilityInfoType array

snapshotDateTime

Start of validity for the snapshot. End of validity is defined by the snapshotDateTime of a possible later snapshot. Defaults to null i.e. valid from the beginning of time

string (date-time)

2016-01-28T14:45:31

studyField

"koulutusala"

UrnCode(namespace = urn:code:study-field, onlySyntax = false)

string (StudyFieldUrn)

urn:code:study-field:*

studyFormat

What kind of work items study consists of. Optionally also how time is divided between the parts. This is meant to be clarified at the course unit realisation level. In the future this field should be replaced with something structured in order to manage the study calendar.

LocalizedStringSize(maxSize = 8000, minSize = 1)

LocalizedMarkupString

subject

"oppiaine/koulutusohjelma"

UrnCode(namespace = urn:code:subject, onlySyntax = false)

string (SubjectUrn)

urn:code:subject:*

universityOrgIds

Ids of the home/owner universities for the object. Affects search results, visibility and access rights. If omitted during import, the system automatically sets this to a value corresponding to the university ID of the integration account used in the import. If set during import, must contain the id of the university ID of the integration account.

NotEmpty
Size(max = 20, min = 0)
OrganisationId
ContainsNoNulls

string (otm-id) array

AssessmentItemAttainment

Attainment of an assessment item, such as an exam. These are the basic attainments that are then later used to compose course unit and module attainments.

Class level validation annotations:
* ValidPrimaryAttainment
* NotEmptyAcceptorPersons

Name Description Validation Schema Example

acceptorPersons

Employee(s) who are responsible for giving the attainment

ContainsNoNulls

PersonWithAttainmentAcceptorType array

additionalInfo

Additional info related to the attainment

LocalizedStringSize(maxSize = 8000, minSize = 0)

LocalizedString

assessmentItemId

Assessment item to which this attainment is related.

NotNull
AssessmentItemId

string (otm-id)

otm-12345

attainmentDate

The official date for the attainment

NotNull

string (date)

2016-01-28

attainmentLanguageUrn

Language of the attainment, typically one of the possible attainment languages of the assessment item

NotNull
UrnCode(namespace = , onlySyntax = false)

string (LanguageUrn)

urn:code:language:*

courseUnitId

Course unit where this attainment will be included.

NotNull
CourseUnitId

string (otm-id)

otm-12345

courseUnitRealisationId

Course unit realisation selection related to attainment.

NotNull
CourseUnitRealisationId

string (otm-id)

otm-12345

creditTransferInfo

Credit transfer information

CreditTransferInfo

credits

The amount of credits.

NotNull

number (double)

documentState

State of this object: DRAFT, ACTIVE or DELETED

string (DocumentState)

expiryDate

The date when attainment will expire

string (date)

2016-01-28

gradeAverage

Calculated average numerical grade for this attainment

GradeAverage

gradeId

The index of the grade, within the grade scale, that represents the grade for this attainment

NotNull

integer (int32)

gradeScaleId

The grade scale used in this attainment

GradeScaleId
NotNull

string (otm-id)

otm-12345

id

Unique identifier for this object

NotNull

string (otm-id)

otm-12345

misregistration

If true, this is a misregistration, replaced by a later attainment

boolean

misregistrationRationale

Rationale for misregistration

Size(max = 1024, min = 1)

string

moduleContentApplicationId

Module content application which affects the same module as this ModuleAttainment is for

StudentApplicationId

string (otm-id)

otm-12345

organisations

Organisations responsible for this attainment in various ways and fractions. Typically the same list as in the related CourseUnitRealisation

ValidSetOfOrganisationRoleShareBase [Active]
ContainsNoNulls
NotEmpty

OrganisationRoleShareBase array

personFirstNames

First names of the student (only for searches)

string

personId

PrivatePerson identifier for the student who has the attainment

NotNull
PrivatePersonId

string (otm-id)

otm-12345

personLastName

Last name of the student (only for searches)

string

personStudentNumber

Student number of the student (only for searches)

string

primary

Indicates whether this is the primary attainment. There may be multiple attainments, for example if the student has tried to increase the grade. Primary attainment is not necessarily the latest attainment, as an earlier grade may be better than a later try. There can be only one primary attainment per student related to a module or a course unit cloud, or an attainment item.

boolean

registrationDate

The date when attainment was registered into the system

NotNull

string (date)

2016-01-28

state

State of the attainment.

NotNull

string (AttainmentState)

studentApplicationId

Student application from which this Attainment is generated of

StudentApplicationId

string (otm-id)

otm-12345

studyFieldUrn

Study field

UrnCode(namespace = urn:code:study-field, onlySyntax = false)

string (StudyFieldUrn)

urn:code:study-field:*

studyRightId

Study right to which this attainment is related to

StudyRightId

string (otm-id)

otm-12345

studyWeeks

How many study weeks the credits of the attainment represents. This must be defined only for old attainments that used study weeks, in order to keep the original study week stored.

number (double)

verifierPersonId

PublicPerson identifier for the person who has done the verification action than converts assessment to attainment

PublicPersonId

string (otm-id)

otm-12345

AssessmentItemSelection

Selection of an assessment item for a course unit in a study plan.

AssessmentItemTypeUrn

Supported values available here

AttainableDegree

Information about attended degree

Name Description Validation Schema Example

degreeName

The name of the degree

Size(max = 1024, min = 0)

string

internationalInstitutionUrn

Cooperating institution

NotNull
UrnCode(namespace = urn:code:international-institution, onlySyntax = false)

string (InternationalInstitutionUrn)

urn:code:international-institution:*

AttainedCreditRangeRule

Evaluates to true if student has attained credits in plan for the degree programme with selected type and education selected in the rule

Name Description Validation Schema Example

creditRange

Credit range limitations.

NotNull

CreditRange

degreeProgramTypeUrn

Optional restriction for degree program type that is taken into account when calculating credits. If null, then all degree program types are taken into account.

UrnCode(namespace = urn:code:degree-program-type, onlySyntax = false)

string (DegreeProgramTypeUrn)

urn:code:degree-program-type:*

educationIds

Optional restriction for educations that are taken into account when calculating credits. If empty, then active study rights for all educations are taken into account.

Size(max = 20, min = 0)
ContainsNoNulls

string (otm-id) array

Attainment

Full attainment object, including the metadata

Name Description Validation Schema Example

acceptorPersons

Employee(s) who are responsible for giving the attainment

ContainsNoNulls

PersonWithAttainmentAcceptorType array

additionalInfo

Additional info related to the attainment

LocalizedStringSize(maxSize = 8000, minSize = 0)

LocalizedString

attainmentDate

The official date for the attainment

NotNull

string (date)

2016-01-28

attainmentLanguageUrn

Language of the attainment, typically one of the possible attainment languages of the assessment item

NotNull
UrnCode(namespace = , onlySyntax = false)

string (LanguageUrn)

urn:code:language:*

creditTransferInfo

Credit transfer information

CreditTransferInfo

credits

The amount of credits.

NotNull

number (double)

documentState

State of this object: DRAFT, ACTIVE or DELETED

string (DocumentState)

expiryDate

The date when attainment will expire

string (date)

2016-01-28

gradeAverage

Calculated average numerical grade for this attainment

GradeAverage

gradeId

The index of the grade, within the grade scale, that represents the grade for this attainment

NotNull

integer (int32)

gradeScaleId

The grade scale used in this attainment

GradeScaleId
NotNull

string (otm-id)

otm-12345

id

Unique identifier for this object

NotNull

string (otm-id)

otm-12345

misregistration