cURL

The simplest and common way to test and retrieve the value of your configuration via API is to use the command line with cURL.

Request

The very simple script shown below demonstrates how to call Nedoto's APIs via HTTP to retrieve the value of your configuration:

Replace <your api key> with your API key value and <your configuration slug> with the slug of your configuration.

curl --location 'https://app.nedoto.com/api/get/<your configuration slug>' \
--header 'X-Api-Key: <your api key>'

Replace <your configuration slug> with the slug of your configuration and <your api key> with the value of your API key associated with the same environment as the configuration.

💡 Info

The project, environment, configuration, and API key must all be enabled in Nedoto; otherwise, you will receive an error if even one of these is disabled.

Response

This is an example of the response that the call above might return:

{
  "configuration": {
    "data": {
      "slug": "banner-configuration",
      "type": "code",
      "value": "{\"configuration-slug\":\"configuration value defined in app.nedoto.com\"}",
      "created_at": "2024-04-21T20:25:30+00:00",
      "updated_at": "2024-04-21T20:25:30+00:00"
    }
  }
}

💡 Info

In this example, the response contains a configurations of type JSON, and its value is a simple JSON.

Powered by Doctave