Theses Resource

Entry point for everything related to Thesis.

GET /thesis

Finds thesis projects whose title or english title matches this string.

Request Parameters
name type description
title query The string which must be present in either english or local title.
Response Body
media type data type description
application/json ThesisGet (JSON) A list of matching thesis projects
application/xml thesisGet (XML)

Example

Request
GET /rest/thesis
Content-Type: application/json
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "title" : "...",
  "title_en" : "...",
  "id" : 12345,
  "externalID" : "...",
  "startDate" : "...",
  "endDate" : "...",
  "aborted" : true,
  "level" : "UNKNOWN",
  "status" : "LATE",
  "unit" : {
    "name_en" : "...",
    "id" : 12345,
    "designation" : "...",
    "closed" : true,
    "name" : "...",
    "units" : [ { }, { } ]
  },
  "finished" : true,
  "readyDate" : 12345,
  "created" : 12345,
  "lastChanged" : 12345,
  "researchAreas" : [ {
    "id" : 12345,
    "active" : true,
    "name_en" : "...",
    "name" : "..."
  }, {
    "id" : 12345,
    "active" : true,
    "name_en" : "...",
    "name" : "..."
  } ]
}
                
              

POST /thesis

Skapar ett nytt examensarbete (uppsatstillfälle)
Creates a new degree thesis

Request Body
media type data type description
application/json ThesisCreate (JSON) The new thesis to add with titles, external ID, start date, end date, unit and research areas.
application/xml thesisCreate (XML)
Response Body
media type data type description
application/json ThesisGet (JSON) and a Location: HTTP header specifying where the created resource can be found.
application/xml thesisGet (XML)

Example

Request
POST /rest/thesis
Content-Type: application/json
Accept: application/json

                
{
  "title" : "...",
  "title_en" : "...",
  "externalID" : "...",
  "startDate" : "...",
  "endDate" : "...",
  "unit" : {
    "id" : 12345
  },
  "researchAreas" : {
    "researchArea" : [ {
      "id" : 12345
    }, {
      "id" : 12345
    } ]
  }
}
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
{
  "title" : "...",
  "title_en" : "...",
  "id" : 12345,
  "externalID" : "...",
  "startDate" : "...",
  "endDate" : "...",
  "aborted" : true,
  "level" : "FIRST_CYCLE",
  "status" : "NOT_STARTED",
  "unit" : {
    "name_en" : "...",
    "id" : 12345,
    "designation" : "...",
    "closed" : true,
    "name" : "...",
    "units" : [ { }, { } ]
  },
  "finished" : true,
  "readyDate" : 12345,
  "created" : 12345,
  "lastChanged" : 12345,
  "researchAreas" : [ {
    "id" : 12345,
    "active" : true,
    "name_en" : "...",
    "name" : "..."
  }, {
    "id" : 12345,
    "active" : true,
    "name_en" : "...",
    "name" : "..."
  } ]
}
                
              

GET /thesis/rejections

Returnerar alla avvisningar fr.o.m. det angivna datumet.

Request Parameters
name type description
since query Anges i formatet yyyy-mm-dd
Response Body
media type data type description
application/json ThesisRejection (JSON) En lista av ThesisRejection
application/xml thesisRejection (XML)

Example

Request
GET /rest/thesis/rejections
Content-Type: application/json
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "rejected" : 12345,
  "examinerId" : 12345,
  "message" : "...",
  "visibleToAuthors" : true,
  "thesisId" : 12345
}
                
              

DELETE /thesis/{id}

Delete a thesis resource.

Request Parameters
name type description constraints
id path Id of the thesis to delete regex: \d+

Example

Request
DELETE /rest/thesis/{id}
Content-Type: application/json

                
...
                
              
Response
HTTP/1.1 204 No Content

              

GET /thesis/{id}

Show a thesis resource

Request Parameters
name type description constraints
id path Id of the thesis regex: \d+
Response Body
media type data type description
application/json ThesisGet (JSON) The thesis, or 404 if not found.
application/xml thesisGet (XML)

Example

