Create ODR Report - Huddle/huddle-apis GitHub Wiki

Summary

The On Demand Reporting (ODR) API is to create ODR report for Account Activity and Workspace Membership Activity.

  • Permission access inherited Account Settings.

Table of contents

Operation
Create an ODR report

Operations

Create an ODR report

Example

The following example create an ODR report of an Account with ID 123.

Request:

POST /accounts/123/settings/ondemandreport HTTP/1.1
Accept: application/vnd.huddle.data+json
Authorization: Bearer frootymcnooty/vonbootycherooty
{
    "OnDemandReportType": 1,
    "StartDate": "2022-04-23T18:25:43.511Z",
    "EndDate": "2022-04-28T18:25:43.511Z"
}

Request Properties

Name Description Type Value
OnDemandReportType On Demand Report type Boolean 1 - WorkspaceMembershipActivity, 2 - AccountActivity
StartDate Start date for report activity generate DateTime (Nullable), format yyyy-MM-dd HH:mm:ss.z 2022-04-23T18:25:43.511Z
EndDate End date for report activity generate DateTime (Nullable), format yyyy-MM-dd HH:mm:ss.z 2022-04-28T18:25:43.511Z

Response:

If successful the method returns a 204 No Content code.

HTTP/1.1 204 No Content

Error Responses

Case Response
Invalid ODR report type 400 Bad Request
StartDate and EndDate are not exists for Account {AccountId} 400 Bad Request
StartDate later than EndDate for Account {AccountId} 400 Bad Request
StartDate and EndDate are not set in the past for Account {AccountId} 400 Bad Request
User {UserId} is not allowed to create OnDemand Report for accountId {AccountID} 403 Forbidden
Cannot find Account {AccountID} 404 Not Found