Hi @TanishqxSharma @georgebrindeiro
I am trying to store data from a csv file to my custom created entity in master data v1, so How can I do that, I am using service example boilerplate, But I don’t know how can I create custom post request for the submit a csv file and convert it into json. what is the correct steps for that.
I am following these steps for doing this->
1->I want to create a custom api with post request for submit a csv file.
2-> I want to convert csv file to json data .A
3-> I want to store data using (Create new document) api.
You don’t have to @Ashif112. Access the masterdata V1 and from there you can upload the excel sheet.
One more thing. DataEntity is a collection of Documents. Each document is a record in JSON Format.
Hi @TanishqxSharma thanks for the reply
The csv file is uploaded by user on the frontend.
So i want to create an api to collect this csv file and convert it into json,
after that i want to insert converted json data into masterdata in the form of documents.
I need help only to create a post api in which i can collect form data from frontend.
A possible solution is to Use the CSV to JSON in your middleware and loop it for the data to post.
yes you are right we can use create document api in loop ,
but how can i collect that csv from frontend ,
I am not able to create a custom api with post request ,
could you please provide me any reference or help for create post api ,
I use GraphQL for the mutations and it is the way to go. Do you have any experience with Graphql?
I don’t have much exp. with graphql, but I will research about it ,
it will be better for me if any other way just like i have create get apis (custom) using clients .
Okay, Then you can read the CSV on the React component and use the REST API for creating documents in loops.