Configurations Model

ActionMethodResourceDescription
Get allGET/configsGet all configurations.
GetGET/configs/:config_idGet configuration with id config_id.
Create POST/configsCreate a configuration.
Update PUT/configs/:config_idUpdate configuration with config_id.
Delete DELETE/configs/:config_idDelete configuration with config_id.

The configuration model is composed of the following attributes:

AttributeTypeRequiredDescription
keystringno, required on createThe configuration's key.
valuestringno, required on createThe configuration's value.
namestringnoThe configuration's name.
descriptionstringnoThe configuration's Description.
typeintegerno, required to createThe configuration's type.
enabledbooleannoThe configuration is enabled.
publicbooleannoThe configuration is public.
config_category_idintegernoThe Config category identifier if belong to one
optionsJSONno, required if type 2, 3 o 4The options which can be used to value config
imagestringnoThe image of the config.
videostringnoThe video of the config
more_infostringnoMore details about the info
support_urlstringnoThe url to go to Config documentation
protectedbooleannoThis mark the configs con value protected so always return "PROTECT" as a value
dependency_keystringnoMark is depend on other config key
dependency_valuestringnoMark wich value must have the config key
rankintegernoThis attribute is only to order the configs
requiredbooleannoThe configuration if mandatory

🚧

Only users type Administrator can get, find, create, update or remove configurations.

Types

The configuration type is used to tell the front end how the options should be displayed and how they should be received so that the api understands them.

  • Type 1: Is only a value can be anything
  • Type 2: Is only a value but, must me a value of one of the options for this config
  • Type 3: have multiple values of the options with the folowin format "1|2|3|4" (values separated by |)
  • Type 4: Have multiple values in an array "[1,2,3,4]"

Options

The options must have the following structure to be accepted

[
	{
  	"text": "TEXT",
    "value": "VALUE"
	},
  ....
]