Skip to main content

Query Environment Information

Use this API to retrieve available environments in NineData. Filter by environment name and use the returned environment IDs when creating or updating data sources.

Request URL: /openapi/v1/env/list

Request Method: GET

Request Parameters

ParameterTypeRequiredDescriptionExample
nameStringNoEnvironment name.Production Env
currentIntegerNoCurrent page, starting from 1, default is 1.1
pageSizeIntegerNoPage size, default is 10.50

Response Parameters

ParameterTypeDescriptionExample
successBoolWhether the API call was successful. Return values: true, false.true
requestIdStringRequest ID.Xh4k7XPF-IOLLqNYnJOIf0VFdOQe9SIO
dataArrayEnvironment list, including environment ID (envId), environment name (name), and other information.{
"envId": "env-product",
"name": "Production"
}
currentIntegerCurrent page number.1
pageSizeIntegerSize per page.10
totalIntegerTotal number of environments.2

Successful Invocation Example

{
"success": true,
"requestId": "Xh4k7XPF-IOLLqNYnJOIf0VFdOQe9SIO",
"data": [{
"envId": "env-product",
"name": "Production"
}, {
"envId": "env-dev",
"name": "Test"
}],
"current": 1,
"pageSize": 10,
"total": 2
}

Result

A successful response returns environments that match the filters. Use the returned envId when you bind a data source to an environment.