-
Notifications
You must be signed in to change notification settings - Fork 0
RESTful API Documentation
Fetch an array of all User objects.
-
type=ALL_USERS
All User objects in a JSON list.
POST HTTP/1.1
Host: 127.0.0.1:8000
type: ALL_USERS
[
{
"id": {
"root": {
"id": 16,
"uuid": "16"
},
"id": 732592954,
"uuid": "16.732592954"
},
"name": "Satya Nadella",
"creation": {
"date": "Apr 26, 2017 5:41:07 PM",
"unix_date": 1493242867545
}
},
{
"id": {
"root": {
"id": 16,
"uuid": "16"
},
"id": -1782484030,
"uuid": "16.2512483266"
},
"name": "George P. Burdell",
"creation": {
"date": "Apr 26, 2017 5:39:08 PM",
"unix_date": 1493242748383
}
}
]Fetch an array of User objects given their UUIDs.
-
type=GET_USERS -
uuids= [list,of,uuids]
User objects in a JSON list. If a provided UUID does not map to a user, it does not contribute to the response array.
GET HTTP/1.1
Host: 127.0.0.1:8000
type: GET_USERS
uuids: [16.732592954]
[
{
"id": {
"root": {
"id": 16,
"uuid": "16"
},
"id": 732592954,
"uuid": "16.732592954"
},
"name": "Satya Nadella",
"creation": {
"date": "Apr 26, 2017 5:41:07 PM",
"unix_date": 1493242867545
}
}
]Fetch an array of Conversation objects given their UUIDs.
-
type=GET_CONVERSATIONS -
uuids= [list,of,uuids]
Conversation objects in a JSON list. If a provided UUID does not map to a conversation, it does not contribute to the response array.
GET HTTP/1.1
Host: 127.0.0.1:8000
type: GET_CONVERSATIONS
uuids: [16.3020133850]
[
{
"id": {
"root": {
"id": 16,
"uuid": "16"
},
"id": -1274833446,
"uuid": "16.3020133850"
},
"owner": {
"root": {
"id": 16,
"uuid": "16"
},
"id": -1782484030,
"uuid": "16.2512483266"
},
"creation": {
"date": "Apr 26, 2017 5:43:48 PM",
"unix_date": 1493243028040
},
"title": "Georgia Tech",
"users": [],
"firstMessage": {
"id": 0,
"uuid": "0"
},
"lastMessage": {
"id": 0,
"uuid": "0"
}
}
]Fetch an array of Conversation objects given a regex pattern to match their titles.
-
type=FIND_CONVERSATIONS -
filter= some regex pattern as string
Matching Conversation objects in a JSON list. If the filter does not match, you will receive an empty array.
GET HTTP/1.1
Host: 127.0.0.1:8000
type: FIND_CONVERSATIONS
filter: .*soft.*
[
{
"id": {
"root": {
"id": 16,
"uuid": "16"
},
"id": -436886707,
"uuid": "16.3858080589"
},
"owner": {
"root": {
"id": 16,
"uuid": "16"
},
"id": 732592954,
"uuid": "16.732592954"
},
"creation": {
"date": "Apr 26, 2017 5:53:54 PM",
"unix_date": 1493243634409
},
"title": "Microsoft",
"users": [],
"firstMessage": {
"id": 0,
"uuid": "0"
},
"lastMessage": {
"id": 0,
"uuid": "0"
}
}
]Fetch an array of Conversation objects created between a given date range.
-
type=TIMED_CONVERSATIONS -
from= earliest creation date, provided as a Unix time stamp in milliseconds. -
to= latest creation date, provided as a Unix time stamp in milliseconds.
Matching Conversation objects in a JSON list. If no conversations were created in the given time frame, you will receive an empty array.
GET HTTP/1.1
Host: 127.0.0.1:8000
type: FIND_CONVERSATIONS
from: 1493243810000
to: 1493243851526
Fetch an array of Message objects given their UUIDs.
-
type=GET_MESSAGES -
uuids= [list,of,uuids]
Message objects in a JSON list. If a provided UUID does not map to a message, it does not contribute to the response array.
GET HTTP/1.1
Host: 127.0.0.1:8000
type: GET_MESSAGES
uuids: [16.2305306822]
[
{
"id": {
"root": {
"id": 16,
"uuid": "16"
},
"id": -1989660474,
"uuid": "16.2305306822"
},
"previous": {
"id": 0,
"uuid": "0"
},
"creation": {
"date": "Apr 26, 2017 6:02:55 PM",
"unix_date": 1493244175713
},
"author": {
"root": {
"id": 16,
"uuid": "16"
},
"id": 732592954,
"uuid": "16.732592954"
},
"content": "Why doesn't Steve Ballmer let me ride the elevator with him?",
"next": {
"id": 0,
"uuid": "0"
}
}
]Fetch an array of Conversation objects created between a given date range.
-
type=TIMED_MESSAGES -
conversation=UUID.as.string(The conversation to insert this message into) -
from= earliest creation date, provided as a Unix time stamp in milliseconds. -
to= latest creation date, provided as a Unix time stamp in milliseconds.
Matching Message objects in a JSON list. If no messages were created in the given time frame, you will receive an empty array.
GET HTTP/1.1
Host: 127.0.0.1:8000
type: TIMED_MESSAGES
conversation: 16.3858080589
from: 1493243810000
to: 1493243851526
Fetch an array of Message objects which are chained together.
-
type=RANGED_MESSAGES -
root_message=UUID.as.string, the message to start at during traversal. -
range=int, the number of steps to take on the chain for inclusion in results. If this number is negative, traversal occurs backwards in the chain.
Matching Conversation objects in a JSON list. If no conversations were created in the given time frame, you will receive an empty array.
GET HTTP/1.1
Host: 127.0.0.1:8000
type: RANGED_MESSAGES
root_message: 16.2305306822
range: -5
Adds a new user to the server.
-
type=NEW_USER
The username you want to register as a raw body.
The new User object in JSON.
POST HTTP/1.1
Host: 127.0.0.1:8000
type: NEW_USER
George P. Burdell
{
"id": {
"root": {
"id": 16,
"uuid": "16"
},
"id": -1782484030,
"uuid": "16.2512483266"
},
"name": "George P. Burdell",
"creation": {
"date": "Apr 26, 2017 5:39:08 PM",
"unix_date": 1493242748383
}
}Adds a new conversation to the server.
-
type=NEW_CONVERSATION -
owner=UUID.as.string
The title of the conversation you want to create as a raw body.
The new Conversation object in JSON.
POST HTTP/1.1
Host: 127.0.0.1:8000
type: NEW_CONVERSATION
owner: 16.2512483266
Georgia Tech
{
"id": {
"root": {
"id": 16,
"uuid": "16"
},
"id": -1274833446,
"uuid": "16.3020133850"
},
"owner": {
"root": {
"id": 16,
"uuid": "16"
},
"id": -1782484030,
"uuid": "16.2512483266"
},
"creation": {
"date": "Apr 26, 2017 5:43:48 PM",
"unix_date": 1493243028040
},
"title": "Georgia Tech",
"users": [],
"firstMessage": {
"id": 0,
"uuid": "0"
},
"lastMessage": {
"id": 0,
"uuid": "0"
}
}Adds a new message to the server.
-
type=NEW_MESSAGE -
author=UUID.as.string -
conversation=UUID.as.string
The content of the message you want to create as a raw body.
The new Message object in JSON.
POST HTTP/1.1
Host: 127.0.0.1:8000
type: NEW_MESSAGE
author: 16.732592954
conversation: 16.3858080589
Why doesn't Steve Ballmer let me ride the elevator with him?
{
"id": {
"root": {
"id": 16,
"uuid": "16"
},
"id": -1989660474,
"uuid": "16.2305306822"
},
"previous": {
"id": 0,
"uuid": "0"
},
"creation": {
"date": "Apr 26, 2017 6:02:55 PM",
"unix_date": 1493244175713
},
"author": {
"root": {
"id": 16,
"uuid": "16"
},
"id": 732592954,
"uuid": "16.732592954"
},
"content": "Why doesn't Steve Ballmer let me ride the elevator with him?",
"next": {
"id": 0,
"uuid": "0"
}
}