Export enumeration value configuration
The endpoint enums returns information about the definition of all or a subset of the enumerations in the Alfabet FastLane meta-model. Enumerations define a predefined set of values that are allowed to be set for an object class property.
Endpoint name: enums
HTTP method: GET
Service call: URLOfTheAlfabetAPIServer/api/v2/enums?names=Enum1,Enum2&emptyValues=true
Parameter | Mandatory/Optional | Required Value |
---|---|---|
names=EnumName,EnumName | Optional | A comma-separated list of enumerations for which information shall be returned. The enumeration must be defined by the value of the Name attribute of the enumeration. If the parameter is not added to the call, information about all enumerations in the Alfabet FastLane meta-model is returned. |
emptyValues=true/false | Optional | If emptyValues=true is added to the service call, all relevant attributes of the enumeration and enumeration items are returned even if they are not set. If emptyValues=false is added, only attributes that are set are returned. By default the attribute is set to false. |
Authorization Header Field: Authorization:TypeValue
Click for details about authorization.
Return value: The return value is a JSON object with two fields:
- alias: The name of the server alias of the Alfabet Web Application answering the request.
- enums: A JSON list of enumerations and their enumeration items.
- {
- "alias": "Alfabet"
- "enums": [...]
- }
The enums field consists of a JSON list of objects. Each enumeration is an object in the JSON list. If all enumerations in the Alfabet FastLane meta-model are returned, they are listed in alphabetical order. If only a defined list of enumerations specified in the service call are returned, they are listed in the order defined in the service call.
For each enumeration, the return value includes:
-
Attributes of the enumeration
Each relevant attribute defined for the enumeration in the Alfabet FastLane meta-model is defined as a field in the JSON object. The field names are similar to the names of the attributes. The attributes specify the technical data about the enumeration. The list of attributes is limited to the attributes that may be relevant for external applications. For example, the date of the last update or tags defined for the object are not exported.
-
Enumeration items and their attributes
The enumeration items defined for the enumeration are listed in the Items field. The Items field provides a JSON list of objects. Each enumeration item is an object in the list and the fields of the objects return the relevant attributes of the enumeration item. The field names are similar to the names of the attributes.
RESTful service call:
Service call: https://AlfabetCloud/AlfabetAPIServer/api/v2/enums?names=ObjectState,SAG_OrganizationType&emptyValues=false
HTTP method: GET
Headers:
- Authorization: bearer eyJ0eXAiOiJKVxMiJ9.eyJpc3MiOiJhbGZhYmV0IiwiaWF0IjoiMTU3MzAzMjA0NiIsImV4cCI6IjE1NzMwMzMyNDYiLCJxc2giOm51bGwsInN1YiI6IkFwaSBBdXRoZW50aWNhdGlvbiIsImNvbnRleHQiOnsidXNlciI6eyJVc2VyS2V5IjoiQUxGQUJFRDRUNGNc1R5cGUiOjB9fX0.PJC0EWtlUETbraV7NckVkRTFVm356y6K9JyhFR245hXp-2ApttryATZ_dAL0bi_GZpeJx7iqr_lRIA
Body: None.
Response of the service call:
- "alias": "Alfabet"
- "enums": [
- {
- "Name": "ObjectState",
- "Caption": "Object State",
- "Guid": "8FC728EE25944B0886099856028AA2B4",
- "Items":[
- {
- "Value": "Retired",
- "Hint": "Retired Hint",
- "Icon": "Retired-BlackOutline",
- "StyleGroup": "Object State",
- "Style": "Retired"
- },
- {
- "Value": "Active",
- "Hint": "Active Hint",
- "Icon": "Active-BlackOutline",
- "StyleGroup": "Object State",
- "Style": "Active"
- },
- {
- "Value": "Plan",
- "Hint": "Plan Hint",
- "Icon": "Plan-BlackOutline",
- "StyleGroup": "Object State",
- "Style": "Plan"
- }
- {
- ]
- },
- {
- "Name": "SAG_OrganizationType",
- "Caption": "Organization Type",
- "Guid": "5GT345533B0886099856028AA2B4",
- "Items":[
- {
- "Value": "External",
- "Hint": "An external entity outside the primary organization",
- },
- {
- "Value": "Internal",
- "Hint": "An internal entity part of the primary organization"
- }
- {
- ]
- }
- {
- ]