Versions Compared

Key

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

...

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).
When 'Id' is user id, must be defined also 'email' string property with email address of the user. Email will be sent only to this address.
When 'Id' is group id, email will be sent to all users which belongs to this group.

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
unreadEmailoptionalboolean

When 'unreadEmail' is missing the default value is true.
If set to true or default, the message will me marked as an email ( yet unread ), and sent via email service.
If it is set as false the message will be marked as a "read" (collect) email.

unreadBrowserNotificationoptionalboolean

When 'unreadBrowserNotification' is missing the default value is true.
If set to true or default, the message will be marked as browser notification ( yet unread ) and send to the Bimplus portal as popup message.
If it is set as false the message will be marked as a "read" (collect) browser notification.

additionalDataoptionalstringExtra info
correlationIdoptionalguidId of the other related message
Card
labelHTTP Method
 POST
Card
labelDescription
 Create

Create a new message for an user or group of users.
When message is created as 'read' (i.e. unreadBrowserNotification or unreadEmail is set to false), such messages are not sent immediatelly but only collected in server.

Card
labelRequest
Code Block
borderColorGreen
langxml
titleHeaders
Authorization: BimPlus 9c1874a62c974dcfa75e0132c423a088
Content-Type: application/json
Code Block
borderColorRed
langxml
titleJSON
{
    "sender": {
            "id": "1110ac3b-fa49-e540-ac2f-8caff3dd72ed"
    },
    "receiver": {
            "id": "1e2223b-fa49-e540-ac2f-8caff3dd72ed"
    },
    "source": "ServiceName",
    "topic": "SKETCHUP_JOB",
    "severity": "Warn",
    "returncode": "FILE_TOO_BIG",
    "unreadBrowserNotification": true
}
Card
labelResponse
Code Block
borderColorGreen
langxml
titleStatus
Status: 201 Created
Code Block
titleJSON
{
    "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",
    "unreadBrowserNotification": true,
    "timestamp": "2013-11-15T10:55:53"
}

...