Skip to content

Configuring departments

One instance of Awesign can support multiple departments within an organization.

Departments have general information about them and a reference to an API endpoint that provides a directory of people in the department.

A sample configuration looks like this:

data_sources:
  departments:
    - name: cse
      display_name: CSE
      formal_name: Department of Computer Science and Engineering
      banner_image: /tenant/department-banners/cse.png
      room_reservation_contact: contact@example.com
      room_reservation_url: https://example.com/reserve-room
      directory:
        url: https://example.com/path/to/directory/api/endpoint
        method: GET
        headers:
          my-header: my-value
  • name is a unique identifier for the department
  • display_name and formal_name are used in various places throughout the UI and on signs
  • banner_image is the absolute path for the department's wide banner image.
    • It MUST start with a slash!
    • This is displayed on the status bar of various signs.
    • It's conventionally within the data/tenant/department-banners directory. You'll need to create this directory yourself if you haven't already. The entire data/tenant directory is hosted as a static files directory at /tenant.
  • directory contains a url, method, and optionally headers. This is described below.
  • room_reservation_contact and room_reservation_url are both optional. The contact should be an email address for people to send room reservation requests to. The URL should be to a self-reservation portal. The email address and a QR code containing the URL will be shown on room reservation signs.

Department directories

Directory data needs to be provided by an external API. You can specify the URL, method (GET, OPTIONS, HEAD, POST, PUT, PATCH, or DELETE), and optionally any HTTP headers you want to send. Awesign will occasionally request the directory and cache the result to avoid excessive requests to your API.

Your API must provide the directory as JSON in the following format:

{
  "people": [
    {
      "first_name": "string",
      "last_name": "string",
      "prefix": "string",
      "suffix": "string",
      "username": "string",
      "email": "string",
      "directory_title": "string",
      "building_name": "string",
      "room_number": "string",
      "desk_number": "string",
      "is_faculty": 0,
      "is_staff": 0,
      "is_student": 0
    }
  ],
  "highlight_people": [
    {
      "first_name": "string",
      "last_name": "string",
      "title": "string",
      "email": "string"
    }
  ]
}

Everyone in people will be sorted according to the user on the interactive directory sign, and filtered to a particular room for a department room directory sign.

All fields are required except for:

  • prefix
  • suffix
  • directory_title

The people listed in highlight_people will be included at the top of the department directory sign in the order provided. Their email must match one of the emails in people to associate the highlight person with their full details. The first_name, last_name, and title you provide here will override the one retrieved from the API.