• EnglishEspañol日本語한국어Português
  • EntrarComeçar agora

Esta tradução de máquina é fornecida para sua comodidade.

In the event of any inconsistency between the English version and the translated version, the English versionwill take priority. Please visit this page for more information.

Criar um problema

API REST para rótulos (EOL)

Listar rótulos existentes

Para listar os rótulos que existem na sua conta, use este comando:

curl 'https://api.newrelic.com/v2/labels.json' \
-H "Api-Key:NEW_RELIC_USER_KEY" -i

Ver o resultado

A saída para o rótulo inclui:

  • O nome completo da chave do rótulo (por exemplo, Staging:Test1), bem como o componente e o nome da chave
  • O aplicativo health_status (vermelho, laranja, verde, cinza) e ID do aplicativo para a etiqueta em cada categoria
  • Aplicativos que possuem esse rótulo; por exemplo, o rótulo Staging:Test1 foi aplicado a um aplicativo (4937390) e dois hosts (3801143 e 5879721)

A saída para uma listagem de rótulos será semelhante a esta:

{
"labels": [
{
"key": "Production:Main",
"category": "Production",
"name": "Main",
"application_health_status": {
"green": [],
"orange": [],
"red": [],
"gray": []
},
"links": {
"applications": [],
}
},
{
"key": "Staging:Test1",
"category": "Staging",
"name": "Test1",
"application_health_status": {
"green": [],
"orange": [],
"red": [
4937390
],
"gray": []
},
"links": {
"applications": [
4937390
],
}
},
...
}
Copyright © 2024 New Relic Inc.

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.