swagger: "2.0"
schemes:
  - http
host: learnifier.com
info:
  title: Learnifier
  version: 1.1.0
  x-apisguru-categories:
    - education
  x-logo:
    backgroundColor: "#000000"
    url: https://twitter.com/learnifier/profile_image?size=original
  x-origin:
    - format: swagger
      url: http://learnifier.com/apidocs/learnifier.json
      version: "2.0"
  x-providerName: learnifier.com
externalDocs:
  url: http://learnifier.com/api/
produces:
  - application/json
paths:
  /coursedesigns:
    get:
      description: Lists all global course design templates. Only api callers that have full access can call this method.
      parameters: []
      responses:
        "200":
          description: List with course design templates
          schema:
            items:
              $ref: "#/definitions/CourseDesign"
            type: array
        default:
          description: Unexpected error
          schema:
            $ref: "#/definitions/Error"
      summary: Lists all global course design templates
      tags:
        - Course Designs
  /extorgunit:
    get:
      description: |
        Returns information about the organization unit with the specified external id.
      parameters:
        - description: The external id of the organization unit
          format: extid
          in: query
          name: extid
          required: true
          type: string
      responses:
        "200":
          description: A response with an organization unit
          schema:
            $ref: "#/definitions/OrgUnit"
        "404":
          description: Organization Unit not found
        default:
          description: Unexpected error
          schema:
            $ref: "#/definitions/Error"
      summary: Get Organization Unit with External Id
      tags:
        - Organization Units
  /extparticipation:
    get:
      description: Gets a participation by external id.
      parameters:
        - description: The external id of the participation
          format: extid
          in: query
          name: extid
          required: true
          type: string
      responses:
        "200":
          description: The matching participation
          schema:
            $ref: "#/definitions/Participation"
        "404":
          description: User not found
        default:
          description: Unexpected error
          schema:
            $ref: "#/definitions/Error"
      summary: Gets a participation by external id
      tags:
        - Users
  /extproject:
    get:
      description: Gets an Organization Unit by external id
      parameters:
        - description: The external id of the organization unit
          format: extid
          in: query
          name: extid
          required: true
          type: string
      responses:
        "200":
          description: The matching project
          schema:
            $ref: "#/definitions/Project"
        default:
          description: Unexpected error
          schema:
            $ref: "#/definitions/Error"
      summary: Gets Organization Unit by external id
      tags:
        - Projects
  /extuser:
    get:
      description: Gets a user by external id.
      parameters:
        - description: The external id of the user
          format: extid
          in: query
          name: extid
          required: true
          type: string
      responses:
        "200":
          description: User was successfully added
          schema:
            $ref: "#/definitions/User"
        "404":
          description: User not found
        default:
          description: Unexpected error
          schema:
            $ref: "#/definitions/Error"
      summary: Gets a user by external id
      tags:
        - Users
  /globalusergroups:
    get:
      description: |
        Returns a list of Global User Groups. Global User Groups are set up for the realm, and will generate groups that can be used on the client level.
      parameters: []
      responses:
        "200":
          description: List of Global User Groups.
          schema:
            items:
              $ref: "#/definitions/GlobalUserGroup"
            type: array
        default:
          description: Unexpected error
          schema:
            $ref: "#/definitions/Error"
      summary: List Global User Groups.
      tags:
        - Global User Groups
  "/globalusergroups/{groupid}/members":
    get:
      description: |
        Returns a list of all members in User Groups that are based on the Global Group with this groupid.
      parameters:
        - description: ID of group
          format: int64
          in: path
          name: groupid
          required: true
          type: integer
      responses:
        "200":
          description: List of users
          schema:
            items:
              $ref: "#/definitions/User"
            type: array
        default:
          description: Unexpected error
          schema:
            $ref: "#/definitions/Error"
      summary: List of all users in group.
      tags:
        - Global User Groups
  /orgunits:
    get:
      description: |
        The orgunits endpoint returns information about the available organization units (orgunits).
        The response includes the display name, internal and external id and client number.
      responses:
        "200":
          description: A response with organization units
          schema:
            $ref: "#/definitions/OrgUnits"
        default:
          description: Unexpected error
          schema:
            $ref: "#/definitions/Error"
      summary: Organization Units
      tags:
        - Organization Units
    post:
      description: Adds an Organization Unit
      parameters:
        - in: body
          name: body
          required: true
          schema:
            $ref: "#/definitions/AddOrganizationUnit"
      responses:
        "200":
          description: Organization Unit was successfully added
          schema:
            $ref: "#/definitions/AddOrganizationUnitResponse"
        "409":
          description: An organization with the same clientNumber or external id already existed.
        default:
          description: Unexpected error
          schema:
            $ref: "#/definitions/Error"
      summary: Adds an Organization Unit
      tags:
        - Organization Units
  "/orgunits/{orgid}":
    get:
      description: |
        Returns information about the specified organization unit.
        The response includes the display name, internal and external id and client number.
      parameters:
        - description: Id of the organization unit
          in: path
          name: orgid
          required: true
          type: integer
      responses:
        "200":
          description: A response with an organization unit
          schema:
            $ref: "#/definitions/OrgUnit"
        "404":
          description: Organization Unit not found
        default:
          description: Unexpected error
          schema:
            $ref: "#/definitions/Error"
      summary: Get Organization Unit
      tags:
        - Organization Units
    patch:
      description: Adds an Organization Unit
      parameters:
        - in: body
          name: body
          required: true
          schema:
            $ref: "#/definitions/UpdateOrganizationUnit"
        - in: path
          name: orgid
          required: true
          type: string
      responses:
        "201":
          description: Organization Unit was successfully updated
        "409":
          description: An organization with the same clientNumber or external id already existed.
        default:
          description: Unexpected error
          schema:
            $ref: "#/definitions/Error"
      summary: Updates an Organization Unit
      tags:
        - Organization Units
  "/orgunits/{orgid}/projects":
    get:
      description: |
        Returns the available projects for the organization unit
      parameters:
        - description: Id of the organization unit
          in: path
          name: orgid
          required: true
          type: number
      responses:
        "200":
          description: A list with projects
          schema:
            items:
              $ref: "#/definitions/Project"
            type: array
        default:
          description: Unexpected error
          schema:
            $ref: "#/definitions/Error"
      summary: Organization Unit Projects
      tags:
        - Projects
    post:
      description: |
        Creates a new project
      parameters:
        - description: Id of the organization unit
          in: path
          name: orgid
          required: true
          type: integer
        - in: body
          name: body
          required: true
          schema:
            $ref: "#/definitions/AddProject"
      responses:
        "201":
          description: The project was succesfully created created.
          headers:
            location:
              description: Location to the added project
              format: uri
              type: string
          schema:
            $ref: "#/definitions/Project"
        default:
          description: Unexpected error
          schema:
            $ref: "#/definitions/Error"
      summary: Create project
      tags:
        - Projects
  "/orgunits/{orgid}/projects/{projectid}":
    delete:
      description: |
        Deletes the project. The project can only be deleted if the project do not contain any participants.
      parameters:
        - description: Id of the organization unit
          in: path
          name: orgid
          required: true
          type: integer
        - description: Id of the project
          in: path
          name: projectid
          required: true
          type: integer
      responses:
        "204":
          description: The project was deleted
        "404":
          description: The project could not be found
        "406":
          description: The project could not be delted due to constraints
          schema:
            $ref: "#/definitions/Error"
        default:
          description: Unexpected error
          schema:
            $ref: "#/definitions/Error"
      summary: Deletes the project
      tags:
        - Projects
    get:
      description: |
        Returns project information
      parameters:
        - description: Id of the organization unit
          in: path
          name: orgid
          required: true
          type: integer
        - description: Id of the project
          in: path
          name: projectid
          required: true
          type: integer
      responses:
        "200":
          description: Project information
          schema:
            $ref: "#/definitions/Project"
        default:
          description: Unexpected error
          schema:
            $ref: "#/definitions/Error"
      summary: Project information
      tags:
        - Projects
    patch:
      description: |
        Updates information about a project. Values are only updated if the fields are specified in the input
      parameters:
        - description: Id of the organization unit
          in: path
          name: orgid
          required: true
          type: integer
        - description: Id of the project
          in: path
          name: projectid
          required: true
          type: integer
        - in: body
          name: body
          required: true
          schema:
            $ref: "#/definitions/UpdateProject"
      responses:
        "200":
          description: The project was succesfully updated
          headers:
            location:
              description: Location to the added project
              format: uri
              type: string
          schema:
            $ref: "#/definitions/Project"
        default:
          description: Unexpected error
          schema:
            $ref: "#/definitions/Error"
      summary: Update project information
      tags:
        - Projects
  "/orgunits/{orgid}/projects/{projectid}/participants":
    get:
      description: |
        Returns project participants
      parameters:
        - description: Id of the organization unit
          in: path
          name: orgid
          required: true
          type: integer
        - description: Id of the project
          in: path
          name: projectid
          required: true
          type: integer
      responses:
        "200":
          description: Project information
          schema:
            items:
              $ref: "#/definitions/Participation"
            type: array
        default:
          description: Unexpected error
          schema:
            $ref: "#/definitions/Error"
      summary: Project participants
      tags:
        - Projects
    post:
      description: |
        Add a user to the project. Participant information is created for the user. In the body object, only one of either email or userid must be specified. The participant needs to be activated before it the user can access it.
      parameters:
        - description: Id of the organization unit
          in: path
          name: orgid
          required: true
          type: integer
        - description: Id of the project
          in: path
          name: projectid
          required: true
          type: integer
        - in: body
          name: body
          required: true
          schema:
            $ref: "#/definitions/AddParticipant"
      responses:
        "201":
          description: Participant was created
          headers:
            location:
              description: Location to the added participant
              format: uri
              type: string
        "409":
          description: Participant with the same email already existed. Location header contains the url to the already existing participant.
          headers:
            location:
              description: Location to the participant
              format: uri
              type: string
        default:
          description: Unexpected error
          schema:
            $ref: "#/definitions/Error"
      summary: Add participant
      tags:
        - Projects
  "/orgunits/{orgid}/projects/{projectid}/participants/${participantId}":
    delete:
      description: |
        Deletes a participant. The user itself will still remain but any state related to the project will be deleted.
        It might not be possible due to constraints from the products in the project to delete the participant. However
        this can only be determined at the time of the delete. If a delete fails the participant will have their inError
        flag set.
      parameters:
        - description: Id of the organization unit
          in: path
          name: orgid
          required: true
          type: integer
        - description: Id of the project
          in: path
          name: projectid
          required: true
          type: integer
        - description: Participant id
          in: path
          name: participantId
          required: true
          type: integer
      responses:
        "204":
          description: Participant is deleted
        "409":
          description: The delete failed due to internal constraints
          schema:
            $ref: "#/definitions/Error"
        default:
          description: Unexpected error
          schema:
            $ref: "#/definitions/Error"
      summary: Deletes a participant
      tags:
        - Projects
  "/orgunits/{orgid}/projects/{projectid}/participants/${participantId}/activate":
    post:
      description: |
        Activates a participant so that it can be used
      parameters:
        - description: Id of the organization unit
          in: path
          name: orgid
          required: true
          type: integer
        - description: Id of the project
          in: path
          name: projectid
          required: true
          type: integer
        - description: Id of the participant
          in: path
          name: participantId
          required: true
          type: integer
      responses:
        "201":
          description: Participant is activated
        "406":
          description: The participant could not be activated
          schema:
            $ref: "#/definitions/ActivationError"
        "422":
          description: The participant could not be activated due to invalid project state
          schema:
            $ref: "#/definitions/Error"
        default:
          description: Unexpected error
          schema:
            $ref: "#/definitions/Error"
      summary: Activate participant
      tags:
        - Projects
  "/orgunits/{orgid}/projects/{projectid}/participants/${participantId}/loginlink":
    post:
      description: |
        Returns a single sign on link for the participant. The link is only usable once and should be used directly. The link expires after a few minutes.

        This operation requires the *login link* permission.
      parameters:
        - description: Id of the organization unit
          in: path
          name: orgid
          required: true
          type: integer
        - description: Id of the project
          in: path
          name: projectid
          required: true
          type: integer
        - description: Id of the participant
          in: path
          name: participantId
          required: true
          type: integer
      responses:
        "200":
          description: A generated one time use login link
          schema:
            $ref: "#/definitions/LoginLink"
        "422":
          description: The participant is not in a state where a loginlink is possible to get
          schema:
            $ref: "#/definitions/Error"
        default:
          description: Unexpected error
          schema:
            $ref: "#/definitions/Error"
      summary: Participant login link
      tags:
        - Projects
  "/orgunits/{orgid}/projects/{projectid}/teammembers":
    get:
      description: |
        Returns the project team members. A team member is a ....
      parameters:
        - description: Id of the organization unit
          in: path
          name: orgid
          required: true
          type: integer
        - description: Id of the project
          in: path
          name: projectid
          required: true
          type: integer
      responses:
        "200":
          description: Project information
          schema:
            items:
              $ref: "#/definitions/ProjectTeamMember"
            type: array
        default:
          description: Unexpected error
          schema:
            $ref: "#/definitions/Error"
      summary: Project team members
      tags:
        - Projects
  "/orgunits/{orgid}/usergroups":
    get:
      description: |
        Returns a list of User Groups for the org unit.
      parameters:
        - description: ID of organization
          format: int64
          in: path
          name: orgid
          required: true
          type: integer
      responses:
        "200":
          description: List of User Groups.
          schema:
            items:
              $ref: "#/definitions/UserGroup"
            type: array
        default:
          description: Unexpected error
          schema:
            $ref: "#/definitions/Error"
      summary: List User Groups.
      tags:
        - User Groups
    post:
      description: |
        Create a User Group.
      parameters:
        - in: body
          name: body
          required: true
          schema:
            $ref: "#/definitions/AddUserGroup"
        - description: ID of organization
          format: int64
          in: path
          name: orgid
          required: true
          type: integer
      responses:
        "200":
          description: List of User Groups.
          schema:
            items:
              $ref: "#/definitions/GroupId"
            type: array
        default:
          description: Unexpected error
          schema:
            $ref: "#/definitions/Error"
      summary: Create a User Group.
      tags:
        - User Groups
  "/orgunits/{orgid}/usergroups/{groupid}":
    get:
      description: |
        Returns single User Group.
      parameters:
        - description: ID of organization
          format: int64
          in: path
          name: orgid
          required: true
          type: integer
        - description: ID of group
          format: int64
          in: path
          name: groupid
          required: true
          type: integer
      responses:
        "200":
          description: User Group.
          schema:
            $ref: "#/definitions/UserGroup"
        default:
          description: Unexpected error
          schema:
            $ref: "#/definitions/Error"
      summary: Get user group
      tags:
        - User Groups
  "/orgunits/{orgid}/usergroups/{groupid}/members":
    get:
      description: |
        Returns a list of all members in User Groups that are based on the Global Group with this groupid.
      parameters:
        - description: ID of organization
          format: int64
          in: path
          name: orgid
          required: true
          type: integer
        - description: ID of group
          format: int64
          in: path
          name: groupid
          required: true
          type: integer
      responses:
        "200":
          description: List of users
          schema:
            items:
              $ref: "#/definitions/User"
            type: array
        default:
          description: Unexpected error
          schema:
            $ref: "#/definitions/Error"
      summary: List of all users in group.
      tags:
        - User Groups
    post:
      description: |
        Adds a user to user group.
      parameters:
        - in: body
          name: body
          required: true
          schema:
            $ref: "#/definitions/AddUserGroupMember"
        - description: ID of organization
          format: int64
          in: path
          name: orgid
          required: true
          type: integer
        - description: ID of group
          format: int64
          in: path
          name: groupid
          required: true
          type: integer
      responses:
        "200":
          description: User ID of added user
          schema:
            $ref: "#/definitions/UserId"
        default:
          description: Unexpected error
          schema:
            $ref: "#/definitions/Error"
      summary: Add user group member.
      tags:
        - User Groups
  "/orgunits/{orgid}/usergroups/{groupid}/members/{uuid}":
    delete:
      description: |
        Removes a user from a user group.
      parameters:
        - description: ID of organization
          format: int64
          in: path
          name: orgid
          required: true
          type: integer
        - description: ID of group
          format: int64
          in: path
          name: groupid
          required: true
          type: integer
        - description: UUID of user to remove from group.
          format: uuid
          in: path
          name: uuid
          required: true
          type: string
      responses:
        "200":
          description: OK
        default:
          description: Unexpected error
          schema:
            $ref: "#/definitions/Error"
      summary: Remove user group member.
      tags:
        - User Groups
  /users:
    get:
      description: Lists all users. Only api callers that have full access can call this method.
      parameters:
        - default: 5000
          description: The maximum number of users to return
          format: integer
          in: query
          name: limit
          required: false
          type: integer
        - default: 0
          description: The offset to start listing users from
          format: integer
          in: query
          name: offset
          required: false
          type: integer
      responses:
        "200":
          description: List with users
          headers:
            X-Limit:
              description: The limit that was used
              type: integer
            X-More:
              description: Indicates if there are more users available
              type: boolean
            X-Offset:
              description: The offset that was used
              type: integer
            X-Size:
              description: The number of users returned
              type: integer
          schema:
            items:
              $ref: "#/definitions/UserWithPermissions"
            type: array
        default:
          description: Unexpected error
          schema:
            $ref: "#/definitions/Error"
      summary: Lists all users
      tags:
        - Users
    post:
      description: Adds a user. No two users can have the same email address. Email is saved WITH case but compared regardless of case. Email can be changed for a user assuming it doesn't cause a conflict.
      parameters:
        - in: body
          name: body
          required: true
          schema:
            $ref: "#/definitions/AddUser"
      responses:
        "200":
          description: User was successfully added
          schema:
            $ref: "#/definitions/AddUserResponse"
        "409":
          description: A user with the same primary email already existed.
          schema:
            $ref: "#/definitions/AddUserResponse"
        default:
          description: Unexpected error
          schema:
            $ref: "#/definitions/Error"
      summary: Adds a user
      tags:
        - Users
  "/users/{userid}":
    get:
      description: |
        Returns information about a user
      parameters:
        - description: A user id
          in: path
          name: userid
          required: true
          type: string
      responses:
        "200":
          description: User information
          schema:
            $ref: "#/definitions/User"
        default:
          description: Unexpected error
          schema:
            $ref: "#/definitions/Error"
      summary: User information
      tags:
        - Users
    patch:
      description: Updates a user. All values that have a key defined in the input will be set. So if a value should not be updated omit it totally from the input, otherwise it will be unset.
      parameters:
        - description: The user id
          format: uuid
          in: path
          name: userid
          required: true
          type: string
        - in: body
          name: body
          required: true
          schema:
            $ref: "#/definitions/AddUser"
      responses:
        "201":
          description: User was successfully updated
        "409":
          description: A user with the same primary email already existed.
        default:
          description: Unexpected error
          schema:
            $ref: "#/definitions/Error"
      summary: Updates user information
      tags:
        - Users
  "/users/{userid}/pic?key={APIKEY}":
    get:
      description: |
        Returns a thumbnail picture of the user. This can either be a selected picture or an auto generated image. This method doesn't require a full sign in. The api key is sufficient.
        The image is square and is likely, but not necessary, to be in 128x128 PNG format. However the format will always be either PNG, JPEG or GIF.
      parameters:
        - description: The user id
          in: path
          name: userid
          required: true
          type: string
        - in: path
          name: APIKEY
          required: true
          type: string
      responses:
        "200":
          description: An image. Check the Content-Type header to determine which type the returned image have
        "302":
          description: A redirect to the profile
        default:
          description: Unexpected error
          schema:
            $ref: "#/definitions/Error"
      summary: User profile picture
      tags:
        - Users
  "/users/{userid}/projectParticipations":
    get:
      description: |
        Returns information about the projects the user is a participant in. Only the projects that the current token have access to will be listed.
      parameters:
        - description: A user id
          format: uuid
          in: path
          name: userid
          required: true
          type: string
      responses:
        "200":
          description: Project participation info
          schema:
            $ref: "#/definitions/UserParticipationInfo"
        default:
          description: Unexpected error
          schema:
            $ref: "#/definitions/Error"
      summary: Returns information about the projects the user is a participant in.
      tags:
        - Users
