Merge pull request #1 from syncfusion/report-server-api-client
Publish Report Server API Client samples to GitHub
This commit is contained in:
Коммит
5c0a119d83
|
@ -0,0 +1,21 @@
|
|||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2018 Syncfusion
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
24
README.md
24
README.md
|
@ -1,2 +1,22 @@
|
|||
# enterpriseserver-reportapiclient
|
||||
Sample C# client application to show how to consume the Syncfusion Report Server API. https://help.syncfusion.com/report-platform/report-server/api/rest-api-reference
|
||||
# Syncfusion Report Server #
|
||||
|
||||
### How do I get set up? ###
|
||||
|
||||
* Clone the branch
|
||||
* We have two projects in this application
|
||||
* API.Helper
|
||||
* API.Sample
|
||||
|
||||
|
||||
### API.Helper ###
|
||||
|
||||
* This project holds the methods which calls our Syncfusion API endpoints directly and return the corresponding result.
|
||||
* This project can be referred in your application and call the helper methods from your application.
|
||||
|
||||
|
||||
### API.Sample ###
|
||||
|
||||
* This project holds the sample source code which requires to call each of the Syncfusion APIs programmatically.
|
||||
* You can refer this and use the required sample codes in your application.
|
||||
|
||||
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
namespace Syncfusion.Report.Server.Api.Helper.Authentication
|
||||
{
|
||||
using RestSharp;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public abstract class Authenticate
|
||||
{
|
||||
protected RestClient Client;
|
||||
|
||||
public virtual DataResponse<T> GetResponse<T>(string url, Method method, T body, Dictionary<string, object> requestParameters)
|
||||
{
|
||||
var executeMethod = typeof(RequestExecutor).GetMethod("ExecuteRequest");
|
||||
var generic = executeMethod.MakeGenericMethod(typeof(T));
|
||||
return (DataResponse<T>)generic.Invoke(this, new object[] { url, method, body, Client, requestParameters});
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
|
||||
namespace Syncfusion.Report.Server.Api.Helper.Authentication
|
||||
{
|
||||
public class DataResponse<T>
|
||||
{
|
||||
public dynamic Content { get; set; }
|
||||
public List<object> Data { get; set; }
|
||||
|
||||
public HttpStatusCode StatusCode;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
using RestSharp;
|
||||
using RestSharp.Authenticators;
|
||||
|
||||
namespace Syncfusion.Report.Server.Api.Helper.Authentication
|
||||
{
|
||||
public class OAuth2 : OAuthAuthentication
|
||||
{
|
||||
private const string TokenType = "Bearer";
|
||||
private readonly string _tokenUrl = "/api/token";
|
||||
private string _token;
|
||||
public OAuth2(string serverUrl, string userName, string password)
|
||||
: base(serverUrl, userName, password)
|
||||
{
|
||||
_tokenUrl = serverUrl.TrimEnd('/') + _tokenUrl;
|
||||
}
|
||||
|
||||
public void GetToken()
|
||||
{
|
||||
var tokenClient = new RestClient(_tokenUrl);
|
||||
var request = new RestRequest
|
||||
{
|
||||
Method = Method.POST
|
||||
};
|
||||
|
||||
request.AddHeader("Content-Type", "application/x-www-form-urlencoded");
|
||||
request.AddHeader("Accept", "application/json");
|
||||
|
||||
request.AddParameter("grant_type", "password");
|
||||
request.AddParameter("username", Username);
|
||||
request.AddParameter("password", Password);
|
||||
|
||||
var response = tokenClient.Execute<Token>(request);
|
||||
_token = response.Data.AccessToken;
|
||||
|
||||
|
||||
Client = new RestClient(ServerUrl)
|
||||
{
|
||||
Authenticator = new OAuth2AuthorizationRequestHeaderAuthenticator(_token, TokenType)
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
namespace Syncfusion.Report.Server.Api.Helper.Authentication
|
||||
{
|
||||
public abstract class OAuthAuthentication : Authenticate
|
||||
{
|
||||
protected readonly string Username;
|
||||
protected readonly string Password;
|
||||
protected readonly string ServerUrl;
|
||||
|
||||
protected OAuthAuthentication(string serverUrl, string username, string password)
|
||||
{
|
||||
Username = username;
|
||||
Password = password;
|
||||
ServerUrl = serverUrl;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,55 @@
|
|||
using RestSharp;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
|
||||
namespace Syncfusion.Report.Server.Api.Helper.Authentication
|
||||
{
|
||||
internal class RequestExecutor
|
||||
{
|
||||
public static DataResponse<T> ExecuteRequest<T>(string url, Method method, T body, RestClient client, IDictionary<string, object> requestParameters) where T : new()
|
||||
{
|
||||
var request = new RestRequest(url, method);
|
||||
if (requestParameters != null)
|
||||
{
|
||||
foreach (var requestParameter in requestParameters)
|
||||
{
|
||||
request.AddParameter(requestParameter.Key, requestParameter.Value);
|
||||
}
|
||||
}
|
||||
if (ShouldAddBody(method))
|
||||
{
|
||||
request.RequestFormat = DataFormat.Json;
|
||||
request.AddJsonBody(body);
|
||||
}
|
||||
|
||||
var result = client.Execute<List<object>>(request);
|
||||
|
||||
if(result.StatusCode.ToString() == HttpStatusCode.NoContent.ToString() && result.ErrorException != null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
if (RequestingSimpleType<T>())
|
||||
{
|
||||
return result.Content as dynamic;
|
||||
}
|
||||
return new DataResponse<T>
|
||||
{
|
||||
Content = result.Content,
|
||||
Data = result.Data,
|
||||
StatusCode = result.StatusCode
|
||||
};
|
||||
}
|
||||
|
||||
private static bool ShouldAddBody(Method method)
|
||||
{
|
||||
return method == Method.PUT || method == Method.POST || method == Method.DELETE;
|
||||
}
|
||||
|
||||
private static bool RequestingSimpleType<T>() where T : new()
|
||||
{
|
||||
return typeof(T) == typeof(object);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,22 @@
|
|||
using System;
|
||||
using System.Net;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace Syncfusion.Report.Server.Api.Helper.Authentication
|
||||
{
|
||||
public class SimpleResponse
|
||||
{
|
||||
public bool ApiStatus { get; set; }
|
||||
|
||||
public bool Status { get; set; }
|
||||
|
||||
public string StatusMessage { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public string Message { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public HttpStatusCode StatusCode { get; set; }
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
namespace Syncfusion.Report.Server.Api.Helper.Authentication
|
||||
{
|
||||
internal class Token
|
||||
{
|
||||
public string AccessToken { get; set; }
|
||||
public string Scopes { get; set; }
|
||||
public int ExpiresIn { get; set; }
|
||||
public string RefreshToken { get; set; }
|
||||
public string TokenType { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("Syncfusion.Report.Server.Api.Helper")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("Syncfusion.Report.Server.Api.Helper")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2018")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("0359a21c-5fda-4a59-970a-09bbe984ad8f")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
|
@ -0,0 +1,69 @@
|
|||
using RestSharp;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using Syncfusion.Report.Server.Api.Helper.Utilities;
|
||||
using Syncfusion.Report.Server.Api.Helper.Authentication;
|
||||
|
||||
namespace Syncfusion.Report.Server.API.Helper
|
||||
{
|
||||
public class ServerApiHelper
|
||||
{
|
||||
private Authenticate _authenticator;
|
||||
|
||||
public string BaseUrl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="serverUrl"></param>
|
||||
/// <param name="username"></param>
|
||||
/// <param name="password"></param>
|
||||
public OAuth2 Connect(string serverUrl, string username, string password)
|
||||
{
|
||||
_authenticator = new OAuth2(serverUrl, username, password);
|
||||
((OAuth2)_authenticator).GetToken();
|
||||
return (OAuth2)_authenticator;
|
||||
}
|
||||
|
||||
private DataResponse<T> Send<T>(T body, Method method, string overrideUrl = null, Dictionary<string, object> requestParameters = null)
|
||||
{
|
||||
var relativeUrl = overrideUrl;
|
||||
DataResponse<T> response;
|
||||
try
|
||||
{
|
||||
response = _authenticator.GetResponse(relativeUrl, method, body, requestParameters);
|
||||
}
|
||||
catch (WebException ex)
|
||||
{
|
||||
Console.WriteLine(ex.Message);
|
||||
response = default(DataResponse<T>);
|
||||
}
|
||||
return response;
|
||||
}
|
||||
|
||||
internal DataResponse<T> Get<T>(T body, string overrideUrl, object requestParameters = null)
|
||||
{
|
||||
var parameterDictionary = requestParameters.ToDictionary();
|
||||
return Send(body, Method.GET, overrideUrl, parameterDictionary);
|
||||
}
|
||||
|
||||
internal DataResponse<T> Post<T>(T body, string overrideUrl, object requestParameters = null)
|
||||
{
|
||||
var parameterDictionary = requestParameters.ToDictionary();
|
||||
return Send(body, Method.POST, overrideUrl, parameterDictionary);
|
||||
}
|
||||
|
||||
internal DataResponse<T> Put<T>(T body, string overrideUrl, object requestParameters = null)
|
||||
{
|
||||
var parameterDictionary = requestParameters.ToDictionary();
|
||||
return Send(body, Method.PUT, overrideUrl, parameterDictionary);
|
||||
}
|
||||
|
||||
internal DataResponse<T> Delete<T>(T body, string overrideUrl, object requestParameters = null)
|
||||
{
|
||||
var parameterDictionary = requestParameters.ToDictionary();
|
||||
return Send(body, Method.DELETE, overrideUrl, parameterDictionary);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,155 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{0B73E1D4-024A-496E-8D22-39483ED71192}</ProjectGuid>
|
||||
<OutputType>Library</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Syncfusion.Report.Server.Api.Helper</RootNamespace>
|
||||
<AssemblyName>Syncfusion.Report.Server.Api.Helper</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<StartupObject />
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="RestSharp, Version=105.2.3.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\RestSharp.105.2.3\lib\net45\RestSharp.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Net.Http.Formatting, Version=5.2.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebApi.Client.5.2.4\lib\net45\System.Net.Http.Formatting.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.Serialization" />
|
||||
<Reference Include="System.Web.Http, Version=5.2.4.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNet.WebApi.Core.5.2.4\lib\net45\System.Web.Http.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Authentication\Authenticate.cs" />
|
||||
<Compile Include="Authentication\OAuth2.cs" />
|
||||
<Compile Include="Authentication\OAuthBase.cs" />
|
||||
<Compile Include="Authentication\RequestExecuter.cs" />
|
||||
<Compile Include="Authentication\DataResponse.cs" />
|
||||
<Compile Include="Authentication\SimpleResponse.cs" />
|
||||
<Compile Include="Authentication\Token.cs" />
|
||||
<Compile Include="ServerApiHelper.cs" />
|
||||
<Compile Include="Utilities\ObjectToDictionaryHelper.cs" />
|
||||
<Compile Include="V1\EndPoints\GroupsEndPoint.cs" />
|
||||
<Compile Include="V1\Models\GroupInfo.cs" />
|
||||
<Compile Include="V1\Models\Group.cs" />
|
||||
<Compile Include="V1\Models\User.cs" />
|
||||
<Compile Include="V1\Models\UserInfo.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="V1\EndPoints\UsersEndPoint.cs" />
|
||||
<Compile Include="V1\Models\GroupList.cs" />
|
||||
<Compile Include="V1\Models\UserList.cs" />
|
||||
<Compile Include="V1\ServerClientV1.cs" />
|
||||
<Compile Include="V2\EndPoints\GroupsEndPoint.cs" />
|
||||
<Compile Include="V2\EndPoints\ItemsEndPoint.cs" />
|
||||
<Compile Include="V2\EndPoints\PermissionsEndPoint.cs" />
|
||||
<Compile Include="V2\EndPoints\UsersEndPoint.cs" />
|
||||
<Compile Include="V2\Models\ApiCategoryAdd.cs" />
|
||||
<Compile Include="V2\Models\ApiCategoryUpdate.cs" />
|
||||
<Compile Include="V2\Models\ApiCsvUserImportRequest.cs" />
|
||||
<Compile Include="V2\Models\ApiCsvUserImportResponse.cs" />
|
||||
<Compile Include="V2\Models\ApiDownloadCsvTemplate.cs" />
|
||||
<Compile Include="V2\Models\ApiExportReport.cs" />
|
||||
<Compile Include="V2\Models\ApiExportReportResponse.cs" />
|
||||
<Compile Include="V2\Models\ApiFileAdd.cs" />
|
||||
<Compile Include="V2\Models\ApiFileUpdate.cs" />
|
||||
<Compile Include="V2\Models\ApiGroupListV2.cs" />
|
||||
<Compile Include="V2\Models\ApiGroupPermissionAdd.cs" />
|
||||
<Compile Include="V2\Models\ApiGroupPermissionDetail.cs" />
|
||||
<Compile Include="V2\Models\ApiGroupUsers.cs" />
|
||||
<Compile Include="V2\Models\ApiGroupV2.cs" />
|
||||
<Compile Include="V2\Models\ApiItemResponse.cs" />
|
||||
<Compile Include="V2\Models\ApiItems.cs" />
|
||||
<Compile Include="V2\Models\ApiReportAdd.cs" />
|
||||
<Compile Include="V2\Models\ApiReportDataSetAdd.cs" />
|
||||
<Compile Include="V2\Models\ApiReportDataSetUpdate.cs" />
|
||||
<Compile Include="V2\Models\ApiReportDataSourceAdd.cs" />
|
||||
<Compile Include="V2\Models\ApiReportDataSourceUpdate.cs" />
|
||||
<Compile Include="V2\Models\ApiReportFavoriteItems.cs" />
|
||||
<Compile Include="V2\Models\ApiReportPublicItems.cs" />
|
||||
<Compile Include="V2\Models\ApiReportUpdate.cs" />
|
||||
<Compile Include="V2\Models\APIResponse.cs" />
|
||||
<Compile Include="V2\Models\ApiSpecifiedItemDetail.cs" />
|
||||
<Compile Include="V2\Models\ApiStatusMessage.cs" />
|
||||
<Compile Include="V2\Models\ApiUpdateFavoriteReport.cs" />
|
||||
<Compile Include="V2\Models\ApiUserActivationRequest.cs" />
|
||||
<Compile Include="V2\Models\ApiUserAdd.cs" />
|
||||
<Compile Include="V2\Models\ApiUserPermissionAdd.cs" />
|
||||
<Compile Include="V2\Models\ApiUserPermissionDetail.cs" />
|
||||
<Compile Include="V2\Models\ApiValidateItemName.cs" />
|
||||
<Compile Include="V2\Models\DatasetMappingInfo.cs" />
|
||||
<Compile Include="V2\Models\DataSourceDefinition.cs" />
|
||||
<Compile Include="V2\Models\DataSourceMappingInfo.cs" />
|
||||
<Compile Include="V2\Models\EnumClass.cs" />
|
||||
<Compile Include="V2\Models\Permission.cs" />
|
||||
<Compile Include="V2\ServerClientV2.cs" />
|
||||
<Compile Include="V3\EndPoints\ScheduleEndPoint.cs" />
|
||||
<Compile Include="V3\Models\ApiDailySchedule.cs" />
|
||||
<Compile Include="V3\Models\ApiHourlySchedule.cs" />
|
||||
<Compile Include="V3\Models\ApiMonthlySchedule.cs" />
|
||||
<Compile Include="V3\Models\ApiMonthlyScheduleCustomRecurrence.cs" />
|
||||
<Compile Include="V3\Models\ApiMonthlyScheduleDayRecurrence.cs" />
|
||||
<Compile Include="V3\Models\ApiScheduleRequest.cs" />
|
||||
<Compile Include="V3\Models\ApiScheduleResponse.cs" />
|
||||
<Compile Include="V3\Models\ApiWeeklySchedule.cs" />
|
||||
<Compile Include="V3\Models\ApiYearlySchedule.cs" />
|
||||
<Compile Include="V3\Models\ApiYearlyScheduleCustomRecurrence.cs" />
|
||||
<Compile Include="V3\Models\ApiYearlyScheduleMonthRecurrence.cs" />
|
||||
<Compile Include="V3\ServerClientV3.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="V1\Models\UserStatus.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="app.config" />
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
|
@ -0,0 +1,22 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 14
|
||||
VisualStudioVersion = 14.0.25420.1
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Syncfusion.Report.Server.API.Helper", "Syncfusion.Report.Server.API.Helper.csproj", "{0359A21C-5FDA-4A59-970A-09BBE984AD8F}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{0359A21C-5FDA-4A59-970A-09BBE984AD8F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{0359A21C-5FDA-4A59-970A-09BBE984AD8F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{0359A21C-5FDA-4A59-970A-09BBE984AD8F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{0359A21C-5FDA-4A59-970A-09BBE984AD8F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
|
@ -0,0 +1,37 @@
|
|||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace Syncfusion.Report.Server.Api.Helper.Utilities
|
||||
{
|
||||
public static class ObjectToDictionaryHelper
|
||||
{
|
||||
//http://stackoverflow.com/questions/11576886/how-to-convert-object-to-dictionarytkey-tvalue-in-c
|
||||
public static Dictionary<string, object> ToDictionary(this object source)
|
||||
{
|
||||
var dictionary = source as Dictionary<string, object>;
|
||||
return dictionary ?? source.ToDictionary<object>();
|
||||
}
|
||||
|
||||
public static Dictionary<string, T> ToDictionary<T>(this object source)
|
||||
{
|
||||
if (source == null) return null;
|
||||
|
||||
var dictionary = new Dictionary<string, T>();
|
||||
foreach (PropertyDescriptor property in TypeDescriptor.GetProperties(source))
|
||||
AddPropertyToDictionary(property, source, dictionary);
|
||||
return dictionary;
|
||||
}
|
||||
|
||||
private static void AddPropertyToDictionary<T>(PropertyDescriptor property, object source, Dictionary<string, T> dictionary)
|
||||
{
|
||||
object value = property.GetValue(source);
|
||||
if (IsOfType<T>(value))
|
||||
dictionary.Add(property.Name, (T)value);
|
||||
}
|
||||
|
||||
private static bool IsOfType<T>(object value)
|
||||
{
|
||||
return value is T;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,140 @@
|
|||
using Newtonsoft.Json;
|
||||
using Syncfusion.Report.Server.Api.Helper.Authentication;
|
||||
using Syncfusion.Report.Server.Api.Helper.V1;
|
||||
using Syncfusion.Report.Server.Api.Helper.V1.Models;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Syncfusion.Report.Server.API.Helper.V1.EndPoints
|
||||
{
|
||||
public class GroupsEndPoint
|
||||
{
|
||||
private readonly ServerClientV1 _serverClientV1;
|
||||
private readonly string _baseUrl;
|
||||
|
||||
public GroupsEndPoint(ServerClientV1 serverClientV1)
|
||||
{
|
||||
_serverClientV1 = serverClientV1;
|
||||
_baseUrl = _serverClientV1.BaseUrl + "/groups";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This method is used to get all groups on the server.
|
||||
/// </summary>
|
||||
/// <returns>List of groups</returns>
|
||||
public Groups GetAllGroups()
|
||||
{
|
||||
var groups = new Groups
|
||||
{
|
||||
GroupList = new List<GroupInfo>()
|
||||
};
|
||||
var result = _serverClientV1.Get(groups, _baseUrl);
|
||||
if(result != null)
|
||||
{
|
||||
return JsonConvert.DeserializeObject<Groups>(result.Content);
|
||||
}
|
||||
else
|
||||
{
|
||||
return new Groups();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This method is used to get group details from the server.
|
||||
/// </summary>
|
||||
/// <param name="groupId">Group Id.</param>
|
||||
/// <returns>Details of the specified group.</returns>
|
||||
public Group GetGroup(int groupId)
|
||||
{
|
||||
var requestUrl = _baseUrl + "/" + groupId;
|
||||
var result = _serverClientV1.Get(new Group(), requestUrl);
|
||||
if(result != null)
|
||||
{
|
||||
return JsonConvert.DeserializeObject<Group>(result.Content);
|
||||
}
|
||||
else
|
||||
{
|
||||
return new Group();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Get the list of users on the server for the specified group
|
||||
/// </summary>
|
||||
/// <param name="id">ID of the group.</param>
|
||||
/// <returns>Returns a list of users on the server for the specified group.</returns>
|
||||
public Users GetGroupMembers(int id)
|
||||
{
|
||||
var requestUrl = _baseUrl + "/" + id + "/users";
|
||||
var result = _serverClientV1.Get(new Users(), requestUrl);
|
||||
if(result != null)
|
||||
{
|
||||
return JsonConvert.DeserializeObject<Users>(result.Content);
|
||||
}
|
||||
else
|
||||
{
|
||||
return new Users();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This mehod is used to create a group.
|
||||
/// </summary>
|
||||
/// <param name="group">Group name, description</param>
|
||||
/// <returns>Status of creating the group.</returns>
|
||||
public SimpleResponse CreateGroup(Group group)
|
||||
{
|
||||
var result =_serverClientV1.Post(group, _baseUrl);
|
||||
if(result != null)
|
||||
{
|
||||
return JsonConvert.DeserializeObject<SimpleResponse>(result.Content);
|
||||
}
|
||||
else
|
||||
{
|
||||
return new SimpleResponse();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This method is used to update the group details.
|
||||
/// </summary>
|
||||
/// <param name="groupId">Group Id</param>
|
||||
/// <param name="group">Group name and description</param>
|
||||
/// <returns>Status of updating the group</returns>
|
||||
public SimpleResponse UpdateGroup(int groupId, Group group)
|
||||
{
|
||||
var requestUrl = _baseUrl + "/" + groupId;
|
||||
var result = _serverClientV1.Put(group, requestUrl);
|
||||
if(result != null)
|
||||
{
|
||||
return JsonConvert.DeserializeObject<SimpleResponse>(result.Content);
|
||||
}
|
||||
else
|
||||
{
|
||||
return new SimpleResponse();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To remove a group from the Server
|
||||
/// </summary>
|
||||
/// <param name="groupId">Group Id</param>
|
||||
/// <returns>Status of removing the user fromm the group.</returns>
|
||||
public SimpleResponse DeleteGroup(int groupId)
|
||||
{
|
||||
var overrideUrl = _baseUrl + "/" + groupId;
|
||||
var result = _serverClientV1.Delete(new User(), overrideUrl);
|
||||
if(result != null)
|
||||
{
|
||||
return JsonConvert.DeserializeObject<SimpleResponse>(result.Content);
|
||||
}
|
||||
else
|
||||
{
|
||||
return new SimpleResponse
|
||||
{
|
||||
ApiStatus = true,
|
||||
StatusMessage = "Group has been deleted successfully."
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,121 @@
|
|||
using System.Collections.Generic;
|
||||
using Syncfusion.Report.Server.Api.Helper.Authentication;
|
||||
using Newtonsoft.Json;
|
||||
using Syncfusion.Report.Server.Api.Helper.V1;
|
||||
using Syncfusion.Report.Server.Api.Helper.V1.Models;
|
||||
|
||||
namespace Syncfusion.Report.Server.API.Helper.V1.EndPoints
|
||||
{
|
||||
public class UsersEndPoint
|
||||
{
|
||||
private readonly ServerClientV1 _serverClientV1;
|
||||
private readonly string _baseUrl;
|
||||
|
||||
public UsersEndPoint(ServerClientV1 serverClientV1)
|
||||
{
|
||||
_serverClientV1 = serverClientV1;
|
||||
_baseUrl = _serverClientV1.BaseUrl + "/users";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This method is used to get the list of users.
|
||||
/// </summary>
|
||||
/// <returns> List of users from the server.</returns>
|
||||
public Users GetAllUsers()
|
||||
{
|
||||
var users = new Users
|
||||
{
|
||||
UserList = new List<UserInfo>()
|
||||
};
|
||||
var result = _serverClientV1.Get(users, _baseUrl);
|
||||
if(result != null)
|
||||
{
|
||||
return JsonConvert.DeserializeObject<Users>(result.Content);
|
||||
}
|
||||
else
|
||||
{
|
||||
return new Users();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This method is used to get the details of the specified user.
|
||||
/// </summary>
|
||||
/// <param name="user">Username or Email id of the user</param>
|
||||
/// <returns>User details.</returns>
|
||||
public User GetUser(string user)
|
||||
{
|
||||
var overrideUrl = _baseUrl + "/" + user;
|
||||
var result = _serverClientV1.Get(new User(), overrideUrl);
|
||||
if(result != null)
|
||||
{
|
||||
return JsonConvert.DeserializeObject<User>(result.Content);
|
||||
}
|
||||
else
|
||||
{
|
||||
return new User();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This method is used to create a user.
|
||||
/// </summary>
|
||||
/// <param name="user">Use details (username, firstname, lastname, email) to be added.</param>
|
||||
/// <returns>Status of creating the user.</returns>
|
||||
public SimpleResponse CreateUser(User user)
|
||||
{
|
||||
var result = _serverClientV1.Post(user, _baseUrl);
|
||||
if(result != null)
|
||||
{
|
||||
return JsonConvert.DeserializeObject<SimpleResponse>(result.Content);
|
||||
}
|
||||
else
|
||||
{
|
||||
return new SimpleResponse();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This method is used to update the user details.
|
||||
/// </summary>
|
||||
/// <param name="userId">User name or emailid</param>
|
||||
/// <param name="user">User details (email, firstname, lastname, contact number)</param>
|
||||
/// <returns>Status of updating the user</returns>
|
||||
public SimpleResponse UpdateUser(string userId, User user)
|
||||
{
|
||||
var requestUrl = _baseUrl + "/" + userId;
|
||||
var result = _serverClientV1.Put(user, requestUrl);
|
||||
if(result != null)
|
||||
{
|
||||
return JsonConvert.DeserializeObject<SimpleResponse>(result.Content);
|
||||
}
|
||||
else
|
||||
{
|
||||
return new SimpleResponse();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This method is used to delete a user.
|
||||
/// </summary>
|
||||
/// <param name="userId">User name or email id</param>
|
||||
/// <returns>Status of deleting the user.</returns>
|
||||
public SimpleResponse DeleteUser(string userId)
|
||||
{
|
||||
var requestUrl = _baseUrl + "/" + userId;
|
||||
var result = _serverClientV1.Delete(new User(), requestUrl);
|
||||
if(result != null)
|
||||
{
|
||||
return JsonConvert.DeserializeObject<SimpleResponse>(result.Content);
|
||||
}
|
||||
else
|
||||
{
|
||||
return new SimpleResponse
|
||||
{
|
||||
ApiStatus = true,
|
||||
StatusMessage = "User has been deleted successfully."
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
using System;
|
||||
using System.Net;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace Syncfusion.Report.Server.Api.Helper.V1.Models
|
||||
{
|
||||
public class Group
|
||||
{
|
||||
/// <summary>
|
||||
/// Name of the group.
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Description of the group.
|
||||
/// </summary>
|
||||
public string Description { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public string Message { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public HttpStatusCode StatusCode { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
namespace Syncfusion.Report.Server.Api.Helper.V1.Models
|
||||
{
|
||||
public class GroupInfo : Group
|
||||
{
|
||||
/// <summary>
|
||||
/// Id of the group.
|
||||
/// </summary>
|
||||
public int Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if the user is added from Windows Active Directory.
|
||||
/// </summary>
|
||||
public bool IsActiveDirectoryGroup { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if the user is added from Azure Active Directory.
|
||||
/// </summary>
|
||||
public bool IsAzureADGroup { get; set; }
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace Syncfusion.Report.Server.Api.Helper.V1.Models
|
||||
{
|
||||
public class Groups
|
||||
{
|
||||
/// <summary>
|
||||
/// List of groups
|
||||
/// </summary>
|
||||
public List<GroupInfo> GroupList { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public string Message { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public HttpStatusCode StatusCode { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,50 @@
|
|||
using System.Net;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace Syncfusion.Report.Server.Api.Helper.V1.Models
|
||||
{
|
||||
public class User
|
||||
{
|
||||
/// <summary>
|
||||
/// Username of the user.
|
||||
/// </summary>
|
||||
public string Username
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// First name of the user.
|
||||
/// </summary>
|
||||
public string FirstName
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Last name of the user.
|
||||
/// </summary>
|
||||
public string Lastname
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Email address of the user.
|
||||
/// </summary>
|
||||
public string Email
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[DataMember]
|
||||
public string Message { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public HttpStatusCode StatusCode { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,68 @@
|
|||
namespace Syncfusion.Report.Server.Api.Helper.V1.Models
|
||||
{
|
||||
public class UserInfo : User
|
||||
{
|
||||
/// <summary>
|
||||
/// Phone number of the user.
|
||||
/// </summary>
|
||||
public string ContactNumber
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Display name of the user.
|
||||
/// </summary>
|
||||
public string DisplayName
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if the user is an active user.
|
||||
/// </summary>
|
||||
public bool IsActive
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if the user is added from Active Directory
|
||||
/// </summary>
|
||||
public bool IsActiveDirectoryUser
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if the user is added from Azure Active Directory.
|
||||
/// </summary>
|
||||
public bool IsAzureAdUser
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ID of the user.
|
||||
/// </summary>
|
||||
public int UserId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the status of the user.
|
||||
/// </summary>
|
||||
public UserStatus UserStatus
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace Syncfusion.Report.Server.Api.Helper.V1.Models
|
||||
{
|
||||
public class Users
|
||||
{
|
||||
/// <summary>
|
||||
/// List of users
|
||||
/// </summary>
|
||||
public List<UserInfo> UserList { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public string Message { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public HttpStatusCode StatusCode { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
using System.ComponentModel;
|
||||
|
||||
namespace Syncfusion.Report.Server.Api.Helper.V1.Models
|
||||
{
|
||||
public enum UserStatus
|
||||
{
|
||||
[Description("Active")]
|
||||
Active,
|
||||
|
||||
[Description("InActive")]
|
||||
InActive
|
||||
}
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
using Syncfusion.Report.Server.API.Helper;
|
||||
using Syncfusion.Report.Server.API.Helper.V1.EndPoints;
|
||||
|
||||
namespace Syncfusion.Report.Server.Api.Helper.V1
|
||||
{
|
||||
public sealed class ServerClientV1 : ServerApiHelper
|
||||
{
|
||||
public ServerClientV1()
|
||||
{
|
||||
BaseUrl = BaseUrl + "/api/v1.0";
|
||||
}
|
||||
|
||||
public UsersEndPoint UsersEndPoint()
|
||||
{
|
||||
return new UsersEndPoint(this);
|
||||
}
|
||||
|
||||
public GroupsEndPoint GroupsEndPoint()
|
||||
{
|
||||
return new GroupsEndPoint(this);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,61 @@
|
|||
using Newtonsoft.Json;
|
||||
using Syncfusion.Report.Server.Api.Helper.V2.Models;
|
||||
|
||||
namespace Syncfusion.Report.Server.API.Helper.V2.EndPoints
|
||||
{
|
||||
public class GroupsEndPoint2
|
||||
{
|
||||
private readonly ServerClientV2 _serverClientV2;
|
||||
private readonly string _baseUrl;
|
||||
|
||||
public GroupsEndPoint2(ServerClientV2 serverClientV2)
|
||||
{
|
||||
_serverClientV2 = serverClientV2;
|
||||
_baseUrl = _serverClientV2.BaseUrl;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This method is used to add list of users to the particular group.
|
||||
/// </summary>
|
||||
/// <param name="id">Group id</param>
|
||||
/// <param name="apiGroupUsers">List of users to be added.</param>
|
||||
/// <returns>Status of adding users to the group.</returns>
|
||||
|
||||
public ApiResponse AddUserToGroup(int id, ApiGroupUsers apiGroupUsers)
|
||||
{
|
||||
var result = _serverClientV2.Post(apiGroupUsers, _baseUrl + "/groups/" + id + "/users");
|
||||
var response = new ApiResponse();
|
||||
if (result != null)
|
||||
{
|
||||
return JsonConvert.DeserializeObject<ApiResponse>(result.Content);
|
||||
}
|
||||
else
|
||||
{
|
||||
return response;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This method is used to delete list of users from the particular group.
|
||||
/// </summary>
|
||||
/// <param name="id">Group id</param>
|
||||
/// <param name="apiGroupUsers">List of users to be deleted.</param>
|
||||
/// <returns>Status of deleting users from the group.</returns>
|
||||
|
||||
public ApiResponse DeleteUserFromGroup(int id, ApiGroupUsers apiGroupUsers)
|
||||
{
|
||||
var overrideUrl = _baseUrl + "/groups/" + id + "/users";
|
||||
var result = _serverClientV2.Delete(apiGroupUsers, overrideUrl);
|
||||
if (result != null)
|
||||
{
|
||||
return JsonConvert.DeserializeObject<ApiResponse>(result.Content);
|
||||
}
|
||||
else
|
||||
{
|
||||
return new ApiResponse {
|
||||
ApiStatus = true,
|
||||
StatusMessage = "User has been deleted successfully from the group."};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,405 @@
|
|||
using Newtonsoft.Json;
|
||||
using Syncfusion.Report.Server.Api.Helper.Authentication;
|
||||
using Syncfusion.Report.Server.Api.Helper.V2.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Web.Http;
|
||||
|
||||
namespace Syncfusion.Report.Server.API.Helper.V2.EndPoints
|
||||
{
|
||||
public class ItemsEndPoint
|
||||
{
|
||||
private readonly ServerClientV2 _serverClientV2;
|
||||
private readonly string _baseUrl;
|
||||
|
||||
public ItemsEndPoint(ServerClientV2 serverClientV2)
|
||||
{
|
||||
_serverClientV2 = serverClientV2;
|
||||
_baseUrl = _serverClientV2.BaseUrl;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This method is used to add new category to the server.
|
||||
/// </summary>
|
||||
/// <param name="apiCategoryAdd">Category details (Category name and category description) to be added.</param>
|
||||
/// <returns>Status of adding category to the server.</returns>
|
||||
public ApiResponse AddCategory(ApiCategoryAdd apiCategoryAdd)
|
||||
{
|
||||
var result = _serverClientV2.Post(apiCategoryAdd, _baseUrl + "/categories");
|
||||
var response = new ApiResponse();
|
||||
if (result != null)
|
||||
{
|
||||
return JsonConvert.DeserializeObject<ApiResponse>(result.Content);
|
||||
}
|
||||
else
|
||||
{
|
||||
return new ApiResponse();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This method is used to update the existing category on the server.
|
||||
/// </summary>
|
||||
/// <param name="apiCategoryUpdate">Category details (Category name and category description) to be updated.</param>
|
||||
/// <returns>Status of updating the category on the server.</returns>
|
||||
|
||||
public ApiResponse UpdateCategory(ApiCategoryUpdate apiCategoryUpdate)
|
||||
{
|
||||
var requestUrl = _baseUrl + "/categories";
|
||||
var result = _serverClientV2.Put(apiCategoryUpdate, requestUrl);
|
||||
var response = new ApiResponse();
|
||||
if (result != null)
|
||||
{
|
||||
return JsonConvert.DeserializeObject<ApiResponse>(result.Content);
|
||||
}
|
||||
else
|
||||
{
|
||||
return response;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This method is used to add new report to the server.
|
||||
/// </summary>
|
||||
/// <param name="apiReportAdd">Report details (Report name, Report description, IsPublic, Item in an array of bytes) to be added.</param>
|
||||
/// <returns>Status of added report to the server.</returns>
|
||||
|
||||
public ApiItemResponse AddReport(ApiReportAdd apiReportAdd)
|
||||
{
|
||||
var result = _serverClientV2.Post(apiReportAdd, _baseUrl + "/reports");
|
||||
var response = new ApiItemResponse();
|
||||
if (result != null)
|
||||
{
|
||||
return JsonConvert.DeserializeObject<ApiItemResponse>(result.Content);
|
||||
}
|
||||
else
|
||||
{
|
||||
return response;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This method is used to update the existing report on the server.
|
||||
/// </summary>
|
||||
/// <param name="apiReportUpdate">Report details (Report name, Report description, IsPublic, Item in an array of bytes) to be updated.</param>
|
||||
/// <returns>Status of updating the report on the server.</returns>
|
||||
|
||||
public ApiItemResponse UpdateReport(ApiReportUpdate apiReportUpdate)
|
||||
{
|
||||
var requestUrl = _baseUrl + "/reports";
|
||||
var result = _serverClientV2.Put(apiReportUpdate, requestUrl);
|
||||
var response = new ApiItemResponse();
|
||||
if (result != null)
|
||||
{
|
||||
return JsonConvert.DeserializeObject<ApiItemResponse>(result.Content);
|
||||
}
|
||||
else
|
||||
{
|
||||
return response;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This method is used to add new datasource to the server.
|
||||
/// </summary>
|
||||
/// <param name="apiDataSourceAdd">Datasource details(Datasource name, Datasource description and item in an array of bytes) to be added.</param>
|
||||
/// <returns>Status of adding datasource to the server.</returns>
|
||||
|
||||
public ApiItemResponse AddDataSource(ApiReportDataSourceAdd apiReportDataSourceAdd)
|
||||
{
|
||||
var result = _serverClientV2.Post(apiReportDataSourceAdd, _baseUrl + "/reports/data-sources");
|
||||
var response = new ApiItemResponse();
|
||||
if (result != null)
|
||||
{
|
||||
return JsonConvert.DeserializeObject<ApiItemResponse>(result.Content);
|
||||
}
|
||||
else
|
||||
{
|
||||
return response;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This method is used to update the existing datasource on the server.
|
||||
/// </summary>
|
||||
/// <param name="apiDataSourceUpdate">Datasource details(Datasource name, Datasource description and item in an array of bytes) to be updated.</param>
|
||||
/// <returns>Status of updating the datasource on the server.</returns>
|
||||
|
||||
public ApiResponse UpdateDataSource(ApiReportDataSourceUpdate apiReportDataSourceUpdate)
|
||||
{
|
||||
var requestUrl = _baseUrl + "/reports/data-sources";
|
||||
var result = _serverClientV2.Put(apiReportDataSourceUpdate, requestUrl);
|
||||
var response = new ApiResponse();
|
||||
if (result != null)
|
||||
{
|
||||
return JsonConvert.DeserializeObject<ApiResponse>(result.Content);
|
||||
}
|
||||
else
|
||||
{
|
||||
return response;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This method is used to add new widget to the server.
|
||||
/// </summary>
|
||||
/// <param name="apiWidgetAdd">Widget details(Widget name, widget description, IsPublic, items in an array of bytes) to be added.</param>
|
||||
/// <returns>Status of adding widget to the server.</returns>
|
||||
|
||||
public ApiItemResponse AddDataset(ApiReportDataSetAdd apiReportDatasetAdd)
|
||||
{
|
||||
var result = _serverClientV2.Post(apiReportDatasetAdd, _baseUrl + "/reports/datasets");
|
||||
var response = new ApiItemResponse();
|
||||
if (result != null)
|
||||
{
|
||||
return JsonConvert.DeserializeObject<ApiItemResponse>(result.Content);
|
||||
}
|
||||
else
|
||||
{
|
||||
return response;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This method is used to update the existing widget on the server.
|
||||
/// </summary>
|
||||
/// <param name="apiWidgetUpdate">Widegt details (Widget name, widget description, IsPublic, items in an array of bytes) to be updated.</param>
|
||||
/// <returns>Status of updating the widget on the server.</returns>
|
||||
|
||||
public ApiItemResponse UpdateDataset(ApiReportDataSetUpdate apiReportDatasetUpdate)
|
||||
{
|
||||
var requestUrl = _baseUrl + "/reports/datasets";
|
||||
var result = _serverClientV2.Put(apiReportDatasetUpdate, requestUrl);
|
||||
var response = new ApiItemResponse();
|
||||
if (result != null)
|
||||
{
|
||||
return JsonConvert.DeserializeObject<ApiItemResponse>(result.Content);
|
||||
}
|
||||
else
|
||||
{
|
||||
return response;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This method is used to add new file to the server.
|
||||
/// </summary>
|
||||
/// <param name="apiFileAdd">File details(File name, File description, File extension, items in an array of bytes) to be added.</param>
|
||||
/// <returns>Status of adding file to the server.</returns>
|
||||
|
||||
public ApiItemResponse AddFile(ApiFileAdd apiFileAdd)
|
||||
{
|
||||
var result = _serverClientV2.Post(apiFileAdd, _baseUrl + "/reports/files");
|
||||
var response = new ApiItemResponse();
|
||||
if (result != null)
|
||||
{
|
||||
return JsonConvert.DeserializeObject<ApiItemResponse>(result.Content);
|
||||
}
|
||||
else
|
||||
{
|
||||
return response;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This method is used to update the existing file on the server.
|
||||
/// </summary>
|
||||
/// <param name="apiFileUpdate">File details (file name, file description, file extension, items in an array of bytes) to be updated.</param>
|
||||
/// <returns>Status of updating the file on the server.</returns>
|
||||
|
||||
public ApiItemResponse UpdateFile(ApiFileUpdate apiFileUpdate)
|
||||
{
|
||||
var requestUrl = _baseUrl + "/reports/files";
|
||||
var result = _serverClientV2.Put(apiFileUpdate, requestUrl);
|
||||
var response = new ApiItemResponse();
|
||||
if (result != null)
|
||||
{
|
||||
return JsonConvert.DeserializeObject<ApiItemResponse>(result.Content);
|
||||
}
|
||||
else
|
||||
{
|
||||
return response;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// This method is used to export the reports for the users who have read access for reports.
|
||||
/// </summary>
|
||||
/// <param name="apiExportReport">Report details (Report Id, Server path, Export type).</param>
|
||||
/// <returns>Status of exporting the report.</returns>
|
||||
|
||||
public ApiExportReportResponse ExportReport(ApiExportReport apiExportReport)
|
||||
{
|
||||
var result = _serverClientV2.Post(apiExportReport, _baseUrl + "/reports/export");
|
||||
var response = new ApiExportReportResponse();
|
||||
if (result != null)
|
||||
{
|
||||
return JsonConvert.DeserializeObject<ApiExportReportResponse>(result.Content);
|
||||
}
|
||||
else
|
||||
{
|
||||
return response;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// This method is used to delete the item(Category, Report, Datasource, Dataset, File, Schedule) on the server.
|
||||
/// </summary>
|
||||
/// <param name="id">Item Id.</param>
|
||||
/// <returns>Status of deleting the items on the server.</returns>
|
||||
|
||||
public ApiResponse DeleteItem(Guid id)
|
||||
{
|
||||
var requestUrl = _baseUrl + "/items/" + id;
|
||||
var result = _serverClientV2.Delete(new ApiItems(), requestUrl);
|
||||
if (result != null)
|
||||
{
|
||||
return JsonConvert.DeserializeObject<ApiResponse>(result.Content);
|
||||
}
|
||||
else
|
||||
{
|
||||
return new ApiResponse
|
||||
{
|
||||
ApiStatus = true,
|
||||
StatusMessage = "Item has been deleted successfully."
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This method returns item details for the values Category Id, Report Id, Datasource Id, Dataset Id, File Id and Schedule Id.
|
||||
/// </summary>
|
||||
/// <param name="id">The id values may be Category Id, Report Id, Datasource Id, Dataset Id, File Id and Schedule Id.</param>
|
||||
/// <returns>Item details for the values.</returns>
|
||||
|
||||
public ApiSpecifiedItemDetail GetItemDetail(Guid id)
|
||||
{
|
||||
var overrideUrl = _baseUrl + "/items/" + id;
|
||||
var itemDetail = new ApiSpecifiedItemDetail();
|
||||
var result = _serverClientV2.Get(itemDetail, overrideUrl);
|
||||
if (result != null)
|
||||
{
|
||||
return JsonConvert.DeserializeObject<ApiSpecifiedItemDetail>(result.Content);
|
||||
}
|
||||
else
|
||||
{
|
||||
return itemDetail;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This method returns list of items for the itemtype category, report, datasource, dataset, file and schedule.
|
||||
/// </summary>
|
||||
/// <param name="itemType">Item type (category, report, datasource, dataset, file and schedule)</param>
|
||||
/// <param name="serverPath">Category path</param>
|
||||
/// <returns>List of items for the itemtype.</returns>
|
||||
|
||||
public List<ApiItems> GetItems([FromUri] ItemType itemType, [FromUri] string serverPath = null)
|
||||
{
|
||||
var requestUrl = _baseUrl + "/items";
|
||||
var items = new List<ApiItems>();
|
||||
var param = new Dictionary<string, object>();
|
||||
param.Add("itemtype", itemType);
|
||||
var result = _serverClientV2.Get(items, requestUrl, param);
|
||||
if (result != null)
|
||||
{
|
||||
return JsonConvert.DeserializeObject<List<ApiItems>>(result.Content);
|
||||
}
|
||||
else
|
||||
{
|
||||
return items;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// This method returns whether the item (category, report, datasource, dataset, file) already exists in the server.
|
||||
/// </summary>
|
||||
/// <param name="apiValidateItemName">Details about the item (Item name, category name, itemtype)</param>
|
||||
/// <returns>Returns whether the item already exists in the server.</returns>
|
||||
|
||||
public bool IsItemNameExists(ApiValidateItemName apiValidateItemName)
|
||||
{
|
||||
var requestUrl = _baseUrl + "/items/is-name-exists";
|
||||
var param = new Dictionary<string, object>();
|
||||
param.Add("itemname", apiValidateItemName.ItemName);
|
||||
param.Add("itemtype", apiValidateItemName.ItemType);
|
||||
param.Add("categoryname", apiValidateItemName.CategoryName);
|
||||
var result = _serverClientV2.Post(apiValidateItemName, requestUrl, param);
|
||||
if (result != null)
|
||||
{
|
||||
return JsonConvert.DeserializeObject<bool>(result.Content);
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This method returns the public items for the values report.
|
||||
/// </summary>
|
||||
/// <param name="itemType"></param>
|
||||
/// <returns>Public items for the values reports.</returns>
|
||||
|
||||
public List<ApiReportPublicItems> GetPublicItems([FromUri] ItemType itemType)
|
||||
{
|
||||
var requestUrl = _baseUrl + "/reports/public";
|
||||
var publicItems = new List<ApiReportPublicItems>();
|
||||
var param = new Dictionary<string, object>();
|
||||
param.Add("itemtype", itemType);
|
||||
var result = _serverClientV2.Get(publicItems, requestUrl, param);
|
||||
if (result != null)
|
||||
{
|
||||
return JsonConvert.DeserializeObject<List<ApiReportPublicItems>>(result.Content);
|
||||
}
|
||||
else
|
||||
{
|
||||
return publicItems;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This method returns list of favorite reports that belong to current user.
|
||||
/// </summary>
|
||||
/// <returns>List of favorite reports.</returns>
|
||||
|
||||
public List<ApiReportFavoriteItems> GetFavoriteItems()
|
||||
{
|
||||
var requestUrl = _baseUrl + "/reports/favorite";
|
||||
var favoriteItems = new List<ApiReportFavoriteItems>();
|
||||
var result = _serverClientV2.Get(favoriteItems, requestUrl);
|
||||
if (result != null)
|
||||
{
|
||||
return JsonConvert.DeserializeObject<List<ApiReportFavoriteItems>>(result.Content);
|
||||
}
|
||||
else
|
||||
{
|
||||
return favoriteItems;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This method is used to update the report as favorite or non-favorite on the server.
|
||||
/// </summary>
|
||||
/// <param name="apiUpdateFavorite">Report details (Report Id and Favorite value to set the item as favorite) to be updated.</param>
|
||||
/// <returns>Status of updating the report as favorite or non-favorite on the server.</returns>
|
||||
|
||||
public ApiResponse UpdateFavoriteItem(ApiUpdateFavoriteReport apiUpdateFavorite)
|
||||
{
|
||||
var requestUrl = _baseUrl + "/reports/favorite";
|
||||
var result = _serverClientV2.Put(apiUpdateFavorite, requestUrl);
|
||||
var response = new ApiResponse();
|
||||
if (result != null)
|
||||
{
|
||||
return JsonConvert.DeserializeObject<ApiResponse>(result.Content);
|
||||
}
|
||||
else
|
||||
{
|
||||
return response;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,143 @@
|
|||
using Newtonsoft.Json;
|
||||
using Syncfusion.Report.Server.Api.Helper.V2.Models;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Syncfusion.Report.Server.API.Helper.V2.EndPoints
|
||||
{
|
||||
public class PermissionEndPoint
|
||||
{
|
||||
private readonly ServerClientV2 _serverClientV2;
|
||||
private readonly string _baseUrl;
|
||||
|
||||
public PermissionEndPoint(ServerClientV2 serverClientV2)
|
||||
{
|
||||
_serverClientV2 = serverClientV2;
|
||||
_baseUrl = _serverClientV2.BaseUrl;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This method is used to get the list of permissions of a specific user.
|
||||
/// </summary>
|
||||
/// <param name="id">User Id</param>
|
||||
/// <returns>list of permissions of a specific user.</returns>
|
||||
|
||||
public List<ApiUserPermissionDetail> GetUserPermission(int id)
|
||||
{
|
||||
var requestUrl = _baseUrl + "/permissions/users/" + id;
|
||||
var userpermission = new List<ApiUserPermissionDetail>();
|
||||
var result = _serverClientV2.Get(userpermission, requestUrl);
|
||||
if(result != null)
|
||||
{
|
||||
return JsonConvert.DeserializeObject<List<ApiUserPermissionDetail>>(result.Content);
|
||||
}
|
||||
else
|
||||
{
|
||||
return userpermission;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This method is used to get the list of permissions of a specific group.
|
||||
/// </summary>
|
||||
/// <param name="id">Group Id</param>
|
||||
/// <returns>List of permissions of a specific group.</returns>
|
||||
|
||||
public List<ApiGroupPermissionDetail> GetGroupPermission(int id)
|
||||
{
|
||||
var requestUrl = _baseUrl + "/permissions/groups/" + id;
|
||||
var grouppermission = new List<ApiGroupPermissionDetail>();
|
||||
var result = _serverClientV2.Get(grouppermission, requestUrl);
|
||||
if(result != null)
|
||||
{
|
||||
return JsonConvert.DeserializeObject<List<ApiGroupPermissionDetail>>(result.Content);
|
||||
}
|
||||
else
|
||||
{
|
||||
return grouppermission;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This method is used to add new permissions to specific users on the server.
|
||||
/// </summary>
|
||||
/// <param name="apiUserPermissionAdd">Permission details (permission access type, user id, permission entity, item id) to be added to the specified user.</param>
|
||||
/// <returns>Status of adding new permissions to specific users.</returns>
|
||||
|
||||
public ApiResponse AddUserPermission(ApiUserPermissionAdd apiUserPermissionAdd)
|
||||
{
|
||||
var result = _serverClientV2.Post(apiUserPermissionAdd, _baseUrl + "/permissions/users");
|
||||
var response = new ApiResponse();
|
||||
if (result != null)
|
||||
{
|
||||
return JsonConvert.DeserializeObject<ApiResponse>(result.Content);
|
||||
}
|
||||
else
|
||||
{
|
||||
return response;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This method is used to add new permissions to the specific group on the server.
|
||||
/// </summary>
|
||||
/// <param name="apiGroupPermissionAdd">Permission details (permission access type, group id, permission entity, item id) to be added to the specified group.</param>
|
||||
/// <returns>Status of adding new permissions to specific group.</returns>
|
||||
|
||||
public ApiResponse AddGroupPermission(ApiGroupPermissionAdd apiGroupPermissionAdd)
|
||||
{
|
||||
var result = _serverClientV2.Post(apiGroupPermissionAdd, _baseUrl + "/permissions/groups");
|
||||
var response = new ApiResponse();
|
||||
if (result != null)
|
||||
{
|
||||
return JsonConvert.DeserializeObject<ApiResponse>(result.Content);
|
||||
}
|
||||
else
|
||||
{
|
||||
return response;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This method is used to delete the specific user permissions on the server.
|
||||
/// </summary>
|
||||
/// <param name="id">User permission id</param>
|
||||
/// <returns>Status of deleting specific user permissions on the server.</returns>
|
||||
|
||||
public ApiResponse DeleteUserPermission(int id)
|
||||
{
|
||||
var requestUrl = _baseUrl + "/permissions/users/" + id;
|
||||
var permission = new List<Permission>() { };
|
||||
var result = _serverClientV2.Delete(permission, requestUrl);
|
||||
if(result != null)
|
||||
{
|
||||
return JsonConvert.DeserializeObject<ApiResponse>(result.Content);
|
||||
}
|
||||
else
|
||||
{
|
||||
return new ApiResponse { ApiStatus = true, StatusMessage = "User permission has been deleted successfully." };
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This method is used to delete the specific group permissions on the server.
|
||||
/// </summary>
|
||||
/// <param name="id">Group permission id</param>
|
||||
/// <returns>Status of deleting specific group permissions on the server.</returns>
|
||||
|
||||
public ApiResponse DeleteGroupPermission(int id)
|
||||
{
|
||||
var requestUrl = _baseUrl + "/permissions/groups/" + id;
|
||||
var permission = new List<Permission>() { };
|
||||
var result = _serverClientV2.Delete(permission, requestUrl);
|
||||
if(result != null)
|
||||
{
|
||||
return JsonConvert.DeserializeObject<ApiResponse>(result.Content);
|
||||
}
|
||||
else
|
||||
{
|
||||
return new ApiResponse { ApiStatus = true, StatusMessage = "Group permission has been deleted successfully."};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,119 @@
|
|||
using Newtonsoft.Json;
|
||||
using Syncfusion.Report.Server.Api.Helper.V2.Models;
|
||||
using System.Web.Http;
|
||||
|
||||
namespace Syncfusion.Report.Server.API.Helper.V2.EndPoints
|
||||
{
|
||||
public class UsersEndPoint2
|
||||
{
|
||||
private readonly ServerClientV2 _serverClientV2;
|
||||
private readonly string _baseUrl;
|
||||
|
||||
public UsersEndPoint2(ServerClientV2 serverClientV2)
|
||||
{
|
||||
_serverClientV2 = serverClientV2;
|
||||
_baseUrl = _serverClientV2.BaseUrl;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This method is used to add a user with password to the server.
|
||||
/// </summary>
|
||||
/// <param name="user">User details (Email, first name, last name, username, password) to be added.</param>
|
||||
/// <returns>Status of adding new user.</returns>
|
||||
|
||||
public ApiStatusMessage AddUserV2(ApiUserAdd user)
|
||||
{
|
||||
var result = _serverClientV2.Post(user, _baseUrl + "/users");
|
||||
if(result != null)
|
||||
{
|
||||
return JsonConvert.DeserializeObject<ApiStatusMessage>(result.Content);
|
||||
}
|
||||
else
|
||||
{
|
||||
return new ApiStatusMessage();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This method is used to get the group details of particular users from the server.
|
||||
/// </summary>
|
||||
/// <param name="user">User id, username or email of the user.</param>
|
||||
/// <returns>List of groups of the user.</returns>
|
||||
|
||||
public ApiGroupListV2 GetGroupsOfUser(string user)
|
||||
{
|
||||
var overrideUrl = _baseUrl + "/users/" + user + "/groups";
|
||||
var result = _serverClientV2.Get(new ApiGroupListV2(), overrideUrl);
|
||||
if(result != null)
|
||||
{
|
||||
return JsonConvert.DeserializeObject<ApiGroupListV2>(result.Content);
|
||||
}
|
||||
else
|
||||
{
|
||||
return new ApiGroupListV2 {
|
||||
Message = "User doesnot belong to any group"
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Used to download the CSV templates from the server.
|
||||
/// </summary>
|
||||
/// <returns>CSV template file.</returns>
|
||||
|
||||
public ApiDownloadCsvTemplate DownloadCsvTemplate()
|
||||
{
|
||||
var overrideUrl = _baseUrl + "/csv-users/download-template";
|
||||
var result = _serverClientV2.Get(new ApiDownloadCsvTemplate(), overrideUrl);
|
||||
if(result != null)
|
||||
{
|
||||
return JsonConvert.DeserializeObject<ApiDownloadCsvTemplate>(result.Content);
|
||||
}
|
||||
else
|
||||
{
|
||||
return new ApiDownloadCsvTemplate();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This method is used to add a CSV of users to the server.
|
||||
/// </summary>
|
||||
/// <param name="apiCsvUserImportRequest">CSV file in an array of bytes.</param>
|
||||
/// <returns>Status of adding users from the CSV file.</returns>
|
||||
public ApiCsvUserImportResponse CsvUserImport(ApiCsvUserImportRequest apiCsvUserImportRequest)
|
||||
{
|
||||
var result = _serverClientV2.Post(apiCsvUserImportRequest, _baseUrl + "/csv-users");
|
||||
var response = new ApiCsvUserImportResponse();
|
||||
if (result != null)
|
||||
{
|
||||
return JsonConvert.DeserializeObject<ApiCsvUserImportResponse>(result.Content);
|
||||
}
|
||||
else
|
||||
{
|
||||
return response;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This method is used to activate or de-activate the user account in the server.
|
||||
/// </summary>
|
||||
/// <param name="user">Username or email id of the user.</param>
|
||||
/// <param name="activationRequest">Status to activate or deactivate the user.</param>
|
||||
/// <returns>Status of activate or deactivate the user.</returns>
|
||||
|
||||
public ApiResponse ActivateDeactivateuser([FromUri] string user, [FromBody] ApiUserActivationRequest activationRequest)
|
||||
{
|
||||
var requestUrl = _baseUrl + "/users/" + user;
|
||||
var result = _serverClientV2.Put(activationRequest, requestUrl);
|
||||
var response = new ApiResponse();
|
||||
if (result != null)
|
||||
{
|
||||
return JsonConvert.DeserializeObject<ApiResponse>(result.Content);
|
||||
}
|
||||
else
|
||||
{
|
||||
return response;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,58 @@
|
|||
namespace Syncfusion.Report.Server.Api.Helper.V2.Models
|
||||
{
|
||||
using System;
|
||||
using System.Net;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
[Serializable]
|
||||
[DataContract]
|
||||
public class ApiResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// Returns the status of the API.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public bool ApiStatus
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns data from the API.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public object Data
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns status of the API request.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public bool Status
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the status message from the API.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string StatusMessage
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[DataMember]
|
||||
public string Message { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public HttpStatusCode StatusCode { get; set; }
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
namespace Syncfusion.Report.Server.Api.Helper.V2.Models
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.Serialization;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Net;
|
||||
|
||||
/// <summary>
|
||||
/// Category details.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
[DataContract]
|
||||
public class ApiCategoryAdd
|
||||
{
|
||||
/// <summary>
|
||||
/// Category name.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
[Required]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Category description.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string Description { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public string Message { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public HttpStatusCode StatusCode { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,48 @@
|
|||
namespace Syncfusion.Report.Server.Api.Helper.V2.Models
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
/// <summary>
|
||||
/// Category details.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
[DataContract]
|
||||
public class ApiCategoryUpdate
|
||||
{
|
||||
/// <summary>
|
||||
/// Category ID.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
[Required]
|
||||
public Guid CategoryId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Category name.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Category description.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string Description { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public string Message { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public HttpStatusCode StatusCode { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
namespace Syncfusion.Report.Server.Api.Helper.V2.Models
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Net;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// Contains CSV user import request.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
[DataContract]
|
||||
public class ApiCsvUserImportRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides the CSV file in an array of bytes.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
[Required]
|
||||
public byte[] CsvFileContent
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[DataMember]
|
||||
public string Message { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public HttpStatusCode StatusCode { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,60 @@
|
|||
namespace Syncfusion.Report.Server.Api.Helper.V2.Models
|
||||
{
|
||||
using System;
|
||||
using System.Net;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// Contains response of Csv user import
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
[DataContract]
|
||||
public class ApiCsvUserImportResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// Returns the status of the API.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public bool ApiStatus
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns status of the API request.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public bool Status
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the status message from the API.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string StatusMessage
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns CSV file in array of bytes if the importing users find errors.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public byte[] CsvErrorContent
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[DataMember]
|
||||
public string Message { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public HttpStatusCode StatusCode { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,59 @@
|
|||
namespace Syncfusion.Report.Server.Api.Helper.V2.Models
|
||||
{
|
||||
using System;
|
||||
using System.Net;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// Contains response of downloaded CSV template file.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
[DataContract]
|
||||
public class ApiDownloadCsvTemplate
|
||||
{
|
||||
/// <summary>
|
||||
/// Returns the status of the API.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public bool ApiStatus
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns status of the API request.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public bool Status
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the status message from the API.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string StatusMessage
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns CSV file in array of bytes.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public byte[] FileContent
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
[DataMember]
|
||||
public string Message { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public HttpStatusCode StatusCode { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
namespace Syncfusion.Report.Server.Api.Helper.V2.Models
|
||||
{
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// Details about the report to be exported
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
[DataContract]
|
||||
public class ApiExportReport
|
||||
{
|
||||
/// <summary>
|
||||
/// Report ID.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public Guid ReportId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the relative URL of the report.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string ServerPath
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Export type.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
[Required]
|
||||
public string ExportType
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,50 @@
|
|||
namespace Syncfusion.Report.Server.Api.Helper.V2.Models
|
||||
{
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
[Serializable]
|
||||
[DataContract]
|
||||
public class ApiExportReportResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// Returns the status of the API.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public bool ApiStatus
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns status of the API request.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public bool Status
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the status message from the API.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string StatusMessage
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the exported report in an array of bytes.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public byte[] FileContent
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,54 @@
|
|||
namespace Syncfusion.Report.Server.Api.Helper.V2.Models
|
||||
{
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// File details
|
||||
/// </summary>
|
||||
public class ApiFileAdd
|
||||
{
|
||||
/// <summary>
|
||||
/// File name
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
[Required]
|
||||
public string Name
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// File description
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string Description
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Provide the file extension to save the item
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
[Required]
|
||||
public string Extension
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Provide items in an array of bytes
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
[Required]
|
||||
public byte[] ItemContent
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,73 @@
|
|||
namespace Syncfusion.Report.Server.Api.Helper.V2.Models
|
||||
{
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// File details
|
||||
/// </summary>
|
||||
public class ApiFileUpdate
|
||||
{
|
||||
/// <summary>
|
||||
/// Item ID
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
[Required]
|
||||
public Guid ItemId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// File name
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string Name
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// File description
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string Description
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Comments about update
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string VersionComment
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Provide the file extension to save the item
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string Extension
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Provide items in an array of bytes
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public byte[] ItemContent
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
namespace Syncfusion.Report.Server.Api.Helper.V2.Models
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
[Serializable]
|
||||
[DataContract]
|
||||
public class ApiGroupListV2
|
||||
{
|
||||
[DataMember]
|
||||
public List<ApiGroupV2> GroupList
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
[DataMember]
|
||||
public string Message { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public HttpStatusCode StatusCode { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,59 @@
|
|||
namespace Syncfusion.Report.Server.Api.Helper.V2.Models
|
||||
{
|
||||
using System;
|
||||
using System.Net;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// Permission details.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
[DataContract]
|
||||
public class ApiGroupPermissionAdd
|
||||
{
|
||||
/// <summary>
|
||||
/// Specify an access type for item.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string PermissionAccess
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Group ID.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public int GroupId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Specify an entity of item for permission.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string PermissionEntity
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Specify the item ID while assigning permission to particular item.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public Guid? ItemId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
[DataMember]
|
||||
public string Message { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public HttpStatusCode StatusCode { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,72 @@
|
|||
namespace Syncfusion.Report.Server.Api.Helper.V2.Models
|
||||
{
|
||||
using System;
|
||||
using System.Net;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// Group Permission details from the server.
|
||||
/// </summary>
|
||||
public class ApiGroupPermissionDetail
|
||||
{
|
||||
/// <summary>
|
||||
/// Specify an access type for item.
|
||||
/// </summary>
|
||||
public string PermissionAccess
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Specify an entity of item for permission.
|
||||
/// </summary>
|
||||
public string PermissionEntity
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Group ID.
|
||||
/// </summary>
|
||||
public int GroupId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Item name.
|
||||
/// </summary>
|
||||
public string ItemName
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Permission ID.
|
||||
/// </summary>
|
||||
public int PermissionId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Item ID.
|
||||
/// </summary>
|
||||
public Guid? ItemId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[DataMember]
|
||||
public string Message { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public HttpStatusCode StatusCode { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
namespace Syncfusion.Report.Server.Api.Helper.V2.Models
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// User(s) added/removed from the group.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
[DataContract]
|
||||
public class ApiGroupUsers
|
||||
{
|
||||
/// <summary>
|
||||
/// List of user IDs
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public List<int> Id { get; set; }
|
||||
[DataMember]
|
||||
public string Message { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public HttpStatusCode StatusCode { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,80 @@
|
|||
namespace Syncfusion.Report.Server.Api.Helper.V2.Models
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
[Serializable]
|
||||
[DataContract]
|
||||
public class ApiGroupV2
|
||||
{
|
||||
/// <summary>
|
||||
/// Description of the group.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string Description
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ID of the group.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public int Id
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if the group is added from Active Directory
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public bool IsActiveDirectoryGroup
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if the group is added from Azure Active Directory
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public bool IsAzureADGroup
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Name of the group.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string Name
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// User(s) count
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public int UserCount
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
[DataMember]
|
||||
public string Message { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public HttpStatusCode StatusCode { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,74 @@
|
|||
namespace Syncfusion.Report.Server.Api.Helper.V2.Models
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
/// <summary>
|
||||
/// Response details of item.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
[DataContract]
|
||||
public class ApiItemResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// Returns the status of the API.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public bool ApiStatus
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns status of the API request.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public bool Status
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the status message from the API.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string StatusMessage
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the ID of the published item.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public Guid PublishedItemId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns link of the published file
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string FileLink
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[DataMember]
|
||||
public string Message { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public HttpStatusCode StatusCode { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,204 @@
|
|||
namespace Syncfusion.Report.Server.Api.Helper.V2.Models
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// Details of items.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
[DataContract]
|
||||
public class ApiItems
|
||||
{
|
||||
/// <summary>
|
||||
/// Specifies the read permission of the item.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public bool CanRead { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the write permission of the item.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public bool CanWrite { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the delete permission of the item.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public bool CanDelete { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the download permission of the item.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public bool CanDownload { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the schedule permission of the item.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public bool CanSchedule { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the open permission of the item.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public bool CanOpen { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the move permission of the item.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public bool CanMove { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the copy permission of the item.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public bool CanCopy { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the clone permission of the item.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public bool CanClone { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the create permission of the item.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public bool CanCreateItem { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Item ID
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public Guid Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Item type.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string ItemType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Item name.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Item description.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Item location.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string ItemLocation
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the user ID of the item creator.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public int CreatedById { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the display name of the user who created the item.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string CreatedByDisplayName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the user ID of the item modifier.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public int ModifiedById { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the full name of the user who modified the item.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string ModifiedByFullName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Category ID.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public Guid? CategoryId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Category name.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string CategoryName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Date created of item in string format.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string CreatedDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Date modified of item in string format.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string ModifiedDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Date modified of item in date format.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public DateTime ItemModifiedDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Date created of item in date format.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public DateTime ItemCreatedDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if the dashboard is multi-dashboard.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public bool IsMultiDashboard { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if it is a favorite item.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public bool IsFavorite { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if the item is public.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public bool IsPublic { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns link of the file
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string FileLink { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns extension of the file
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string Extension { get; set; }
|
||||
[DataMember]
|
||||
public string Message { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public HttpStatusCode StatusCode { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,98 @@
|
|||
namespace Syncfusion.Report.Server.Api.Helper.V2.Models
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// Report details
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
[DataContract]
|
||||
public class ApiReportAdd
|
||||
{
|
||||
/// <summary>
|
||||
/// Report name
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
[Required]
|
||||
public string Name
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Report description
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string Description
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Category ID
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
[Required]
|
||||
public Guid CategoryId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Specify the relative Path of the item
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string ServerPath
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Specify true to set the item as a public
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public bool IsPublic
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Mapping information of dataset
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public List<DataSetMappingInfo> DataSetMappingInfo
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Mapping information of datasource
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public List<DataSourceMappingInfo> DataSourceMappingInfo
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Provide items in an array of bytes
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
[Required]
|
||||
public byte[] ItemContent
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,60 @@
|
|||
namespace Syncfusion.Report.Server.Api.Helper.V2.Models
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
/// <summary>
|
||||
/// Dataset details
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
[DataContract]
|
||||
public class ApiReportDataSetAdd
|
||||
{
|
||||
/// <summary>
|
||||
/// Dataset name
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
[Required]
|
||||
public string Name
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Dataset description
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string Description
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Datasource mapping information
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public List<DataSourceMappingInfo> DataSourceMappingInfo
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Provide items in an array of bytes
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
[Required]
|
||||
public byte[] ItemContent
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,79 @@
|
|||
namespace Syncfusion.Report.Server.Api.Helper.V2.Models
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
/// <summary>
|
||||
/// Dataset details
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
[DataContract]
|
||||
public class ApiReportDataSetUpdate
|
||||
{
|
||||
/// <summary>
|
||||
/// Item ID
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
[Required]
|
||||
public Guid ItemId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Dataset name
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string Name
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Dataset description
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string Description
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Comments about update
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string VersionComment
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Datasource mapping information
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public List<DataSourceMappingInfo> DataSourceMappingInfo
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Provide items in an array of bytes
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public byte[] ItemContent
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,45 @@
|
|||
namespace Syncfusion.Report.Server.Api.Helper.V2.Models
|
||||
{
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// Datasource details
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
[DataContract]
|
||||
public class ApiReportDataSourceAdd
|
||||
{
|
||||
/// <summary>
|
||||
/// Datasource name
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
[Required]
|
||||
public string Name
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Datasource description
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string Description
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Datasource definition
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public DataSourceDefinition DataSourceDefinition
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,69 @@
|
|||
namespace Syncfusion.Report.Server.Api.Helper.V2.Models
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
/// <summary>
|
||||
/// Datasource details
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
[DataContract]
|
||||
public class ApiReportDataSourceUpdate
|
||||
{
|
||||
/// <summary>
|
||||
/// Item ID
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
[Required]
|
||||
public Guid ItemId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Datasource name
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string Name
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Datasource description
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string Description
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Comments about update
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string VersionComment
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Datasource definition
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public DataSourceDefinition DataSourceDefinition
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,107 @@
|
|||
namespace Syncfusion.Report.Server.Api.Helper.V2.Models
|
||||
{
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// Details of Favorite Item
|
||||
/// </summary>
|
||||
public class ApiReportFavoriteItems
|
||||
{
|
||||
/// <summary>
|
||||
/// Report ID
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public Guid ReportId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Item type
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public ItemType ItemType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Item name
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Item description
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Category ID
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public Guid? CategoryId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Category name
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string CategoryName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Category discription
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string CategoryDescription { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the user ID of the item creator
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public int CreatedById { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the display name of the user who created the item
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string CreatedByDisplayName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the user ID of the item modifier
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public int ModifiedById { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the full name of the user who modified the item
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string ModifiedByFullName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Date created of item in string format
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string CreatedDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Date modified of item in string format
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string ModifiedDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Date created of item in date format
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public DateTime ItemCreatedDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Date modified of item in date format
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public DateTime ItemModifiedDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if the item is public.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public bool IsPublic { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,109 @@
|
|||
namespace Syncfusion.Report.Server.Api.Helper.V2.Models
|
||||
{
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// Details of Public items
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
[DataContract]
|
||||
public class ApiReportPublicItems
|
||||
{
|
||||
/// <summary>
|
||||
/// Report ID
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public Guid ReportId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Item type
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public ItemType ItemType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Item name
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Item description
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Category ID
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public Guid? CategoryId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Category name
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string CategoryName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Category discription
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string CategoryDescription { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the user ID of the item creator
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public int CreatedById { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the display name of the user who created the item
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string CreatedByDisplayName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the user ID of the item modifier
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public int ModifiedById { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the full name of the user who modified the item
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string ModifiedByFullName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Date created of item in string format
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string CreatedDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Date modified of item in string format
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string ModifiedDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Date created of item in date format
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public DateTime ItemCreatedDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Date modified of item in date format
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public DateTime ItemModifiedDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if it is a favorite item.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public bool IsFavorite { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,117 @@
|
|||
namespace Syncfusion.Report.Server.Api.Helper.V2.Models
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// Report details
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
[DataContract]
|
||||
public class ApiReportUpdate
|
||||
{
|
||||
/// <summary>
|
||||
/// Item ID
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
[Required]
|
||||
public Guid ItemId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Report name
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string Name
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Report description
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string Description
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Category ID
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
[Required]
|
||||
public Guid CategoryId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Comments about update
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string VersionComment
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Specify the relative Path of the item
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string ServerPath
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Specify true to set item as public
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public bool IsPublic
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Dataset mapping information
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public List<DataSetMappingInfo> DataSetMappingInfo
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Datasource mapping information
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public List<DataSourceMappingInfo> DataSourceMappingInfo
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Provide items in an array of bytes
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public byte[] ItemContent
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,177 @@
|
|||
namespace Syncfusion.Report.Server.Api.Helper.V2.Models
|
||||
{
|
||||
using System;
|
||||
using System.Net;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// Item Details.
|
||||
/// </summary>
|
||||
public class ApiSpecifiedItemDetail
|
||||
{
|
||||
/// <summary>
|
||||
/// Item ID.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public Guid Id
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Item type.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string ItemType
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Item name.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string Name
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Item description.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string Description
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the user ID of the item creator.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public int CreatedById
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Item ID from where the item was cloned.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public Guid? CloneOf
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Category ID.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public Guid? CategoryId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Category name.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string CategoryName
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Date created of item in date format.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public DateTime ItemCreatedDate
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Date modified of item in date format.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public DateTime ItemModifiedDate
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Date created of item in string format.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string CreatedDate
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Date modified of item in string format.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string ModifiedDate
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the user ID of the item modifier.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public int ModifiedById
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Item extension.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string Extension
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if the item is public.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public bool IsPublic
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if the item is active.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public bool IsActive
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
[DataMember]
|
||||
public string Message { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public HttpStatusCode StatusCode { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
namespace Syncfusion.Report.Server.Api.Helper.V2.Models
|
||||
{
|
||||
using System.Net;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
public class ApiStatusMessage
|
||||
{
|
||||
/// <summary>
|
||||
/// Returns the status message from the API.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string StatusMessage
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the Link from API.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string Link
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
[DataMember]
|
||||
public string Message { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public HttpStatusCode StatusCode { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
namespace Syncfusion.Report.Server.Api.Helper.V2.Models
|
||||
{
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// Details about the favorite item.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
[DataContract]
|
||||
public class ApiUpdateFavoriteReport
|
||||
{
|
||||
/// <summary>
|
||||
/// Report ID.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
[Required]
|
||||
public Guid ReportId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Specify true to set the item as a favorite item.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
[Required]
|
||||
public bool Favorite { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
namespace Syncfusion.Report.Server.Api.Helper.V2.Models
|
||||
{
|
||||
using System;
|
||||
using System.Net;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// User activation or deactivation request
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
[DataContract]
|
||||
public class ApiUserActivationRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// Status update for the user.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public bool Activate { get; set; }
|
||||
[DataMember]
|
||||
public string Message { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public HttpStatusCode StatusCode { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,77 @@
|
|||
namespace Syncfusion.Report.Server.Api.Helper.V2.Models
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Net;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
/// <summary>
|
||||
/// User detail
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
[DataContract]
|
||||
public class ApiUserAdd
|
||||
{
|
||||
/// <summary>
|
||||
/// Email address of the user.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
[Required]
|
||||
public string Email
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// First name of the user.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
[Required]
|
||||
public string FirstName
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Last name of the user.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string Lastname
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Username of the user.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
[Required]
|
||||
public string Username
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Password of the user.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string Password
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
[DataMember]
|
||||
public string Message { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public HttpStatusCode StatusCode { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,59 @@
|
|||
namespace Syncfusion.Report.Server.Api.Helper.V2.Models
|
||||
{
|
||||
using System;
|
||||
using System.Net;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// Permission details.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
[DataContract]
|
||||
public class ApiUserPermissionAdd
|
||||
{
|
||||
/// <summary>
|
||||
/// Specify an access type for item.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string PermissionAccess
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// User ID.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public int UserId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Specify an entity of item for permission.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string PermissionEntity
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Specify the item ID while assigning permission to particular item.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public Guid? ItemId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
[DataMember]
|
||||
public string Message { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public HttpStatusCode StatusCode { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,72 @@
|
|||
namespace Syncfusion.Report.Server.Api.Helper.V2.Models
|
||||
{
|
||||
using System;
|
||||
using System.Net;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// User permission details from the server.
|
||||
/// </summary>
|
||||
public class ApiUserPermissionDetail
|
||||
{
|
||||
/// <summary>
|
||||
/// Specify an access type for item.
|
||||
/// </summary>
|
||||
public string PermissionAccess
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Specify an entity of item for permission.
|
||||
/// </summary>
|
||||
public string PermissionEntity
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// User ID.
|
||||
/// </summary>
|
||||
public int UserId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Item name.
|
||||
/// </summary>
|
||||
public string ItemName
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Permission ID.
|
||||
/// </summary>
|
||||
public int PermissionId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Item ID.
|
||||
/// </summary>
|
||||
public Guid? ItemId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
[DataMember]
|
||||
public string Message { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public HttpStatusCode StatusCode { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,40 @@
|
|||
namespace Syncfusion.Report.Server.Api.Helper.V2.Models
|
||||
{
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Net;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// Validation details of the item.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
[DataContract]
|
||||
public class ApiValidateItemName
|
||||
{
|
||||
/// <summary>
|
||||
/// Item name.
|
||||
/// </summary>
|
||||
[Required]
|
||||
[DataMember]
|
||||
public string ItemName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Category name.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string CategoryName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Item type.
|
||||
/// </summary>
|
||||
[Required]
|
||||
[DataMember]
|
||||
public string ItemType { get; set; }
|
||||
[DataMember]
|
||||
public string Message { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public HttpStatusCode StatusCode { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,301 @@
|
|||
namespace Syncfusion.Report.Server.Api.Helper.V2.Models
|
||||
{
|
||||
using System;
|
||||
using System.Xml.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// Set the type of credentials to secure data
|
||||
/// Prompt: Credentials should be supplied by the user while running the report,
|
||||
/// Store: Credentials that stored securely in the report server,
|
||||
/// Integrated: Use the Windows credentials of the current user to access the data source,
|
||||
/// None: Credentials are not required.
|
||||
/// </summary>
|
||||
public enum CredentialRetrieval
|
||||
{
|
||||
Prompt,
|
||||
Store,
|
||||
Integrated,
|
||||
None,
|
||||
}
|
||||
|
||||
#region property used in api
|
||||
/// <summary>
|
||||
/// Select the server type to make datasource connection
|
||||
/// </summary>
|
||||
public enum ServerType
|
||||
{
|
||||
None,
|
||||
SQL,
|
||||
SQLCE,
|
||||
OLEDB,
|
||||
ODBC,
|
||||
Oracle,
|
||||
XML,
|
||||
SSAS,
|
||||
OData,
|
||||
PostgreSQL
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// Datasource definition
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class DataSourceDefinition
|
||||
{
|
||||
private string connectStringField;
|
||||
private CredentialRetrieval credentialRetrievalField;
|
||||
private bool enabledField;
|
||||
private bool enabledFieldSpecified;
|
||||
private string extensionField;
|
||||
private bool impersonateUserField;
|
||||
private bool impersonateUserFieldSpecified;
|
||||
private bool originalConnectStringExpressionBasedField;
|
||||
private string passwordField;
|
||||
private string promptField;
|
||||
private bool useOriginalConnectStringField;
|
||||
private string userNameField;
|
||||
private bool windowsCredentialsField;
|
||||
private bool windowsCredentialsFieldSpecified;
|
||||
|
||||
/// <summary>
|
||||
/// Datasource connection string
|
||||
/// </summary>
|
||||
public string ConnectString
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.connectStringField;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.connectStringField = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set the type of credentials to secure data
|
||||
/// </summary>
|
||||
public CredentialRetrieval CredentialRetrieval
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.credentialRetrievalField;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.credentialRetrievalField = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set true if modifying the datasource connection details
|
||||
/// </summary>
|
||||
public bool Enabled
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.enabledField;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.enabledField = Convert.ToBoolean(value.ToString().ToLower());
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set true to save the propoerty - (Enabled) in xml file
|
||||
/// </summary>
|
||||
[XmlIgnore]
|
||||
public bool EnabledSpecified
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.enabledFieldSpecified;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.enabledFieldSpecified = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Specify the Server type
|
||||
/// </summary>
|
||||
public string Extension
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.extensionField;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.extensionField = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set to true to impersonate the authenticated user after a connection has been made to the datasource
|
||||
/// </summary>
|
||||
public bool ImpersonateUser
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.impersonateUserField;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.impersonateUserField = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set true to save the impersonate user in xml file
|
||||
/// </summary>
|
||||
[XmlIgnore]
|
||||
public bool ImpersonateUserSpecified
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.impersonateUserFieldSpecified;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.impersonateUserFieldSpecified = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the original connection string
|
||||
/// </summary>
|
||||
public bool OriginalConnectStringExpressionBased
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.originalConnectStringExpressionBasedField;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.originalConnectStringExpressionBasedField = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the password of connection credentials
|
||||
/// </summary>
|
||||
public string Password
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.passwordField;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.passwordField = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the text that prompts users for a username and password
|
||||
/// </summary>
|
||||
public string Prompt
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.promptField;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.promptField = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Specifies whether to use origingal connection string
|
||||
/// </summary>
|
||||
public bool UseOriginalConnectString
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.useOriginalConnectStringField;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.useOriginalConnectStringField = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the username of connection credentials
|
||||
/// </summary>
|
||||
public string UserName
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.userNameField;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.userNameField = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set to true to use Windows credentials when connecting to the datasource
|
||||
/// </summary>
|
||||
public bool WindowsCredentials
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.windowsCredentialsField;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.windowsCredentialsField = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Set true to save the windows credentials in xml file
|
||||
/// </summary>
|
||||
[XmlIgnore]
|
||||
public bool WindowsCredentialsSpecified
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.windowsCredentialsFieldSpecified;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
this.windowsCredentialsFieldSpecified = value;
|
||||
}
|
||||
}
|
||||
|
||||
#region property used in api
|
||||
/// <summary>
|
||||
/// Specify the server type
|
||||
/// </summary>
|
||||
[XmlIgnore]
|
||||
public ServerType ServerType
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
namespace Syncfusion.Report.Server.Api.Helper.V2.Models
|
||||
{
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Mapping information of datasource
|
||||
/// </summary>
|
||||
public class DataSourceMappingInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Datasource ID
|
||||
/// </summary>
|
||||
public Guid DataSourceId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Datasource name
|
||||
/// </summary>
|
||||
public string Name
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
namespace Syncfusion.Report.Server.Api.Helper.V2.Models
|
||||
{
|
||||
using System;
|
||||
|
||||
/// <summary>
|
||||
/// Mapping information of dataset
|
||||
/// </summary>
|
||||
public class DataSetMappingInfo
|
||||
{
|
||||
/// <summary>
|
||||
/// Dataset ID
|
||||
/// </summary>
|
||||
public Guid DataSetId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Dataset name
|
||||
/// </summary>
|
||||
public string Name
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
}
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -0,0 +1,176 @@
|
|||
namespace Syncfusion.Report.Server.Api.Helper.V2.Models
|
||||
{
|
||||
using System;
|
||||
using System.Net;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
public class Permission
|
||||
{
|
||||
/// <summary>
|
||||
/// To state whether user can delete the permission or not.
|
||||
/// </summary>
|
||||
public bool CanDelete
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To find the report item corresponds to which category
|
||||
/// </summary>
|
||||
public string CategoryName
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Id of the group
|
||||
/// </summary>
|
||||
public int GroupId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Name of the group
|
||||
/// </summary>
|
||||
public string GroupName
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To check whether the permission is user permission or group permission
|
||||
/// </summary>
|
||||
public bool IsUserPermission
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Id of the Item
|
||||
/// </summary>
|
||||
public Guid? ItemId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Name of the Item e.g. FIFA World Cup2014-Brazil etc.
|
||||
/// </summary>
|
||||
public string ItemName
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Enum type property to store the multiple constants like Category=1, report=3 etc.
|
||||
/// </summary>
|
||||
public ItemType ItemType
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Description for the enum Itemtype e.g.Report,DataSet etc.
|
||||
/// </summary>
|
||||
public string ItemTypeDescription
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Enum type property to store the multiple constants like Read=2,ReadWrite=6 etc.
|
||||
/// </summary>
|
||||
public PermissionAccess PermissionAccess
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Description for the enum PermissionAccess e.g. Read, Write, Delete
|
||||
/// </summary>
|
||||
public string PermissionAccessDescription
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Enum type property to store the multiple constants like All Reports=1 etc.
|
||||
/// </summary>
|
||||
public PermissionEntity PermissionEntity
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Description for the enum PermissionEntity e.g. Specific Category, All Category, Specific Dashborads etc.
|
||||
/// </summary>
|
||||
public string PermissionEntityDescription
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ID of each permission
|
||||
/// </summary>
|
||||
public int PermissionId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// To state whether the permission belongs to a user or group
|
||||
/// </summary>
|
||||
public int TargetId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Full Name of user
|
||||
/// </summary>
|
||||
public string UserFullName
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Id of User
|
||||
/// </summary>
|
||||
public int UserId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// UserName of user
|
||||
/// </summary>
|
||||
public string UserName
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
[DataMember]
|
||||
public string Message { get; set; }
|
||||
|
||||
[DataMember]
|
||||
public HttpStatusCode StatusCode { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
using Syncfusion.Report.Server.API.Helper.V2.EndPoints;
|
||||
|
||||
namespace Syncfusion.Report.Server.API.Helper.V2
|
||||
{
|
||||
public sealed class ServerClientV2 : ServerApiHelper
|
||||
{
|
||||
public ServerClientV2()
|
||||
{
|
||||
BaseUrl = BaseUrl + "/api/v2.0";
|
||||
}
|
||||
|
||||
public UsersEndPoint2 UsersEndPoint2()
|
||||
{
|
||||
return new UsersEndPoint2(this);
|
||||
}
|
||||
|
||||
public GroupsEndPoint2 GroupsEndPoint2()
|
||||
{
|
||||
return new GroupsEndPoint2(this);
|
||||
}
|
||||
|
||||
public ItemsEndPoint ItemsEndPoint()
|
||||
{
|
||||
return new ItemsEndPoint(this);
|
||||
}
|
||||
|
||||
public PermissionEndPoint PermissionsEndPoint()
|
||||
{
|
||||
return new PermissionEndPoint(this);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,60 @@
|
|||
using Newtonsoft.Json;
|
||||
using Syncfusion.Report.Server.Api.Helper.V3.Models;
|
||||
using Syncfusion.Report.Server.API.Helper.V3;
|
||||
using System;
|
||||
|
||||
namespace Syncfusion.Report.Server.Api.Helper.V3.EndPoints
|
||||
{
|
||||
public class ScheduleEndPoint
|
||||
{
|
||||
private readonly ServerClientV3 _serverClientV3;
|
||||
private readonly string _baseUrl;
|
||||
|
||||
public ScheduleEndPoint(ServerClientV3 serverClientV3)
|
||||
{
|
||||
_serverClientV3 = serverClientV3;
|
||||
_baseUrl = _serverClientV3.BaseUrl;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This method is used to create new schedules.
|
||||
/// </summary>
|
||||
/// <param name="apiScheduleRequest">Schedule details.</param>
|
||||
/// <returns>Status of adding schedule in server.</returns>
|
||||
|
||||
public ApiScheduleResponse AddSchedule(ApiScheduleRequest apiScheduleRequest)
|
||||
{
|
||||
var result = _serverClientV3.Post(apiScheduleRequest, _baseUrl + "/reports/schedule");
|
||||
var response = new ApiScheduleResponse();
|
||||
if (result != null)
|
||||
{
|
||||
return JsonConvert.DeserializeObject<ApiScheduleResponse>(result.Content);
|
||||
}
|
||||
else
|
||||
{
|
||||
return response;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// This method is used to create new schedules.
|
||||
/// </summary>
|
||||
/// <param name="scheduleid">Schedule Id </param>
|
||||
/// <param name="apiScheduleRequest">Schedule details.</param>
|
||||
/// <returns>Status of adding schedule in server.</returns>
|
||||
|
||||
public ApiScheduleResponse UpdateSchedule(Guid scheduleid, ApiScheduleRequest apiScheduleRequest)
|
||||
{
|
||||
var result = _serverClientV3.Put(apiScheduleRequest, _baseUrl + "/reports/schedule/" + scheduleid);
|
||||
var response = new ApiScheduleResponse();
|
||||
if (result != null)
|
||||
{
|
||||
return JsonConvert.DeserializeObject<ApiScheduleResponse>(result.Content);
|
||||
}
|
||||
else
|
||||
{
|
||||
return response;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
namespace Syncfusion.Report.Server.Api.Helper.V3.Models
|
||||
{
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// Runs the schedules on a daily basis.
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
[Serializable]
|
||||
public class ApiDailySchedule
|
||||
{
|
||||
/// <summary>
|
||||
/// Specifies the recurrence type, whether the schedule recurs every day or every working day. Valid values: `EveryNdays` `EveryWeekday`. \n\n Note: If you chose the recurrence type as EveryNdays, provide a value to the EveryNdays property, and leave the (EveryWeekday) property empty.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
[Required]
|
||||
public string RecurrenceType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the number of days the schedule recurs. \n\n For example: If you provide 2, the schedule recurs every 2 days.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public int EveryNdays { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// For the schedule to recur every working day, set to true.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public bool EveryWeekday { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
namespace Syncfusion.Report.Server.Api.Helper.V3.Models
|
||||
{
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// Runs the schedules on an hourly basis.
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
[Serializable]
|
||||
public class ApiHourlySchedule
|
||||
{
|
||||
/// <summary>
|
||||
/// Specifies the hour interval. Based on this interval the schedule will run continuously until the end time. The format should be `HH:mm`.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
[Required]
|
||||
public string ScheduleInterval { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,33 @@
|
|||
namespace Syncfusion.Report.Server.Api.Helper.V3.Models
|
||||
{
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// Runs the schedule on a monthly basis.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
[DataContract]
|
||||
public class ApiMonthlySchedule
|
||||
{
|
||||
/// <summary>
|
||||
/// Specifies the recurrence type, whether the schedule recurs on a day basis or on the customized day basis. Valid values: `DayRecurrence` `CustomRecurrence` \n\n Note: If you chose the recurrence type as DayRecurrence, provide a value to the DayRecurrence property and leave the (CustomRecurrence) property empty.
|
||||
/// </summary>
|
||||
[Required]
|
||||
[DataMember]
|
||||
public string RecurrenceType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The schedule recurs on the day specified on the month interval.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public ApiMonthlyScheduleDayRecurrence DayRecurrence { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The schedule recurs on the customized day of the specified month interval.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public ApiMonthlyScheduleCustomRecurrence CustomRecurrence { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
namespace Syncfusion.Report.Server.Api.Helper.V3.Models
|
||||
{
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// The schedule recurs on the customized day of the specified month interval.
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
[Serializable]
|
||||
public class ApiMonthlyScheduleCustomRecurrence
|
||||
{
|
||||
/// <summary>
|
||||
/// Specifies the week of the month the schedule recurs. Valid values: `first` `second` `third` `fourth` `last`. \n\n For example: If you provide second, the schedule will recur on the second week.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
[Required]
|
||||
public string WeekOfMonth { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the day of the week the schedule recurs. Valid values: `day` `weekday` `weekendday` `Sunday` `Monday` `Tuesday` `Wednesday` `Thursday` `Friday` `Saturday`. \n\n For example: If you provide Sunday, the schedule will recur on the second week of sunday.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
[Required]
|
||||
public string DayOfWeek { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the number of months the schedule recurs. \n\n For example: If you provide 5, the schedule will recur second week of sunday's of every 5 months.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
[Required]
|
||||
public int MonthInterval { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
namespace Syncfusion.Report.Server.Api.Helper.V3.Models
|
||||
{
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// The schedule recurs on the day specified on the month interval.
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
[Serializable]
|
||||
public class ApiMonthlyScheduleDayRecurrence
|
||||
{
|
||||
/// <summary>
|
||||
/// Specifies the number of days the schedule recurs. \n\n For example: If you provide 10, the schedule will recur every 10th day.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
[Required]
|
||||
public int DayInterval { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the number of months the schedule recurs. \n\n For example: If you provide 3, the schedule will recur 10th day of every 3 months.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
[Required]
|
||||
public int MonthInterval { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,116 @@
|
|||
namespace Syncfusion.Report.Server.Api.Helper.V3.Models
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Runtime.Serialization;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
/// <summary>
|
||||
/// Details about the schedule passed will be added to the server.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
[DataContract]
|
||||
public class ApiScheduleRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// Schedule name.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
[Required]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Report ID.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
[Required]
|
||||
public Guid ReportId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the export type to schedule the report. Valid values: `Excel` `Html` `Pdf` `Word` `PPT` `CSV`.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
[Required]
|
||||
public string ExportType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the UTC start date-time of schedule. The format should be ISO 8601 i.e. `yyyy-mm-ddTHH:mm:ssZ`.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
[Required]
|
||||
public string StartTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Sets the schedule with no end when specified as true. \n\n Note: By default, the NeverEnd is set to true. To set the end time for the schedule, fill the properties of either EndAfterOccurrence or EndDate; otherwise remains empty.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public bool NeverEnd { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the number of occurrences after which the schedule will be completed. \n\n For example: If you provide 5, the schedule will end after the completion of 5 occurrences.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public int EndAfterOccurrence { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the UTC end date-time of schedule after which schedule will be completed. The format should be ISO 8601 i.e. `yyyy-mm-ddTHH:mm:ssZ`. \n\n For example: If you provide the end date-time, the schedule will end once the end date-time is reached.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string EndDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides the list of username, email, or user IDs to the recipients who will get the schedules.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public List<string> UserList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides the list of group IDs to the recipients in the group list who will get the schedules.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public List<int> GroupList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Provides the list of email IDs to the email recipients who will get the schedules.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public List<string> ExternalRecipientsList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the schedule type to schedule the report. Valid values: `Hourly` `Daily` `Weekly` `Monthly` `Yearly`. \n\n Note: If you chose the schedule type as `Monthly`, provide a values to the MonthlySchedule property, and leave the (HourlySchedule, DailySchedule, WeeklySchedule and YearlySchedule) property empty.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
[Required]
|
||||
public string ScheduleType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Runs the schedules on an hourly basis.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public ApiHourlySchedule HourlySchedule { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Runs the schedules on a daily basis.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public ApiDailySchedule DailySchedule { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Runs the schedule on a weekly basis.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public ApiWeeklySchedule WeeklySchedule { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Runs the schedule on a monthly basis.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public ApiMonthlySchedule MonthlySchedule { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Runs the schedules on a yearly basis.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public ApiYearlySchedule YearlySchedule { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
namespace Syncfusion.Report.Server.Api.Helper.V3.Models
|
||||
{
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// Response Details of schedules created.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
[DataContract]
|
||||
public class ApiScheduleResponse
|
||||
{
|
||||
/// <summary>
|
||||
/// Returns schedule name.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string ScheduleName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns schedule ID.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public Guid ScheduleId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the status message from the API.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string StatusMessage { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the schedule type.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string ScheduleType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Returns the schedule’s next run.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string NextRun { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
namespace Syncfusion.Report.Server.Api.Helper.V3.Models
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// Runs the schedule on a weekly basis.
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
[Serializable]
|
||||
public class ApiWeeklySchedule
|
||||
{
|
||||
/// <summary>
|
||||
/// Specifies the number of weeks the schedule recurs. \n\n For example: If you provide 2, the schedule will recur every 2 weeks.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
[Required]
|
||||
public int RecurrenceWeeks { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the list of days the schedule recurs. Valid values `Sunday` `Monday` `Tuesday` `Wednesday` `Thursday` `Friday` `Saturday`. \n\n For example: If you provide `Sunday`, the schedule will recur sunday's of every 2 weeks.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
[Required]
|
||||
public List<string> RecurrenceDays { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,40 @@
|
|||
namespace Syncfusion.Report.Server.Api.Helper.V3.Models
|
||||
{
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// Runs the schedules on a yearly basis.
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
[Serializable]
|
||||
public class ApiYearlySchedule
|
||||
{
|
||||
/// <summary>
|
||||
/// Specifies the number of years the schedule recurs. \n\n For example: If you provide 5, the schedule will recur every 5 years.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
[Required]
|
||||
public int YearInterval { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the recurrence type, whether the schedule recurs on a month basis or on the customized month basis. Valid values: `MonthRecurrence` `CustomRecurrence`. \n\n Note: If you chose the recurrence type as MonthRecurrence, provide a value to the MonthRecurrence property, and leave the (CustomRecurrence) property empty.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
[Required]
|
||||
public string RecurrenceType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The schedule recurs on the month and number of years specified in YearInterval property.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public ApiYearlyScheduleMonthRecurrence MonthRecurrence { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The schedule recurs in the customized month based on the number of years provided in the YearInterval property.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public ApiYearlyScheduleCustomRecurrence CustomRecurrence { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
namespace Syncfusion.Report.Server.Api.Helper.V3.Models
|
||||
{
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// The schedule recurs in the customized month based on the number of years provided in the YearInterval property.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
[DataContract]
|
||||
public class ApiYearlyScheduleCustomRecurrence
|
||||
{
|
||||
/// <summary>
|
||||
/// Specifies the week of the month the schedule recurs. Valid values: `first` `second` `third` `fourth` `last`. \n\n For example: If you provide second, the schedule will recur on the second week.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
[Required]
|
||||
public string WeekOfMonth { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the day of week the schedule recurs. Valid values: `day` `weekday` `weekendday` `Sunday` `Monday` `Tuesday` `Wednesday` `Thursday` `Friday` `Saturday`.\n\n For example: If you provide Sunday, the schedule will recur on every sunday's of the second week.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
[Required]
|
||||
public string DayOfWeek { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the month the schedule recurs. Valid values: `January` `February` `March` `April` `May` `June` `July` `August` `September` `October` `November` `December`. \n\n For example: If you provide March, the schedule will recur on the sunday's of the second week of March every year. Here the (year) is the value provided in the YearInterval property.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
[Required]
|
||||
public string MonthOfYear { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
namespace Syncfusion.Report.Server.Api.Helper.V3.Models
|
||||
{
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
/// <summary>
|
||||
/// The schedule recurs on the month and number of years specified in YearInterval property.
|
||||
/// </summary>
|
||||
[DataContract]
|
||||
[Serializable]
|
||||
public class ApiYearlyScheduleMonthRecurrence
|
||||
{
|
||||
/// <summary>
|
||||
/// Specifies the month the schedule recurs. Valid values: `January` `February` `March` `April` `May` `June` `July` `August` `September` `October` `November` `December`. \n\n For example: If you provide April, the schedule will recur in April of every year. Here the (year) is the value provided in the YearInterval property.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
[Required]
|
||||
public string MonthOfYear { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the day of the month the schedule recurs. \n\n For example: If you provide 20, the schedule will recur 20th April of every year. Here the (year) is the value provided in the YearInterval property.
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
[Required]
|
||||
public int DayOfMonth { get; set; }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
using Syncfusion.Report.Server.Api.Helper.V3.EndPoints;
|
||||
|
||||
namespace Syncfusion.Report.Server.API.Helper.V3
|
||||
{
|
||||
public sealed class ServerClientV3 : ServerApiHelper
|
||||
{
|
||||
public ServerClientV3()
|
||||
{
|
||||
BaseUrl = BaseUrl + "/api/v3.0";
|
||||
}
|
||||
|
||||
public ScheduleEndPoint ScheduleEndPoint3()
|
||||
{
|
||||
return new ScheduleEndPoint(this);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Microsoft.AspNet.WebApi.Client" version="5.2.4" targetFramework="net45" />
|
||||
<package id="Microsoft.AspNet.WebApi.Core" version="5.2.4" targetFramework="net45" />
|
||||
<package id="Newtonsoft.Json" version="10.0.3" targetFramework="net45" />
|
||||
<package id="RestSharp" version="105.2.3" targetFramework="net45" />
|
||||
<package id="System.Collections" version="4.3.0" targetFramework="net45" />
|
||||
<package id="System.ComponentModel.Annotations" version="4.4.1" targetFramework="net45" />
|
||||
<package id="System.Runtime.Serialization.Primitives" version="4.3.0" targetFramework="net45" />
|
||||
</packages>
|
|
@ -0,0 +1,14 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
|
||||
</startup>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-10.0.0.0" newVersion="10.0.0.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
|
@ -0,0 +1,2 @@
|
|||
Username,Email,Fullname,Password(Needed only for Automatic account activation mode)
|
||||
Tesruser1,test1@xyz.com,testuser1,Tesrtuser!233
|
|
|
@ -0,0 +1,191 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Linq;
|
||||
using System.Runtime.Serialization;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Syncfusion.Report.Server.API.Sample.Dataclasses
|
||||
{
|
||||
public class Token
|
||||
{
|
||||
public string access_token { get; set; }
|
||||
|
||||
public string token_type { get; set; }
|
||||
|
||||
public string expires_in { get; set; }
|
||||
|
||||
public string userName { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class ApiItemDetail
|
||||
{
|
||||
/// <summary>
|
||||
/// Specifies the read permission of the item
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public bool CanRead { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the write permission of the item
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public bool CanWrite { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the delete permission of the item
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public bool CanDelete { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the schedule permission of the item
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public bool CanSchedule { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the open permission of the item
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public bool CanOpen { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the move permission of the item
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public bool CanMove { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the copy permission of the item
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public bool CanCopy { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the clone permission of the item
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public bool CanClone { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the create permission of the item
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public bool CanCreateItem { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Item ID
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public Guid Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Item type
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public ItemType ItemType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Item name
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Item description
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the user ID of the item creator
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public int CreatedById { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the display name of the user who created the item
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string CreatedByDisplayName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the user ID of the item modifier
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public int ModifiedById { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Specifies the full name of the user who modified the item
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string ModifiedByFullName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Category ID
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public Guid? CategoryId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Category name
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string CategoryName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Date created of item in string format
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string CreatedDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Date modified of item in string format
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public string ModifiedDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Date modified of item in date format
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public DateTime ItemModifiedDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Date created of item in date format
|
||||
/// </summary>
|
||||
[DataMember]
|
||||
public DateTime ItemCreatedDate { get; set; }
|
||||
}
|
||||
|
||||
[DataContract(Name = "Data5", Namespace = "http://schemas.datacontract.org/2004/07/Syncfusion.Server.Base.DataClasses")]
|
||||
public enum ItemType
|
||||
{
|
||||
[EnumMember]
|
||||
[Description("Category")]
|
||||
Category = 1,
|
||||
[EnumMember]
|
||||
[Description("Dashboard")]
|
||||
Dashboard,
|
||||
[EnumMember]
|
||||
[Description("Report")]
|
||||
Report,
|
||||
[EnumMember]
|
||||
[Description("Datasource")]
|
||||
Datasource,
|
||||
[EnumMember]
|
||||
[Description("Dataset")]
|
||||
Dataset,
|
||||
[EnumMember]
|
||||
[Description("File")]
|
||||
File,
|
||||
[EnumMember]
|
||||
[Description("Schedule")]
|
||||
Schedule
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,648 @@
|
|||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using Syncfusion.Report.Server.API.Helper.V3;
|
||||
using Syncfusion.Report.Server.API.Helper.V2;
|
||||
using Syncfusion.Report.Server.Api.Helper.V1;
|
||||
using Syncfusion.Report.Server.Api.Helper.V3.Models;
|
||||
using Syncfusion.Report.Server.Api.Helper.V2.Models;
|
||||
using Syncfusion.Report.Server.Api.Helper.V1.Models;
|
||||
using Syncfusion.Report.Server.API.Helper;
|
||||
using System;
|
||||
|
||||
namespace Syncfusion.Report.Server.API.Sample
|
||||
{
|
||||
internal class Program
|
||||
{
|
||||
//The test user credentials are given here and can access limited API's. Inorder to access all the API'S, admin credentials has to be used.
|
||||
|
||||
private static string SyncfusionReportServerUrl = "https://reportserver.syncfusion.com/";//provide the syncfusion report server hosted URL
|
||||
private static string userName = "guest";// user credentials
|
||||
private static string password = "demo";
|
||||
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
#region Token generation
|
||||
|
||||
var token = new ServerApiHelper().Connect(SyncfusionReportServerUrl, userName, password);
|
||||
|
||||
#endregion
|
||||
|
||||
#region Connect to version 1
|
||||
|
||||
var v1ApiObject = new ServerClientV1();
|
||||
v1ApiObject.Connect(SyncfusionReportServerUrl, userName, password);
|
||||
|
||||
#endregion
|
||||
|
||||
#region Connect to version 2
|
||||
|
||||
var v2ApiObject = new ServerClientV2();
|
||||
v2ApiObject.Connect(SyncfusionReportServerUrl, userName, password);
|
||||
|
||||
#endregion
|
||||
|
||||
#region Connect to version 3
|
||||
|
||||
var v3ApiObject = new ServerClientV3();
|
||||
v3ApiObject.Connect(SyncfusionReportServerUrl, userName, password);
|
||||
|
||||
#endregion
|
||||
|
||||
#region V1
|
||||
|
||||
#region V1 USERS
|
||||
|
||||
#region Add user
|
||||
|
||||
var addUserWithoutPassword = v1ApiObject.UsersEndPoint().CreateUser(new User()
|
||||
{
|
||||
Username = "sample",
|
||||
FirstName = "uuser",
|
||||
Lastname = "",
|
||||
Email = "sampleuser@syncfusion.com"
|
||||
});
|
||||
|
||||
#endregion
|
||||
|
||||
#region Get user list
|
||||
|
||||
var userList = v1ApiObject.UsersEndPoint().GetAllUsers();
|
||||
|
||||
#endregion
|
||||
|
||||
#region variable declaration for users
|
||||
|
||||
var userId = userList.UserList.Select(x => x.UserId).FirstOrDefault(); // Assign first userid in the user's list
|
||||
|
||||
// Declare username or email id of the user from the user list
|
||||
|
||||
var name = userList.UserList.Select(x => x.Username).FirstOrDefault(); // Assign first username in the user's list
|
||||
var emailId = userList.UserList.Select(x => x.Email).FirstOrDefault(); //Assign first email id in the user's list
|
||||
|
||||
#endregion
|
||||
|
||||
#region Update user
|
||||
|
||||
// Update using username
|
||||
|
||||
var updateUser = v1ApiObject.UsersEndPoint().UpdateUser(name, new User() { FirstName = "user" });
|
||||
|
||||
// Update using email id
|
||||
|
||||
// var updateUser = version1ApiObject.UsersEndPoint().UpdateUser(emailId, new User() { FirstName = "user" });
|
||||
|
||||
#endregion
|
||||
|
||||
#region Delete user
|
||||
|
||||
var deleteUser = v1ApiObject.UsersEndPoint().DeleteUser(name);
|
||||
|
||||
#endregion
|
||||
|
||||
#region Get user detail
|
||||
|
||||
var userDetail = v1ApiObject.UsersEndPoint().GetUser(name);
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
#region V1 GROUPS
|
||||
|
||||
#region Add group
|
||||
|
||||
var addGroup = v1ApiObject.GroupsEndPoint().CreateGroup(new Group()
|
||||
{
|
||||
Name = "Test group",
|
||||
Description = "Testing"
|
||||
});
|
||||
|
||||
#endregion
|
||||
|
||||
#region Get group list
|
||||
|
||||
var listGroup = v1ApiObject.GroupsEndPoint().GetAllGroups();
|
||||
|
||||
#endregion
|
||||
|
||||
#region Variable declaration for groups
|
||||
|
||||
// Declare group id. Assigns first group id in the group list
|
||||
|
||||
var groupId = listGroup.GroupList.Select(x => x.Id).FirstOrDefault();
|
||||
|
||||
#endregion
|
||||
|
||||
#region Update group
|
||||
|
||||
var updateGroup = v1ApiObject.GroupsEndPoint().UpdateGroup(groupId,
|
||||
new Group()
|
||||
{
|
||||
Name = "Testing group",
|
||||
Description = "test"
|
||||
});
|
||||
|
||||
#endregion
|
||||
|
||||
#region Delete group
|
||||
|
||||
var deleteGroup = v1ApiObject.GroupsEndPoint().DeleteGroup(groupId);
|
||||
|
||||
#endregion
|
||||
|
||||
#region Get group detail
|
||||
|
||||
var groupDetails = v1ApiObject.GroupsEndPoint().GetGroup(groupId);
|
||||
|
||||
#endregion
|
||||
|
||||
#region Get members of group
|
||||
|
||||
var groupMembers = v1ApiObject.GroupsEndPoint().GetGroupMembers(groupId);
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
#region V2
|
||||
|
||||
#region V2 ITEMS
|
||||
|
||||
#region Get items
|
||||
|
||||
//Get report list
|
||||
|
||||
var reportItems = v2ApiObject.ItemsEndPoint().GetItems(ItemType.Report);
|
||||
|
||||
//Get category list
|
||||
|
||||
var categoryItems = v2ApiObject.ItemsEndPoint().GetItems(ItemType.Category);
|
||||
|
||||
//Get datasource list
|
||||
|
||||
var datasourceItems = v2ApiObject.ItemsEndPoint().GetItems(ItemType.Datasource);
|
||||
|
||||
//Get dataset list
|
||||
|
||||
var datasetItems = v2ApiObject.ItemsEndPoint().GetItems(ItemType.Dataset);
|
||||
|
||||
//Get schedule list
|
||||
|
||||
var scheduleItems = v2ApiObject.ItemsEndPoint().GetItems(ItemType.Schedule);
|
||||
|
||||
//Get file list
|
||||
|
||||
var fileItems = v2ApiObject.ItemsEndPoint().GetItems(ItemType.File);
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
#region Variable declaration to get details of particular items
|
||||
|
||||
var reportId = reportItems.Select(i => i.Id).FirstOrDefault(); //Assign the Id of first item in the report list
|
||||
var categoryId = categoryItems.Select(i => i.Id).FirstOrDefault(); //Assign the Id of first item in the category list
|
||||
var datasourceId = datasourceItems.Select(i => i.Id).FirstOrDefault(); //Assign the Id of first item in the datasource list
|
||||
var datasetId = datasetItems.Select(i => i.Id).FirstOrDefault(); //Assign the Id of first item in the dataset list
|
||||
var scheduleId = scheduleItems.Select(i => i.Id).FirstOrDefault(); //Assign the Id of first item in the schedule list
|
||||
var fileId = fileItems.Select(i => i.Id).FirstOrDefault(); //Assign the Id of first item in the file list
|
||||
|
||||
#endregion
|
||||
|
||||
#region Get item detail
|
||||
|
||||
// Get details of particular report
|
||||
|
||||
var reportDetails = v2ApiObject.ItemsEndPoint().GetItemDetail(reportId);
|
||||
|
||||
// Get details of particular category
|
||||
|
||||
var categoryDetails = v2ApiObject.ItemsEndPoint().GetItemDetail(categoryId);
|
||||
|
||||
// Get details of particular datasource
|
||||
|
||||
var datasourceDetails = v2ApiObject.ItemsEndPoint().GetItemDetail(datasourceId);
|
||||
|
||||
// Get details of particular dataset
|
||||
|
||||
var datasetDetals = v2ApiObject.ItemsEndPoint().GetItemDetail(datasetId);
|
||||
|
||||
// Get details of particular schedule
|
||||
|
||||
var scheduleDetails = v2ApiObject.ItemsEndPoint().GetItemDetail(scheduleId);
|
||||
|
||||
// Get details of particular file
|
||||
|
||||
var fileDetails = v2ApiObject.ItemsEndPoint().GetItemDetail(fileId);
|
||||
|
||||
#endregion
|
||||
|
||||
#region Get public reports
|
||||
|
||||
var getPublicReports = v2ApiObject.ItemsEndPoint().GetPublicItems(ItemType.Report);
|
||||
|
||||
#endregion
|
||||
|
||||
#region Get favorite report
|
||||
|
||||
var favoriteReports = v2ApiObject.ItemsEndPoint().GetFavoriteItems();
|
||||
|
||||
#endregion
|
||||
|
||||
#region Add category
|
||||
|
||||
var addCategory = v2ApiObject.ItemsEndPoint().AddCategory(new ApiCategoryAdd() { Name = "samplecategory" });
|
||||
|
||||
#endregion
|
||||
|
||||
#region Add report
|
||||
|
||||
var addReport = v2ApiObject.ItemsEndPoint().AddReport(new ApiReportAdd()
|
||||
{
|
||||
Name = "Testing report",
|
||||
Description = "Testing purpose",
|
||||
CategoryId = categoryId,
|
||||
IsPublic = true, //Set ispublic Value to make and remove report Public Access
|
||||
ItemContent = File.ReadAllBytes("../../Sales Order Detail.rdl")
|
||||
});
|
||||
|
||||
#endregion
|
||||
|
||||
#region Add datasource
|
||||
|
||||
var addDataSource = v2ApiObject.ItemsEndPoint().AddDataSource(new ApiReportDataSourceAdd()
|
||||
{
|
||||
Name = "Test datasource",
|
||||
Description = "Testing purpose",
|
||||
DataSourceDefinition = new DataSourceDefinition
|
||||
{
|
||||
ConnectString = "Data Source=mvc.syncfusion.com;Initial Catalog=AdventureWorks;",
|
||||
ServerType = ServerType.SQL,
|
||||
CredentialRetrieval = CredentialRetrieval.Store,
|
||||
UserName = "ssrs1",
|
||||
Password = "RDLReport1"
|
||||
}
|
||||
});
|
||||
|
||||
#endregion
|
||||
|
||||
#region Add dataset
|
||||
|
||||
var addDataset = v2ApiObject.ItemsEndPoint().AddDataset(new ApiReportDataSetAdd()
|
||||
{
|
||||
Name = "Test dataset",
|
||||
Description = "Testing purpose",
|
||||
DataSourceMappingInfo = new List<DataSourceMappingInfo> {
|
||||
new DataSourceMappingInfo
|
||||
{
|
||||
DataSourceId = datasourceDetails.Id,
|
||||
Name = datasourceDetails.Name
|
||||
}
|
||||
},
|
||||
ItemContent = File.ReadAllBytes("../../Sales.rsd")
|
||||
});
|
||||
|
||||
#endregion
|
||||
|
||||
#region Add file
|
||||
|
||||
var addWidget = v2ApiObject.ItemsEndPoint().AddFile(new ApiFileAdd()
|
||||
{
|
||||
Name = "Sample file",
|
||||
Description = "Testing purpose",
|
||||
ItemContent = File.ReadAllBytes("../../sample file.txt")
|
||||
});
|
||||
|
||||
#endregion
|
||||
|
||||
#region Check item name existence
|
||||
|
||||
var checkNameExistence = v2ApiObject.ItemsEndPoint().IsItemNameExists(new ApiValidateItemName()
|
||||
{
|
||||
ItemName = "Sales Order Detail",
|
||||
ItemType = ItemType.Report.ToString(),
|
||||
CategoryName = "Sample Reports"
|
||||
});
|
||||
|
||||
#endregion
|
||||
|
||||
#region Update category
|
||||
|
||||
var updateCategory = v2ApiObject.ItemsEndPoint().UpdateCategory(new ApiCategoryUpdate()
|
||||
{
|
||||
CategoryId = categoryId,
|
||||
Name = "update test"
|
||||
});
|
||||
|
||||
#endregion
|
||||
|
||||
#region Update report
|
||||
|
||||
var updateReport = v2ApiObject.ItemsEndPoint().UpdateReport(new ApiReportUpdate()
|
||||
{
|
||||
ItemId = reportId,
|
||||
IsPublic = false,
|
||||
Name = "Testing report update",
|
||||
ItemContent = File.ReadAllBytes("../../Sales Order Detail.rdl")
|
||||
});
|
||||
|
||||
#endregion
|
||||
|
||||
#region Update datasource
|
||||
|
||||
var updateDatasource = v2ApiObject.ItemsEndPoint().UpdateDataSource(new ApiReportDataSourceUpdate()
|
||||
{
|
||||
ItemId = datasourceId,
|
||||
Description = "testing"
|
||||
});
|
||||
|
||||
#endregion
|
||||
|
||||
#region Update file
|
||||
|
||||
var updateWidget = v2ApiObject.ItemsEndPoint().UpdateFile(new ApiFileUpdate()
|
||||
{
|
||||
ItemId = fileDetails.Id,
|
||||
Description = "test",
|
||||
ItemContent = File.ReadAllBytes("../../sample file.txt")
|
||||
});
|
||||
|
||||
#endregion
|
||||
|
||||
#region Variable declaration to get favorite dashbaord
|
||||
|
||||
var favoriteReportId = favoriteReports.Select(x => x.ReportId).FirstOrDefault();
|
||||
|
||||
#endregion
|
||||
|
||||
#region Update favorite report
|
||||
|
||||
var updateFavoriteReport = v2ApiObject.ItemsEndPoint().UpdateFavoriteItem(new ApiUpdateFavoriteReport()
|
||||
{
|
||||
ReportId = favoriteReportId,
|
||||
Favorite = false
|
||||
});
|
||||
|
||||
#endregion
|
||||
|
||||
#region Export report
|
||||
|
||||
// Export report to excel format
|
||||
|
||||
var exportReportToExcel = v2ApiObject.ItemsEndPoint().ExportReport(new ApiExportReport()
|
||||
{
|
||||
ReportId = reportId,
|
||||
ExportType = ExportType.Excel.ToString()
|
||||
});
|
||||
|
||||
// Export report to Pdf format
|
||||
|
||||
var exportReportToPdf = v2ApiObject.ItemsEndPoint().ExportReport(new ApiExportReport()
|
||||
{
|
||||
ReportId = reportId,
|
||||
ExportType = ExportType.Pdf.ToString()
|
||||
});
|
||||
|
||||
// Export report to word format
|
||||
|
||||
var exportReportToWord = v2ApiObject.ItemsEndPoint().ExportReport(new ApiExportReport()
|
||||
{
|
||||
ReportId = reportId,
|
||||
ExportType = ExportType.Word.ToString()
|
||||
});
|
||||
|
||||
// Export report to PPT format
|
||||
|
||||
var exportReportToPPT = v2ApiObject.ItemsEndPoint().ExportReport(new ApiExportReport()
|
||||
{
|
||||
ReportId = reportId,
|
||||
ExportType = ExportType.PPT.ToString()
|
||||
});
|
||||
|
||||
// Export report to CSV format
|
||||
|
||||
var exportReportToCSV = v2ApiObject.ItemsEndPoint().ExportReport(new ApiExportReport()
|
||||
{
|
||||
ReportId = reportId,
|
||||
ExportType = ExportType.CSV.ToString()
|
||||
});
|
||||
|
||||
// Export report to HTML format
|
||||
|
||||
var exportReportToHTML = v2ApiObject.ItemsEndPoint().ExportReport(new ApiExportReport()
|
||||
{
|
||||
ReportId = reportId,
|
||||
ExportType = ExportType.Html.ToString()
|
||||
});
|
||||
|
||||
#endregion
|
||||
|
||||
#region Delete item
|
||||
|
||||
// Delete report
|
||||
|
||||
var deleteReport = v2ApiObject.ItemsEndPoint().DeleteItem(reportId);
|
||||
|
||||
// Delete category
|
||||
|
||||
var deleteCategory = v2ApiObject.ItemsEndPoint().DeleteItem(categoryId);
|
||||
|
||||
// Delete datasource
|
||||
|
||||
var deleteDatasource = v2ApiObject.ItemsEndPoint().DeleteItem(datasourceId);
|
||||
|
||||
// Delete dataset
|
||||
|
||||
var deleteDataset = v2ApiObject.ItemsEndPoint().DeleteItem(datasetId);
|
||||
|
||||
// Delete file
|
||||
|
||||
var deleteFile = v2ApiObject.ItemsEndPoint().DeleteItem(fileId);
|
||||
|
||||
// Delete schedule
|
||||
|
||||
var deleteSchedule = v2ApiObject.ItemsEndPoint().DeleteItem(scheduleId);
|
||||
|
||||
#endregion
|
||||
|
||||
#region V2 USERS
|
||||
|
||||
#region V2 Download CSV template
|
||||
|
||||
var downloadCsvTemplate = v2ApiObject.UsersEndPoint2().DownloadCsvTemplate();
|
||||
|
||||
#endregion
|
||||
|
||||
#region V2 Add user
|
||||
|
||||
var addUserWithPassword = v2ApiObject.UsersEndPoint2().AddUserV2(new ApiUserAdd()
|
||||
{
|
||||
Email = "testuser@sync.com",
|
||||
FirstName = "Test2 user",
|
||||
Username = "Testuser2",
|
||||
Password = "Testuser@1203"
|
||||
});
|
||||
|
||||
#endregion
|
||||
|
||||
#region V2 Add CSV user
|
||||
|
||||
var addCsvUser = v2ApiObject.UsersEndPoint2().CsvUserImport(new ApiCsvUserImportRequest()
|
||||
{
|
||||
CsvFileContent = File.ReadAllBytes("../../CSV Users.csv")
|
||||
});
|
||||
|
||||
#endregion
|
||||
|
||||
#region V2 Get group details of particular user
|
||||
|
||||
var groupDetailsOfUser = v2ApiObject.UsersEndPoint2().GetGroupsOfUser(name);
|
||||
|
||||
#endregion
|
||||
|
||||
#region V2 Activate or deactivate the user
|
||||
|
||||
var activateUser = v2ApiObject.UsersEndPoint2().ActivateDeactivateuser(name,
|
||||
new ApiUserActivationRequest()
|
||||
{
|
||||
Activate = true // Status to activate or deactivate the user
|
||||
});
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
#region V2 GROUPS
|
||||
|
||||
#region V2 Add user to particular group
|
||||
|
||||
var addUserToGroup = v2ApiObject.GroupsEndPoint2().AddUserToGroup(groupId,
|
||||
new ApiGroupUsers()
|
||||
{
|
||||
Id = new List<int> { 3, 4 } // List of user's id to be added to the group
|
||||
|
||||
});
|
||||
|
||||
#endregion
|
||||
|
||||
#region V2 Delete user from particular group
|
||||
|
||||
var deleteUserFromGroup = v2ApiObject.GroupsEndPoint2().DeleteUserFromGroup(groupId,
|
||||
new ApiGroupUsers()
|
||||
{
|
||||
Id = new List<int> { 3, 4 } //List of user's id to be deleted from the group
|
||||
});
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
#region V2 PERMISSION
|
||||
|
||||
#region V2 Get list of permissions of particular user
|
||||
|
||||
var getUserPermission = v2ApiObject.PermissionsEndPoint().GetUserPermission(userId);
|
||||
|
||||
#endregion
|
||||
|
||||
#region V2 Get list of permissions of particular group
|
||||
|
||||
var getGroupPermission = v2ApiObject.PermissionsEndPoint().GetGroupPermission(groupId);
|
||||
|
||||
#endregion
|
||||
|
||||
#region V2 Add permission to particular user
|
||||
|
||||
var addUserPermission = v2ApiObject.PermissionsEndPoint().AddUserPermission(new ApiUserPermissionAdd()
|
||||
{
|
||||
PermissionAccess = PermissionAccess.Read.ToString(),
|
||||
UserId = 3,
|
||||
PermissionEntity = PermissionEntity.AllReports.ToString()
|
||||
});
|
||||
|
||||
#endregion
|
||||
|
||||
#region V2 Add permission to particular group
|
||||
|
||||
var addGroupPermission = v2ApiObject.PermissionsEndPoint().AddGroupPermission(new ApiGroupPermissionAdd()
|
||||
{
|
||||
PermissionAccess = PermissionAccess.Create.ToString(),
|
||||
GroupId = 2,
|
||||
PermissionEntity = PermissionEntity.AllCategories.ToString()
|
||||
});
|
||||
|
||||
#endregion
|
||||
|
||||
#region Variable declaration to get permission id of users and groups
|
||||
|
||||
var userPermissionId = getUserPermission.Where(x => x.UserId == userId).Select(x => x.PermissionId).FirstOrDefault(); // Assign first permission id of the first user
|
||||
|
||||
var groupPermissionId = getGroupPermission.Where(x => x.GroupId == groupId).Select(x => x.PermissionId).FirstOrDefault(); // Assign first permission id of the first group
|
||||
|
||||
#endregion
|
||||
|
||||
#region V2 Delete specific user permission
|
||||
|
||||
var deleteUserPermission = v2ApiObject.PermissionsEndPoint().DeleteUserPermission(userPermissionId);
|
||||
|
||||
#endregion
|
||||
|
||||
#region V2 Delete specific group permission
|
||||
|
||||
var deleteGroupPermission = v2ApiObject.PermissionsEndPoint().DeleteGroupPermission(groupPermissionId);
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
#region V3
|
||||
|
||||
#region schedule
|
||||
|
||||
var addSchedule = v3ApiObject.ScheduleEndPoint3().AddSchedule(new ApiScheduleRequest
|
||||
{
|
||||
Name = "sample schedule",
|
||||
ReportId = reportId,
|
||||
ExportType = "Pdf",
|
||||
StartTime = DateTime.UtcNow.AddHours(1).ToString("yyyy-mm-dd HH:mm:ss"),
|
||||
NeverEnd = true,
|
||||
EndAfterOccurrence = 0,
|
||||
ExternalRecipientsList = new List<string> { "rameshkumar.arumugam@syncfusion.com", "rmshkumar362@outlook.com" },
|
||||
ScheduleType = "Daily",
|
||||
DailySchedule = new ApiDailySchedule
|
||||
{
|
||||
RecurrenceType = "EveryWeekday",
|
||||
EveryNdays = 0,
|
||||
EveryWeekday = true
|
||||
}
|
||||
});
|
||||
|
||||
var updateSchedule = v3ApiObject.ScheduleEndPoint3().UpdateSchedule(scheduleId, new ApiScheduleRequest
|
||||
{
|
||||
Name = "sample schedule-update",
|
||||
ReportId = reportId,
|
||||
ExportType = "Word",
|
||||
StartTime = DateTime.Now.ToString("yyyy-mm-ddTHH:mm:ssZ"),
|
||||
NeverEnd = true,
|
||||
EndAfterOccurrence = 0,
|
||||
ExternalRecipientsList = new List<string> { "rameshkumar.arumugam@syncfusion.com" },
|
||||
ScheduleType = "Daily",
|
||||
DailySchedule = new ApiDailySchedule
|
||||
{
|
||||
RecurrenceType = "EveryWeekday",
|
||||
EveryNdays = 0,
|
||||
EveryWeekday = true
|
||||
}
|
||||
});
|
||||
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("Syncfusion.Report.Server.Api.Helper")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyProduct("Syncfusion.Report.Server.Api.Helper")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2018")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
// The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
[assembly: Guid("0b73e1d4-024a-496e-8d22-39483ed71192")]
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -0,0 +1,40 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<SharedDataSet xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner" xmlns="http://schemas.microsoft.com/sqlserver/reporting/2010/01/shareddatasetdefinition">
|
||||
<DataSet Name="Sales">
|
||||
<Query>
|
||||
<DataSourceReference>AdventureWorks/8a351e7f-d658-4b7d-8dd0-d6165d02fa62</DataSourceReference>
|
||||
<CommandText>SET DATEFORMAT mdy
|
||||
SELECT Top 50 PC.Name AS ProdCat, PS.Name AS SubCat, DATEPART(yy, SOH.OrderDate) AS OrderYear, 'Q' + DATENAME(qq, SOH.OrderDate) AS OrderQtr,
|
||||
SUM(SOD.UnitPrice * SOD.OrderQty) AS Sales
|
||||
FROM Production.ProductSubcategory PS INNER JOIN
|
||||
Sales.SalesOrderHeader SOH INNER JOIN
|
||||
Sales.SalesOrderDetail SOD ON SOH.SalesOrderID = SOD.SalesOrderID INNER JOIN
|
||||
Production.Product P ON SOD.ProductID = P.ProductID ON PS.ProductSubcategoryID = P.ProductSubcategoryID INNER JOIN
|
||||
Production.ProductCategory PC ON PS.ProductCategoryID = PC.ProductCategoryID
|
||||
WHERE (SOH.OrderDate BETWEEN '1/1/2002' AND '12/31/2003')
|
||||
GROUP BY DATEPART(yy, SOH.OrderDate), PC.Name, PS.Name, 'Q' + DATENAME(qq, SOH.OrderDate), PS.ProductSubcategoryID</CommandText>
|
||||
</Query>
|
||||
<Fields>
|
||||
<Field Name="ProdCat">
|
||||
<DataField>ProdCat</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="SubCat">
|
||||
<DataField>SubCat</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="OrderYear">
|
||||
<DataField>OrderYear</DataField>
|
||||
<rd:TypeName>System.Int32</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="OrderQtr">
|
||||
<DataField>OrderQtr</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Sales">
|
||||
<DataField>Sales</DataField>
|
||||
<rd:TypeName>System.Decimal</rd:TypeName>
|
||||
</Field>
|
||||
</Fields>
|
||||
</DataSet>
|
||||
</SharedDataSet>
|
|
@ -0,0 +1,75 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{0359A21C-5FDA-4A59-970A-09BBE984AD8F}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<AppDesignerFolder>Properties</AppDesignerFolder>
|
||||
<RootNamespace>Syncfusion.Report.Server.API.Sample</RootNamespace>
|
||||
<AssemblyName>Syncfusion.Report.Server.API.Sample</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<StartupObject />
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
|
||||
<HintPath>packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Runtime.Serialization" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Dataclasses.cs" />
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\API.Helper\Syncfusion.Report.Server.API.Helper.csproj">
|
||||
<Project>{0b73e1d4-024a-496e-8d22-39483ed71192}</Project>
|
||||
<Name>Syncfusion.Report.Server.API.Helper</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
<Target Name="BeforeBuild">
|
||||
</Target>
|
||||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
|
@ -0,0 +1,22 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 14
|
||||
VisualStudioVersion = 14.0.25420.1
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Syncfusion.Report.Server.API.Sample", "Syncfusion.Report.Server.API.Sample.csproj", "{0359A21C-5FDA-4A59-970A-09BBE984AD8F}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{0359A21C-5FDA-4A59-970A-09BBE984AD8F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{0359A21C-5FDA-4A59-970A-09BBE984AD8F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{0359A21C-5FDA-4A59-970A-09BBE984AD8F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{0359A21C-5FDA-4A59-970A-09BBE984AD8F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Newtonsoft.Json" version="10.0.3" targetFramework="net45" />
|
||||
</packages>
|
|
@ -0,0 +1,28 @@
|
|||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 14
|
||||
VisualStudioVersion = 14.0.25420.1
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Syncfusion.Report.Server.API.Helper", "API.Helper\Syncfusion.Report.Server.API.Helper.csproj", "{0B73E1D4-024A-496E-8D22-39483ED71192}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Syncfusion.Report.Server.API.Sample", "API.Sample\Syncfusion.Report.Server.API.Sample.csproj", "{0359A21C-5FDA-4A59-970A-09BBE984AD8F}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{0B73E1D4-024A-496E-8D22-39483ED71192}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{0B73E1D4-024A-496E-8D22-39483ED71192}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{0B73E1D4-024A-496E-8D22-39483ED71192}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{0B73E1D4-024A-496E-8D22-39483ED71192}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{0359A21C-5FDA-4A59-970A-09BBE984AD8F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{0359A21C-5FDA-4A59-970A-09BBE984AD8F}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{0359A21C-5FDA-4A59-970A-09BBE984AD8F}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{0359A21C-5FDA-4A59-970A-09BBE984AD8F}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
Загрузка…
Ссылка в новой задаче