| name | type | description | constraints |
|---|---|---|---|
| Authorization | header | Bearer token, see https://dev.d4science.org/how-to-access-resources | |
| id | path | ||
| reduceBody | query | int |
| media type | data type | description |
|---|---|---|
| application/json | MessageList (JSON) |
GET /messages/inbox
Content-Type: */*
Accept: application/json
Authorization: ...
...
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" : "..."
} ]
}
| 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 |
| media type | data type |
|---|---|
| application/x-www-form-urlencoded | (custom) |
| media type | data type | description |
|---|---|---|
| application/json | string (JSON) |
POST /messages/send
Content-Type: application/x-www-form-urlencoded
Accept: application/json
Authorization: ...
...
HTTP/1.1 201 Created
Content-Type: application/json
...
| name | type | description | constraints |
|---|---|---|---|
| Authorization | header | Bearer token, see https://dev.d4science.org/how-to-access-resources | |
| id | path | ||
| reduceBody | query | int |
| media type | data type | description |
|---|---|---|
| application/json | MessageList (JSON) |
GET /messages/sent
Content-Type: */*
Accept: application/json
Authorization: ...
...
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" : "..."
} ]
}
| name | type | description |
|---|---|---|
| Authorization | header | Bearer token, see https://dev.d4science.org/how-to-access-resources |
| id | path |
DELETE /messages/{id}
Content-Type: */*
Authorization: ...
...
HTTP/1.1 204 No Content
| name | type | description |
|---|---|---|
| Authorization | header | Bearer token, see https://dev.d4science.org/how-to-access-resources |
| id | path |
| media type | data type | description |
|---|---|---|
| application/json | Message (JSON) |
GET /messages/{id}
Content-Type: */*
Accept: application/json
Authorization: ...
...
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" : "..."
}
| name | type | description |
|---|---|---|
| Authorization | header | Bearer token, see https://dev.d4science.org/how-to-access-resources |
| id | path |
| media type | data type | description |
|---|---|---|
| application/json | ItemList (JSON) |
GET /messages/{id}/attachments
Content-Type: */*
Accept: application/json
Authorization: ...
...
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" : "..."
} ]
}
| name | type | description |
|---|---|---|
| Authorization | header | Bearer token, see https://dev.d4science.org/how-to-access-resources |
| id | path | |
| prop | path |
| media type | data type |
|---|---|
| application/json | object (JSON) |
PUT /messages/{id}/{prop}
Content-Type: application/json
Authorization: ...
...
HTTP/1.1 204 No Content