Ir al contenido
v2.7

Advisor

Informes generados por el servidor con sugerencias sobre el proyecto.

Informes generados por el servidor con sugerencias sobre el proyecto.

Clase Advisor: 5 métodos (0 en @owbase/web, 5 en @owbase/node). Las descripciones de los métodos están en inglés. Los ejemplos usan la forma de objeto de los parámetros; cambia los valores entre < y > por los tuyos.

Listar informes

GET /reports · página del método

SDK: solo @owbase/node

Get a list of all the project’s analyzer reports. You can use the query params to filter your results.

Parámetro Tipo Obligatorio Descripción
queries string[] no Array of query strings generated using the Query class provided by the SDK. Learn more about queries. Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: appId, type, targetType, target, analyzedAt
total boolean no When set to false, the total count returned will be 0 and will not be calculated.

Acceso: clave de API con el alcance reports.read.

@owbase/node
import { Client, Advisor } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const advisor = new Advisor(client);
const result = await advisor.listReports({
queries: [], // optional
total: false, // optional
});

Obtener informe

GET /reports/{reportId} · página del método

SDK: solo @owbase/node

Get an analyzer report by its unique ID. The response includes the report’s metadata and the nested insights it produced.

Parámetro Tipo Obligatorio Descripción
reportId string sí Report ID.

Acceso: clave de API con el alcance reports.read.

@owbase/node
import { Client, Advisor } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const advisor = new Advisor(client);
const result = await advisor.getReport({
reportId: '<REPORT_ID>',
});

Eliminar informe

DELETE /reports/{reportId} · página del método

SDK: solo @owbase/node

Delete an analyzer report by its unique ID. Nested insights and CTA metadata are removed asynchronously by the deletes worker.

Parámetro Tipo Obligatorio Descripción
reportId string sí Report ID.

Acceso: clave de API con el alcance reports.write.

@owbase/node
import { Client, Advisor } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const advisor = new Advisor(client);
const result = await advisor.deleteReport({
reportId: '<REPORT_ID>',
});

Listar insights

GET /reports/{reportId}/insights · página del método

SDK: solo @owbase/node

List the insights produced under a single analyzer report. You can use the query params to filter your results further.

Parámetro Tipo Obligatorio Descripción
reportId string sí Parent report ID.
queries string[] no Array of query strings generated using the Query class provided by the SDK. Learn more about queries. Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: type, severity, status, resourceType, resourceId, parentResourceType, parentResourceId, analyzedAt, dismissedAt, dismissedBy
total boolean no When set to false, the total count returned will be 0 and will not be calculated.

Acceso: clave de API con el alcance insights.read.

@owbase/node
import { Client, Advisor } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const advisor = new Advisor(client);
const result = await advisor.listInsights({
reportId: '<REPORT_ID>',
queries: [], // optional
total: false, // optional
});

Obtener insight

GET /reports/{reportId}/insights/{insightId} · página del método

SDK: solo @owbase/node

Get an insight by its unique ID, scoped to its parent report.

Parámetro Tipo Obligatorio Descripción
reportId string sí Parent report ID.
insightId string sí Insight ID.

Acceso: clave de API con el alcance insights.read.

@owbase/node
import { Client, Advisor } from '@owbase/node';
const client = new Client()
.setEndpoint('https://cloud.owbase.dev/v1') // Your API Endpoint
.setProject('<YOUR_PROJECT_ID>') // Your project ID
.setKey('<YOUR_API_KEY>'); // Your secret API key
const advisor = new Advisor(client);
const result = await advisor.getInsight({
reportId: '<REPORT_ID>',
insightId: '<INSIGHT_ID>',
});

Las descripciones de esta página vienen de la especificación de la API del servidor (licencia BSD-3-Clause), en inglés, y los ejemplos vienen del generador de SDKs (licencia MIT). Los avisos completos están en el archivo NOTICE de los paquetes @owbase/web y @owbase/node.

¿Te ayudó esta página?