FORMAT: 1A
Sharepoint Connector. For more information on the underlying module in use, and info on Sharepoint itself see here.
#Environment Variables
When setting up this connector, you were presented with a number of environment variables to fill in. These are documented in greater detail here.
Required Environment Variables:
SHAREPOINT_HOSTNAME: Sharepoint URL
SHAREPOINT_AUTH_TYPE: Type of authentication in use, valid values: basic
, ntlm
, online
Optional Environment Variables:
SHAREPOINT_USERNAME: Service account username to use for authenticating all requests
SHAREPOINT_PASSWORD: Service account password to use authenticating all requests
SHAREPOINT_STRICT_SSL: Allow connection to SharePoint instances with self-signed certificates
SHAREPOINT_SESSION_TIMEOUT: How long to keep a session open for (in seconds) before timing out - defaults to 60*60 = 1hr
API for logging into SharePoint - for use where no service account environment variables have been specified (SP_USERNAME
and SP_PASSWORD
).
Logs in with Sharepoint, and retrieves the contents of a list view
-
Request (application/json)
-
Body
{ "username" : "some@sharepointLogin.com", "password" : "yourSharepointPassword" }
-
-
Response 200 (application/json)
-
Body
{ "session" : "yourSessionToken" }
-
Operations on sharepoint "list" objects.
In all of the following examples, header x-sp-session
can be omitted if using service account to log in.
Lists all "list" objects in SharePoint.
-
Request (application/json)
-
Headers
x-sp-session: yourSessionTokenFromLogin
-
-
Response 200 (application/json)
-
Body
[ { Name : "Some Sharepoint List" } ]
-
Creates a new SharePoint list from a supplied request body.
-
Request (application/json)
-
Headers
x-sp-session: yourSessionTokenFromLogin
-
Body
{ "Title" : "My new list", "Description" : "My new list description" }
-
-
Response 200 (application/json)
-
Body
{ "Title" : "My new list", "Description" : "My new list description" }
-
Operations on an individual list, as identified by guid {id}
.
- Parameters
- id - Id of the list being operated on
Also returns all Items under that list, and it's fields.
-
Request (application/json)
-
Headers
x-sp-session: yourSessionTokenFromLogin
-
-
Response 200 (application/json)
-
Body
{ "Title" : "My new list", "Description" : "My new list description", "Items" : [ {}, {} ], "Fields" : [ {}, {} ] }
-
Also returns all Items under that list, and it's fields.
-
Request (application/json)
-
Headers
x-sp-session: yourSessionTokenFromLogin
-
Body
{ "Title" : "My updated list", "Description" : "My updated list description" }
-
-
Response 200 (application/json)
-
Body
{ "Title" : "My updated list", "Description" : "My updated list description" }
-
Removes a SharePoint List object.
-
Request (application/json)
-
Headers
x-sp-session: yourSessionTokenFromLogin
-
-
Response 200 (application/json)
- Body
Operations on List Items.
-
Parameters
- id - Id of the list being operated on
-
Request (application/json)
-
Headers
x-sp-session: yourSessionTokenFromLogin
-
-
Response 200 (application/json)
-
Body
[ { "Title" : "My list item", "Description" : "My list item description" } ]
-
-
Request (application/json)
-
Headers
x-sp-session: yourSessionTokenFromLogin
-
Body
{ "Name" : "My new list item", "Desc" : "list item to be created" }
-
-
Response 200 (application/json)
-
Body
{ "Name" : "My new list item", "Desc" : "list item to be created" }
-
Operations on an individual list item, as identified by guid {itemId}
.
-
Parameters
- id - Id of the list being operated on
- itemId - Id of the item under list with identifier id being operated on
-
Request (application/json)
-
Headers
x-sp-session: yourSessionTokenFromLogin
-
-
Response 200 (application/json)
-
Body
{ "Title" : "My list item", "Description" : "My list item description" }
-
-
Request (application/json)
-
Headers
x-sp-session: yourSessionTokenFromLogin
-
Body
{ "Title" : "My updated list item", "Description" : "My updated list item description" }
-
-
Response 200 (application/json)
-
Body
{ "Title" : "My updated list item", "Description" : "My updated list item description" }
-
-
Request (application/json)
-
Headers
x-sp-session: yourSessionTokenFromLogin
-
-
Response 200 (application/json)
- Body