Elenca contenitori

GET
https://www.digicert.com/services/v2/container

Usa questo endpoint per elencare tutti i contenitori nel tuo account.

cURL
curl -X GET \
  https://www.digicert.com/services/v2/container \
  -H 'Content-Type: application/json' \
  -H 'X-DC-DEVKEY: {{api_key}}'
Python
import requests

url = "https://www.digicert.com/services/v2/container"

payload = ""
headers = {
    'X-DC-DEVKEY': "{{api_key}}",
    'Content-Type': "application/json"
    }

response = requests.request("GET", url, data=payload, headers=headers)

print(response.text)
Go
package main

import (
	"fmt"
	"net/http"
	"io/ioutil"
)

func main() {

	url := "https://www.digicert.com/services/v2/container"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("X-DC-DEVKEY", "{{api_key}}")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := ioutil.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
NodeJS
var request = require("request");

var options = { method: 'GET',
  url: 'https://www.digicert.com/services/v2/container',
  headers: 
   { 'Content-Type': 'application/json',
     'X-DC-DEVKEY': '{{api_key}}' } };

request(options, function (error, response, body) {
  if (error) throw new Error(error);

  console.log(body);
});
200 OK
{
  "containers": [
    {
      "id": 3,
      "public_id": "<public_id>",
      "name": "Company Name, Inc.",
      "parent_id": 0,
      "template_id": 5,
      "ekey": "<ekey>",
      "has_logo": true,
      "is_active": true,
      "allowed_domain_names": [
        "example.com"
      ]
    },
    {
      "id": 11224,
      "public_id": "<public_id>",
      "name": "History department",
      "description": "For the history department.",
      "parent_id": 3,
      "template_id": 6,
      "ekey": "<ekey>",
      "has_logo": false,
      "is_active": true,
      "allowed_domain_names": [
        "example1.com"
      ],
      "organization_assignments": [
        {
          "id": 7,
          "status": "active",
          "name": "Organization Name, LLC",
          "display_name": "Organization Name",
          "is_active": "1"
        }
      ]
    },
    {
      "id": 11225,
      "public_id": "<public_id>",
      "name": "IT department",
      "description": "For the IT department.",
      "parent_id": 3,
      "template_id": 6,
      "ekey": "<ekey>",
      "has_logo": false,
      "is_active": true,
      "user_id_assignments": [
        "123456"
      ],
      "allowed_domain_names": [
        "example2.com",
        "example3.com"
      ]
    }
  ]
}

Parametri di risposta

Nome Tipo Descrizione
containers array Elenco di tutti i contenitori.
.. id int ID contenitore.
.. public_id string ID pubblico del contenitore.
.. name string Nome del contenitore.
.. description string Descrizione del contenitore.
.. parent_id int ID dell’elemento principale del contenitore.
.. template_id int ID modello del contenitore.
.. has_logo bool Stato del logo personalizzato del contenitore.
.. is_active bool Stato attivo del contenitore.
.. user_id_assignments array Elenco degli utenti assegnati al contenitore.
.. allowed_domain_names array Elenco dei domini che possono essere usati con il contenitore.
.. organization_assignments array Elenco degli oggetti organizzazione assegnati al contenitore.