Skip to main content

Overview

The SharePoint API provides endpoints for syncing files from SharePoint Online to Zarna. Base Path: /api/sharepoint

Endpoints

List Files

GET /api/sharepoint/files
Query Parameters:
  • site_url: SharePoint site URL
  • library: Document library name
  • company_id: Associated company
Response:
{
  "files": [
    {
      "id": "sharepoint-file-123",
      "name": "Proposal.docx",
      "size": 1048576,
      "modified_at": "2024-01-20T10:30:00Z",
      "web_url": "https://company.sharepoint.com/..."
    }
  ]
}

Sync Site

POST /api/sharepoint/sync
Request Body:
{
  "site_url": "https://company.sharepoint.com/sites/deals",
  "library": "Documents",
  "company_id": "550e8400-e29b-41d4-a716-446655440000"
}

Download File

GET /api/sharepoint/files/{file_id}/download

Next Steps