Ana içeriğe geç

Get Traffic Log Settings by Environment

Endpoint

GET /apiops/projects/{projectName}/apiProxies/{apiProxyName}/trafficLogSettings/{environmentName}/

Authentication

Requires a Personal API Access Token.

Authorization: Bearer YOUR_TOKEN

Request

Headers

HeaderValueRequired
AuthorizationBearer {token}Yes

Path Parameters

ParameterTypeRequiredDescription
projectNamestringYesProject name
apiProxyNamestringYesAPI Proxy name
environmentNamestringYesEnvironment name

Response

Success Response (200 OK)

{
"status": "SUCCESS",
"resultList": [
{
"logParamRequestFromClient": true,
"logHeaderRequestFromClient": true,
"logBodyRequestFromClient": true,
"logParamRequestToTarget": true,
"logHeaderRequestToTarget": true,
"logBodyRequestToTarget": true,
"logHeaderResponseFromTarget": true,
"logBodyResponseFromTarget": true,
"logHeaderResponseToClient": true,
"logBodyResponseToClient": true,
"connectorSettingsMap": {
"Production Elasticsearch": {
"enabled": true,
"logBodyRequestFromClient": true,
"enableBodyFromClientSize": true,
"sizeBodyFromClient": 1024
},
"ELASTICSEARCH_INDEX": {
"enabled": true,
"logBodyRequestFromClient": true
}
},
"methodOverrideList": [
{
"apiMethodName": "/pets",
"connectorSettingsMap": {
"Production Elasticsearch": {
"logBodyRequestFromClient": false
}
}
}
]
}
],
"resultCount": 1
}

Error Response (400 Bad Request)

{
"error": "bad_request",
"error_description": "Environment (staging) is not found!"
}

cURL Example

curl -X GET \
"https://demo.apinizer.com/apiops/projects/MyProject/apiProxies/MyAPI/trafficLogSettings/production/" \
-H "Authorization: Bearer YOUR_TOKEN"

Permissions

User must have API_MANAGEMENT + VIEW permission in the project.

Notes

  • The connectorSettingsMap uses connection names as keys (e.g., "Production Elasticsearch"). Legacy connector type keys (e.g., ELASTICSEARCH_INDEX) may also appear for backward compatibility.