Manage the workspace
Get info of an item referred through its path
| name | type | description |
|---|---|---|
| Authorization | header | Bearer token, see https://dev.d4science.org/how-to-access-resources |
| exclude | query | a list of fields to exclude from the returned item Multivalued Optional |
| relPath | query | relative path |
| code | condition |
|---|---|
| 200 | Item retrieved. |
| 406 | Item not found. |
| media type | data type | description |
|---|---|---|
| application/json | ItemWrapper (JSON) | workspace item |
GET /?relPath=folder1/folder2/file.txt&exclude=owner
Content-Type: */*
Accept: application/json
Authorization: ...
...
HTTP/1.1 200 OK
Content-Type: application/json
{
"item" : {
"trashed" : true,
"externalManaged" : true,
"shared" : true,
"locked" : true,
"publicItem" : true,
"title" : "...",
"description" : "...",
"lastModifiedBy" : "...",
"lastModificationTime" : 12345,
"creationTime" : 12345,
"lastAction" : "MOVED",
"hidden" : true,
"ownerNode" : {
"userName" : "...",
"userId" : "..."
},
"accounting" : {
"entries" : [ { }, { } ]
},
"metadata" : {
"map" : {
"property1" : { },
"property2" : { }
}
},
"owner" : "...",
"name" : "...",
"id" : "...",
"path" : "...",
"parentId" : "...",
"primaryType" : "...",
"relatedNode" : { },
"parentPath" : "..."
}
}
Get info on the trash folder
| name | type | description |
|---|---|---|
| Authorization | header | Bearer token, see https://dev.d4science.org/how-to-access-resources |
| exclude | query | a list of fields to exclude from the returned item Multivalued Optional |
| code | condition |
|---|---|
| 200 | Success. |
| media type | data type | description |
|---|---|---|
| application/json | ItemWrapper (JSON) | info on the trash folder |
GET /trash
Content-Type: */*
Accept: application/json
Authorization: ...
...
HTTP/1.1 200 OK
Content-Type: application/json
{
"item" : {
"trashed" : true,
"externalManaged" : true,
"shared" : true,
"locked" : true,
"publicItem" : true,
"title" : "...",
"description" : "...",
"lastModifiedBy" : "...",
"lastModificationTime" : 12345,
"creationTime" : 12345,
"lastAction" : "MOVED",
"hidden" : true,
"ownerNode" : {
"userName" : "...",
"userId" : "..."
},
"accounting" : {
"entries" : [ { }, { } ]
},
"metadata" : {
"map" : {
"property1" : { },
"property2" : { }
}
},
"owner" : "...",
"name" : "...",
"id" : "...",
"path" : "...",
"parentId" : "...",
"primaryType" : "...",
"relatedNode" : { },
"parentPath" : "..."
}
}
Empty the trash folder
| name | type | description |
|---|---|---|
| Authorization | header | Bearer token, see https://dev.d4science.org/how-to-access-resources |
| exclude | query | a list of fields to exclude from the returned item Multivalued Optional |
| code | condition |
|---|---|
| 200 | Trash emptied. |
| media type | data type | description |
|---|---|---|
| text/plain | string | trash folder id |
DELETE /trash/empty
Content-Type: */*
Accept: text/plain
Authorization: ...
...
HTTP/1.1 200 OK
Content-Type: text/plain
5f4b3b4e-4b3b- ... -4b3b4e4b3b4e
Restore a trashed item.
| name | type | description |
|---|---|---|
| destinationId | form | destination folder id |
| trashedItemId | form | item id |
| Authorization | header | Bearer token, see https://dev.d4science.org/how-to-access-resources |
| exclude | query | a list of fields to exclude from the returned item Multivalued Optional |
| media type | data type |
|---|---|
| application/x-www-form-urlencoded | (custom) |
| code | condition |
|---|---|
| 200 | Item restored. |
| 406 | Source or destination item does not exist. |
| 409 | Source and destination are the same item. |
| 415 | Wrong content type. |
| media type | data type | description |
|---|---|---|
| application/json | string (JSON) | id of the restored item |
PUT /trash/restore
Content-Type: application/x-www-form-urlencoded
Accept: application/json
Authorization: ...
trashedId=17dae181-f33c- ... - 3fa22198dd30&destinationId=19863b4e-b33f- ... -5b6d2e0e1eee
...
HTTP/1.1 200 OK
Content-Type: application/json
...
Upload a file in the volatile area
| name | type | description |
|---|---|---|
| file | form | multipart/form-data file parameter, with optional 'filename' and 'size' (see example below) |
| Authorization | header | Bearer token, see https://dev.d4science.org/how-to-access-resources |
| exclude | query | a list of fields to exclude from the returned item Multivalued Optional |
| media type | data type |
|---|---|
| multipart/form-data | (custom) |
| code | condition |
|---|---|
| 200 | File created. |
| 400 | File not provided. |
| 415 | Wrong content type. |
| 500 | Wrong set of parameters. |
| media type | data type | description |
|---|---|---|
| text/plain | string | public link to the created file |
POST /volatile
Content-Type: multipart/form-data
Accept: text/plain
Authorization: ...
--------boundaryString
Content-Disposition: form-data; name="file"; filename="doc.pdf"; size=426018;
Content-Type: application/pdf
(data)
--------boundaryString--
...
HTTP/1.1 200 OK
Content-Type: text/plain
...
Get info on the VRE folder associated to the current token
| name | type | description |
|---|---|---|
| Authorization | header | Bearer token, see https://dev.d4science.org/how-to-access-resources |
| exclude | query | a list of fields to exclude from the returned item Multivalued Optional |
| code | condition |
|---|---|
| 200 | Success. |
| media type | data type | description |
|---|---|---|
| application/json | ItemWrapper (JSON) | VRE folder info |
GET /vrefolder
Content-Type: */*
Accept: application/json
Authorization: ...
...
HTTP/1.1 200 OK
Content-Type: application/json
{
"item" : {
"trashed" : true,
"externalManaged" : true,
"shared" : true,
"locked" : true,
"publicItem" : true,
"title" : "...",
"description" : "...",
"lastModifiedBy" : "...",
"lastModificationTime" : 12345,
"creationTime" : 12345,
"lastAction" : "RENAMED",
"hidden" : true,
"ownerNode" : {
"userName" : "...",
"userId" : "..."
},
"accounting" : {
"entries" : [ { }, { } ]
},
"metadata" : {
"map" : {
"property1" : { },
"property2" : { }
}
},
"owner" : "...",
"name" : "...",
"id" : "...",
"path" : "...",
"parentId" : "...",
"primaryType" : "...",
"relatedNode" : { },
"parentPath" : "..."
}
}
Get a list of recent documents from VRE folders
| name | type | description |
|---|---|---|
| Authorization | header | Bearer token, see https://dev.d4science.org/how-to-access-resources |
| exclude | query | a list of fields to exclude from the returned item Multivalued Optional |
| code | condition |
|---|---|
| 200 | Success. |
| media type | data type | description |
|---|---|---|
| application/json | ItemList (JSON) | list of recent documents |
GET /vrefolder/recents
Content-Type: */*
Accept: application/json
Authorization: ...
...
HTTP/1.1 200 OK
Content-Type: application/json
{
"itemlist" : [ {
"trashed" : true,
"externalManaged" : true,
"shared" : true,
"locked" : true,
"publicItem" : true,
"title" : "...",
"description" : "...",
"lastModifiedBy" : "...",
"lastModificationTime" : 12345,
"creationTime" : 12345,
"lastAction" : "CLONED",
"hidden" : true,
"ownerNode" : {
"userName" : "...",
"userId" : "..."
},
"accounting" : {
"entries" : [ { }, { } ]
},
"metadata" : {
"map" : {
"property1" : { },
"property2" : { }
}
},
"owner" : "...",
"name" : "...",
"id" : "...",
"path" : "...",
"parentId" : "...",
"primaryType" : "...",
"relatedNode" : { },
"parentPath" : "..."
}, {
"trashed" : true,
"externalManaged" : true,
"shared" : true,
"locked" : true,
"publicItem" : true,
"title" : "...",
"description" : "...",
"lastModifiedBy" : "...",
"lastModificationTime" : 12345,
"creationTime" : 12345,
"lastAction" : "CREATED",
"hidden" : true,
"ownerNode" : {
"userName" : "...",
"userId" : "..."
},
"accounting" : {
"entries" : [ { }, { } ]
},
"metadata" : {
"map" : {
"property1" : { },
"property2" : { }
}
},
"owner" : "...",
"name" : "...",
"id" : "...",
"path" : "...",
"parentId" : "...",
"primaryType" : "...",
"relatedNode" : { },
"parentPath" : "..."
} ]
}
Get a list of VRE folders for which the user is member
| name | type | description |
|---|---|---|
| Authorization | header | Bearer token, see https://dev.d4science.org/how-to-access-resources |
| exclude | query | a list of fields to exclude from the returned item Multivalued Optional |
| media type | data type | description |
|---|---|---|
| application/json | ItemList (JSON) | list of VRE folders |
GET /vrefolders
Content-Type: */*
Accept: application/json
Authorization: ...
...
HTTP/1.1 200 OK
Content-Type: application/json
{
"itemlist" : [ {
"trashed" : true,
"externalManaged" : true,
"shared" : true,
"locked" : true,
"publicItem" : true,
"title" : "...",
"description" : "...",
"lastModifiedBy" : "...",
"lastModificationTime" : 12345,
"creationTime" : 12345,
"lastAction" : "MOVED",
"hidden" : true,
"ownerNode" : {
"userName" : "...",
"userId" : "..."
},
"accounting" : {
"entries" : [ { }, { } ]
},
"metadata" : {
"map" : {
"property1" : { },
"property2" : { }
}
},
"owner" : "...",
"name" : "...",
"id" : "...",
"path" : "...",
"parentId" : "...",
"primaryType" : "...",
"relatedNode" : { },
"parentPath" : "..."
}, {
"trashed" : true,
"externalManaged" : true,
"shared" : true,
"locked" : true,
"publicItem" : true,
"title" : "...",
"description" : "...",
"lastModifiedBy" : "...",
"lastModificationTime" : 12345,
"creationTime" : 12345,
"lastAction" : "UPDATED",
"hidden" : true,
"ownerNode" : {
"userName" : "...",
"userId" : "..."
},
"accounting" : {
"entries" : [ { }, { } ]
},
"metadata" : {
"map" : {
"property1" : { },
"property2" : { }
}
},
"owner" : "...",
"name" : "...",
"id" : "...",
"path" : "...",
"parentId" : "...",
"primaryType" : "...",
"relatedNode" : { },
"parentPath" : "..."
} ]
}
Get a paged list of VRE folders for which the user is member
| name | type | description |
|---|---|---|
| Authorization | header | Bearer token, see https://dev.d4science.org/how-to-access-resources |
| exclude | query | a list of fields to exclude from the returned item Multivalued Optional |
| limit | query | maximum number of items returned Possible values: integers |
| start | query | start index, counting from 0 Possible values: integers |
| media type | data type | description |
|---|---|---|
| application/json | ItemList (JSON) | list of VRE folders |
GET /vrefolders/paged?start=0&limit=10
Content-Type: */*
Accept: application/json
Authorization: ...
...
HTTP/1.1 200 OK
Content-Type: application/json
{
"itemlist" : [ {
"trashed" : true,
"externalManaged" : true,
"shared" : true,
"locked" : true,
"publicItem" : true,
"title" : "...",
"description" : "...",
"lastModifiedBy" : "...",
"lastModificationTime" : 12345,
"creationTime" : 12345,
"lastAction" : "CLONED",
"hidden" : true,
"ownerNode" : {
"userName" : "...",
"userId" : "..."
},
"accounting" : {
"entries" : [ { }, { } ]
},
"metadata" : {
"map" : {
"property1" : { },
"property2" : { }
}
},
"owner" : "...",
"name" : "...",
"id" : "...",
"path" : "...",
"parentId" : "...",
"primaryType" : "...",
"relatedNode" : { },
"parentPath" : "..."
}, {
"trashed" : true,
"externalManaged" : true,
"shared" : true,
"locked" : true,
"publicItem" : true,
"title" : "...",
"description" : "...",
"lastModifiedBy" : "...",
"lastModificationTime" : 12345,
"creationTime" : 12345,
"lastAction" : "RENAMED",
"hidden" : true,
"ownerNode" : {
"userName" : "...",
"userId" : "..."
},
"accounting" : {
"entries" : [ { }, { } ]
},
"metadata" : {
"map" : {
"property1" : { },
"property2" : { }
}
},
"owner" : "...",
"name" : "...",
"id" : "...",
"path" : "...",
"parentId" : "...",
"primaryType" : "...",
"relatedNode" : { },
"parentPath" : "..."
} ]
}