Examples
- URL: https://www.mywebsiteURL.org
- Application Programming Interface (API) DOCS: https://www.mywebsiteURL.org/api
- API Key: API_Key
- Partition ID: partition_ID
- Username: Site_Admin_Need_To_Setup
- Password: Site_Admin_Need_To_Setup
Authentication Token
To use the APIs you first must get an authentication token. This does not have to be done before every call.
- Call the Authenticate method first (/api/Authentication/v1/Authenticate) this will return a token in the apiKey field
- Sample Successful return:
{
"AdditionalInfo": "Success",
"Success": true,
"apiKey": "API_Key",
"UserId": 743,
"Message": "Login successful."
} - Take the token to make other calls in the UserToken field
- Token doesn’t expire until you log out
Important Note
- For security, identifying information is replaced by a label, when you receive your information the keys and IDs may be separate.
Example Calls
You can limit your results to only published items by using OData “?$filter=Status eq 'Published'.
- Authenticate:
POST /api/Authentication/v1/Authenticate/
Host: mywebsiteURL.org
content-type: application/json
apiKey: API_Key
partition: partition_ID
{
"Username": "USERNAME",
"Password": "PASSWORD"
}
- Get all Calendar Categories: This will get you all calendar categories (separate calendars). Use the item count to know the number of events under each calendar.
GET /api/Calendar/v1/Category/
Host: mywebsiteURL.org
content-type: application/json
UserToken: User_API_Key
apiKey: API_Key
partition: partition_ID
- Get all events in a calendar: We use OData so you can do many cool queries against the data. Note in the below example “22” should be the CategoryID you want to grab.
GET /api/Calendar/v1/Item?$filter=CategoryId eq 22&$top=10&$inlinecount=allpages&$orderby=Name desc
Host: mywebsiteURL.org
content-type: application/json
UserToken: User_API_Key
apiKey: API_Key
partition: partition_ID
- Get full event (52 is the item I want to grab):
GET /api/Calendar/v1/Item/52
Host: mywebsiteURL.org
content-type: application/json
UserToken: 6ade72b2-9b63-47a6-b490-a2d75ec6d303
apiKey: API_Key
partition: partition_ID
Feedback About the Article
Let us know what was helpful or not helpful about the article below.0 comments
Please sign in to leave a comment.