Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bulk creation through REST API #2687

Open
lcmps opened this issue Apr 4, 2023 · 1 comment
Open

Bulk creation through REST API #2687

lcmps opened this issue Apr 4, 2023 · 1 comment

Comments

@lcmps
Copy link

lcmps commented Apr 4, 2023

It would be great if some sort of bulk creation through a POST/PUT request was possible.

For example instead of sending two different requests to /api/v1/Contact like:

curl --request POST \
  --url /api/v1/Contact \
  --data '
{
  "name": "John Doe",
  "email": "john@doe.com"
 }'

and another one for

curl --request POST \
  --url /api/v1/Contact \
  --data '
{
  "name": "Eva Lu",
  "email": "eva@lu.com"
}'

A single request with a JSON array of two contact entities, like:

curl --request POST \
  --url /api/v1/Contact \
  --data '[
	{
		"name": "John Doe",
		"emailAddress": "john@doe.com"
	},
	{
		"name": "Eva Lu",
		"emailAddress": "eva@lu.com"
	}
]'
@o-data
Copy link
Contributor

o-data commented Apr 5, 2023

I haven't got to this skill level yet, but I have a feeling this is already possible. It is possible for GET, so I assume same is true for POST

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants