Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Messaging Service

...

Messaging Service

...

Anchor
createMessage
createMessage

Create a new message for an user
Deck of Cards
idbimCreateMessage
Card
defaulttrue
labelURL / Resource / JSON Structure
Resource: messages 

URLhttps://api-stage.bimplus.net/v2/messages

Examplehttps://api-stage.bimplus.net/v2/messages

JSON Structure

Name

Mandatory / Optional

Type

Description

id

will be ignored

string

Id of the message

receiver

mandatory

object

receiver user object (contains id & email)

senderoptionalobjectsender user object (contains id & email)
idmandatorystring(guid)id of the user
emailmandatorystringemail id of the user

source

mandatory

string

Source of the message (eg: Import Service)

topic

mandatory

string

Topic of the message

severity

mandatory

object

Severity can be Info, Warning, Error

returnCode

mandatory

string

Readable return code

timestampwill be ignoredstringCreation date of the message
unreadmandatorybooleanWhether the message was unread
additionalDataoptionalstringExtra info
correlationIdoptionalguidId of the other related message
Card
labelHTTP Method
 POST
Card
labelDescription
 Create a new message for an user.
Card
labelRequest
Code Block
borderColorGreen
titleHeaders
langxml
Authorization: BimPlus 9c1874a62c974dcfa75e0132c423a088
Content-Type: application/json
Code Block
borderColorRed
titleJSON
langxml
{
    "id": "4633d522-53aa-4d81-90b4-704681e0573d",
    "sender": {
            "id": "1110ac3b-fa49-e540-ac2f-8caff3dd72ed",
            "email": "customer1@bimplus.net"
    },
    "receiver": {
            "id": "1e2223b-fa49-e540-ac2f-8caff3dd72ed",
            "email": "customer2@bimplus.net"
    },
    "source": "ServiceName",
    "topic": "SKETCHUP_JOB",
    "severity": "Warn",
    "returncode": "FILE_TOO_BIG",
    "unread": false,
    "timestamp": "2013-11-15T10:55:53"
}
Card
labelResponse
Code Block
borderColorGreen
titleStatus
langxml
Status: 201 Created

Anchor
getMessageList
getMessageList

Get the message list of the current user
Deck of Cards
idbimGetCurrentMessageList
Card
defaulttrue
labelURL / Resource / JSON Structure
Resource: user/<user_id>/messages 

URLhttps://api-stage.bimplus.net/v2/user/<user_id>/messages

Examplehttps://api-stage.bimplus.net/v2/user/123456789/messages

Card
labelHTTP Method
 GET
Card
labelDescription
 Gets the message list of the current user
Card
labelRequest
Code Block
borderColorGreen
titleHeaders
langxml
Authorization: BimPlus 9c1874a62c974dcfa75e0132c423a088
Content-Type: application/json
Card
labelResponse
Code Block
borderColorGreen
titleStatus
langxml
Status: 200 OK
Code Block
borderColorRed
titleJSON
langxml
[
    {
        "id": "481713d6-7dab-410c-8c8a-d65ff1d4a766",
        "sender": {
            "id": "1110ac3b-fa49-e540-ac2f-8caff3dd72ed",
            "email": "customer1@bimplus.net"
        },
        "receiver": {
            "id": "1e2223b-fa49-e540-ac2f-8caff3dd72ed",
            "email": "customer2@bimplus.net"
        },
        "source": "ServiceName2",
        "topic": "SKETCHUP_JOB",
        "severity": "Info",
        "returncode": "FILE_TOO_BIG",
        "timestamp": "2013-11-18T14:55:22",
        "unread": false,
        "additionaldata": null,
        "correlationid": null
    },
    {
        "id": "93c29c5d-1391-4ae8-8876-ef9815e60f7d",
        "sender": {
            "id": "1110ac3b-fa49-e540-ac2f-8caff3dd72ed",
            "email": "customer1@bimplus.net"
        },
        "receiver": {
            "id": "1e2223b-fa49-e540-ac2f-8caff3dd72ed",
            "email": "customer2@bimplus.net"
        },
        "source": "ServiceName",
        "topic": "IFC_JOB",
        "severity": "Info",
        "returncode": "OK",
        "timestamp": "2013-11-18T14:30:53",
        "unread": true,
        "additionaldata": null,
        "correlationid": null
    }
]