definitions:
  ActivationError:
    properties:
      code:
        description: Optional error code
        format: int32
        type: integer
      failures:
        items:
          $ref: "#/definitions/ProductFailure"
        type: array
      field:
        description: The input field that the error was related to
        type: string
      message:
        description: Optional error message
        type: string
  AddOrganizationUnit:
    properties:
      caller:
        description: The id of the user that initiated this operation
        example: 81590981-1e05-4fd5-aa15-15bc4b06cf7f
        format: uuid
        type: string
      clientNumber:
        description: A client number. Sometimes used when communicating with external system. Must be unique if specified.
        example: X-1234
        type: string
      country:
        description: The country code that best matches the organization unit. If unspecified the platform default will be set.
        example: se
        format: locale
        type: string
      displayName:
        description: The name shown for the organization unit
        example: Sample Corp
        type: string
      externalId:
        description: The external id (foreign key). Must not exceed 255 characters.
        type: string
      parent:
        description: A Organization Unit id of the parent Organization Unit (optional).
        example: "1234"
        format: id64
        type: number
    required:
      - displayName
  AddOrganizationUnitResponse:
    properties:
      ouId:
        description: The Organization Unit id
        example: "12"
        format: int64
        type: number
  AddParticipant:
    properties:
      email:
        description: The email of the user. If no user exists with the specified email a user will be created with default values and the specified email.
        example: user@example.com
        format: email
        type: string
      extid:
        description: An optional external id for the participation
        type: string
      userid:
        example: 81590981-1e05-4fd5-aa15-15bc4b06cf7f
        format: uuid
        type: string
  AddProject:
    properties:
      country:
        description: The country code. Default value will be used if not specified
        example: SE
        format: countrycode
        type: string
      createdBy:
        description: The id of the user that created the project. If the creator is not known this value can be *null* or not specified
        example: 8c102c8e-fabd-4c8a-b245-4d2d2f77fc4b
        format: uuid
        type: string
      designId:
        description: The id of the design this project should be based on
        format: int64
        type: integer
      locale:
        description: The primary locale for this project. Default value will be used if not specified
        example: en-US
        format: locale
        type: string
      name:
        description: The internal name of the project
        type: string
      note:
        description: The internal note field
        type: string
      timezone:
        description: The main timezone for the project. Do not specify for default timezone
        example: Europe/Stockholm
        format: timezone
        type: string
      userDescription:
        description: The description presented to participants. Do not specify for default value from design
        type: string
      userTitle:
        description: The title presented to participants. Do not specify for default value from design
        type: string
    required:
      - name
      - designId
  AddUser:
    properties:
      displayName:
        description: The name shown when the user is listed
        example: Jane Doe
        type: string
      externalId:
        description: The external id (foreign key). Must not exceed 255 characters.
        type: string
      firstName:
        description: The first (given) name of the user
        example: Jane
        type: string
      hardLock:
        description: True if the user should be locked from the system
        type: boolean
      homeOrg:
        description: The primary organization for the user. Must match the id of an Organization Unit.
        example: 1234
        format: int64
        type: integer
      lastName:
        description: The last name (surname) of the user
        example: Doe
        format: string
      locale:
        description: The user's preferred language/locale setting. Affects date and number formatting.
        example: en-US
        format: locale
        type: string
      primaryEmail:
        description: The primary email for the user. Used for communication from the platform.
        example: jane.doe@example.com
        type: string
  AddUserGroup:
    properties:
      name:
        description: Name of group.
        example: Foo
        type: string
      parent:
        description: Optional ID of parent group.
        example: 1010
        format: int64
        type: integer
    required:
      - name
  AddUserGroupMember:
    properties:
      uuid:
        description: UUID of user to add to this group.
        format: uuid
        type: string
    required:
      - uuid
  AddUserResponse:
    properties:
      userId:
        description: The user id
        example: 81590981-1e05-4fd5-aa15-15bc4b06cf7f
        format: uuid
        type: string
  BackOfficeRole:
    properties:
      id:
        description: The id of the role
        type: string
      name:
        description: The name of the role
        type: string
    required:
      - id
      - name
  ClientRole:
    properties:
      id:
        description: The id of the role
        type: string
      name:
        description: The name of the role
        type: string
  ClientRoles:
    properties:
      id:
        description: An organization unit id
        type: string
      roles:
        description: A list with client roles
        items:
          $ref: "#/definitions/ClientRole"
        type: array
  CourseDesign:
    properties:
      created:
        description: The time this entry was created
        format: date-time
        type: string
      createdBy:
        description: UUID of the user that created this entry.
        format: uuid
        type: string
      description:
        description: Course description
        type: string
      enabled:
        description: True if this design is enabled for use
        type: boolean
      locale:
        description: BCP-47 locale
        format: locale
        type: string
      locked:
        description: The time when this entry was locked or null
        format: date-time
        type: string
      lockedBy:
        description: UUID of the user that has locked this design
        format: uuid
        type: string
      lockedDesign:
        description: True if this design is locked for editing
        type: boolean
      name:
        description: The name
        type: string
      softid:
        description: The soft identifier
        type: string
      sticky:
        description: True if this design is sticky
        type: boolean
      tags:
        description: Course tags
        items:
          type: string
        type: array
    required:
      - name
      - locale
      - enabled
      - lockedDesign
      - sticky
  Error:
    properties:
      code:
        description: Optional error code
        format: int32
        type: integer
      field:
        description: The input field that the error was related to
        type: string
      message:
        description: Optional error message
        type: string
  GlobalUserGroup:
    properties:
      created:
        description: Timestamp when group was created.
        format: date-time
        type: string
      createdBy:
        description: UUID of the user that created this group.
        example: 81590981-1e05-4fd5-aa15-15bc4b06cf7f
        format: uuid
        type: string
      id:
        description: The id of the group.
        format: int64
        type: integer
      name:
        description: The name of the group.
        type: string
      parent:
        description: Id of parent group, null if group has no parent.
        format: int64
        type: integer
      softiId:
        description: Alternative unique ID for the group.
        type: string
      updated:
        description: Timestamp when group was last modified.
        format: date-time
        type: string
      updatedBy:
        description: UUID of the user that last updated this group.
        example: 81590981-1e05-4fd5-aa15-15bc4b06cf7f
        format: uuid
        type: string
    required:
      - id
      - created
  GroupId:
    properties:
      groupId:
        description: ID of group.
        example: "1010"
        format: int64
        type: integer
    required:
      - groupId
  LoginLink:
    properties:
      link:
        description: An full http url
        example: http://www.example.com/login/1234567890
        format: url
        type: string
  OrgUnit:
    properties:
      externalId:
        description: The external id (foreign key). Must not exceed 255 characters.
        type: string
      id:
        description: Unique identifier representing a specific organization unit. Id numbers are never reused.
        format: int64
        type: integer
      name:
        description: The name of the client.
        type: string
      parentId:
        description: Unique identifier of the parent or *null* if there is no parent.
        format: int64
        type: integer
      type:
        description: The organization unit type. The only type is *client* at the moment.
        type: string
    required:
      - id
      - type
  OrgUnits:
    properties:
      orgUnits:
        items:
          $ref: "#/definitions/OrgUnit"
        type: array
  Participation:
    properties:
      accessLink:
        description: "A link to access this particular participation. The link requires the user to login. Users that access the platform the first time must set a password. This value is null if this participation is not activated. "
        example: http://www.example.com/accesslink/123451
        format: url
        type: string
      activated:
        description: True if this participation has been activated and can be used
        type: boolean
      activitiesCompleted:
        description: The number of activities completed
        example: 3
        format: int64
        type: number
      activitiesTotal:
        description: The total number of activities
        example: 5
        format: int64
        type: number
      errorMessage:
        description: An optional error message that may describe why the participation is in error state.
        type: string
      expiration:
        description: The timestamp when this participation will expire. Expiration never happens if this value is *null*.
        format: date-time
        type: string
      externalId:
        description: The external id (foreign key). Must not exceed 255 characters.
        type: string
      firstAccess:
        description: The timestamp when the participant accessed the project for the first time. This value can be null
        format: date-time
        type: string
      firstActivation:
        description: The timestamp when this participation was first activated. This value can be null
        format: date-time
        type: string
      firstMail:
        description: The timestamp when the first mail was sent to this participant. This value can be null
        format: date-time
        type: string
      id:
        description: Unique identifier representing this participation. Id numbers are never reused
        format: int64
        type: integer
      inError:
        description: True if this participation is in an error state. The user is not able to access participations that are in error state.
        type: boolean
      lastAccess:
        description: The timestamp when the participant accessed the project the last time. This value can be null
        format: date-time
        type: string
      lastActivation:
        description: The timestamp when this participation was last activated. This value can be null
        format: date-time
        type: string
      lastMail:
        description: The timestamp when the last mail was sent to this participant. This value can be null
        format: date-time
        type: string
      projectId:
        description: The id of the project this participation belongs to
        format: int64
        type: integer
      userId:
        description: The id of the user this participation belongs to
        format: uuid
        type: string
  ProductFailure:
    properties:
      message:
        description: The error message
        type: string
      productId:
        description: A product id
        type: string
      type:
        description: The technical error type
        type: string
  Project:
    properties:
      adminUrl:
        description: URL to the page where project administration can be done. Administrative access is still required when accessing the url.
        example: http://www.example.com/adminUrl/1234
        format: url
        type: string
      country:
        description: The country code
        example: SE
        format: countrycode
        type: string
      created:
        description: The timestamp when this project was created.
        format: date-time
        type: string
      createdBy:
        description: The id of the user that created the project. If the creator is not known this value is *null*
        example: 8c102c8e-fabd-4c8a-b245-4d2d2f77fc4b
        format: uuid
        type: string
      designId:
        description: The id of the design this project are using or null if no design is used
        format: int64
        type: integer
      externalId:
        description: The external id (foreign key). Must not exceed 255 characters.
        type: string
      id:
        description: Unique identifier representing a specific project. Id numbers are never reused.
        format: int64
        type: integer
      locale:
        description: The primary locale for this project
        example: en-US
        format: locale
        type: string
      name:
        description: The internal name of the project
        type: string
      note:
        description: The internal note field
        type: string
      orgId:
        description: The id of the organization unit this project belongs to
        format: int64
        type: integer
      status:
        description: Project status. Can be either ACTIVATED, NEW or DISABLED
        enum:
          - ACTIVATED
          - NEW
          - DISABLED
        example: ACTIVATED
        type: string
      timezone:
        description: The main timezone for the project
        example: Europe/Stockholm
        format: timezone
        type: string
      userDescription:
        description: The description presented to participants. This value can be *null*.
        type: string
      userTitle:
        description: The title presented to participants
        type: string
  ProjectTeamMember:
    properties:
      roles:
        $ref: "#/definitions/TeamRole"
        type: array
      userid:
        description: The id of the user that created the project. If the creator is not known this value is *null*
        example: 81590981-1e05-4fd5-aa15-15bc4b06cf7f
        format: uuid
        type: string
  TeamRole:
    properties:
      name:
        type: string
      roleid:
        example: 2afae00f-8357-4b56-94bb-44a3cf0b8ffa
        format: uuid
        type: string
  UpdateOrganizationUnit:
    properties:
      caller:
        description: The id of the user that initiated this operation
        example: 81590981-1e05-4fd5-aa15-15bc4b06cf7f
        format: uuid
        type: string
      clientNumber:
        description: A client number. Sometimes used when communicating with external system. Must be unique if specified.
        example: X-1234
        type: string
      country:
        description: The country code that best matches the organization unit. If unspecified the platform default will be set.
        example: se
        format: locale
        type: string
      displayName:
        description: The name shown for the organization unit
        example: Sample Corp
        type: string
      externalId:
        description: The external id (foreign key). Must not exceed 255 characters.
        type: string
      parent:
        description: A Organization Unit id of the parent Organization Unit (optional).
        example: "1234"
        format: id64
        type: number
  UpdateProject:
    properties:
      country:
        description: The country code
        example: SE
        format: countrycode
        type: string
      locale:
        description: The primary locale for this project
        example: en-US
        format: locale
        type: string
      name:
        description: The internal name of the project
        type: string
      note:
        description: The internal note field
        type: string
      status:
        description: Project status. Can be either ACTIVATED, NEW or DISABLED
        enum:
          - ACTIVATED
          - NEW
          - DISABLED
        example: ACTIVATED
        type: string
      timezone:
        description: The main timezone for the project
        example: Europe/Stockholm
        format: timezone
        type: string
      userDescription:
        description: The description presented to participants. This value can be *null*.
        type: string
      userTitle:
        description: The title presented to participants
        type: string
  User:
    properties:
      authorizationPossible:
        description: True if the user can authorize herself/himself
        type: boolean
      displayName:
        description: Full name of the user
        example: Jane Doe
        type: string
      externalId:
        description: The external id (foreign key). Must not exceed 255 characters.
        type: string
      firstLogin:
        description: The timestamp when the first login was made. This value can be *null*.
        format: date-time
        type: string
      firstName:
        description: The first name of the user (or given name)
        example: Jane
        type: string
      hardLock:
        description: True if the user is locked and the lock has been set by an administrator
        type: boolean
      homeOrg:
        description: The primary organization for the user. Must match the id of an Organization Unit.
        example: 1234
        format: int64
        type: integer
      id:
        description: The id of the user this participation belongs to
        example: 81590981-1e05-4fd5-aa15-15bc4b06cf7f
        format: uuid
        type: string
      lastLogin:
        description: The timestamp when the last login was made. This value can be *null*.
        format: date-time
        type: string
      lastName:
        description: The last name of the user (or surname)
        example: Doe
        type: string
      locked:
        description: Lock status. A locked user will not be able to access the platform.
        type: boolean
      prefs:
        $ref: "#/definitions/UserPreferences"
      primaryEmail:
        description: The primary email for this user. If the user has no email this value is *null*.
        format: email
        type: string
  UserGroup:
    properties:
      children:
        description: Children User Groups.
        items:
          $ref: "#/definitions/UserGroup"
        type: array
      globalId:
        description: Global group ID if this group is based on a global group, otherwise null.
        format: int64
        type: integer
      groupId:
        description: Unique identifier representing a User Group. Id numbers are never reused.
        format: int64
        type: integer
      name:
        description: The name of the User Group.
        type: string
      parent:
        description: Unique identifier of the parent or *null* if there is no parent.
        format: int64
        type: integer
      userGroup:
        description: If of internal user group object that holds the members of this group.
        format: int64
        type: integer
    required:
      - name
  UserId:
    properties:
      uuid:
        description: UUID of user to add to this group.
        example: aa7685cb-d47e-419e-8541-0d13cdcfe779
        format: uuid
        type: string
    required:
      - uuid
  UserParticipationInfo:
    properties:
      accessLink:
        description: "A link to access this particular participation. The link requires the user to login. Users that access the platform the first time must set a password. This value is null if this participation is not activated. "
        example: http://www.example.com/accesslink/123451
        format: url
        type: string
      activated:
        description: True if this participation has been activated and can be used
        type: boolean
      activitiesCompleted:
        description: The number of activities completed
        example: "3"
        format: int64
        type: number
      activitiesTotal:
        description: The total number of activities
        example: "5"
        format: int64
        type: number
      errorMessage:
        description: An optional error message that may describe why the participation is in error state.
        type: string
      expiration:
        description: The timestamp when this participation will expire. Expiration never happens if this value is *null*.
        format: date-time
        type: string
      externalId:
        description: The external id (foreign key). Must not exceed 255 characters.
        type: string
      firstAccess:
        description: The timestamp when the participant accessed the project for the first time. This value can be null
        format: date-time
        type: string
      firstActivation:
        description: The timestamp when this participation was first activated. This value can be null
        format: date-time
        type: string
      firstMail:
        description: The timestamp when the first mail was sent to this participant. This value can be null
        format: date-time
        type: string
      id:
        description: Participation id
        format: int64
        type: integer
      inError:
        description: True if this participation is in an error state. The user is not able to access participations that are in error state.
        type: boolean
      lastAccess:
        description: The timestamp when the participant accessed the project the last time. This value can be null
        format: date-time
        type: string
      lastActivation:
        description: The timestamp when this participation was last activated. This value can be null
        format: date-time
        type: string
      lastMail:
        description: The timestamp when the last mail was sent to this participant. This value can be null
        format: date-time
        type: string
      projectId:
        description: Project id
        format: int64
        type: integer
      projectName:
        description: The internal name of the project
        type: string
      projectOrgId:
        description: The organization id
        format: int64
        type: integer
      projectStatus:
        description: Project status. Can be either ACTIVATED, NEW or DISABLED
        enum:
          - ACTIVATED
          - NEW
          - DISABLED
        example: ACTIVATED
        type: string
      projectThumbnail:
        description: An url to the project thumbnail. This url can be accessed by anyone.
        example: http://www.example.com/thumbnail.png
        format: url
        type: string
      projectUserTitle:
        description: The title presented to participants
        type: string
  UserPreferences:
    properties:
      locale:
        description: The preferred locale. This value can be *null* if no specific preference has been selected.
        example: sv-SE
        format: locale
        type: string
  UserWithPermissions:
    allOf:
      - $ref: "#/definitions/User"
      - properties:
          backOfficeRoles:
            items:
              $ref: "#/definitions/BackOfficeRole"
            type: array
          clientRoles:
            description: A list with client roles
            items:
              $ref: "#/definitions/ClientRoles"
            type: array
        type: object
