Skip to content

Service Config

Service Owners generally need to store some form of configuration to enable their automated processes to run. This could be in the form of simple things like the IP address of the device they would be sending configuration to, or a configuration template that they may use in conjunction with the declaration that has been asked from the Consumer. To avoid Service Owners requiring to store this in another database or configuration file, NetOrca provides Service Config model. Service Config is basically a versioned dictionary for each Service, and is fully managed by Service Owners.

Service Owners can update each Service's Config:

POST /v1/orcabase/serviceowner/service_configs/ HTTP/1.1
Content-Type: application/json
Authorization: Token <YOUR_TOKEN> or Api-Key <YOUR_API_KEY>
{
    "service": <service_id>, 
    config: { ... any config dictionay ... }
}

Service Owners may update the Service Config declaratively. It means always the full declaration must be sent to the endpoint. It is not possible to update a Config partially. Each time, a new version of the Config will be saved in NetOrca's database. Service Owners can still access the old versions of their Service Config. However, There is a limit for the number Configs per Service managed by NetOrca admin. If the number of Configs exceeds the limit, the oldest Config will be deleted automatically, i.e. First In, First Out.

To access the Service Configs, both list and detail endpoints are available:

GET /v1/orcabase/serviceowner/service_configs/?service_id=<int>&limit=1&ordering=-version HTTP/1.1
Content-Type: application/json
Authorization: Token <YOUR_TOKEN> or Api-Key <YOUR_API_KEY>