Anchor
getMessageListOfAll
getMessageListOfAll

Get the message list of all the users
Deck of Cards
idbimGetMessageListOfAll
Card
defaulttrue
labelURL / Resource / JSON Structure
Resource: messages 

URLhttps://api-stage.bimplus.net/v2/user/messages

Examplehttps://api-stage.bimplus.net/v2/messages

Card
labelHTTP Method
 GET
Card
labelDescription
 Gets the message list of the current user
Card
labelRequest
Code Block
borderColorGreen
titleHeaders
langxml
Authorization: BimPlus 9c1874a62c974dcfa75e0132c423a088
Content-Type: application/json
Card
labelResponse
Code Block
borderColorGreen
titleStatus
langxml
Status: 200 OK
Code Block
borderColorRed
titleJSON
langxml
[
    {
        "id": "481713d6-7dab-410c-8c8a-d65ff1d4a766",
        "sender": {
            "id": "1110ac3b-fa49-e540-ac2f-8caff3dd72ed",
            "email": "customer1@bimplus.net"
        },
        "receiver": {
            "id": "1e2223b-fa49-e540-ac2f-8caff3dd72ed",
            "email": "customer2@bimplus.net"
        },
        "source": "ServiceName2",
        "topic": "SKETCHUP_JOB",
        "severity": "Info",
        "returncode": "FILE_TOO_BIG",
        "timestamp": "2013-11-18T14:55:22",
        "unread": false,
        "additionaldata": null,
        "correlationid": null
    },
    {
        "id": "93c29c5d-1391-4ae8-8876-ef9815e60f7d",
        "sender": {
            "id": "1110ac3b-fa49-e540-ac2f-8caff3dd72ed",
            "email": "customer1@bimplus.net"
        },
        "receiver": {
            "id": "1e2223b-fa49-e540-ac2f-8caff3dd72ed",
            "email": "customer3@bimplus.net"
        },
        "source": "ServiceName",
        "topic": "IFC_JOB",
        "severity": "Info",
        "returncode": "OK",
        "timestamp": "2013-11-18T14:30:53",
        "unread": true,
        "additionaldata": null,
        "correlationid": null
    }
]

Anchor
getMessage
getMessage

Get information about a specified message
Deck of Cards
idbimGetMessage
Card
defaulttrue
labelURL / Resource / JSON Structure
Resource: messages 

URLhttps://api-stage.bimplus.net/v2/messages/<message_id>

Examplehttps://api-stage.bimplus.net/v2/messages/<message_id>


Card
labelHTTP Method
 GET
Card
labelDescription
 Get information about a specified message
Card
labelRequest
Code Block
borderColorGreen
titleHeaders
langxml
Authorization: BimPlus 9c1874a62c974dcfa75e0132c423a088
Content-Type: application/json
Card
labelResponse
Code Block
borderColorGreen
titleStatus
langxml
Status: 200 OK
Code Block
borderColorRed
titleJSON
langxml
{
    "id": "93c29c5d-1391-4ae8-8876-ef9815e60f7d",
    "sender": {
            "id": "1110ac3b-fa49-e540-ac2f-8caff3dd72ed",
            "email": "customer1@bimplus.net"
    },
    "receiver": {
            "id": "1e2223b-fa49-e540-ac2f-8caff3dd72ed",
            "email": "customer2@bimplus.net"
    },
    "source": "ServiceName",
    "topic": "IFC_JOB",
    "severity": "Info",
    "returncode": "OK",
    "timestamp": "2013-11-18T14:30:53",
    "unread": true,
    "additionaldata": null,
    "correlationid": null
}

Anchor
deleteMessage
deleteMessage

Delete the specified message
Deck of Cards
idbimDeleteMessage
Card
defaulttrue
labelURL / Resource / JSON Structure
Resource: messages/<message_id> 

URLhttps://api-stage.bimplus.net/v2/messages/<message_id>

Examplehttps://api-stage.bimplus.net/v2/messages/<message_id>

Card
labelHTTP Method
 DELETE
Card
labelDescription
 Delete the specified message.
