Cesivi Server - API Reference¶
Home → Documentation → Reference → API Reference
Overview¶
The Cesivi Server implements a comprehensive set of SharePoint 2019/Online APIs, providing 100% SOAP service coverage and full REST API support with OData queries. This document serves as a complete reference for all available endpoints, request/response formats, and authentication methods.
API Coverage: - 26 SOAP Services (100% coverage) - 38+ REST Endpoints (full OData support) - CSOM Protocol (implemented, requires VM for debugging)
Table of Contents¶
Authentication¶
Supported Authentication Schemes¶
The mock server supports multiple authentication methods for compatibility with different SharePoint clients:
| Scheme | Header Format | Supported | Status |
|---|---|---|---|
| NTLM | Authorization: NTLM <token> |
✅ Yes | Production |
| Basic | Authorization: Basic <base64> |
✅ Yes | Production |
| Bearer | Authorization: Bearer <token> |
✅ Yes | Production |
| Forms | Cookie-based | ✅ Yes | Production |
Authentication Examples¶
Basic Authentication:
$user = "domain\username"
$pass = "password"
$base64Creds = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes("${user}:${pass}"))
$headers = @{"Authorization" = "Basic $base64Creds"}
Invoke-RestMethod -Uri "http://localhost/_api/web" -Headers $headers
NTLM Authentication:
$creds = Get-Credential
Invoke-RestMethod -Uri "http://localhost/_api/web" -Credential $creds
Bearer Token:
$headers = @{"Authorization" = "Bearer eyJ0eXAiOiJKV1QiLCJhbGc..."}
Invoke-RestMethod -Uri "http://localhost/_api/web" -Headers $headers
Mock Behavior¶
Note: The current implementation accepts all credentials without validation. This is intended for testing purposes. In production deployments, implement proper credential validation.
SOAP Services¶
All SOAP services are accessible at /_vti_bin/<service>.asmx with standard SOAP 1.1/1.2 protocols.
1. Lists Service (lists.asmx)¶
Status: ✅ FULL Implementation
Endpoint: POST /_vti_bin/lists.asmx
GetListCollection¶
Returns all lists in the current web.
Request:
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<GetListCollection xmlns="http://schemas.microsoft.com/sharepoint/soap/" />
</soap:Body>
</soap:Envelope>
Response:
<GetListCollectionResponse xmlns="http://schemas.microsoft.com/sharepoint/soap/">
<GetListCollectionResult>
<List ID="{guid}" Title="Documents" BaseType="1" BaseTemplate="101" />
<List ID="{guid}" Title="Tasks" BaseType="0" BaseTemplate="107" />
</GetListCollectionResult>
</GetListCollectionResponse>
GetList¶
Returns metadata for a specific list.
Request:
<GetList xmlns="http://schemas.microsoft.com/sharepoint/soap/">
<listName>Documents</listName>
</GetList>
GetListItems¶
Query list items with CAML.
Request:
<GetListItems xmlns="http://schemas.microsoft.com/sharepoint/soap/">
<listName>Documents</listName>
<query>
<Query>
<Where>
<Eq>
<FieldRef Name="Title"/>
<Value Type="Text">Example</Value>
</Eq>
</Where>
</Query>
</query>
<viewFields>
<ViewFields>
<FieldRef Name="Title"/>
<FieldRef Name="Modified"/>
</ViewFields>
</viewFields>
<rowLimit>100</rowLimit>
</GetListItems>
UpdateListItems¶
CRUD operations on list items (New, Update, Delete).
Request:
<UpdateListItems xmlns="http://schemas.microsoft.com/sharepoint/soap/">
<listName>Documents</listName>
<updates>
<Batch OnError="Continue">
<Method ID="1" Cmd="New">
<Field Name="Title">New Document</Field>
<Field Name="FileLeafRef">document.docx</Field>
</Method>
</Batch>
</updates>
</UpdateListItems>
Additional Methods¶
AddList- Create new listDeleteList- Delete listGetFields- Get field collectionGetViewCollection- Get viewsAddAttachment- Upload attachmentGetAttachmentCollection- List attachmentsDeleteAttachment- Remove attachmentGetVersionCollection- File versionsCheckOutFile- Mark file checked outCheckInFile- Check in fileUndoCheckOut- Revert checkout
2. Webs Service (webs.asmx)¶
Status: ✅ FULL Implementation
Endpoint: POST /_vti_bin/webs.asmx
GetWeb¶
Returns web metadata.
Request:
<GetWeb xmlns="http://schemas.microsoft.com/sharepoint/soap/">
<webUrl>/</webUrl>
</GetWeb>
GetWebCollection¶
Returns child webs.
Request:
<GetWebCollection xmlns="http://schemas.microsoft.com/sharepoint/soap/" />
CreateWeb¶
Create new subweb.
Request:
<CreateWeb xmlns="http://schemas.microsoft.com/sharepoint/soap/">
<url>SubWeb1</url>
<title>New Subweb</title>
<description>Test subweb</description>
<templateName>STS#0</templateName>
<language>1033</language>
<languageSpecified>true</languageSpecified>
<locale>1033</locale>
<localeSpecified>true</localeSpecified>
<collationLocale>0</collationLocale>
<collationLocaleSpecified>false</collationLocaleSpecified>
<uniquePermissions>false</uniquePermissions>
<uniquePermissionsSpecified>true</uniquePermissionsSpecified>
<anonymous>false</anonymous>
<anonymousSpecified>true</anonymousSpecified>
<presence>true</presence>
<presenceSpecified>true</presenceSpecified>
</CreateWeb>
Additional Methods¶
DeleteWeb- Delete subwebGetAllSubWebCollection- All descendant websWebUrlFromPageUrl- Parse web URLGetContentTypes- Content type collectionGetContentType- Single content type
3. UserGroup Service (usergroup.asmx)¶
Status: ✅ FULL Implementation
Endpoint: POST /_vti_bin/usergroup.asmx
GetUserCollectionFromWeb¶
Returns all users.
Request:
<GetUserCollectionFromWeb xmlns="http://schemas.microsoft.com/sharepoint/soap/" />
GetGroupCollectionFromWeb¶
Returns all groups.
Request:
<GetGroupCollectionFromWeb xmlns="http://schemas.microsoft.com/sharepoint/soap/" />
AddUserToGroup¶
Add user to group.
Request:
<AddUserToGroup xmlns="http://schemas.microsoft.com/sharepoint/soap/">
<groupName>Site Members</groupName>
<userName>domain\user</userName>
<userLoginName>domain\user</userLoginName>
<userEmail>user@domain.com</userEmail>
<userNotes>User notes</userNotes>
</AddUserToGroup>
Additional Methods¶
GetUserInfo- Single userGetGroupInfo- Single groupGetCurrentUserInfo- Current userAddGroup- Create groupRemoveUserFromGroup- Remove user
4. Copy Service (copy.asmx)¶
Status: ✅ FULL Implementation
Endpoint: POST /_vti_bin/copy.asmx
CopyIntoItems¶
Copy file to multiple destinations.
Request:
<CopyIntoItems xmlns="http://schemas.microsoft.com/sharepoint/soap/">
<SourceUrl>http://localhost/Documents/source.docx</SourceUrl>
<DestinationUrls>
<string>http://localhost/Archive/dest1.docx</string>
<string>http://localhost/Backup/dest2.docx</string>
</DestinationUrls>
<Fields>
<FieldInformation Type="Text" DisplayName="Title" InternalName="Title" Value="Copied Document" />
</Fields>
</CopyIntoItems>
5. Permissions Service (permissions.asmx)¶
Status: ✅ FULL Implementation
Endpoint: POST /_vti_bin/permissions.asmx
GetPermissionCollection¶
Get role assignments for object.
Request:
<GetPermissionCollection xmlns="http://schemas.microsoft.com/sharepoint/soap/">
<objectName>Documents</objectName>
<objectType>List</objectType>
</GetPermissionCollection>
AddPermission¶
Grant permissions.
Request:
<AddPermission xmlns="http://schemas.microsoft.com/sharepoint/soap/">
<objectName>Documents</objectName>
<objectType>List</objectType>
<permissionIdentifier>domain\user</permissionIdentifier>
<permissionType>User</permissionType>
<permissionMask>1073741827</permissionMask>
</AddPermission>
6. Views Service (views.asmx)¶
Status: ✅ FULL Implementation
Endpoint: POST /_vti_bin/views.asmx
AddView¶
Create new view.
Request:
<AddView xmlns="http://schemas.microsoft.com/sharepoint/soap/">
<listName>Documents</listName>
<viewName>Custom View</viewName>
<viewFields>
<ViewFields>
<FieldRef Name="Title"/>
<FieldRef Name="Modified"/>
</ViewFields>
</viewFields>
<query>
<Query>
<OrderBy>
<FieldRef Name="Modified" Ascending="FALSE"/>
</OrderBy>
</Query>
</query>
<rowLimit>50</rowLimit>
</AddView>
7. Versions Service (versions.asmx)¶
Status: ✅ FULL Implementation
Endpoint: POST /_vti_bin/versions.asmx
RestoreVersion¶
Restore file version.
Request:
<RestoreVersion xmlns="http://schemas.microsoft.com/sharepoint/soap/">
<fileName>http://localhost/Documents/file.docx</fileName>
<fileVersion>1.0</fileVersion>
</RestoreVersion>
8. SiteData Service (sitedata.asmx)¶
Status: ✅ FULL Implementation
Endpoint: POST /_vti_bin/sitedata.asmx
GetSite¶
Returns site collection metadata.
Request:
<GetSite xmlns="http://schemas.microsoft.com/sharepoint/soap/" />
GetList¶
Returns list metadata with fields.
Request:
<GetList xmlns="http://schemas.microsoft.com/sharepoint/soap/">
<strListName>Documents</strListName>
</GetList>
9-26. Additional SOAP Services¶
| Service | Endpoint | Status | Implementation |
|---|---|---|---|
| Search | /_vti_bin/search.asmx |
✅ FULL | Query, QueryEx, GetPortalSearchInfo |
| Alerts | /_vti_bin/alerts.asmx |
✅ FULL | Full CRUD with persistence |
| Taxonomy | /_vti_bin/taxonomywebservice.asmx |
✅ FULL | Term stores, groups, sets, terms |
| People | /_vti_bin/people.asmx |
✅ FULL | SearchPrincipals, ResolvePrincipals |
| UserProfile | /_vti_bin/userprofileservice.asmx |
✅ FULL | Profile CRUD, 15+ methods |
| Meetings | /_vti_bin/meetings.asmx |
✅ FULL | Workspace CRUD, 5+ methods |
| DWS | /_vti_bin/dws.asmx |
✅ FULL | Document workspace CRUD |
| Workflow | /_vti_bin/workflow.asmx |
✅ FULL | GetWorkflowDataForItem, StartWorkflow |
| WebPartPages | /_vti_bin/webpartpages.asmx |
✅ FULL | GetWebPartPage, GetWebPartProperties |
| SocialDataService | /_vti_bin/socialdataservice.asmx |
✅ FULL | GetAllTagTerms, GetAllTagUrls |
| Authentication | /_vti_bin/authentication.asmx |
✅ FULL | Login, Mode |
| BusinessDataCatalog | /_vti_bin/businessdatacatalog.asmx |
✅ FULL | Tier 1 — 6 operations, empty results |
| Imaging | /_vti_bin/imaging.asmx |
✅ FULL | 6 operations (ListPictureLibrary, GetItems, Download, Upload, CheckSubweb) |
| Forms | /_vti_bin/forms.asmx |
✅ FULL | GetFormCollection with real list data |
| Admin | /_vti_bin/admin.asmx |
✅ FULL | CreateSite/DeleteSite, GetLanguages, RefreshConfigCache |
| Diagnostics | /_vti_bin/diagnostics.asmx |
✅ FULL | 4 operations: SendClientScriptErrorReport, GetServerDiagnostics, RecordTrace, SetLoggingLevel |
| Sites | /_vti_bin/sites.asmx |
✅ FULL | GetUpdatedFormDigest, GetSiteTemplates |
| Publishing | /_vti_bin/publishedlinksservice.asmx |
✅ FULL | GetLinks + GetPublishingPages with real storage |
REST API¶
All REST endpoints are accessible at /_api/* with JSON responses following SharePoint Online OData v3 format.
Base Endpoints¶
Get Web¶
GET /_api/web
Response:
{
"odata.metadata": "http://localhost/_api/$metadata#Web",
"Id": "8ee3228a-72b3-4674-8282-f07e0f4a2db2",
"Title": "Root Web",
"Url": "http://localhost",
"ServerRelativeUrl": "/",
"Description": "Mock SharePoint Root Web",
"Created": "2025-01-01T00:00:00Z",
"LastItemModifiedDate": "2025-10-04T23:00:00Z"
}
Get Site¶
GET /_api/site
Response:
{
"odata.metadata": "http://localhost/_api/$metadata#Site",
"Id": "12345678-1234-1234-1234-123456789012",
"Url": "http://localhost",
"ServerRelativeUrl": "/"
}
Get Lists¶
GET /_api/web/lists
Response:
{
"odata.metadata": "http://localhost/_api/$metadata#Lists",
"value": [
{
"Id": "guid",
"Title": "Documents",
"BaseType": 1,
"BaseTemplate": 101,
"Hidden": false,
"ItemCount": 10
}
]
}
Get List by Title¶
GET /_api/web/lists/getbytitle('Documents')
Response:
{
"odata.metadata": "http://localhost/_api/$metadata#List",
"Id": "guid",
"Title": "Documents",
"BaseType": 1,
"Description": "Document library"
}
Get List Items¶
GET /_api/web/lists/getbytitle('Documents')/items
Response:
{
"odata.metadata": "http://localhost/_api/$metadata#Items",
"value": [
{
"Id": 1,
"Title": "Document 1",
"FileLeafRef": "doc1.docx",
"Modified": "2025-10-04T10:00:00Z"
}
]
}
Create List Item¶
POST /_api/web/lists/getbytitle('Documents')/items
Request:
{
"__metadata": { "type": "SP.Data.DocumentsItem" },
"Title": "New Document",
"FileLeafRef": "newdoc.docx"
}
OData Query Parameters¶
The REST API supports standard OData v3 query parameters:
| Parameter | Description | Example |
|---|---|---|
$select |
Select specific fields | $select=Title,Modified |
$filter |
Filter results | $filter=Hidden eq false |
$orderby |
Sort results | $orderby=Title asc |
$top |
Limit results | $top=10 |
$skip |
Skip results | $skip=20 |
$expand |
Expand related entities | $expand=Lists |
Example:
GET /_api/web/lists?$select=Title,ItemCount&$filter=Hidden eq false&$orderby=Title&$top=10
Response:
{
"value": [
{ "Title": "Documents", "ItemCount": 5 },
{ "Title": "Lists", "ItemCount": 12 },
{ "Title": "Tasks", "ItemCount": 3 }
]
}
Additional REST Endpoints¶
| Endpoint | Method | Description |
|---|---|---|
/_api/web/webs |
GET | Get subwebs |
/_api/web/currentuser |
GET | Current user info |
/_api/contextinfo |
POST | Get form digest |
/_api/web/lists/getbytitle('list')/items({id}) |
GET | Get item by ID |
/_api/web/lists/getbytitle('list')/items({id}) |
POST | Update item |
/_api/web/lists/getbytitle('list')/items({id}) |
DELETE | Delete item |
CSOM Protocol¶
Status: ⚠️ Implemented but blocked (0% functional)
Endpoint: POST /_vti_bin/client.svc/ProcessQuery
Known Issues¶
The CSOM protocol is implemented but has binary JSON serialization format mismatches that prevent it from working correctly. This requires access to a real SharePoint environment for debugging.
Blocked Cmdlets (require CSOM):
- Get-PnPWeb (CSOM variant)
- New-PnPList
- Get-PnPField
- Get-PnPView
- Add-PnPListItem
- Get-PnPUser
- Get-PnPSite
- Get-PnPFile
Workaround: Use SOAP-based cmdlets which are fully functional.
Error Handling¶
Error Response Format¶
SOAP Errors:
<soap:Fault>
<faultcode>soap:Server</faultcode>
<faultstring>List 'InvalidList' does not exist</faultstring>
<detail>
<errorcode xmlns="">0x81020015</errorcode>
</detail>
</soap:Fault>
REST Errors:
{
"error": {
"code": "404",
"message": "List 'InvalidList' not found"
}
}
Common Error Codes¶
| Code | Description | HTTP Status |
|---|---|---|
0x81020015 |
List not found | 404 |
0x81020014 |
Item not found | 404 |
0x80070005 |
Access denied | 401/403 |
0x81020089 |
Invalid CAML query | 400 |
0x8102009a |
Field not found | 404 |
Health & Diagnostics¶
Health Check¶
GET /_vti_bin/health
- Authentication: Not required
- Response: JSON with server status, uptime, request metrics
Diagnostics¶
GET /_vti_bin/diagnostics
- Authentication: Required
- Response: Detailed metrics (performance, cache, storage)
Correlation Headers¶
Every response includes:
- X-Correlation-ID: Unique request identifier
- SPRequestGuid: SharePoint-compatible GUID
- SPRequestDuration: Processing time (ms)
Rate Limiting & Throttling¶
Current Status: Not implemented in mock server
For production deployments, consider implementing: - Request rate limits (e.g., 100 req/min per client) - Concurrent request limits (e.g., 10 simultaneous requests) - Payload size limits (e.g., 10MB max)
Version History¶
| Version | Date | Changes |
|---|---|---|
| 1.0 | 2025-10-04 | Initial API reference - 100% SOAP coverage |
API Reference Version: 1.0 Last Updated: 2025-10-04 Compatible with: SharePoint 2019/Online, PnP PowerShell 2019