Configuration
Configure settings across your entire application.
Configuration Object
Individual configuration objects can be created for various modules that make up your application.
You should know!
For security purposes, when using the Stellify Editor with our database, there are limits enforced on which configuration objects can be created and within those objects, which keys can be edited.
Retrieve Config
This endpoint allows you to retrieve a config settings for a given config name.
Request
curl -G https://api.stellify.com/v1/config/app \
-H "Authorization: Bearer {token}"
import ApiClient from '@stellisoft/js-api-client'
const client = new ApiClient(token)
await client.config.get('app')
from stellify_api import ApiClient
client = ApiClient(token)
client.config.get('app')
$client = new \Stellify\ApiClient($token);
$client->config->get('app');
Response
{
"name": "My first app"
}
Create Config
This endpoint allows you to create a new configuration object.
Required attributes
-
- Name
name
- Type
- string
- Description
-
The name of the config you wish to create.
Request
curl https://api.stellify.com/v1/config \
-H "Authorization: Bearer {token}" \
-d name="app"
import ApiClient from '@stellisoft/js-api-client'
const client = new ApiClient(token)
await client.config.create('app')
from stellify_api import ApiClient
client = ApiClient(token)
client.config.create("app")
$client = new \Stellify\ApiClient($token);
$client->config->create('app');
Response
{
"name": "My first app"
}
Update Config
This endpoint allows you to save changes to a config object.
Request
curl -X PUT https://api.stellify.com/v1/config/app \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-d "{\"name\":\"My new project name\"}"
import ApiClient from '@stellisoft/js-api-client'
const client = new ApiClient(token)
await client.method.update('app', {
"name": "My new project name",
});
from stellify_api import ApiClient
client = ApiClient(token)
client.method.update("app", name="My new project name")
$client = new \Stellify\ApiClient($token);
$client->method->update('app, [
"name" => "My new project name",
]);
Response
{
"name": "My new project name"
}
Delete Config
This endpoint allows you to delete a config object.
Request
curl -X DELETE https://api.stellify.com/v1/config/app \
-H "Authorization: Bearer {token}"
import ApiClient from '@stellisoft/js-api-client'
const client = new ApiClient(token)
await client.messages.delete('app')
from stellify_api import ApiClient
client = ApiClient(token)
client.config settings.delete("app")
$client = new \Stellify\ApiClient($token);
$client->config settings->delete('app');