Card
labelRequest
Code Block
borderColorGreen
titleHeaders
langxml
Authorization: BimPlus 9c1874a62c974dcfa75e0132c423a088
Content-Type: application/json
Card
labelResponse
Code Block
borderColorGreen
titleStatus
langxml
Status: 200 OK

Anchor
messageRead
messageRead

Mark a message as "read"
Deck of Cards
idbimMessageRead
Card
defaulttrue
labelURL / Resource / JSON Structure
Resource: messages/<message_id>/markasread 

URLhttps://api-stage.bimplus.net/v2/messages/<message_id>/markasread 

Examplehttps://api-stage.bimplus.net/v2/messages/<message_id>/markasread

Card
labelHTTP Method
 POST
Card
labelDescription
 Mark a message as read.
Card
labelRequest
Code Block
borderColorGreen
titleHeaders
langxml
Authorization: BimPlus 9c1874a62c974dcfa75e0132c423a088
Content-Type: application/json
Card
labelResponse
Code Block
borderColorGreen
titleStatus
langxml
Status: 200 OK

Anchor
messageFilter
messageFilter

Filter the messages (eg: Get all the unread messages from a particular user)
Deck of Cards
idbimGetMessageList
Card
defaulttrue
labelURL / Resource / JSON Structure
Resource: messages?filter=<property><operator><value>%26<property><operator><value>%26....

URLhttps://api-stage.bimplus.net/v2/messages?filter=unread=true%26receiver.email=customer@bimplus.net%26source=IssueService

Examplehttps://api-stage.bimplus.net/v2/messages?filter=unread=true%26receiver.email=customer@bimplus.net%26source=IssueService

where "%26" is the escape character for "&"

Card
labelHTTP Method
 GET
Card
labelDescription
 Get information about a specified message
Card
labelRequest
Code Block
borderColorGreen
titleHeaders
langxml
Authorization: BimPlus 9c1874a62c974dcfa75e0132c423a088
Content-Type: application/json
Card
labelResponse
Code Block
borderColorGreen
titleStatus
langxml
Status: 200 OK
Code Block
borderColorRed
titleJSON
langxml
[
    {
        "id": "44ad058b-1f76-4343-bafa-031eb462215c",
        "receiver": {
            "id": "71e0ac3b-fa49-e540-ac2f-8caff3dd72ed",
            "email": "customer@bimplus.net"
        },
        "sender": {
            "id": "71e0ac3b-fa49-e540-ac2f-8caff3dd72ed",
            "email": "testuser1@bimplus.net"
        },
        "source": "IssueService",
        "topic": "ISSUE_DELETED",
        "severity": "Info",
        "returnCode": "ISSUE_DELETED",
        "timestamp": "2014-05-09T09:54:17",
        "unread": true,
        "correlationId": null
    },
    {
        "id": "0a4c8eab-26af-49ce-9191-049a141ba762",
        "receiver": {
            "id": "71e0ac3b-fa49-e540-ac2f-8caff3dd72ed",
            "email": "customer@bimplus.net"
        },
        "sender": {
            "id": "71e0ac3b-fa49-e540-ac2f-8caff3dd72ed",
            "email": "testuser1@bimplus.net"
        },
        "source": "IssueService",
        "topic": "ISSUE_UPDATED",
        "severity": "Info",
        "returnCode": "ISSUE_UPDATED",
        "timestamp": "2014-04-08T08:54:41",
        "unread": true,
        "correlationId": "de96f4ae-79fd-4d83-99e9-07cec7a80906"
    },
    {
        "id": "ffd50096-fb82-4029-8d49-06a04e31f02a",
        "receiver": {
            "id": "71e0ac3b-fa49-e540-ac2f-8caff3dd72ed",
            "email": "customer@bimplus.net"
        },
        "sender": {
            "id": "71e0ac3b-fa49-e540-ac2f-8caff3dd72ed",
            "email": "testuser2@bimplus.net"
        },
        "source": "IssueService",
        "topic": "ISSUE_DELETED",
        "severity": "Info",
        "returnCode": "ISSUE_DELETED",
        "timestamp": "2014-05-09T09:54:27",
        "unread": true,       
        "correlationId": null
    }
]