D4Science D4Science Don't have a D4Science account? Create one Could not find what you are looking for? Contact us.

MessageManager Resource

GET /messages/inbox

Request Parameters
name type description constraints
Authorization header Bearer token, see https://dev.d4science.org/how-to-access-resources  
id path  
reduceBody query int
Response Body
media type data type description
application/json MessageList (JSON)

Example

Request
GET /messages/inbox
Content-Type: */*
Accept: application/json
Authorization: ...

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "messages" : [ {
    "body" : "...",
    "withAttachments" : true,
    "addresses" : [ "...", "..." ],
    "read" : true,
    "opened" : true,
    "subject" : "...",
    "sender" : {
      "userName" : "...",
      "userId" : "..."
    },
    "creationTime" : 12345,
    "parentPath" : "...",
    "path" : "...",
    "primaryType" : "...",
    "name" : "...",
    "relatedNode" : { },
    "parentId" : "...",
    "id" : "..."
  }, {
    "body" : "...",
    "withAttachments" : true,
    "addresses" : [ "...", "..." ],
    "read" : true,
    "opened" : true,
    "subject" : "...",
    "sender" : {
      "userName" : "...",
      "userId" : "..."
    },
    "creationTime" : 12345,
    "parentPath" : "...",
    "path" : "...",
    "primaryType" : "...",
    "name" : "...",
    "relatedNode" : { },
    "parentId" : "...",
    "id" : "..."
  } ]
}
                
              

POST /messages/send

Request Parameters
name type description multivalued
attachments[] form yes
body form no
subject form no
to[] form yes
Authorization header Bearer token, see https://dev.d4science.org/how-to-access-resources no
id path no
Request Body
media type data type
application/x-www-form-urlencoded (custom)
Response Body
media type data type description
application/json string (JSON)

Example

Request
POST /messages/send
Content-Type: application/x-www-form-urlencoded
Accept: application/json
Authorization: ...

                
...
                
              
Response
HTTP/1.1 201 Created
Content-Type: application/json

                
...
                
              

GET /messages/sent

Request Parameters
name type description constraints
Authorization header Bearer token, see https://dev.d4science.org/how-to-access-resources  
id path  
reduceBody query int
Response Body
media type data type description
application/json MessageList (JSON)

Example

Request
GET /messages/sent
Content-Type: */*
Accept: application/json
Authorization: ...

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "messages" : [ {
    "body" : "...",
    "withAttachments" : true,
    "addresses" : [ "...", "..." ],
    "read" : true,
    "opened" : true,
    "subject" : "...",
    "sender" : {
      "userName" : "...",
      "userId" : "..."
    },
    "creationTime" : 12345,
    "parentPath" : "...",
    "path" : "...",
    "primaryType" : "...",
    "name" : "...",
    "relatedNode" : { },
    "parentId" : "...",
    "id" : "..."
  }, {
    "body" : "...",
    "withAttachments" : true,
    "addresses" : [ "...", "..." ],
    "read" : true,
    "opened" : true,
    "subject" : "...",
    "sender" : {
      "userName" : "...",
      "userId" : "..."
    },
    "creationTime" : 12345,
    "parentPath" : "...",
    "path" : "...",
    "primaryType" : "...",
    "name" : "...",
    "relatedNode" : { },
    "parentId" : "...",
    "id" : "..."
  } ]
}
                
              

DELETE /messages/{id}

Request Parameters
name type description
Authorization header Bearer token, see https://dev.d4science.org/how-to-access-resources
id path

Example

Request
DELETE /messages/{id}
Content-Type: */*
Authorization: ...

                
...
                
              
Response
HTTP/1.1 204 No Content

              

GET /messages/{id}

Request Parameters
name type description
Authorization header Bearer token, see https://dev.d4science.org/how-to-access-resources
id path
Response Body
media type data type description
application/json Message (JSON)

Example

Request
GET /messages/{id}
Content-Type: */*
Accept: application/json
Authorization: ...

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "body" : "...",
  "withAttachments" : true,
  "addresses" : [ "...", "..." ],
  "read" : true,
  "opened" : true,
  "subject" : "...",
  "sender" : {
    "userName" : "...",
    "userId" : "..."
  },
  "creationTime" : 12345,
  "parentPath" : "...",
  "path" : "...",
  "primaryType" : "...",
  "name" : "...",
  "relatedNode" : { },
  "parentId" : "...",
  "id" : "..."
}
                
              

GET /messages/{id}/attachments

Request Parameters
name type description
Authorization header Bearer token, see https://dev.d4science.org/how-to-access-resources
id path
Response Body
media type data type description
application/json ItemList (JSON)

Example

Request
GET /messages/{id}/attachments
Content-Type: */*
Accept: application/json
Authorization: ...

                
...
                
              
Response
HTTP/1.1 200 OK
Content-Type: application/json

                
{
  "itemlist" : [ {
    "lastModificationTime" : 12345,
    "externalManaged" : true,
    "accounting" : {
      "entries" : [ { }, { } ]
    },
    "owner" : "...",
    "lastAction" : "MOVED",
    "locked" : true,
    "publicItem" : true,
    "trashed" : true,
    "creationTime" : 12345,
    "description" : "...",
    "ownerNode" : {
      "userName" : "...",
      "userId" : "..."
    },
    "hidden" : true,
    "lastModifiedBy" : "...",
    "shared" : true,
    "title" : "...",
    "metadata" : {
      "map" : {
        "property1" : { },
        "property2" : { }
      }
    },
    "parentPath" : "...",
    "path" : "...",
    "primaryType" : "...",
    "name" : "...",
    "relatedNode" : { },
    "parentId" : "...",
    "id" : "..."
  }, {
    "lastModificationTime" : 12345,
    "externalManaged" : true,
    "accounting" : {
      "entries" : [ { }, { } ]
    },
    "owner" : "...",
    "lastAction" : "CREATED",
    "locked" : true,
    "publicItem" : true,
    "trashed" : true,
    "creationTime" : 12345,
    "description" : "...",
    "ownerNode" : {
      "userName" : "...",
      "userId" : "..."
    },
    "hidden" : true,
    "lastModifiedBy" : "...",
    "shared" : true,
    "title" : "...",
    "metadata" : {
      "map" : {
        "property1" : { },
        "property2" : { }
      }
    },
    "parentPath" : "...",
    "path" : "...",
    "primaryType" : "...",
    "name" : "...",
    "relatedNode" : { },
    "parentId" : "...",
    "id" : "..."
  } ]
}
                
              

PUT /messages/{id}/{prop}

Request Parameters
name type description
Authorization header Bearer token, see https://dev.d4science.org/how-to-access-resources
id path
prop path
Request Body
media type data type
application/json object (JSON)

Example

Request
PUT /messages/{id}/{prop}
Content-Type: application/json
Authorization: ...

                
...
                
              
Response
HTTP/1.1 204 No Content