Request
GET /rest/thesis/{id}
Content-Type: application/json
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "title" : "...",
  "title_en" : "...",
  "id" : 12345,
  "externalID" : "...",
  "startDate" : "...",
  "endDate" : "...",
  "aborted" : true,
  "level" : "UNKNOWN",
  "status" : "STARTED",
  "unit" : {
    "name_en" : "...",
    "id" : 12345,
    "designation" : "...",
    "closed" : true,
    "name" : "...",
    "units" : [ { }, { } ]
  },
  "finished" : true,
  "readyDate" : 12345,
  "created" : 12345,
  "lastChanged" : 12345,
  "researchAreas" : [ {
    "id" : 12345,
    "active" : true,
    "name_en" : "...",
    "name" : "..."
  }, {
    "id" : 12345,
    "active" : true,
    "name_en" : "...",
    "name" : "..."
  } ]
}
                
              

PUT /thesis/{id}

Uppdaterar ett examensarbete (uppsatstillfälle)
Updates a degree thesis

Request Parameters
name type description constraints
id path The ID of the degree thesis to update. regex: \d+
Request Body
media type data type description
application/json ThesisUpdate (JSON) The new titles, external ID, start date, end date, aborted flag, unit and research areas for the degree thesis.
application/xml thesisUpdate (XML)
Response Body
media type data type description
application/json ThesisGet (JSON) The just updated degree thesis
application/xml thesisGet (XML)

Example

Request
PUT /rest/thesis/{id}
Content-Type: application/json
Accept: application/json

                
{
  "title" : "...",
  "title_en" : "...",
  "externalID" : "...",
  "startDate" : "...",
  "endDate" : "...",
  "aborted" : true,
  "unit" : {
    "id" : 12345
  },
  "researchAreas" : {
    "researchArea" : [ {
      "id" : 12345
    }, {
      "id" : 12345
    } ]
  }
}
                
              
Response
HTTP/1.1 204 No Content
Content-Type: application/json

                
{
  "title" : "...",
  "title_en" : "...",
  "id" : 12345,
  "externalID" : "...",
  "startDate" : "...",
  "endDate" : "...",
  "aborted" : true,
  "level" : "PRE_UNIVERSITY",
  "status" : "LATE",
  "unit" : {
    "name_en" : "...",
    "id" : 12345,
    "designation" : "...",
    "closed" : true,
    "name" : "...",
    "units" : [ { }, { } ]
  },
  "finished" : true,
  "readyDate" : 12345,
  "created" : 12345,
  "lastChanged" : 12345,
  "researchAreas" : [ {
    "id" : 12345,
    "active" : true,
    "name_en" : "...",
    "name" : "..."
  }, {
    "id" : 12345,
    "active" : true,
    "name_en" : "...",
    "name" : "..."
  } ]
}
                
              

GET /thesis/{id}/author

Retrieves the authors of this degree thesis project

Request Parameters
name type description constraints
id path Id of the thesis. regex: \d+
Response Body
media type data type description
application/json AuthorProjectParticipant (JSON) A list of authors (students).
application/xml authorProjectParticipant (XML)

Example

Request
GET /rest/thesis/{id}/author
Content-Type: application/json
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "course" : {
    "courseCode" : "...",
    "credits" : 12345.0,
    "id" : 12345,
    "level" : "THIRD_CYCLE",
    "eduInstDesignation" : "..."
  },
  "person" : {
    "id" : 12345,
    "firstName" : "...",
    "lastName" : "...",
    "email" : "...",
    "lastChanged" : 12345,
    "deceased" : true
  },
  "role" : "SUPERVISOR",
  "id" : 12345
}
                
              

POST /thesis/{id}/author

Lägger till en student som författare till ett examensarbete (uppsatstillfälle).
Adds a student as an author to a degree thesis (uppsatstillfälle)

Request Parameters
name type description constraints
id path Examensarbetets ID. The ID of the degree thesis. regex: \d+
Request Body
media type data type description
application/json AddThesisAuthor (JSON) Information om författaren/studenten. Måste inkludera studentens ID, nivå och institution. Kan även inkludera kurspoäng.
Information about the author/student. Must include the ID of the student, the level and the department. May also include the number och course credits.
application/xml addThesisAuthor (XML)
Response Codes
code condition
201 Om allt gick bra. Författarskapet inkluderas i responsen.
When the author was added successfully. The authorship will be included in the response.
404 Om examensarbetet, studenten eller institutionen inte hittades.
If the degree thesis, the student, or the department could not be found.
403 Om studenten inte kunde läggas som författare på det valda examensarbetet (antingen pga konflikt med annat författarskap, eller för att lämplig kursregistrering saknades (måste matcha nivån, institutionen och potentiellt kurspoäng)).
If the student could not be added as an author to the specified degree thesis (either because of a conflict with another authorship or because a suitable course registration was not found (must match the level, the department and possible course credits.)).
Response Body
media type data type description
application/json AuthorProjectParticipant (JSON)
application/xml authorProjectParticipant (XML)

