Skip to main content

Gets context field

GET 

<your-unleash-url>/api/admin/context/:contextField

Returns specific context field identified by the name in the path

Request

Path Parameters

    contextField stringrequired

Responses

contextFieldSchema

Schema
    namestringrequired

    The name of the context field

    Example: userId
    descriptionstringnullable

    The description of the context field.

    Example: Used to uniquely identify users
    stickinessboolean

    Does this context field support being used for stickiness calculations

    Example: true
    sortOrderinteger

    Used when sorting a list of context fields. Is also used as a tiebreaker if a list of context fields is sorted alphabetically.

    Example: 900
    createdAtdate-timenullable

    When this context field was created

    Example: 2023-06-29T10:19:00.000Z
    usedInFeaturesintegernullable

    Number of projects where this context field is used in

    Example: 3
    usedInProjectsintegernullable

    Number of projects where this context field is used in

    Example: 2
    legalValues object[]

    Allowed values for this context field schema. Can be used to narrow down accepted input

  • Array [
  • valuestringrequired

    The valid value

    Example: #c154c1
    descriptionstring

    Describes this specific legal value

    Example: Deep fuchsia
  • ]

Authorization: Authorization

name: Authorizationtype: apiKeyin: headerdescription: API key needed to access this API
curl -L 'https://unleash-docs-m4shpbv9v-unleash-team.vercel.app/api/admin/context/:contextField' \
-H 'Accept: application/json' \
-H 'Authorization: <Authorization>'
Request Collapse all
Base URL
<your-unleash-url>
Auth
Parameters
— pathrequired
ResponseClear

Click the Send API Request button above and see the response here!