Use CSV to create resources
Description
It should be possible to import resources formatted as CSV files. This should accept the same format that the resource API can output.
Request:
POST /api/apps/{appId}/resources/{resourceType} HTTP/1.1
Accept: application/json
Content-Type: text/csv
firstName,lastName
Spongebob,Squarepants
Patrick,Star
Response:
HTTP/1.1 200 OK
Content-Type: application/json
[
{
"id": "17a869d4-ee23-40d0-900a-2970d62dfb55",
"firstName": "Spongebob",
"lastName": "Squarepants"
},
{
"id": "26af411d-dcef-4449-b3a5-af3e70207d11",
"firstName": "Patrick",
"lastName": "Star"
}
]
The CLI should also be able to upload CSV, but it shouldn’t need to process it on the client side. This means it makes additional requests for CSV files instead of merging them into a single request.
Appsemble Studio should support this functionality using an Import button.
Requirements
-
Server operation createResource
acceptstext/csv
-
CLI appsemble resource create
command can upload.csv
files -
Studio has an import button
Edited by Wessel Kuipers