Example

Request
POST /rest/thesis/{id}/author
Content-Type: application/json
Accept: application/json

                
{
  "student" : {
    "id" : 12345
  },
  "course" : {
    "level" : "THIRD_CYCLE",
    "courseCredits" : 12345.0,
    "department" : {
      "id" : 12345
    }
  }
}
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
{
  "course" : {
    "courseCode" : "...",
    "credits" : 12345.0,
    "id" : 12345,
    "level" : "SECOND_CYCLE",
    "eduInstDesignation" : "..."
  },
  "person" : {
    "id" : 12345,
    "firstName" : "...",
    "lastName" : "...",
    "email" : "...",
    "lastChanged" : 12345,
    "deceased" : true
  },
  "role" : "SUPERVISOR",
  "id" : 12345
}
                
              

GET /thesis/{id}/contributor

Show contributors (non-authors) on this degree thesis project

Request Parameters
name type description constraints
id path Id of the thesis regex: \d+
Response Body
media type data type description
application/json ProjectParticipant (JSON) A list of project participants.
application/xml projectParticipant (XML)

Example

Request
GET /rest/thesis/{id}/contributor
Content-Type: application/json
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "course" : {
    "courseCode" : "...",
    "credits" : 12345.0,
    "id" : 12345,
    "level" : "UNKNOWN",
    "eduInstDesignation" : "..."
  },
  "person" : {
    "id" : 12345,
    "firstName" : "...",
    "lastName" : "...",
    "email" : "...",
    "lastChanged" : 12345,
    "deceased" : true
  },
  "role" : "REVIEWER",
  "id" : 12345
}
                
              

POST /thesis/{id}/contributor

Lägger till en medverkande person (ej författare) till ett examensarbete (uppsatstillfälle)
Adds a contributing person (not author) to a degree thesis project.

Request Parameters
name type description constraints
id path Examensarbetets ID (uppsatstillfällets ID).
The ID of the degree thesis.
regex: \d+
Request Body
media type data type description
application/json ProjectParticipant (JSON) Medverkandet som ska läggas till. Personens ID och rollen måste vara angivna. Om rollen är handledare (SUPERVISOR) ersätts den nuvarande handledaren och examensarbetets enhet ändras automatiskt till den nya handledarens primära enhet.
The participant to be added. The ID of the person and the role must be specified. If the role in supervisor (SUPERVISOR), the existing supervisor will be replaced and the unit of the degree thesis gets set to the new supervisor's primary unit..
application/xml projectParticipant (XML)
Response Codes
code condition
404 Om examensarbetet inte hittades.
If the degree thesis could not be found.
409 Om den befintliga handledaren inte kunde ersättas. Om personen redan har en annan roll. Om den angivna handledaren inte har en enhet. Om rollen kräver kurs och ingen lämplig kurs hittades.
If the existing supervisor could not be replaced. If the person already has a different role. If the specified supervisor does not have a unit. If the role requires a course and no suitable course could be found.
Response Body
media type data type description
application/json ProjectParticipant (JSON)
application/xml projectParticipant (XML)

Example

Request
POST /rest/thesis/{id}/contributor
Content-Type: application/json
Accept: application/json

                
{
  "course" : {
    "courseCode" : "...",
    "credits" : 12345.0,
    "id" : 12345,
    "level" : "UNKNOWN",
    "eduInstDesignation" : "..."
  },
  "person" : {
    "id" : 12345,
    "firstName" : "...",
    "lastName" : "...",
    "email" : "...",
    "lastChanged" : 12345,
    "deceased" : true
  },
  "role" : "ASSISTANT_SUPERVISOR",
  "id" : 12345
}
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
{
  "course" : {
    "courseCode" : "...",
    "credits" : 12345.0,
    "id" : 12345,
    "level" : "SECOND_CYCLE",
    "eduInstDesignation" : "..."
  },
  "person" : {
    "id" : 12345,
    "firstName" : "...",
    "lastName" : "...",
    "email" : "...",
    "lastChanged" : 12345,
    "deceased" : true
  },
  "role" : "REVIEWER",
  "id" : 12345
}
                
              

DELETE /thesis/{id}/publication

Request Parameters
name type description constraints
id path regex: \d+

Example

