Get identity flags and traits
GEThttps://edge.api.flagsmith.com/api/v1/identities
Retrieve the flags and traits for an identity. Note: identity will be lazily created if it does not already exist.
Request
Query Parameters
identifier stringrequired
Identity Key
Responses
- 200
OK
- application/json
- Schema
- Example (auto)
Schema
- Array [
- ]
flags object[]
traits object[]
[
{
"flags": [
{
"enabled": true,
"feature_state_value": "a-remote-config-value",
"feature": {
"id": 42,
"name": "show_hero_banner",
"type": "STANDARD"
}
}
],
"traits": [
{
"trait_key": "Name",
"trait_value": "B.A. Baracus"
}
]
}
]
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
conn = http.client.HTTPSConnection("edge.api.flagsmith.com")
payload = ''
headers = {
'Accept': 'application/json',
'X-Environment-Key': '<API_KEY_VALUE>'
}
conn.request("GET", "/api/v1/identities", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
ResponseClear