Manage item retrieval, deletion, and update.
Move the specified item to the trash or delete it permanently if it is already trashed.
| name | type | description |
|---|---|---|
| Authorization | header | Bearer token, see https://dev.d4science.org/how-to-access-resources |
| id | path | item id |
| force | query | permanently delete Possible values: true, false Optional default: false |
| code | condition |
|---|---|
| 200 | Item deleted. |
| 406 | Unable to find this item. |
| 500 | Unable to delete this item. |
| media type | data type | description |
|---|---|---|
| application/json | string (JSON) |
DELETE /{id}?force=true
Content-Type: */*
Accept: application/json
Authorization: ...
...
HTTP/1.1 200 OK
Content-Type: application/json
...
Retrieve an item by its id.
| name | type | description |
|---|---|---|
| Authorization | header | Bearer token, see https://dev.d4science.org/how-to-access-resources |
| id | path | item id |
| exclude | query | a list of fields to exclude from the returned item Multivalued Optional |
| code | condition |
|---|---|
| 200 | Item found. |
| 406 | Unable to find this item. |
| media type | data type | description |
|---|---|---|
| application/json | ItemWrapper (JSON) | a JSON representation of the item |
GET /{id}?exclude=content
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" : "...",
"relatedNode" : { },
"parentId" : "...",
"path" : "...",
"name" : "...",
"id" : "...",
"parentPath" : "...",
"primaryType" : "..."
}
}
Retrieve the anchestors of a given item.
| name | type | description |
|---|---|---|
| Authorization | header | Bearer token, see https://dev.d4science.org/how-to-access-resources |
| id | path | item id |
| exclude | query | a list of fields to exclude from the returned item list Multivalued Optional |
| code | condition |
|---|---|
| 200 | Item found. |
| 406 | Item does not exist. |
| media type | data type | description |
|---|---|---|
| application/json | ItemList (JSON) | the list of anchestors |
GET /{id}/anchestors?exclude=content
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" : "CREATED",
"hidden" : true,
"ownerNode" : {
"userName" : "...",
"userId" : "..."
},
"accounting" : {
"entries" : [ { }, { } ]
},
"metadata" : {
"map" : {
"property1" : { },
"property2" : { }
}
},
"owner" : "...",
"relatedNode" : { },
"parentId" : "...",
"path" : "...",
"name" : "...",
"id" : "...",
"parentPath" : "...",
"primaryType" : "..."
}, {
"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" : "...",
"relatedNode" : { },
"parentId" : "...",
"path" : "...",
"name" : "...",
"id" : "...",
"parentPath" : "...",
"primaryType" : "..."
} ]
}
Retrieve a list of children items.
| name | type | description |
|---|---|---|
| Authorization | header | Bearer token, see https://dev.d4science.org/how-to-access-resources |
| id | path | parent item id |
| exclude | query | a list of fields to exclude from the returned item Multivalued Optional |
| onlyType | query | only items of the specified type are counted Optional |
| showHidden | query | if true, hidden items are shown Possible values: true, false Optional default: false |
| code | condition |
|---|---|
| 200 | Item found. |
| 406 | Parent item does not exist. |
| media type | data type | description |
|---|---|---|
| application/json | ItemList (JSON) | a JSON representation of the item list |
GET /{id}/children?showHidden=true&onlyType=File&exclude=content
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" : "UPDATED",
"hidden" : true,
"ownerNode" : {
"userName" : "...",
"userId" : "..."
},
"accounting" : {
"entries" : [ { }, { } ]
},
"metadata" : {
"map" : {
"property1" : { },
"property2" : { }
}
},
"owner" : "...",
"relatedNode" : { },
"parentId" : "...",
"path" : "...",
"name" : "...",
"id" : "...",
"parentPath" : "...",
"primaryType" : "..."
}, {
"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" : "...",
"relatedNode" : { },
"parentId" : "...",
"path" : "...",
"name" : "...",
"id" : "...",
"parentPath" : "...",
"primaryType" : "..."
} ]
}
Retrieve the number of children items.
| name | type | description |
|---|---|---|
| Authorization | header | Bearer token, see https://dev.d4science.org/how-to-access-resources |
| id | path | parent item id |
| onlyType | query | only items of the specified type are counted Optional |
| showHidden | query | if true, hidden items are shown Possible values: true, false Optional default: false |
| code | condition |
|---|---|
| 200 | Item found. |
| 406 | Parent item does not exist |
| media type | data type | description |
|---|---|---|
| application/json | number (JSON) | the number of children |
GET /{id}/children/count?showHidden=true&onlyType=File
Content-Type: */*
Accept: application/json
Authorization: ...
...
HTTP/1.1 200 OK
Content-Type: application/json
...
Retrieve a paged list of children items.
| name | type | description |
|---|---|---|
| Authorization | header | Bearer token, see https://dev.d4science.org/how-to-access-resources |
| id | path | parent item id |
| exclude | query | a list of fields to exclude from the returned item Multivalued Optional |
| limit | query | maximum number of items returned Possible values: integers |
| onlyType | query | only items of the specified type are counted Optional |
| showHidden | query | if true, hidden items are shown Possible values: true, false Optional default: false |
| start | query | start index, counting from 0 Possible values: integers |
| code | condition |
|---|---|
| 200 | Item found. |
| 406 | Parent item does not exist. |
| 500 | Missing 'start' or 'limit' parameter. |
| media type | data type | description |
|---|---|---|
| application/json | ItemList (JSON) | a JSON representation of the item list |
GET /{id}/children/paged?start=1&limit=100&showHidden=true&onlyType=File&exclude=content
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" : "RENAMED",
"hidden" : true,
"ownerNode" : {
"userName" : "...",
"userId" : "..."
},
"accounting" : {
"entries" : [ { }, { } ]
},
"metadata" : {
"map" : {
"property1" : { },
"property2" : { }
}
},
"owner" : "...",
"relatedNode" : { },
"parentId" : "...",
"path" : "...",
"name" : "...",
"id" : "...",
"parentPath" : "...",
"primaryType" : "..."
}, {
"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" : "...",
"relatedNode" : { },
"parentId" : "...",
"path" : "...",
"name" : "...",
"id" : "...",
"parentPath" : "...",
"primaryType" : "..."
} ]
}
Copy a given item.
| name | type | description |
|---|---|---|
| destinationId | form | destination folder id |
| fileName | form | name of the copied item |
| Authorization | header | Bearer token, see https://dev.d4science.org/how-to-access-resources |
| id | path | item id |
| code | condition |
|---|---|
| 200 | Item copied. |
| 406 | Source or destination item does not exist. |
| media type | data type | description |
|---|---|---|
| application/json | string (JSON) | id of the copied item |
PUT /{id}/copy
Content-Type: */*
Accept: application/json
Authorization: ...
destinationId=19863b4e-b33f- ... -5b6d2e0e1eee&fileName=myCopy.jpg
...
HTTP/1.1 200 OK
Content-Type: application/json
...
Set description for the specified item. The body request is interpreted as the description string.
| name | type | description |
|---|---|---|
| Authorization | header | Bearer token, see https://dev.d4science.org/how-to-access-resources |
| id | path | item id |
| code | condition |
|---|---|
| 200 | Item description set. |
| 400 | Unable to parse request body. |
| 406 | Item does not exist. |
| media type | data type | description |
|---|---|---|
| text/plain | string | id of the item |
PUT /{id}/description
Content-Type: application/json
Accept: text/plain
Authorization: ...
This is a sample description
...
HTTP/1.1 200 OK
Content-Type: text/plain
5f4b3b4e-4b3b- ... -4b3b4e4b3b4e
Download a given item.
| name | type | description |
|---|---|---|
| Authorization | header | Bearer token, see https://dev.d4science.org/how-to-access-resources |
| id | path | item id |
| code | condition |
|---|---|
| 200 | Item found. |
| 406 | Item does not exist. |
| media type | data type | description |
|---|---|---|
| application/json | Response (JSON) | download the item |
GET /{id}/download
Content-Type: */*
Accept: application/json
Authorization: ...
...
HTTP/1.1 200 OK
Content-Type: application/json
{
"length" : 12345,
"entity" : { },
"status" : 12345,
"location" : "...",
"entityTag" : {
"weak" : true,
"value" : "..."
},
"allowedMethods" : [ "...", "..." ],
"cookies" : {
"property1" : {
"expiry" : 12345,
"secure" : true,
"comment" : "...",
"sameSite" : "LAX",
"httpOnly" : true,
"maxAge" : 12345,
"name" : "...",
"value" : "...",
"path" : "...",
"domain" : "...",
"version" : 12345
},
"property2" : {
"expiry" : 12345,
"secure" : true,
"comment" : "...",
"sameSite" : "NONE",
"httpOnly" : true,
"maxAge" : 12345,
"name" : "...",
"value" : "...",
"path" : "...",
"domain" : "...",
"version" : 12345
}
},
"mediaType" : {
"wildcardSubtype" : true,
"wildcardType" : true,
"parameters" : {
"property1" : "...",
"property2" : "..."
},
"subtype" : "...",
"type" : "..."
},
"statusInfo" : {
"reasonPhrase" : "...",
"statusCode" : 12345,
"family" : "SUCCESSFUL"
},
"closed" : true,
"stringHeaders" : {
"property1" : [ "...", "..." ],
"property2" : [ "...", "..." ]
},
"lastModified" : 12345,
"links" : [ {
"title" : "...",
"rel" : "...",
"uri" : "...",
"rels" : [ "...", "..." ],
"type" : "...",
"params" : {
"property1" : "...",
"property2" : "..."
},
"uriBuilder" : { }
}, {
"title" : "...",
"rel" : "...",
"uri" : "...",
"rels" : [ "...", "..." ],
"type" : "...",
"params" : {
"property1" : "...",
"property2" : "..."
},
"uriBuilder" : { }
} ],
"headers" : {
"property1" : [ { }, { } ],
"property2" : [ { }, { } ]
},
"language" : "...",
"metadata" : {
"property1" : [ { }, { } ],
"property2" : [ { }, { } ]
},
"date" : 12345
}
Get info of the specified folder.
| name | type | description |
|---|---|---|
| Authorization | header | Bearer token, see https://dev.d4science.org/how-to-access-resources |
| id | path | item id |
| code | condition |
|---|---|
| 200 | Item found. |
| 400 | This item is not a folder. |
| 406 | Unable to find this folder. |
| media type | data type | description |
|---|---|---|
| application/json | string (JSON) | folder info |
GET /items/{id}/info
Content-Type: */*
Accept: application/json
Authorization: ...
...
HTTP/1.1 200 OK
Content-Type: application/json
...
Retrieve a child item by its name.
| name | type | description |
|---|---|---|
| Authorization | header | Bearer token, see https://dev.d4science.org/how-to-access-resources |
| id | path | parent item id |
| exclude | query | a list of fields to exclude from the returned item Multivalued Optional |
| name | query | the name of the child item to retrieve |
| code | condition |
|---|---|
| 200 | Item found. |
| 406 | Parent item does not exist. |
| media type | data type | description |
|---|---|---|
| application/json | string (JSON) | a JSON representation of the item list |
GET /{id}/items?name=doc.pdf&exclude=content
Content-Type: */*
Accept: application/json
Authorization: ...
...
HTTP/1.1 200 OK
Content-Type: application/json
...
Set metadata for the specified item. The body request is interpreted as the metadata JSON.
| name | type | description |
|---|---|---|
| Authorization | header | Bearer token, see https://dev.d4science.org/how-to-access-resources |
| id | path | item id |
| code | condition |
|---|---|
| 200 | Item metadata set. |
| 400 | Unable to parse request body. |
| 406 | Item does not exist. |
| media type | data type | description |
|---|---|---|
| text/plain | string | id of the item |
PUT /{id}/metadata
Content-Type: application/json
Accept: text/plain
Authorization: ...
{
"map": {
"meta1": "value1",
"meta2": "value2"
}
}
...
HTTP/1.1 200 OK
Content-Type: text/plain
5f4b3b4e-4b3b- ... -4b3b4e4b3b4e
Move a given item.
| name | type | description |
|---|---|---|
| destinationId | form | destination folder id |
| Authorization | header | Bearer token, see https://dev.d4science.org/how-to-access-resources |
| id | path | item id |
| code | condition |
|---|---|
| 200 | Item moved. |
| 406 | Source or destination item does not exist. |
| 409 | Source and destination are the same item. |
| media type | data type | description |
|---|---|---|
| application/json | string (JSON) | id of the moved item |
PUT /{id}/move
Content-Type: */*
Accept: application/json
Authorization: ...
destinationId=19863b4e-b33f- ... -5b6d2e0e1eee
...
HTTP/1.1 200 OK
Content-Type: application/json
...
Retrieve an item by its relative path.
| name | type | description |
|---|---|---|
| Authorization | header | Bearer token, see https://dev.d4science.org/how-to-access-resources |
| id | path | item id |
| exclude | query | a list of fields to exclude from the returned item Multivalued Optional |
| path | query | the relative path of the item to retrieve |
| media type | data type | description |
|---|---|---|
| application/json | ItemWrapper (JSON) | a JSON representation of the item |
GET /{id}/path?path=folder1&exclude=content
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" : "CREATED",
"hidden" : true,
"ownerNode" : {
"userName" : "...",
"userId" : "..."
},
"accounting" : {
"entries" : [ { }, { } ]
},
"metadata" : {
"map" : {
"property1" : { },
"property2" : { }
}
},
"owner" : "...",
"relatedNode" : { },
"parentId" : "...",
"path" : "...",
"name" : "...",
"id" : "...",
"parentPath" : "...",
"primaryType" : "..."
}
}
Retrieves the public link for a specified item.
| name | type | description |
|---|---|---|
| Authorization | header | Bearer token, see https://dev.d4science.org/how-to-access-resources |
| id | path | item id |
| version | query | version of the item for which the public link is requested Optional default: last version |
| code | condition |
|---|---|
| 200 | Item found. |
| 400 | This item is not a file. |
| 406 | Item does not exist. |
| media type | data type | description |
|---|---|---|
| application/json | string (JSON) | URL of the public link for the specified item |
GET /{id}/publiclink?version=1.0
Content-Type: */*
Accept: application/json
Authorization: ...
...
HTTP/1.1 200 OK
Content-Type: application/json
...
Set the access level of the specified folder.
| name | type | description |
|---|---|---|
| publish | form | if true, the folder is made public Possible values: true, false |
| Authorization | header | Bearer token, see https://dev.d4science.org/how-to-access-resources |
| id | path | item id |
| code | condition |
|---|---|
| 200 | Item found. |
| 400 | This item is not a file. |
| 406 | Item does not exist. |
| media type | data type | description |
|---|---|---|
| application/json | string (JSON) | the id of the folder |
PUT /items/{id}/publish
Content-Type: */*
Accept: application/json
Authorization: ...
publish=true
...
HTTP/1.1 200 OK
Content-Type: application/json
...
Rename a given item.
| name | type | description |
|---|---|---|
| newName | form | new name for the item |
| Authorization | header | Bearer token, see https://dev.d4science.org/how-to-access-resources |
| id | path | item id |
| code | condition |
|---|---|
| 200 | Item renamed. |
| 406 | Item does not exist. |
| media type | data type | description |
|---|---|---|
| application/json | string (JSON) | id of the renamed item |
PUT /{id}/rename
Content-Type: */*
Accept: application/json
Authorization: ...
newName=newFileName.txt
...
HTTP/1.1 200 OK
Content-Type: application/json
...
Retrieve a list of children items matching a search query.
| name | type | description |
|---|---|---|
| Authorization | header | Bearer token, see https://dev.d4science.org/how-to-access-resources |
| id | path | parent item id |
| exclude | query | a list of fields to exclude from the returned item Multivalued Optional |
| excludeTrashed | query | if true, exclude items from the bin Possible values: true, false Optional default: true |
| name | query | the name to search for items whose names contain this value (case-insensitive) are returned |
| onlyType | query | only items of the specified type are counted Optional |
| showHidden | query | if true, hidden items are shown Possible values: true, false Optional default: false |
| code | condition |
|---|---|
| 200 | Item found. |
| 406 | Parent item does not exist. |
| media type | data type | description |
|---|---|---|
| application/json | ItemList (JSON) | a JSON representation of the item list matching the search query |
GET /{id}/search?name=message&showHidden=true&onlyType=File&exclude=content
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" : "...",
"relatedNode" : { },
"parentId" : "...",
"path" : "...",
"name" : "...",
"id" : "...",
"parentPath" : "...",
"primaryType" : "..."
}, {
"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" : "...",
"relatedNode" : { },
"parentId" : "...",
"path" : "...",
"name" : "...",
"id" : "...",
"parentPath" : "...",
"primaryType" : "..."
} ]
}
Retrieves the list of versions for the specified item.
| name | type | description |
|---|---|---|
| Authorization | header | Bearer token, see https://dev.d4science.org/how-to-access-resources |
| id | path | item id |
| code | condition |
|---|---|
| 200 | Item found. |
| 406 | Item does not exist. |
| media type | data type | description |
|---|---|---|
| application/json | VersionList (JSON) | the version list |
GET /items/{id}/versions
Content-Type: */*
Accept: application/json
Authorization: ...
...
HTTP/1.1 200 OK
Content-Type: application/json
{
"itemlist" : [ {
"id" : "...",
"created" : 12345,
"current" : true,
"name" : "..."
}, {
"id" : "...",
"created" : 12345,
"current" : true,
"name" : "..."
} ]
}
Delete a specific version of a given item.
| name | type | description |
|---|---|---|
| Authorization | header | Bearer token, see https://dev.d4science.org/how-to-access-resources |
| id | path | item id |
| version | path | the requested version |
| code | condition |
|---|---|
| 200 | Item deleted. |
| 400 | This item's version cannot be removed. |
| 406 | Item does not exist. |
| 500 | Invalid version. |
| media type | data type | description |
|---|---|---|
| application/json | object (JSON) | download the item |
DELETE /{id}/versions/1.0
Content-Type: */*
Accept: application/json
Authorization: ...
...
HTTP/1.1 200 OK
Content-Type: application/json
...
Download a specific version of a given item.
| name | type | description |
|---|---|---|
| Authorization | header | Bearer token, see https://dev.d4science.org/how-to-access-resources |
| id | path | item id |
| code | condition |
|---|---|
| 200 | Item found. |
| 406 | Item does not exist. |
| 500 | Invalid version. |
| media type | data type | description |
|---|---|---|
| application/json | string (JSON) | download the item |
GET /{id}/versions/1.0/download
Content-Type: */*
Accept: application/json
Authorization: ...
...
HTTP/1.1 200 OK
Content-Type: application/json
...