Request
DELETE /rest/thesis/{id}/publication
Content-Type: application/json

                
...
                
              
Response
HTTP/1.1 204 No Content

              

GET /thesis/{id}/publication

Returnerar ett valt examensarbetes publikation. Returns the publication for a given degree thesis project

Request Parameters
name type description constraints
id path Examensarbetets ID (UppsatstillfID). The id of the degree thesis project. regex: \d+
Response Body
media type data type description
application/json ThesisPublication (JSON) Publikationen, 204 No Content om examensarbetet inte har publikation, 404 Not Found om examensarbetet inte finns. The publication, 204 No Content i the thesis exists without publication, otherwise 404 Not Found if the thesis does not exist.
application/xml thesisPublication (XML)

Example

Request
GET /rest/thesis/{id}/publication
Content-Type: application/json
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "id" : 12345,
  "date" : 12345,
  "year" : 12345,
  "language" : "...",
  "swedishAbstract" : "...",
  "englishAbstract" : "...",
  "swedishKeywords" : "...",
  "englishKeywords" : "...",
  "comment" : "...",
  "file" : {
    "size" : 12345,
    "contentType" : "...",
    "created" : 12345,
    "accessType" : "PUBLIKATION",
    "createdByPersonId" : 12345,
    "id" : 12345,
    "name" : "..."
  },
  "nationalSubjectCategoryExternalID" : 12345,
  "researchAreas" : [ {
    "id" : 12345
  }, {
    "id" : 12345
  } ]
}
                
              

PUT /thesis/{id}/publication

Request Parameters
name type description constraints
id path Uppsatstillfällets ID The id of the thesis regex: \d+
Request Body
media type data type
application/json ThesisPublication (JSON)
application/xml thesisPublication (XML)
Response Body
media type data type description
application/json ThesisPublication (JSON)
application/xml thesisPublication (XML)

Example

Request
PUT /rest/thesis/{id}/publication
Content-Type: application/json
Accept: application/json

                
{
  "id" : 12345,
  "date" : 12345,
  "year" : 12345,
  "language" : "...",
  "swedishAbstract" : "...",
  "englishAbstract" : "...",
  "swedishKeywords" : "...",
  "englishKeywords" : "...",
  "comment" : "...",
  "file" : {
    "size" : 12345,
    "contentType" : "...",
    "created" : 12345,
    "accessType" : "TENTA",
    "createdByPersonId" : 12345,
    "id" : 12345,
    "name" : "..."
  },
  "nationalSubjectCategoryExternalID" : 12345,
  "researchAreas" : [ {
    "id" : 12345
  }, {
    "id" : 12345
  } ]
}
                
              
Response
HTTP/1.1 204 No Content
Content-Type: application/json

                
{
  "id" : 12345,
  "date" : 12345,
  "year" : 12345,
  "language" : "...",
  "swedishAbstract" : "...",
  "englishAbstract" : "...",
  "swedishKeywords" : "...",
  "englishKeywords" : "...",
  "comment" : "...",
  "file" : {
    "size" : 12345,
    "contentType" : "...",
    "created" : 12345,
    "accessType" : "VILLKOR",
    "createdByPersonId" : 12345,
    "id" : 12345,
    "name" : "..."
  },
  "nationalSubjectCategoryExternalID" : 12345,
  "researchAreas" : [ {
    "id" : 12345
  }, {
    "id" : 12345
  } ]
}
                
              

GET /thesis/{id}/author/{personID}

Returns a specific author for a given degree thesis project

Request Parameters
name type description constraints
id path The id of the degree thesis regex: \d+
personID path The id of the author regex: \d+
Response Body
media type data type description
application/json AuthorProjectParticipant (JSON) The author, otherwise 404.
application/xml authorProjectParticipant (XML)

Example

Request
GET /rest/thesis/{id}/author/{personID}
Content-Type: application/json
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "course" : {
    "courseCode" : "...",
    "credits" : 12345.0,
    "id" : 12345,
    "level" : "UNKNOWN",
    "eduInstDesignation" : "..."
  },
  "person" : {
    "id" : 12345,
    "firstName" : "...",
    "lastName" : "...",
    "email" : "...",
    "lastChanged" : 12345,
    "deceased" : true
  },
  "role" : "SUPERVISOR",
  "id" : 12345
}
                
              

GET /thesis/{id}/contributor/{personID}

Returns a specific participant (non-author) for a given degree thesis project

