Skip to content

Items⚓︎

An item is a chronological representation of an interaction with a user.

Endpoint⚓︎

GET /api/data/{queue}/{number}

Parameters⚓︎

Name Value
queue The queue of the item.
number The number of the item.

Query String Options⚓︎

Name Description Possible Values
headers_only When "True", only meta data will be loaded. When "False" content will be parsed. (Defaults to "False".) "True" | "False"

Return Codes⚓︎

Code Description
200 - Ok On success.
404 - Not Found When the Item does not exist.
500 - Internal Service Error On failure.

Properties⚓︎

Item.assigned_to:⚓︎

Type Description
String The Purdue career account alias of the person this item is assigned to.

Example

console.log(Item.assigned_to)
// Expexted Output
"sundeep"

Item.building⚓︎

Type Description
String The building a particular Item is related to.

Example

console.log(Item.building)
// Expexted Output
"ME"

Item.content⚓︎

Type Description
Array<Object> A chronological array of objects representing 1 of 9 possible actions taken on an item.

Possible Actions

Directory Information

Information about the user info collected from ECNDB including but not limited to alias, phone number and office location.

Properties
Key Value
type directory_information
Name The real name of the sender.
Login The career account alias of the sender.
Computer The computer the item is related to. Formatting may vary.
Location Where the computer is located.
Email The email address of the sender.
Phone The phone number of the sender.
Office The office location of the sender.
UNIX Dir The home directory for the user on non-Windows systems
Zero Dir The home directory for the user via Active Directory
User ECNDB Link to the sender's username report in ECNDB
Host ECNDB Link to the computer report in ECNDB
Subject The subject of the email sent to the queue
Parsed Example
{
    "type": "directory_information",
    "Name": "Nestor Fabian Rodriguez Buitrago",
    "Login": "rodri563",
    "Computer": "ce-205-38 (128.46.205.67)",
    "Location": "HAMP G230",
    "Email": "rodri563@purdue.edu",
    "Phone": "7654766893",
    "Office": "HAMP G230",
    "UNIX Dir": "/home/bridge/b/rodri563",
    "Zero Dir": "U=\\\\bridge.ecn.purdue.edu\\rodri563",
    "User ECNDB": "http://eng.purdue.edu/jump/2e8399a",
    "Host ECNDB": "http://eng.purdue.edu/jump/2e83999",
    "Subject": "Autocad installation"
}
Initial Message

The body of the email the item originated from.

Properties
Key Value
type initial_message
datetime RFC 8061 formatted datetime string.
from_name The sender's real name. Formatting may vary. This can be empty.
from_email The sender's email address.
to A list of names(s) and email(s) of people this message was sent to.
cc A list of name(s) and email(s) of people who were CC'd. This can be empty.
subject The subject of the initial message.
content The content of the message as an list of strings.
Parsed Example
{
    "type": "initial_message",
    "datetime": "2020-09-11T01:26:45+00:00",
    "from_name": "Justin Campbell",
    "from_email": "campb303@purdue.edu",
    "to": [
        { "name": "John Doe", "email": "johndoe@example.com" },
    ],
    "cc": [
        { "name": "", "email": "janesmith@example.com" }
    ],
    "subject": Maps to item.subject,
    "content": [
        "I need some help with something.\n"
    ]
}
Edit

Information added by someone at ECN, usually for internal use and/or communication.

Properties
Key Value
type edit
datetime RFC 8061 formatted datetime string.
by The career account alias of the person who added the edit.
content The content of the edit as a list of strings.
Parsed Example
{
    "type": "edit",
    "datetime": "2020-04-22T16:39:51",
    "by": "knewell",
    "content": [
        "This is related to another item. I need to do X next.\n"
    ]
}
Status

A short message about the progress of the item.

Properties
Key Value
type status
datetime RFC 8061 formatted datetime string.
by The career account alias of the person who updated the status.
content The content of the status as a list of strings.
Parsed Example
{
    "type": "status",
    "datetime": "2020-04-23T10:35:47",
    "by": "knewell",
    "content": [
        "Doing X thing."
    ]
}
Assignment

Assigning the item to someone.

Properties
Key Value
type assignment
datetime RFC 8061 formatted datetime string.
by The career account alias of the person who changed the
to The career account alias of the person who the item was assigned to.
Parsed Example
{
    "type": "assignment",
    "datetime": "2020-06-23T13:27:00",
    "by": "harley",
    "to": "campb303",
}
Reply To User

A message from ECN to the user and/or related parties.

Properties
Key Value
type reply_to_user
datetime RFC 8061 formatted datetime string.
by The sender's real name. Formatting may vary. This can be empty.
content The content of the message as an list of strings
Parsed Example
{
    "type": "reply_to_user",
    "datetime": "2020-05-08T09:21:43",
    "by": "ewhile",
    "content": [
        "Sascha,\n",
        "\n",
        "Chicken kevin biltong, flank jowl prosciutto shoulder meatball meatloaf sirloin.\n",
        "\n",
        "Ethan White\n",
        "ECN"
    ]
}
Reply To User

