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 tiertrue if this field should be available for use with custom stickiness, otherwise false
falseHow this context field should be sorted if no other sort order is selected
2legalValues
object[]
A list of allowed values for this context field
The valid value
#c154c1Describes this specific legal value
Deep fuchsiaThe name of the context field.
subscriptionTierResponses
- 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
userIdThe description of the context field.
Used to uniquely identify usersDoes this context field support being used for stickiness calculations
trueUsed when sorting a list of context fields. Is also used as a tiebreaker if a list of context fields is sorted alphabetically.
900When this context field was created
2023-06-29T10:19:00.000ZNumber of projects where this context field is used in
3Number of projects where this context field is used in
2legalValues
object[]
Allowed values for this context field schema. Can be used to narrow down accepted input
The valid value
#c154c1Describes 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"
}
]
}