Use este terminal para retornar informações sobre um relatório, fornecendo um ID de relatório.
O recurso Biblioteca de relatórios deve estar habilitado em sua conta para que este endpoint responda com sucesso.
curl -X GET \
'https://www.digicert.com/services/v2/reports/preview/report/{{report_identifier}}' \
-H 'Content-Type: application/json' \
-H 'X-DC-DEVKEY: {{api_key}}'
import requests
url = "https://www.digicert.com/services/v1/reports/preview/report/{{report-identifier}}"
payload={}
headers = {
'Content-Type': 'application/json',
'X-DC-DEVKEY': '{{api_key}}',
}
response = requests.request("GET", url, headers=headers, data=payload)
print(response.text)
package main
import (
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://www.digicert.com/services/v1/reports/preview/report/{{report-identifier}}"
method := "GET"
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Content-Type", "application/json")
req.Header.Add("X-DC-DEVKEY", "{{api_key}}")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}
var request = require('request');
var options = {
'method': 'GET',
'url': 'https://www.digicert.com/services/v1/reports/preview/report/{{report-identifier}}',
'headers': {
'Content-Type': 'application/json',
'X-DC-DEVKEY': '{{api_key}}',
}
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
{
"report": {
"report_display_name": "RPT01",
"report_identifier": "b80de6e4-f085-4488-a47f-b7b5ea07e05e",
"created_by_user_id": 10192361,
"created_by_user_name": "venkat patil",
"created_date": "2021-01-13 09:43:17",
"report_metadata": {
"columns": [
{
"identifier": "account_id"
},
{
"identifier": "number_of_sans"
},
{
"identifier": "certificate_id"
},
{
"identifier": "certificate_validity_days"
},
{
"identifier": "container_id"
},
{
"identifier": "container_name"
}
],
"report_type": "orders"
},
"schedule": {
"frequency": "WEEKLY", //Possible values ON_DEMAND,WEEKLY,MONTHLY
"weekday_to_run": "WEDNESDAY", // Possible values SUNDAY to SATURDAY, ""
"weekday_frequency": "", // Possible values FIRST, SECOND, THIRD, FOURTH, LAST, ""
"run_until": "2021-12-23"
},
"next_run_date": "2021-01-20",
"format": [
"CSV" // Possible value only CSV
],
"status": "ACTIVE" // Always ACTIVE
}
}
{
"code": "user_authentication_error",
"message": "User is not authenticated."
}
{
"code": "user_forbidden",
"message": "User does not have the required permission."
}
{
"code": "custom_reports_not_enabled",
"message": "Custom reports is not enabled"
}
{
"code": "reports_not_found",
"message": "Report with the given identifier does not exist."
}
404 page not found
Nome | Obr/Opc | Tipo | Descrição |
---|---|---|---|
report-identifier | obrigatório | string | ID do relatório exibido na resposta de Criar API de relatório. |
Nome | Tipo | Descrição |
---|---|---|
report | object | Recipiente. |
report_display_name | string | O nome especificado para o relatório. |
.. report_identifier | string | ID do relatório exibido na resposta de Criar API de relatório. |
.. created_by_user_id | string | O ID do usuário associado à pessoa que está criando o relatório. |
.. created_date | string | A data de criação do relatório, incluindo o carimbo de data/hora no formato: AA-MM-DD HH - MM-SS. |
.. created_by_user_name | string | O nome de usuário associado à criação do relatório. |
.. report_metadata | object | Recipiente. |
.. .. columns | object | Tipos de colunas especificadas no relatório. |
.. .. .. identifier | string | O identificador de coluna compatível com APIs da biblioteca de relatórios. Para obter uma lista de todas as colunas com suporte, consulte Colunas da API da biblioteca de relatórios. |
.. .. report_type | string | O tipo de relatório. |
.. schedule | object | Recipiente. |
.. .. frequency | string |
A frequência de criação do relatório. Valores possíveis: ON_DEMAND, WEEKLY, MONTHLY . Os valores diferenciam maiúsculas de minúsculas.
|
.. .. weekday_to_run | string |
O dia da semana para criar o relatório. Valores possíveis: SUNDAY a SATURDAY . Os valores diferenciam maiúsculas de minúsculas.
|
.. .. weekday_frequency | string |
O número de vezes para criar o relatório por dia da semana. Valores possíveis: FIRST , SECOND , THIRD , FOURTH , LAST . Os valores diferenciam maiúsculas de minúsculas.
|
.. .. run_until | date | A data para interromper a criação deste relatório. Formato: AA-MM-DD. |
.. next_run_date | date | A data para retomar a criação deste relatório. Formato: AA-MM-DD. |
.. format | string |
O formato do relatório. Para este terminal, o valor possível é CSV . Para retornar um relatório em JSON, consulte Obter API de relatório JSON.
|
.. status | string |
O status do relatório. Todos os relatórios programados são ACTIVE .
|