> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zylon.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Integración SharePoint

> Sincroniza documentos de SharePoint en el espacio de trabajo.

<Warning>
  **Próxima versión — Zylon 1.58**

  Esta documentación se publica antes del lanzamiento para que puedas preparar tus integraciones de API. La imagen de la versión todavía no está disponible. Para instalaciones con 1.57, consulta la [documentación de 1.57](/es/v1.57/overview).
</Warning>

Las integraciones de SharePoint importan bibliotecas y documentos. **Habilita SharePoint a nivel de instancia primero**—consulta la guía del operador: [Configuración de SharePoint](/es/v1.58/operator-manual/knowledge-base/sharepoint).

Usa el flujo de [OpenID y OAuth](/es/v1.58/developer-manual/build-with-zylon/workspace-api/authentication/openid) para crear o volver a autenticar el artefacto de integración. Los tokens se guardan como propiedades privadas y no se devuelven en la API pública de artefactos.

## Obtener la integración

<Accordion title="Parametros del endpoint">
  | Tipo | Nombre | Obligatorio | Notas |
  | - | - | - | - |
  | Path | `integrationArtifactID` | Si | ID del artefacto de integración SharePoint. |
</Accordion>

```bash theme={null}
curl "https://{BASE_URL}/api/v1/app/artifact/{integrationArtifactID}" \
  -H "Authorization: Bearer {API_TOKEN}" \
  -H "x-org: {org_slug}"
```

<Accordion title="Ejemplo de respuesta">
  ```json theme={null}
  {
    "id": "{integrationArtifactID}",
    "child_count": 0,
    "project_id": "{projectID}",
    "name": "SharePoint de soporte",
    "type": "Integration",
    "source": "SharePoint",
    "state": "Published",
    "ingest_status": "NotApplicable",
    "props": {},
    "keep_file_after_ingestion": true,
    "created_by": {
      "id": "{accountID}",
      "state": "Active",
      "email": "sasha@example.com",
      "name": "Sasha Patel",
      "provider": "Credentials",
      "roles": ["Workspace"],
      "created_at": "2026-02-08T14:12:45Z",
      "updated_at": "2026-02-08T14:12:45Z"
    },
    "created_at": "2026-03-01T11:00:00Z",
    "updated_at": "2026-03-01T11:00:00Z",
    "scopes": [
      {
        "scope_type": "project",
        "scope_id": "{projectID}",
        "enabled": true,
        "ws_auto_select": false
      }
    ]
  }
  ```
</Accordion>

## Iniciar la ingesta

Indica el proyecto de destino y los elementos que quieres importar. Cada elemento necesita el ID de la unidad y el ID del archivo o carpeta. La respuesta es un stream de Server-Sent Events (SSE).

<Accordion title="Parametros del endpoint">
  | Tipo | Nombre | Obligatorio | Notas |
  | - | - | - | - |
  | Path | `integrationArtifactID` | Si | ID del artefacto de integración SharePoint. |
  | Body | `project_id` | Si | Proyecto de destino. |
  | Body | `items` | Si | Elementos de SharePoint que se importarán. |
  | Body | `items[].drive_id` | Si | ID de la unidad de SharePoint. |
  | Body | `items[].id` | Si | ID del archivo o carpeta. |
</Accordion>

```bash theme={null}
curl -N -X POST "https://{BASE_URL}/api/v1/app/artifact/{integrationArtifactID}/ingest" \
  -H "Authorization: Bearer {API_TOKEN}" \
  -H "x-org: {org_slug}" \
  -H "Content-Type: application/json" \
  -H "Accept: text/event-stream" \
  -d '{
    "project_id": "{projectID}",
    "items": [
      {
        "drive_id": "{driveID}",
        "id": "{itemID}"
      }
    ]
  }'
```

<Accordion title="Ejemplo de stream">
  ```text theme={null}
  event: SyncEvent
  data: {"type":"sync_started","current_artifact_count":0,"integration_item_count":1}

  event: SyncEvent
  data: {"type":"sync_progress","artifact_id":"{artifactID}","op":"Added","progress":1.0}

  event: SyncEvent
  data: {"type":"sync_completed"}
  ```
</Accordion>

## Errores y casos límite

* **400**: faltan `project_id`, `items` o alguno de sus IDs.
* **403**: integración no habilitada o permisos insuficientes.
* **404**: proyecto, elemento o artefacto de integración no encontrado.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.