Add
Add configuration section to configuration.
Add Config Api options
The options available in this api are described below:
Option name | Type | Default Value | Required | Description |
---|---|---|---|---|
name | string | The unique configuration section name. This value is string type and is required. | ||
type | string | This option indicates the type of config item. For example the value of this option should be in the following format:
This format indicates the type of plugin to be used. | ||
specifications | object (Key-Value) | The specifications regarding configuration section. They should be passed in pairs of key value |
Calling Add Config Api
For calling this api, the following details are required to apply:
The options and parameters introduced in the previous section must be included as json data in the request body part.
URL | Method | ContentType | Body |
---|---|---|---|
http://localhost:5860/config/add | POST | application/json |
|
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:
First of all make sure flowsynx is running.
- HTTP API (Bash)
- HTTP API (PowerShell)
curl -X POST -H "Content-Type: application/json" -d '{ "name": "azfile", "type": "FlowSynx.Storage/Azure.Files", "specifications": {} }' http://localhost:5860/config/add
Invoke-RestMethod -Method Post -ContentType 'application/json' -Body '{ "name": "azfile", "type": "FlowSynx.Storage/Azure.Files", "specifications": {} }' -Uri 'http://localhost:5860/config/add'
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"
},
"messages": [
"The configuration was added successfully."
],
"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.
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).