Skip to main content

Configuration API

Detailed documentation on the configuration API

List Configuration

The options available in this api are described below:

Option nameTypeDefault ValueRequiredDescription
typestring

This option indicates the type of config item in the list of configs. In other words, if this option has a value, the configs will be filtered based on this type and only the configs that are of this type will be returned as a result (if any).

For example the value of this option should be in the following format: FlowSynx.Storage/Azure.Blob

This format indicates the type of plugin to be used.

Calling Config list Api

For calling this api, the following details are required to apply:

note

The options and parameters introduced in the previous section must be included as json data in the request body part.

URLMethodContentTypeBody
http://localhost:5860/configPOSTapplication/json
{
"type": <STRING VALUE>
}

Now, if we want to have these details in the form of an http api call, open a new terminal and enter the following command:

info

First of all make sure flowsynx is running.

curl -X POST -H "Content-Type: application/json" -d '{ "type": "FlowSynx.Storage/Azure.Files" }' http://localhost:5860/config

Also you can use Http Api test clients to test this api. Anyway, after executing this api, a result like below will be obtained.

{
"data": [
{
"id": "18c91659-858b-4fd6-bd20-0125cac86c27",
"name": "azfile",
"type": "FlowSynx.Storage/Azure.Files"
},
.
.
.
],
"messages": [],
"succeeded": true
}

The answer is divided into three data, messages, and succeeded parts. succeeded indicates the status of the execution of this api which is boolean value and can be true or false. messages also indicates the list of possible messages that are returned with the response. data contains the data to be returned.

info

data part will have a value only when succeeded is true. If succeeded is false, this field will be null.

The information including in the result for this api is described as follows:

id: The guid-based identity for configuration item.
name: The name of configuration item (this name is unique).
type: The type of config item which represents the plugin type.