Skip to content

Commit

Permalink
Merge pull request #183 from flotiq/batch-limits
Browse files Browse the repository at this point in the history
Add info about limit in batch actions
  • Loading branch information
WHLukasz authored Sep 13, 2023
2 parents 3361129 + 206bdbb commit b3aeae2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 4 additions & 2 deletions docs/API/content-type/creating-co.md
Original file line number Diff line number Diff line change
Expand Up @@ -999,7 +999,7 @@ please leave a comment below or contact us on [[email protected]](mailto:hello@fl

## Batch create Content Objects through API

There is a way to add up to 100 Content Objects at once.
There is a way to add up to 100[^2] Content Objects at once.
It is possible by using the `/batch` endpoint
(in our example, the URL would be `https://api.flotiq.com/api/v1/content/blogposts/batch`).
It can be only `insert` or `insert or update` operation. To use `insert or update`
Expand Down Expand Up @@ -1080,10 +1080,12 @@ Response parameters:
| batch_total_count | number of elements sent in the request, present when there are no duplications in data |
| batch_success_count | number of correct elements sent in the request, present when there are no duplications in data |
| batch_error_count | number of incorrect elements sent in the request, present when there are no duplications in data |
| batch_limit | max number of elements sent in a single request, present when the limit is exceeded |
| errors | array of errors in the elements, errors are objects containing the id of the object and list of errors, present when there are no duplications in data |
| data | present only when there are duplications in data, listing keys containing duplications (see example above) |
| data | listing keys containing duplications (see example above), present only when there are duplications in data or batch_limit exceeded |

[Register to start creating your content objects](https://editor.flotiq.com/register.html){: .flotiq-button}


[^1]: Number of available Content Objects depends on the chosen subscription plan. Check pricing and limits [here](https://flotiq.com/pricing){:target="_blank"}
[^2]: Limit can be changed in the [enterprise plan](https://flotiq.com/pricing){:target="_blank"}
4 changes: 3 additions & 1 deletion docs/API/content-type/deleting-co.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ Deleting is done by sending `DELETE` request to `https://api.flotiq.com/api/v1/c

## Batch deleting

Batch deleting can remove up to 100 objects at a time.
Batch deleting can remove up to 100[^1] objects at a time.
If you need to batch delete items, you need to send `POST` request to `https://api.flotiq.com/api/v1/content/{CTD name}/batch-delete`, where:

* `CTD name` is the name of the content type definition
Expand Down Expand Up @@ -239,3 +239,5 @@ curl -X POST "https://api.flotiq.com/api/v1/content/blogposts/batch-delete" -H "
```

[Register to start creating your content objects](https://editor.flotiq.com/register.html){: .flotiq-button}

[^1]: Limit can be changed in the [enterprise plan](https://flotiq.com/pricing){:target="_blank"}

0 comments on commit b3aeae2

Please sign in to comment.