Overview

The API is used for accessing data related to generated documents.

Endpoints

Export ApplicationAttachments

GET /api/student-applications/export

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

Query Parameters
Name Description Schema Example

since optional

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

Long (int64)

789

sinceTime optional

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

Date (date-time)

2013-10-20T19:20:30+01:00

limit required

Maximum number of application attachments 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)

56

Responses

Table 1. http response codes
Code Message Datatype

401

Authentication required

400

Bad request

422

Validation failed

403

Authorization failed, access forbidden

200

OK

ExportResultApplicationAttachments[ExportResultApplicationAttachments]

Produces
  • application/json

Samples

Does a redirect for downloading a file containing the stored document data.

GET /api/stored-documents/{id}/download

Parameters

Path Parameters

Name

Description

Schema

Example

id required

The id of the stored document

String

otm-123456

Responses

Table 3. http response codes
Code Message Datatype

401

Authentication required

400

Bad request

422

Validation failed

403

Authorization failed, access forbidden

200

OK

Samples

Export Stored-documents

GET /api/stored-documents/export

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

Query Parameters
Name Description Schema Example

since optional

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

Long (int64)

789

sinceTime optional

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

Date (date-time)

2013-10-20T19:20:30+01:00

limit required

Maximum number of stored-documents 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)

56

Responses

Table 4. http response codes
Code Message Datatype

401

Authentication required

400

Bad request

422

Validation failed

403

Authorization failed, access forbidden

200

OK

ExportResultStoredDocument[ExportResultStoredDocument]

Produces
  • application/json

Samples

Upload a document to Tasku

POST /api/stored-documents/{id}/upload

Parameters

Path Parameters

Name

Description

Schema

Example

id required

String

otm-123456

Form Parameters
Name Description Schema Example

file required

File ([file]) (binary)

BINARY_DATA_HERE

Query Parameters
Name Description Schema Example

filename optional

String

filename_example

hasElectronicSignatures optional

Updates hasElectronicSignatures in associated StoredDocument. Does not set anything if not given.

Boolean

true

Responses

Table 6. http response codes
Code Message Datatype

401

Authentication required

400

Bad request

422

Validation failed

403

Authorization failed, access forbidden

200

OK

StoredDocument[StoredDocument]

Produces
  • /

Samples

Models

ApplicationAttachments

ApplicationAttachments contains attachments related to application

Field Name Description Validation Schema Example

documentState optional

State of this object: DRAFT, ACTIVE or DELETED

[String] enum DRAFT, ACTIVE, DELETED,

null

workflowId required

Id of the workflow which is related to these attachments

NotNull

[String]

otm-123456

personId required

Id of the student

NotNull

[String]

otm-123456

attachments optional

List of the attachments

List of Attachment

null

minScannedOn optional

Most oldest virus-scanned Attachment's DateTime

[Date] date-time

null

id optional

Unique identifier within source system. Prefixed with a source system specific prefix, guaranteeing uniqueness also locally.

Allowable prefix values are 1 to 5 characters (a-z, A-Z) long. Allowable postfixes are 1 to 58 characters (a-z, A-Z, 0-9, dash (-) or underscore (_)) long. The separator is a dash (-).

[String]

otm-123456

applicationId optional

Unique identifier within source system. Prefixed with a source system specific prefix, guaranteeing uniqueness also locally.

Allowable prefix values are 1 to 5 characters (a-z, A-Z) long. Allowable postfixes are 1 to 58 characters (a-z, A-Z, 0-9, dash (-) or underscore (_)) long. The separator is a dash (-).

[String]

otm-123456

Attachment

Attachment contains information related to the uploaded file

Field Name Description Validation Schema Example

localId optional

attachment's id

[String]

otm-123456

name required

Name of the attachment

NotNull

[String]

null

comment optional

User created comment for the uploaded file

Size(max = 1024, min = 0)
ValidSanitized

[String]

null

contentUrl optional

Url where file is stored inside the fileStorage (s3/minio) system

