Trendsic Platform Service

<back to all web services

ReportManagerDataRequest

The following routes are available for this service:
GET,POST,OPTIONS/v1/ReportManager/api/Objects/{Table}/data
using System;
using System.IO;
using System.Collections;
using System.Collections.Generic;
using System.Runtime.Serialization;
using ServiceStack;
using ServiceStack.DataAnnotations;
using CRM.AgencyPlatform.API.Internal;
using CRM.AgencyPlatform.API.Internal.JsonToSqlQuery.Models;
using Newtonsoft.Json.Linq;

namespace CRM.AgencyPlatform.API.Internal
{
    public partial class ReportManagerDataBucket
    {
        public virtual string BucketColumn { get; set; }
        public virtual List<ReportManagerDataBucketOption> Options { get; set; } = [];
    }

    public partial class ReportManagerDataBucketOption
    {
        public virtual string Id { get; set; }
        public virtual List<Object> Values { get; set; } = [];
    }

    public partial class ReportManagerDataJoin
    {
        public virtual string Source { get; set; }
        public virtual string Target { get; set; }
        public virtual string SourceField { get; set; }
        public virtual string TargetField { get; set; }
        public virtual string id { get; set; }
    }

    public partial class ReportManagerDataRequest
    {
        public virtual string Table { get; set; }
        public virtual string TableKey { get; set; }
        public virtual string Query { get; set; }
        public virtual GetSqlResult QueryCast { get; set; }
        public virtual List<string> Columns { get; set; } = [];
        public virtual string Joins { get; set; }
        public virtual List<ReportManagerDataJoin> JoinsCast { get; set; } = [];
        public virtual string Limit { get; set; }
        public virtual string Sort { get; set; }
        public virtual List<ReportManagerDataSort> SortCast { get; set; } = [];
        public virtual List<string> Group { get; set; } = [];
        public virtual string Buckets { get; set; }
        public virtual List<ReportManagerDataBucket> BucketsCast { get; set; } = [];
    }

    public partial class ReportManagerDataSort
    {
        public virtual string Field { get; set; }
        public virtual string Direction { get; set; }
    }

}

namespace CRM.AgencyPlatform.API.Internal.JsonToSqlQuery.Models
{
    public partial class GetSqlResult
    {
        public virtual string Sql { get; set; }
        public virtual IDictionary<string, JValue> Values { get; set; }
        public virtual string Error { get; set; }
        public virtual bool HasError { get; set; }
    }

}

namespace Newtonsoft.Json.Linq
{
    public partial class JToken
        : IJsonLineInfo
    {
    }

    public partial class JValue
        : JToken
    {
    }

}

C# ReportManagerDataRequest DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .other suffix or ?format=other

HTTP + OTHER

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /v1/ReportManager/api/Objects/{Table}/data HTTP/1.1 
Host: api.dev.dynamics.trendsic.com 
Accept: text/jsonl
Content-Type: text/jsonl
Content-Length: length

{Unable to show example output for type 'ReportManagerDataRequest' using the custom 'other' filter}One or more errors occurred.
HTTP/1.1 200 OK
Content-Type: text/jsonl
Content-Length: length

[{"String":{}}]