Create a context field
POST/api/admin/context
Endpoint that allows creation of custom context fields
Request
- application/json
Body
required
createContextFieldSchema
Array [
]
A description of the context field
The user's subscription tier
true
if this field should be available for use with custom stickiness, otherwise false
false
How this context field should be sorted if no other sort order is selected
2
legalValues
object[]
A list of allowed values for this context field
The valid value
#c154c1
Describes this specific legal value
Deep fuchsia
The name of the context field.
subscriptionTier
Responses
- 201
The resource was successfully created.
Response Headers
location
string
The location of the newly created resource.
- application/json
- Schema
- Example (from schema)
Schema
Array [
]
The name of the context field
userId
The description of the context field.
Used to uniquely identify users
Does this context field support being used for stickiness calculations
true
Used when sorting a list of context fields. Is also used as a tiebreaker if a list of context fields is sorted alphabetically.
900
When this context field was created
2023-06-29T10:19:00.000Z
Number of projects where this context field is used in
3
Number of projects where this context field is used in
2
legalValues
object[]
Allowed values for this context field schema. Can be used to narrow down accepted input
The valid value
#c154c1
Describes this specific legal value
Deep fuchsia
{
"name": "userId",
"description": "Used to uniquely identify users",
"stickiness": true,
"sortOrder": 900,
"createdAt": "2023-06-29T10:19:00.000Z",
"usedInFeatures": 3,
"usedInProjects": 2,
"legalValues": [
{
"value": "#c154c1",
"description": "Deep fuchsia"
}
]
}