> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-mintlify-67bc7bf8.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Acceso programático a la API con Postman

> Esta guía le ayudará a probar la API de ClickHouse Cloud con Postman

export const Image = ({img, alt, size}) => {
  return <Frame>
      <img src={img} alt={alt} />
    </Frame>;
};

Esta guía te ayudará a probar la API de ClickHouse Cloud con [Postman](https://www.postman.com/product/what-is-postman/).
La aplicación Postman está disponible para usarse en un navegador web o puede descargarse en un equipo de escritorio.

<div id="create-an-account">
  ### Crear una cuenta
</div>

* Puedes crear una cuenta gratuita en [https://www.postman.com](https://www.postman.com).

<Image img="https://mintcdn.com/private-7c7dfe99-mintlify-67bc7bf8/rN0GAKCa2MML40yO/images/cloud/manage/postman/postman1.png?fit=max&auto=format&n=rN0GAKCa2MML40yO&q=85&s=29a723988ebfd50b8d39a82f6b13fae8" size="md" alt="Sitio de Postman" border width="1621" height="1011" data-path="images/cloud/manage/postman/postman1.png" />

<div id="create-a-workspace">
  ### Crear un espacio de trabajo
</div>

* Asigna un nombre a tu espacio de trabajo y establece el nivel de visibilidad.

<Image img="https://mintcdn.com/private-7c7dfe99-mintlify-67bc7bf8/rN0GAKCa2MML40yO/images/cloud/manage/postman/postman2.png?fit=max&auto=format&n=rN0GAKCa2MML40yO&q=85&s=5f92a02b1b1a92b00af693bb7050f532" size="md" alt="Crear un espacio de trabajo" border width="784" height="760" data-path="images/cloud/manage/postman/postman2.png" />

<div id="create-a-collection">
  ### Crear una colección
</div>

* Debajo de "Explore", en el menú superior izquierdo, haz clic en "Import":

<Image img="https://mintcdn.com/private-7c7dfe99-mintlify-67bc7bf8/rN0GAKCa2MML40yO/images/cloud/manage/postman/postman3.png?fit=max&auto=format&n=rN0GAKCa2MML40yO&q=85&s=4e45550dfecad0e7cb216855171b207a" size="md" alt="Explore > Import" border data-og-width="1317" width="1317" data-og-height="647" height="647" data-path="images/cloud/manage/postman/postman3.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/private-7c7dfe99-mintlify-67bc7bf8/rN0GAKCa2MML40yO/images/cloud/manage/postman/postman3.png?w=280&fit=max&auto=format&n=rN0GAKCa2MML40yO&q=85&s=f3459ab7b2c5be5f870a4c4026fa3022 280w, https://mintcdn.com/private-7c7dfe99-mintlify-67bc7bf8/rN0GAKCa2MML40yO/images/cloud/manage/postman/postman3.png?w=560&fit=max&auto=format&n=rN0GAKCa2MML40yO&q=85&s=6b849de23b6f7ee04b99a435620748d7 560w, https://mintcdn.com/private-7c7dfe99-mintlify-67bc7bf8/rN0GAKCa2MML40yO/images/cloud/manage/postman/postman3.png?w=840&fit=max&auto=format&n=rN0GAKCa2MML40yO&q=85&s=72d9d5789ab76e610330e99923b50d32 840w, https://mintcdn.com/private-7c7dfe99-mintlify-67bc7bf8/rN0GAKCa2MML40yO/images/cloud/manage/postman/postman3.png?w=1100&fit=max&auto=format&n=rN0GAKCa2MML40yO&q=85&s=22b842dd7d56eb8ffb1c276e439f8794 1100w, https://mintcdn.com/private-7c7dfe99-mintlify-67bc7bf8/rN0GAKCa2MML40yO/images/cloud/manage/postman/postman3.png?w=1650&fit=max&auto=format&n=rN0GAKCa2MML40yO&q=85&s=908a1d2fe333e1b50a0cd03eac19d8e9 1650w, https://mintcdn.com/private-7c7dfe99-mintlify-67bc7bf8/rN0GAKCa2MML40yO/images/cloud/manage/postman/postman3.png?w=2500&fit=max&auto=format&n=rN0GAKCa2MML40yO&q=85&s=611546c0c4fe4714bb5f27dafcde2b67 2500w" />

* Se abrirá una ventana modal:

<Image img="https://mintcdn.com/private-7c7dfe99-mintlify-67bc7bf8/rN0GAKCa2MML40yO/images/cloud/manage/postman/postman4.png?fit=max&auto=format&n=rN0GAKCa2MML40yO&q=85&s=714a938e9f373f3c0616c6c0296ea837" size="md" alt="Campo de URL de la API" border width="659" height="471" data-path="images/cloud/manage/postman/postman4.png" />

* Introduce la URL de la API: "[https://api.clickhouse.cloud/v1](https://api.clickhouse.cloud/v1)" y pulsa 'Enter':

* Selecciona "Postman Collection" haciendo clic en el botón "Import":

<Image img="https://mintcdn.com/private-7c7dfe99-mintlify-67bc7bf8/rN0GAKCa2MML40yO/images/cloud/manage/postman/postman6.png?fit=max&auto=format&n=rN0GAKCa2MML40yO&q=85&s=08f1f59775df64f86d9a8a2bc8a7bbb8" size="md" alt="Colección > Import" border data-og-width="666" width="666" data-og-height="253" height="253" data-path="images/cloud/manage/postman/postman6.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/private-7c7dfe99-mintlify-67bc7bf8/rN0GAKCa2MML40yO/images/cloud/manage/postman/postman6.png?w=280&fit=max&auto=format&n=rN0GAKCa2MML40yO&q=85&s=a9a40b7443b4276bbaffa1bb4ca8dc01 280w, https://mintcdn.com/private-7c7dfe99-mintlify-67bc7bf8/rN0GAKCa2MML40yO/images/cloud/manage/postman/postman6.png?w=560&fit=max&auto=format&n=rN0GAKCa2MML40yO&q=85&s=52fdb2396ce1de5d4a14141c38907aa7 560w, https://mintcdn.com/private-7c7dfe99-mintlify-67bc7bf8/rN0GAKCa2MML40yO/images/cloud/manage/postman/postman6.png?w=840&fit=max&auto=format&n=rN0GAKCa2MML40yO&q=85&s=f45ef8dd6b1198156ddecfba476571fe 840w, https://mintcdn.com/private-7c7dfe99-mintlify-67bc7bf8/rN0GAKCa2MML40yO/images/cloud/manage/postman/postman6.png?w=1100&fit=max&auto=format&n=rN0GAKCa2MML40yO&q=85&s=466257384ab1c103fb4420f234fbcdf5 1100w, https://mintcdn.com/private-7c7dfe99-mintlify-67bc7bf8/rN0GAKCa2MML40yO/images/cloud/manage/postman/postman6.png?w=1650&fit=max&auto=format&n=rN0GAKCa2MML40yO&q=85&s=24bfa4b8f8d1f9fabece44106ad4658e 1650w, https://mintcdn.com/private-7c7dfe99-mintlify-67bc7bf8/rN0GAKCa2MML40yO/images/cloud/manage/postman/postman6.png?w=2500&fit=max&auto=format&n=rN0GAKCa2MML40yO&q=85&s=7fbb2d36420c6b8b87146cfbba0dfd66 2500w" />

<div id="interface-with-the-clickhouse-cloud-api-spec">
  ### Interactúa con la especificación de la API de ClickHouse Cloud
</div>

* La "API spec for ClickHouse Cloud" ahora aparecerá en "Collections" (navegación izquierda).

<Image img="https://mintcdn.com/private-7c7dfe99-mintlify-67bc7bf8/rN0GAKCa2MML40yO/images/cloud/manage/postman/postman7.png?fit=max&auto=format&n=rN0GAKCa2MML40yO&q=85&s=3185bb7d31b3894b9951404eb16ff2be" size="md" alt="Importa tu API" border width="949" height="446" data-path="images/cloud/manage/postman/postman7.png" />

* Haz clic en "API spec for ClickHouse Cloud". En el panel central, selecciona la pestaña "Authorization":

<Image img="https://mintcdn.com/private-7c7dfe99-mintlify-67bc7bf8/rN0GAKCa2MML40yO/images/cloud/manage/postman/postman8.png?fit=max&auto=format&n=rN0GAKCa2MML40yO&q=85&s=305e250a2e991b1fe71451272cddf8c6" size="md" alt="Importación completada" border width="872" height="420" data-path="images/cloud/manage/postman/postman8.png" />

<div id="set-authorization">
  ### Configurar la autorización
</div>

* Abre el menú desplegable y selecciona "Basic Auth":

<Image img="https://mintcdn.com/private-7c7dfe99-mintlify-67bc7bf8/rN0GAKCa2MML40yO/images/cloud/manage/postman/postman9.png?fit=max&auto=format&n=rN0GAKCa2MML40yO&q=85&s=e4f382922730eced8f94164344407db1" size="md" alt="Basic auth" border width="789" height="620" data-path="images/cloud/manage/postman/postman9.png" />

* Introduce el nombre de usuario y la contraseña que recibiste al configurar tus API keys de ClickHouse Cloud:

<Image img="https://mintcdn.com/private-7c7dfe99-mintlify-67bc7bf8/rN0GAKCa2MML40yO/images/cloud/manage/postman/postman10.png?fit=max&auto=format&n=rN0GAKCa2MML40yO&q=85&s=181425b2acf079cb049f2b36680a7d3b" size="md" alt="credenciales" border width="951" height="700" data-path="images/cloud/manage/postman/postman10.png" />

<div id="enable-variables">
  ### Habilitar variables
</div>

* Las [variables](https://learning.postman.com/docs/sending-requests/variables/) permiten almacenar y reutilizar valores en Postman, lo que facilita las pruebas de la API.

<div id="set-the-organization-id-and-service-id">
  #### Configura el ID de la organización y el ID del servicio
</div>

* En la "Collection", haz clic en la pestaña "Variable" del panel central (la URL base ya se habrá configurado con la importación previa de la API):
* Debajo de `baseURL`, haz clic en el campo "Add new value" y reemplázalo por tu ID de la organización y tu ID del servicio:

<Image img="https://mintcdn.com/private-7c7dfe99-mintlify-67bc7bf8/rN0GAKCa2MML40yO/images/cloud/manage/postman/postman11.png?fit=max&auto=format&n=rN0GAKCa2MML40yO&q=85&s=af644f92ef9902cfeb0e35b5134f77c0" size="md" alt="ID de la organización e ID del servicio" border width="1057" height="558" data-path="images/cloud/manage/postman/postman11.png" />

<div id="test-the-clickhouse-cloud-api-functionalities">
  ## Probar las funcionalidades de la API de ClickHouse Cloud
</div>

<div id="test-get-list-of-available-organizations">
  ### Pruebe "GET list of available organizations"
</div>

* En "OpenAPI spec for ClickHouse Cloud", expanda la carpeta > V1 > organizations
* Haga clic en "GET list of available organizations" y pulse el botón azul "Send" a la derecha:

<Image img="https://mintcdn.com/private-7c7dfe99-mintlify-67bc7bf8/rN0GAKCa2MML40yO/images/cloud/manage/postman/postman12.png?fit=max&auto=format&n=rN0GAKCa2MML40yO&q=85&s=41b45fcc77450954fb851204eb6b534b" size="md" alt="Pruebe la obtención de organizaciones" border width="1797" height="972" data-path="images/cloud/manage/postman/postman12.png" />

* Los resultados devueltos deberían mostrar los detalles de su organización con "status": 200. (Si recibe un "status" 400 sin información de la organización, su configuración no es correcta).

<Image img="https://mintcdn.com/private-7c7dfe99-mintlify-67bc7bf8/rN0GAKCa2MML40yO/images/cloud/manage/postman/postman13.png?fit=max&auto=format&n=rN0GAKCa2MML40yO&q=85&s=2946977c68a89ca6bcc6a26198779d5b" size="md" alt="Estado" border width="1797" height="972" data-path="images/cloud/manage/postman/postman13.png" />

<div id="test-get-organizational-details">
  ### Probar "GET organizational details"
</div>

* En la carpeta `organizationid`, ve a "GET organizational details":
* En el menú del panel central, en Params, se requiere un `organizationid`.

<Image img="https://mintcdn.com/private-7c7dfe99-mintlify-67bc7bf8/rN0GAKCa2MML40yO/images/cloud/manage/postman/postman14.png?fit=max&auto=format&n=rN0GAKCa2MML40yO&q=85&s=be257f14e173bba53241925a81916b81" size="md" alt="Probar la obtención de los detalles de la organización" border width="1797" height="972" data-path="images/cloud/manage/postman/postman14.png" />

* Edita este valor con `orgid` entre llaves `{{orgid}}` (como ya estableciste este valor antes, aparecerá un menú con él):

<Image img="https://mintcdn.com/private-7c7dfe99-mintlify-67bc7bf8/rN0GAKCa2MML40yO/images/cloud/manage/postman/postman15.png?fit=max&auto=format&n=rN0GAKCa2MML40yO&q=85&s=8e158caf4bcfecf64225c22e4f54a278" size="md" alt="Enviar prueba" border width="1797" height="972" data-path="images/cloud/manage/postman/postman15.png" />

* Después de pulsar el botón "Save", pulsa el botón azul "Send" en la esquina superior derecha de la pantalla.

<Image img="https://mintcdn.com/private-7c7dfe99-mintlify-67bc7bf8/rN0GAKCa2MML40yO/images/cloud/manage/postman/postman16.png?fit=max&auto=format&n=rN0GAKCa2MML40yO&q=85&s=f89c36cba25250a74606dcbb44db6d9d" size="md" alt="Valor devuelto" border width="1797" height="972" data-path="images/cloud/manage/postman/postman16.png" />

* Los resultados devueltos deberían mostrar los detalles de tu organización con "status": 200. (Si recibes un "status" 400 sin información de la organización, la configuración no es correcta).

<div id="test-get-service-details">
  ### Probar "GET service details"
</div>

* Haz clic en "GET service details"
* Edita los valores de `organizationid` y `serviceid` con `{{orgid}}` y `{{serviceid}}`, respectivamente.
* Pulsa "Save" y luego el botón azul "Send", a la derecha.

<Image img="https://mintcdn.com/private-7c7dfe99-mintlify-67bc7bf8/rN0GAKCa2MML40yO/images/cloud/manage/postman/postman17.png?fit=max&auto=format&n=rN0GAKCa2MML40yO&q=85&s=18000ec0082a590187bd5e84f0b45f21" size="md" alt="Lista de servicios" border width="1537" height="867" data-path="images/cloud/manage/postman/postman17.png" />

* Los resultados devueltos deberían mostrar una lista de tus servicios y sus detalles con "status": 200. (Si recibes un "status" 400 sin información de servicios, tu configuración no es correcta).