[String]

null

fileType required

Type of the uploaded file

NotNull

[String]

null

status optional

Status of the file upload/virus-scan -process (PENDING/UPLOADED/VERIFIED/VERIFICATION_FAILED)

[String] enum PENDING, UPLOADED, VERIFIED, VERIFICATION_FAILED,

null

size required

The size of the file in bytes

NotNull
Max(value = 1073741824)

[Integer] int32

null

uploadTime optional

DateTime when file was uploaded. Currently created when uploaded the file first time

[Date] date-time

null

scannedTime optional

DateTime when file was virus-scanned last time

[Date] date-time

null

ExportResultApplicationAttachments

Container for results of export api calls. Specifies a continuation key for next similar api call with 'greatestOrdinal', and 'hasMore' tells if there are, at this time, any continuation data to be had. The field 'entities' contains the actual data.

Field Name Description Validation Schema Example

greatestOrdinal optional

The modification ordinal number of the last modification whose corresponding entity data is included in this result.

[Long] int64

null

hasMore optional

Is there more data to be had?

[Boolean]

null

entities optional

The actual data.

List of ApplicationAttachments

null

ExportResultStoredDocument

Container for results of export api calls. Specifies a continuation key for next similar api call with 'greatestOrdinal', and 'hasMore' tells if there are, at this time, any continuation data to be had. The field 'entities' contains the actual data.

Field Name Description Validation Schema Example

greatestOrdinal optional

The modification ordinal number of the last modification whose corresponding entity data is included in this result.

[Long] int64

null

hasMore optional

Is there more data to be had?

[Boolean]

null

entities optional

The actual data.

List of StoredDocument

null

StoredDocument

StoredDocument contains metadata for documents stored in TASKU

Field Name Description Validation Schema Example

documentState optional

State of this object: DRAFT, ACTIVE or DELETED

[String] enum DRAFT, ACTIVE, DELETED,

null

id optional

Unique identifier for this object. Persisted value is never null.

NotNull

[String]

otm-123456

groupid optional

Group id of the document, group id ties a set of documents into a group

[String]

otm-123456

generationParameters optional

Parameters used when the document was created

[String]

null

requestUserId required

Person who requested this document

NotNull

[String]

otm-123456

subjectUserId optional

Person of whom this document is about

[String]

otm-123456

graduationId optional

The id of the graduation this document is related to

[String]

otm-123456

ticketId required

Ticketid of the document generation request

NotNull
Size(max = 255, min = 0)

[String]

null

contentUrl optional

Path to the document

Size(max = 1024, min = 0)

[String]

null

documentType required

Type of the generated document

NotNull

[String] enum TRANSCRIPT_STUDENT, TRANSCRIPT_STAFF, STUDY_RIGHT_RECORD_TRANSCRIPT_STAFF, STUDY_RIGHT_RECORD_TRANSCRIPT_STUDENT, TRANSCRIPT_DEGREE_CERTIFICATE, DEGREE_CERTIFICATE, DEGREE_CERTIFICATE_TRANSLATION, DIPLOMA_SUPPLEMENT, QUALIFICATION_CERTIFICATE, CURRICULUM, STUDY_CERTIFICATE, SYLLABUS, ENROLLED_STUDENTS, MASS_EXAM_SESSION_ENROLMENTS, ASSESSMENTS, SIGNED_CERTIFICATE, GENERIC,

null

errorMessage optional

Error message, if one was created during the generation

Size(max = 1024, min = 0)

[String]

null

startTime required

Local time of the start of the generation

NotNull

[Date] date-time

null

completionTime optional

Local time of the completed generation

[Date] date-time

null

draft optional

True if this is a draft document

[Boolean]

null

hasElectronicSignatures optional

Indicates that the file contains electronic signatures

[Boolean]

null

Validations

ValidApplicationAttachments

Checks that ApplicationAttachments are valid

ValidSanitized

Check string has no vulnerable XSS fields.