Bulk insert identities (overwrite)
POSThttps://edge.api.flagsmith.com/api/v1/bulk-identities
Bulk uploading identities and traits. If there is an existing identity, using POST will overwrite the existing identity with the data from the request.
It has a limit of 100 identities per request.
Request
- application/json
Body
data object[]
Responses
- 202
- 400
- 403
- 404
Accepted
Bad Request
- text/plain
- Schema
- Example (auto)
Schema
string string
Number of identities must not be more than 100
"string"
Forbidden
- text/plain
- Schema
- Example (auto)
Schema
string string
Organisation is disabled from serving flags.
"string"
Not Found
- text/plain
- Schema
- Example (auto)
Schema
string string
Environment not found
"string"
Authorization: X-Environment-Key
name: X-Environment-Keytype: apiKeyin: header
- python
- curl
- csharp
- go
- nodejs
- ruby
- php
- java
- powershell
- HTTP.CLIENT
- REQUESTS
import http.client
import json
conn = http.client.HTTPSConnection("edge.api.flagsmith.com")
payload = json.dumps({})
headers = {
'Content-Type': 'application/json',
'X-Environment-Key': '<API_KEY_VALUE>'
}
conn.request("POST", "/api/v1/bulk-identities", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
ResponseClear