If you are using the standard endpoints, such as POST /vXX.X/sobjects/Account
or PATCH /vXX.X/sobjects/Account/id
, then yes, you can only create or update one at a time.
The bulk API, or even the SOAP API, can be used to upload multiple objects at the same time.
You can also create your own APEX REST endpoint. As an example:
@RestResource(urlMapping='/test/*')
global with sharing class TestRestController{
global class RequestBody {
global List<Account> accounts;
}
@HttpPost
global static List<Account> createBulk(TestRestController.RequestBody req) {
insert req.accounts;
return req.accounts;
}
}
You can then post to that endpoint the following data, and get back full data about the created Account objects.
POST https://[instance].salesforce.com/services/apexrest/test/
{
"req" : {
"accounts": [{"name": "test1"},{"name" : "test2"}]
}
}
Using a custom endpoint would be subject to the normal governor limits including a maximum request and response size of 3MB.
PATCH /vXX.X/sobjects/Account/id
./id
points to a single ID, so I can't even update multiple rows (ids).