Manage item creation.
Upload an archive from the provided url and extract its content on-the-fly in a new folder.
| name | type | description |
|---|---|---|
| parentFolderName | form | name of the newly-created folder containing extracted files |
| url | form | address of the archive to be uploaded |
| Authorization | header | Bearer token, see https://dev.d4science.org/how-to-access-resources |
| id | path | destination folder id |
| media type | data type |
|---|---|
| application/x-www-form-urlencoded | (custom) |
| code | condition |
|---|---|
| 200 | Archive extracted. |
| 400 | Wrong set of parameters. |
| 406 | Unable to extract archive. |
| 415 | Wrong content type. |
| media type | data type | description |
|---|---|---|
| text/plain | string | id of the created folder containing extracted files |
POST /items/{id}/create/ARCHIVE
Content-Type: application/x-www-form-urlencoded
Accept: text/plain
Authorization: ...
name=sampleZip.zip&description=This+is+a+sample+zip&url="https://getsamplefiles.com/download/zip/sample-1.zip"
...
HTTP/1.1 200 OK
Content-Type: text/plain
5f4b3b4e-4b3b- ... -4b3b4e4b3b4e
Upload the provided archive and extract its content on-the-fly in a new folder.
| name | type | description |
|---|---|---|
| file | form | multipart/form-data file parameter, with optional 'filename' and 'size' (see example below) |
| parentFolderName | form | name of the newly-created folder containing extracted files |
| Authorization | header | Bearer token, see https://dev.d4science.org/how-to-access-resources |
| id | path | destination folder id |
| media type | data type |
|---|---|
| multipart/form-data | (custom) |
| code | condition |
|---|---|
| 200 | Archive extracted. |
| 400 | Wrong set of parameters. |
| 406 | Unable to extract archive. |
| 415 | Wrong content type. |
| media type | data type | description |
|---|---|---|
| text/plain | string | id of the created folder containing extracted files |
POST /items/{id}/create/ARCHIVE
Content-Type: multipart/form-data
Accept: text/plain
Authorization: ...
--------boundaryString
Content-Disposition: form-data; name="file"; filename="archive.zip"; size=1560238;
Content-Type: application/zip
(compressed data)
--------boundaryString
Content-Disposition: form-data; name="parentFolderName="
my documents
--------boundaryString--
...
HTTP/1.1 200 OK
Content-Type: text/plain
5f4b3b4e-4b3b- ... -4b3b4e4b3b4e
Upload a file retrieved from the provided url.
| name | type | description |
|---|---|---|
| description | form | description meta-info for the created file |
| name | form | destination file name |
| url | form | address of the file to be uploaded |
| Authorization | header | Bearer token, see https://dev.d4science.org/how-to-access-resources |
| id | path | destination folder id |
| media type | data type |
|---|---|
| application/x-www-form-urlencoded | (custom) |
| code | condition |
|---|---|
| 200 | File created. |
| 400 | Wrong set of parameters. |
| 406 | Unable to create file. |
| 415 | Wrong content type. |
| media type | data type | description |
|---|---|---|
| text/plain | string | id of the created file |
POST /items/{id}/create/FILE
Content-Type: application/x-www-form-urlencoded
Accept: text/plain
Authorization: ...
name=d4science_logo.png&description=D4Science+logo&url="https://www.d4science.org/image/layout_set_logo?img_id=12630&t=1720538711657"
...
HTTP/1.1 200 OK
Content-Type: text/plain
5f4b3b4e-4b3b- ... -4b3b4e4b3b4e
Upload the provided file.
| name | type | description |
|---|---|---|
| description | form | description meta-info for the created file |
| file | form | multipart/form-data file parameter, with optional 'filename' and 'size' (see example below) |
| name | form | destination file name |
| Authorization | header | Bearer token, see https://dev.d4science.org/how-to-access-resources |
| id | path | destination folder id |
| media type | data type |
|---|---|
| multipart/form-data | (custom) |
| code | condition |
|---|---|
| 200 | File created. |
| 400 | Wrong set of parameters. |
| 406 | Unable to create file. |
| 415 | Wrong content type. |
| media type | data type | description |
|---|---|---|
| text/plain | string | id of the created file |
POST /items/{id}/create/FILE
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
Content-Disposition: form-data; name="name"
doc.pdf
--------boundaryString
Content-Disposition: form-data; name="description"
"This is just a sample PDF file"
--------boundaryString--
...
HTTP/1.1 200 OK
Content-Type: text/plain
5f4b3b4e-4b3b- ... -4b3b4e4b3b4e
Create a URL.
| name | type | description |
|---|---|---|
| description | form | description meta-info for the created URL |
| name | form | destination URL name |
| value | form | URL address |
| Authorization | header | Bearer token, see https://dev.d4science.org/how-to-access-resources |
| id | path | destination parent folder id |
| media type | data type |
|---|---|
| application/x-www-form-urlencoded | (custom) |
| code | condition |
|---|---|
| 200 | URL created. |
| 400 | Wrong set of parameters. |
| 406 | Unable to create URL. |
| 415 | Wrong content type. |
| media type | data type | description |
|---|---|---|
| text/plain | object | id of the created URL |
POST /items/{id}/create/URL
Content-Type: application/x-www-form-urlencoded
Accept: text/plain
Authorization: ...
name=d4science&description=D4Science+URL&value=www.d4science.org
...
HTTP/1.1 200 OK
Content-Type: text/plain
5f4b3b4e-4b3b- ... -4b3b4e4b3b4e