A message from ECN to the user and/or related parties.

Properties
Key Value
type reply_to_user
datetime RFC 8061 formatted datetime string.
by The sender's real name. Formatting may vary. This can be empty.
content The content of the message as an list of strings
Parsed Example
{
    "type": "reply_to_user",
    "datetime": "2020-05-08T09:21:43",
    "by": "ewhile",
    "content": [
        "Sascha,\n",
        "\n",
        "Chicken kevin biltong, flank jowl prosciutto shoulder meatball meatloaf sirloin.\n",
        "\n",
        "Ethan White\n",
        "ECN"
    ]
}
Reply From User

A message from the user and/or related parties.

Properties
Key Value
type reply_from_user
datetime RFC 8061 formatted datetime string.
from_name The sender's real name. Formatting may vary. This can be empty.
from_email The sender's email address.
cc A list of name(s) and email(s) of people who were CC'd. This can be empty.
headers A dictionary of headers from the reply.
subject The subject of the reply.
content The content of the message as an list of strings
Parsed Example
{
    "type": "reply_from_user",
    "datetime": "2020-05-08T13:57:18+00:00",
    "from_name": "Reckowsky, Michael J.",
    "from_email": "mreckowsky@purdue.edu",
    "cc": [
        { "name": "John Doe", "email": "johndoe@example.com" },
        { "name": "", "email": "janesmith@example.com" }
    ],
    "headers" : [
        {
            "type": "Subject", 
            "content": "RE: New Computer Deploy"
        },
        {
            "type": "From", 
            "content": "\"Reckowsky, Michael J.\" <mreckowsky@purdue.edu>"
        },
        {
            "type": "Date", 
            "content": "Fri, 8 May 2020 13:57:17 +0000"
        },
    ],
    "subject": "RE: New Computer Deploy",
    "content": [
        "Ethan,\n",
        "\n",
        "Biltong beef ribs doner chuck, pork chop jowl salami cow filet mignon pork.\n",
        "\n",
        "Mike\n",
    ]
}
Parse Error

An error caused by a malformed delimiter or nested delimiters.

Properties
Key Value
type parse_error
datetime RFC 8061 formatted datetime string.
file_path Full path of the item with the error.
expected Description of what the parser was expecting.
got Line that cause the parse error.
line_num The line number in the item that caused the parse error.
Parsed Example
{
    'type': 'parse_error',
    'datetime': '2020-10-16T10:44:45',
    'file_path': '/home/pier/e/benne238/webqueue2/q-snapshot/aae/2',
    'expected': 'Did not encounter a reply-from-user ending delimiter',
    'got': 'Kris', 
    'line_num': 468
}

Item.date_received⚓︎

Type Description
String An ISO 8601 formatted time string showing the date this item was created.

Example

console.log(Item.date_received)
// Expexted Output
"2021-04-03T00:48:38+00:00"

Item.department⚓︎

Type Description
String The most recent department for this item.

Example

console.log(Item.department)
// Expexted Output
"Bussiness Office"

Item.headers⚓︎

Type Description
Array<Object> An array of objects containing parsed item headers in type/value pairs.

Example

console.log(Item.headers[0])
// Expexted Output
{ type: "From", content: "\"Campbell, Justin Tyler\" <campb303@purdue.edu>\n"}

Item.is_locked⚓︎

Type Description
Boolean A boolean showing whether or not a lockfile for the item is present.

Example

console.log(Item.is_locked)
// Expexted Output
true

Item.last_updated⚓︎

Type Description
String An ISO 8601 formatted time string showing the last time the file was updated according to the filesystem.

Example

console.log(Item.last_updated)
// Expected Output
"2021-04-03T00:48:38+00:00"

Item.number⚓︎

Type Description
Number The indentifying number of the queue item.

Example

console.log(Item.number)
// Expected Output
4

Item.path⚓︎

Type Description
String The absolute file path to the Item.

Example

console.log(Item.path)
// Expected Output
"/home/pier/e/queue/Mail/ce/1"

Item.priority:⚓︎

Type Description
String The most recent priority for this item.

Example

console.log(Item.priority)
// Expexted Output
"COVID"

Item.queue:⚓︎

Type Description
String The queue the Item is in.

Example

console.log(Item.queue)
// Expexted Output
"ce"

Item.status⚓︎

Type Description
String The most recent status update for the item.

Example

console.log(Item.status)
// Expexted Output
"Waiting for Reply"

Item.subject:⚓︎

Type Description
String The subject of the original message for this item.

Example

console.log(Item.subject)
// Expexted Output
"Can't Access Outlook"

Item.user_alias:⚓︎

Type Description
String The Purdue career account alias of the person this item is from.

Example

console.log(Item.user_alias)
// Expexted Output
"campb303"

Item.user_email⚓︎

Type Description
String The email address of the person who this item is from.

Example

console.log(Item.user_email)
// Expexted Output
"campb303@purdue.edu"

Item.user_name⚓︎

Type Description
String The real name of the person who this item is from.

Example

console.log(Item.user_name)
// Expexted Output
"Justin Campbell"