Modules

The Modules API exposes information about academic modules offered at Cardiff University via the institutional developer portal. OAuth2-secured; requires consumer keys and an access token.

OpenAPI Specification

cardiff-modules.yaml Raw ↑
openapi: 3.0.3
info:
  description: The Module API provides a simple interface for applications that want to retrieve lists of modules or information
    relating to a specific module taught in Cardiff University. Using the Modules API, clients can filter modules by school,
    language, level and year.
  version: v1
  title: ModulesApi
  termsOfService: http://www.cardiff.ac.uk/terms/
  contact:
    name: [email protected]
  license:
    name: Apache 2.0
    url: http://www.apache.org/licenses/LICENSE-2.0.html
servers:
- url: https://api.data.cardiff.ac.uk/modules/v1
paths:
  /{code}/occurrences/{occurrence}:
    get:
      tags:
      - Modules
      - Occurrences
      summary: Returns specified module.
      description: This endpoint returns the module with the specified module code.
      parameters:
      - name: code
        in: path
        description: Specifies which module to return
        required: true
        schema:
          type: string
      - name: occurrence
        in: path
        description: Specifies which occurrence to return for the module. Defaults to current year e.g. 14A
        required: true
        schema:
          type: string
      responses:
        '200':
          description: Returns specified occurrence for the module
          content:
            application/json:
              schema:
                required:
                - data
                - meta
                properties:
                  data:
                    type: object
                    properties:
                      assessments:
                        type: array
                        items:
                          $ref: '#/components/schemas/Assessment'
                      module:
                        type: array
                        items:
                          type: object
                          properties:
                            dateOflastClass:
                              type: string
                            code:
                              type: string
                            dateOfFirstClass:
                              type: string
                            moduleLeader:
                              type: object
                              properties:
                                forename:
                                  type: string
                                surname:
                                  type: string
                                fullName:
                                  type: string
                                title:
                                  type: string
                                staffId:
                                  type: string
                                username:
                                  type: string
                                email:
                                  type: string
                            collaborators:
                              type: array
                              items:
                                type: object
                                properties:
                                  forename:
                                    type: string
                                  surname:
                                    type: string
                                  fullName:
                                    type: string
                                  title:
                                    type: string
                                  staffId:
                                    type: string
                                  username:
                                    type: string
                                  email:
                                    type: string
                                  role:
                                    type: string
                            level:
                              type: object
                              properties:
                                code:
                                  type: string
                                name:
                                  type: string
                            year:
                              type: string
                            subject:
                              type: object
                              properties:
                                code:
                                  type: string
                                name:
                                  type: string
                            language:
                              type: string
                            occurrence:
                              type: string
                            type:
                              type: string
                            noOfPeriods:
                              type: string
                            credits:
                              type: string
                            school:
                              type: object
                              properties:
                                parent:
                                  type: string
                                code:
                                  type: string
                                name:
                                  type: string
                            occurrenceName:
                              type: string
                            name:
                              type: string
                            semester:
                              type: object
                              properties:
                                code:
                                  type: string
                                name:
                                  type: string
                            welshPerc:
                              type: string
                          required:
                          - code
                          - collaborators
                          - credits
                          - language
                          - moduleLeader
                          - name
                          - noOfPeriods
                          - type
                      descriptions:
                        type: array
                        items:
                          type: object
                          properties:
                            code:
                              type: string
                            text:
                              type: string
                            title:
                              type: string
                          required:
                          - code
                          - text
                          - title
                  meta:
                    $ref: '#/components/schemas/Meta'
      security:
      - default: []
      x-auth-type: Application
  /{code}/assessments:
    get:
      tags:
      - Modules
      - Assessments
      summary: Returns the assessments for a module
      description: This endpoint returns a list of assessments with the specified module code.
      parameters:
      - name: code
        in: path
        description: Specifies which module to return
        required: true
        schema:
          type: string
      - name: year
        in: query
        description: Academic year, used to filter which assessments are returned. Defaults to current year
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Returns a list of assessments for the specified module
          content:
            application/json:
              schema:
                required:
                - data
                - meta
                properties:
                  meta:
                    $ref: '#/components/schemas/Meta'
                  data:
                    type: object
                    properties:
                      assessments:
                        type: array
                        items:
                          $ref: '#/components/schemas/Assessment'
      security:
      - default: []
      x-auth-type: Application
  /{code}:
    get:
      tags:
      - Modules
      summary: Returns specified module.
      description: This endpoint returns the module with the specified module code.
      parameters:
      - name: code
        in: path
        description: Specifies which module to return
        required: true
        schema:
          type: string
      - name: year
        in: query
        description: Academic year, used to filter which occurrences are returned. Defaults to current year
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Returns specified module
          content:
            application/json:
              schema:
                required:
                - data
                - meta
                properties:
                  data:
                    type: object
                    properties:
                      occurrences:
                        type: array
                        items:
                          type: object
                          properties:
                            dateOflastClass:
                              type: string
                            dateOfFirstClass:
                              type: string
                            credits:
                              type: string
                            year:
                              type: string
                            name:
                              type: string
                            semester:
                              type: object
                              properties:
                                code:
                                  type: string
                                name:
                                  type: string
                            occurrence:
                              type: string
                            welshPerc:
                              type: integer
                            moduleLeader:
                              type: object
                              properties:
                                forename:
                                  type: string
                                surname:
                                  type: string
                                fullName:
                                  type: string
                                title:
                                  type: string
                                staffId:
                                  type: string
                                username:
                                  type: string
                                email:
                                  type: string
                            collaborators:
                              type: array
                              items:
                                type: object
                                properties:
                                  forename:
                                    type: string
                                  surname:
                                    type: string
                                  fullName:
                                    type: string
                                  title:
                                    type: string
                                  staffId:
                                    type: string
                                  username:
                                    type: string
                                  email:
                                    type: string
                                  role:
                                    type: string
                          required:
                          - collaborators
                          - credits
                          - dateOfFirstClass
                          - dateOflastClass
                          - moduleLeader
                          - name
                          - occurrence
                          - semester
                          - welshPerc
                          - year
                      module:
                        type: object
                        properties:
                          code:
                            type: string
                          moduleLeader:
                            type: object
                            properties:
                              forename:
                                type: string
                              surname:
                                type: string
                              fullName:
                                type: string
                              title:
                                type: string
                              staffId:
                                type: string
                              username:
                                type: string
                              email:
                                type: string
                          level:
                            type: object
                            properties:
                              code:
                                type: string
                              name:
                                type: string
                          school:
                            type: object
                            properties:
                              parent:
                                type: string
                              code:
                                type: string
                              name:
                                type: string
                          credits:
                            type: string
                          subject:
                            type: object
                            properties:
                              code:
                                type: string
                              name:
                                type: string
                          name:
                            type: string
                          language:
                            type: string
                          noOfPeriods:
                            type: string
                          type:
                            type: string
                        required:
                        - code
                        - credits
                        - language
                        - name
                        - noOfPeriods
                        - type
                  meta:
                    $ref: '#/components/schemas/Meta'
      security:
      - default: []
      x-auth-type: Application
  /{code}/occurrences:
    get:
      tags:
      - Occurrences
      summary: Returns occurrences for a module.
      description: This endpoint returns all occurrences for the module with the specified module code.
      parameters:
      - name: code
        in: path
        description: Specifies which module to return
        required: true
        schema:
          type: string
      - name: year
        in: query
        description: Academic year, used to filter which occurrences are returned. Defaults to current year
        required: false
        schema:
          type: string
      responses:
        '200':
          description: Returns occurrences for the specified module
          content:
            application/json:
              schema:
                required:
                - data
                - meta
                properties:
                  data:
                    type: object
                    properties:
                      occurrences:
                        type: array
                        items:
                          type: object
                          properties:
                            moduleLeader:
                              type: object
                              properties:
                                forename:
                                  type: string
                                surname:
                                  type: string
                                fullName:
                                  type: string
                                title:
                                  type: string
                                staffId:
                                  type: string
                                username:
                                  type: string
                                email:
                                  type: string
                            collaborators:
                              type: array
                              items:
                                type: object
                                properties:
                                  forename:
                                    type: string
                                  surname:
                                    type: string
                                  fullName:
                                    type: string
                                  title:
                                    type: string
                                  staffId:
                                    type: string
                                  username:
                                    type: string
                                  email:
                                    type: string
                                  role:
                                    type: string
                            dateOflastClass:
                              type: string
                            dateOfFirstClass:
                              type: string
                            credits:
                              type: string
                            year:
                              type: string
                            name:
                              type: string
                            semester:
                              type: object
                              properties:
                                code:
                                  type: string
                                name:
                                  type: string
                            occurrence:
                              type: string
                            welshPerc:
                              type: integer
                          required:
                          - collaborators
                          - credits
                          - dateOfFirstClass
                          - dateOflastClass
                          - moduleLeader
                          - name
                          - occurrence
                          - semester
                          - welshPerc
                          - year
                  meta:
                    $ref: '#/components/schemas/Meta'
      security:
      - default: []
      x-auth-type: Application
  /map:
    get:
      tags:
      - Rollover
      summary: Returns a list of the modules held in the Blackboard map
      description: This endpoint returns all the modules held in the blackboard map table within SIMS.
      parameters: []
      responses:
        '200':
          description: List all modules from blackboard map
          content:
            application/json:
              schema:
                required:
                - data
                - meta
                properties:
                  data:
                    type: object
                    properties:
                      modules:
                        type: array
                        items:
                          type: object
                          properties:
                            prog_inc:
                              type: string
                            upr:
                              type: string
                            prog_exc:
                              type: string
                            year_of_study:
                              type: string
                            module_exc:
                              type: string
                            in_use:
                              type: string
                            occurrence:
                              type: string
                            dept:
                              type: string
                            module_inc:
                              type: string
                          required:
                          - dept
                          - in_use
                          - module_exc
                          - module_inc
                          - occurrence
                          - prog_exc
                          - prog_inc
                          - upr
                          - year_of_study
                  meta:
                    $ref: '#/components/schemas/Meta'
      security:
      - default:
        - lc_rollover
      x-auth-type: Application & Application User
  /occurrences:
    get:
      tags:
      - Occurrences
      summary: List all module occurrences
      description: This endpoint returns a list of module occurrences available with the University.
      parameters:
      - name: year
        in: query
        description: Academic year filter, defaults to current year. Defaults to current year
        required: false
        schema:
          type: string
      - name: school
        in: query
        description: Returns modules linked to the specified school code e.g. SOCSI (Social Sciences)
        required: false
        schema:
          type: string
      - name: level
        in: query
        description: Returns modules linked to the specified level code e.g. L4 (Level 4 UG Certificate)
        required: false
        schema:
          type: string
      - name: staffId
        in: query
        description: Returns modules linked to the specified staff member
        required: false
        schema:
          type: string
      - name: subject
        in: query
        description: Returns modules linked to the specified subject code e.g. A300 (Clinical Medicine)
        required: false
        schema:
          type: string
      - name: language
        in: query
        description: Returns modules linked to the specified lenguage
        required: false
        schema:
          type: string
      - name: type
        in: query
        description: 'Filters modules by programme type. Accepted values: P (Postgraduate), R (Research) or U (Undergraduate).
          (Note: This parameter is case sensitive.)'
        required: false
        schema:
          type: string
      - name: limit
        in: query
        description: Number of modules to return
        required: false
        schema:
          type: integer
          default: 500
      - name: offset
        in: query
        description: Offset of modules to return
        required: false
        schema:
          type: integer
      - name: sort
        in: query
        description: Sorts the data by column name, use "-" for descending
        required: false
        schema:
          type: string
      responses:
        '200':
          description: List all module occurrences
          content:
            application/json:
              schema:
                required:
                - data
                - meta
                properties:
                  data:
                    type: object
                    properties:
                      modules:
                        type: array
                        items:
                          type: object
                          properties:
                            dateOflastClass:
                              type: string
                            code:
                              type: string
                            dateOfFirstClass:
                              type: string
                            level:
                              type: object
                              properties:
                                code:
                                  type: string
                                name:
                                  type: string
                            year:
                              type: string
                            subject:
                              type: object
                              properties:
                                code:
                                  type: string
                                name:
                                  type: string
                            language:
                              type: string
                            occurrence:
                              type: string
                            type:
                              type: string
                            noOfPeriods:
                              type: integer
                            moduleLeader:
                              type: object
                              properties:
                                forename:
                                  type: string
                                surname:
                                  type: string
                                fullName:
                                  type: string
                                title:
                                  type: string
                                staffId:
                                  type: string
                                username:
                                  type: string
                                email:
                                  type: string
                            collaborators:
                              type: array
                              items:
                                type: object
                                properties:
                                  forename:
                                    type: string
                                  surname:
                                    type: string
                                  fullName:
                                    type: string
                                  title:
                                    type: string
                                  staffId:
                                    type: string
                                  username:
                                    type: string
                                  email:
                                    type: string
                                  role:
                                    type: string
                            credits:
                              type: integer
                            school:
                              type: object
                              properties:
                                parent:
                                  type: string
                                code:
                                  type: string
                                name:
                                  type: string
                            name:
                              type: string
                            welshPerc:
                              type: integer
                          required:
                          - code
                          - collaborators
                          - credits
                          - language
                          - moduleLeader
                          - name
                          - noOfPeriods
                          - type
                  meta:
                    $ref: '#/components/schemas/Meta'
      security:
      - default: []
      x-auth-type: Application
  /learn-occurrences:
    get:
      tags:
      - Occurrences
      summary: List all module occurrences in LEARN
      description: This endpoint returns a list of module occurrences in LEARN available with the University.
      parameters:
      - name: year
        in: query
        description: Academic year filter, defaults to current year. Defaults to current year
        required: false
        schema:
          type: string
      - name: school
        in: query
        description: Returns modules linked to the specified school code e.g. SOCSI (Social Sciences)
        required: false
        schema:
          type: string
      - name: level
        in: query
        description: Returns modules linked to the specified level code e.g. L4 (Level 4 UG Certificate)
        required: false
        schema:
          type: string
      - name: staffId
        in: query
        description: Returns modules linked to the specified staff member
        required: false
        schema:
          type: string
      - name: subject
        in: query
        description: Returns modules linked to the specified subject code e.g. A300 (Clinical Medicine)
        required: false
        schema:
          type: string
      - name: language
        in: query
        description: Returns modules linked to the specified lenguage
        required: false
        schema:
          type: string
      - name: type
        in: query
        description: 'Filters modules by programme type. Accepted values: P (Postgraduate), R (Research) or U (Undergraduate).
          (Note: This parameter is case sensitive.)'
        required: false
        schema:
          type: string
      - name: limit
        in: query
        description: Number of modules to return
        required: false
        schema:
          type: integer
          default: 500
      - name: offset
        in: query
        description: Offset of modules to return
        required: false
        schema:
          type: integer
      - name: sort
        in: query
        description: Sorts the data by column name, use "-" for descending
        required: false
        schema:
          type: string
      responses:
        '200':
          description: List all module occurrences in LEARN
          content:
            application/json:
              schema:
                required:
                - data
                - meta
                properties:
                  data:
                    type: object
                    properties:
                      modules:
                        type: array
                        items:
                          type: object
                          properties:
                            dateOflastClass:
                              type: string
                            code:
                              type: string
                            dateOfFirstClass:
                              type: string
                            level:
                              type: object
                              properties:
                                code:
                                  type: string
                                name:
                                  type: string
                            year:
                              type: string
                            subject:
                              type: object
                              properties:
                                code:
                                  type: string
                                name:
                                  type: string
                            language:
                              type: string
                            occurrence:
                              type: string
                            type:
                              type: string
                            noOfPeriods:
                              type: integer
                            moduleLeader:
                              type: object
                              properties:
                                forename:
                                  type: string
                                surname:
                                  type: string
                                fullName:
                                  type: string
                                title:
                                  type: string
                                staffId:
                                  type: string
                                username:
                                  type: string
                                email:
                                  type: string
                            collaborators:
                              type: array
                              items:
                                type: object
                                properties:
                                  forename:
                                    type: string
                                  s

# --- truncated at 32 KB (48 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/cardiff/refs/heads/main/openapi/cardiff-modules.yaml