Request Parameters
name type description constraints
id path The id of the degree thesis regex: \d+
personID path The id of the contributing person regex: \d+
Response Body
media type data type description
application/json ProjectParticipant (JSON) The participant, otherwise 404.
application/xml projectParticipant (XML)

Example

Request
GET /rest/thesis/{id}/contributor/{personID}
Content-Type: application/json
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "course" : {
    "courseCode" : "...",
    "credits" : 12345.0,
    "id" : 12345,
    "level" : "SECOND_CYCLE",
    "eduInstDesignation" : "..."
  },
  "person" : {
    "id" : 12345,
    "firstName" : "...",
    "lastName" : "...",
    "email" : "...",
    "lastChanged" : 12345,
    "deceased" : true
  },
  "role" : "ACTIVE_PARTICIPANT",
  "id" : 12345
}
                
              

DELETE /thesis/{id}/person/{personID}

Tar bort en medverkande person från ett examensarbetesprojekt (uppsatstillfälle). Handledaren får inte tas bort.
Removes a contributing person from a degree thesis project. The supervisor may not be removed.

Request Parameters
name type description constraints
id path Examensarbetets ID (uppsatstillfällets ID).
The ID of the degree thesis.
regex: \d+
personID path Personens ID.
The ID of the person.
regex: \d+
Response Codes
code condition
404 Om examensarbetet inte hittades.
If the degree thesis could not be found.
400 Om personen är handledaren.
If the person is the supervisor of the thesis.

Example

Request
DELETE /rest/thesis/{id}/person/{personID}
Content-Type: application/json

                
...
                
              
Response
HTTP/1.1 204 No Content

              

DELETE /thesis/{id}/publication/file

Request Parameters
name type description constraints
id path regex: \d+

Example

Request
DELETE /rest/thesis/{id}/publication/file
Content-Type: application/json

                
...
                
              
Response
HTTP/1.1 204 No Content

              

GET /thesis/{id}/publication/file

Request Parameters
name type description constraints
id path regex: \d+
Response Body
media type data type description
application/pdf object

Example

Request
GET /rest/thesis/{id}/publication/file
Content-Type: application/json
Accept: application/pdf

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/pdf

                
...
                
              

PUT /thesis/{id}/publication/file

Request Parameters
name type description constraints
Content-Length header required long
Content-Type header  
X-Filename header  
id path regex: \d+
Request Body
media type data type
application/pdf object
Response Body
media type data type description
application/json Fil (JSON)
application/xml fil (XML)

Example

Request
PUT /rest/thesis/{id}/publication/file
Content-Type: application/pdf
Accept: application/json
Content-Length: ...
X-Filename: ...

                
...
                
              
Response
HTTP/1.1 204 No Content
Content-Type: application/json

                
{
  "size" : 12345,
  "contentType" : "...",
  "created" : 12345,
  "accessType" : "VILLKOR",
  "createdByPersonId" : 12345,
  "id" : 12345,
  "name" : "..."
}
                
              

GET /thesis/{id}/author/{personID}/publishingConsent

Retrieves the publishing consent level for the given author

Request Parameters
name type description constraints
id path id of the thesis regex: \d+
personID path id of the author (Daisy person id) regex: \d+
Response Body
media type data type description
application/json PublishingConsent (JSON) the currently selected consent level, and the consent levels available for selection
application/xml publishingConsent (XML)

Example

Request
GET /rest/thesis/{id}/author/{personID}/publishingConsent
Content-Type: application/json
Accept: application/json

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "selected" : "DO_NOT_PUBLISH",
  "available" : [ "PUBLIC", "DO_NOT_PUBLISH" ]
}
                
              

POST /thesis/{id}/author/{personID}/publishingConsent

Updates the publishing consent level for the given author

Request Parameters
name type description constraints
id path id of the thesis regex: \d+
personID path id of the author (Daisy person id) regex: \d+
Request Body
media type data type description
application/json PublishingConsentLevel (JSON) the new publishing consent level
application/xml publishingConsentLevel (XML)
Response Codes
code condition
200 Consent level updated
400 Unacceptable consent level
Response Body
media type data type description
application/json PublishingConsentLevel (JSON) the authors consent level (potentially unchanged)
application/xml publishingConsentLevel (XML)

Example

Request
POST /rest/thesis/{id}/author/{personID}/publishingConsent
Content-Type: application/json
Accept: application/json

                
"DO_NOT_PUBLISH"
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
"DO_NOT_PUBLISH"