Home > Forum > General > Data sources - Fixed values list - API

Data sources - Fixed values list - API
0

Hi,

Are "Fixed values list"s' content available through API? Not dictionaries or other process types, but "Fixed values list" object types only.
The need is to synchronize Webcon data with other systems, assuming Webcon repository is master.

I found this article https://community.webcon.com/forum/thread/2491 which states that there would exist /api/data/v4.0/db/{dbId}/elements/resolveFieldValue/{idguid}, but this kind of call results in 404 - not found error.

I did not find resolveFieldValue anywhere else, or any other solution for that matter, thus current question.

Thank you,
Mihail

MVP

I Mihali, I've checked Swagger UI*, and there are no data sources available through api - closest we can get, are connections, but thats not it.

/api/data/v4.0/db/{dbId}/elements/resolveFieldValue/{idguid} this endpoint based on Swagger description:
"Gets available values for selected picker/choose form field"
It will not return directly Fixed Values List content, but it should also consider all filters which are on specific field for specific element ID.
You could though create some technical element, which would be used as some kind of helper to get to those values.

I think there is something wrong in the URL based on the error - i can easily use this endpoint, are you sure that you've authorized with API application with granted permissions? Based on Swagger:
At least one permission required: App.Elements.Admin.All; App.Elements.ReadWrite.All; User.Elements.Admin.All; User.Elements.Admin.<ProcGuid>; User.Elements.ReadWrite.All; User.Elements.ReadWrite.<ProcGuid>?

It also requires passing workflow id, and formtype id as queryparams, so whole request might look like this:
https://mycompany-webcon/api/data/beta/db/{db_id}/elements/resolveFieldValue/{field_id}?workflow={workflow_id}&formType={formtype_id}

You could also consider querying them directly from the database.
There is WFDataSources table, and WFS_StaticValues column.


* On each webcon instance there is Swagger available under https://{instance}/api, you can read about it here: https://developer.webcon.com/docs/rest-api/