Listar objetivos de política de parches
Recupera una lista paginada de objetivos de política de parches para una organización. Admite paginación, ordenación y filtrado mediante una cadena de filtros JSON. Los objetivos de política de parches definen cuándo y cómo se aplican los parches a los Workspaces.
curl --request GET \
--url https://api.flexxible.net/v2/organizations/{organization_id}/patch-policy-targets \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.flexxible.net/v2/organizations/{organization_id}/patch-policy-targets"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.flexxible.net/v2/organizations/{organization_id}/patch-policy-targets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.flexxible.net/v2/organizations/{organization_id}/patch-policy-targets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.flexxible.net/v2/organizations/{organization_id}/patch-policy-targets"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.flexxible.net/v2/organizations/{organization_id}/patch-policy-targets")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flexxible.net/v2/organizations/{organization_id}/patch-policy-targets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"has_next": false,
"data": [
{
"id": "66ab6cf4d4d2e709bafd404c",
"name": "Base",
"created_by": "6439606652fc0c0051f1787b",
"created_at": "2024-08-01T11:09:40.719Z",
"timezone": "UTC",
"should_restart": true,
"wake_on_lan": true,
"force_patching_configuration": false,
"is_in_maintenance": false,
"weeks": [
1,
2
],
"schedule": {
"MONDAY": {},
"TUESDAY": {},
"WEDNESDAY": {},
"THURSDAY": {
"9": [
15,
30,
45
],
"10": [
0,
15,
30,
45
],
"11": [
0,
15,
30,
45
],
"12": [
0,
15,
30,
45
],
"13": [
0,
15,
30,
45
],
"14": [
0,
15,
30,
45
],
"15": [
0
]
},
"FRIDAY": {},
"SATURDAY": {},
"SUNDAY": {}
},
"patch_policy_target_type": "windows",
"patch_policy_id": "507f1f77bcf86cd799439011"
}
]
}Autorizaciones
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Parámetros de ruta
El identificador único de la organización
24^[0-9a-f]{24}$Parámetros de consulta
Número de página (predeterminado: 1)
x >= 1Elementos por página (predeterminado: 100, máx.: 100)
1 <= x <= 100Campo de ordenación con sufijo de orden opcional (:asc o :desc). Use los nombres de las propiedades de la respuesta. Campos válidos: id, name, created_at, timezone, should_restart, wake_on_lan, force_patching_configuration, is_in_maintenance, patch_policy_target_type. Ejemplo: "name:asc" o "created_at:desc"
Lista de campos separada por comas para incluir en cada elemento de objetivo de política de parches. Campos seleccionables: id, name, created_by, created_at, timezone, should_restart, wake_on_lan, force_patching_configuration, is_in_maintenance, weeks, schedule, patch_policy_target_type, patch_policy_id. El campo id siempre se incluye.
2048Filtre objetivos de política de parches por uno o más criterios. Proporcione un objeto JSON con condiciones de filtro. Puede filtrar por cualquier campo devuelto en la respuesta. Use operadores de comparación (eq, ne, gt, gte, lt, lte, in, nin, contains, startsWith, endsWith, between) y combine múltiples condiciones con operadores lógicos (and, or). Longitud máxima: 5120 caracteres.
5120curl --request GET \
--url https://api.flexxible.net/v2/organizations/{organization_id}/patch-policy-targets \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.flexxible.net/v2/organizations/{organization_id}/patch-policy-targets"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.flexxible.net/v2/organizations/{organization_id}/patch-policy-targets', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.flexxible.net/v2/organizations/{organization_id}/patch-policy-targets",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.flexxible.net/v2/organizations/{organization_id}/patch-policy-targets"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.flexxible.net/v2/organizations/{organization_id}/patch-policy-targets")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.flexxible.net/v2/organizations/{organization_id}/patch-policy-targets")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"has_next": false,
"data": [
{
"id": "66ab6cf4d4d2e709bafd404c",
"name": "Base",
"created_by": "6439606652fc0c0051f1787b",
"created_at": "2024-08-01T11:09:40.719Z",
"timezone": "UTC",
"should_restart": true,
"wake_on_lan": true,
"force_patching_configuration": false,
"is_in_maintenance": false,
"weeks": [
1,
2
],
"schedule": {
"MONDAY": {},
"TUESDAY": {},
"WEDNESDAY": {},
"THURSDAY": {
"9": [
15,
30,
45
],
"10": [
0,
15,
30,
45
],
"11": [
0,
15,
30,
45
],
"12": [
0,
15,
30,
45
],
"13": [
0,
15,
30,
45
],
"14": [
0,
15,
30,
45
],
"15": [
0
]
},
"FRIDAY": {},
"SATURDAY": {},
"SUNDAY": {}
},
"patch_policy_target_type": "windows",
"patch_policy_id": "507f1f77bcf86cd799439011"
}
]
}