Я работаю с Xena api
У меня проблемы с получением данных из API, даже если у меня есть действующий токен доступа.
https://my.xena.biz/Api/User/XenaUserMembership
возвращает
{
"Message": "An error has occurred.",
"ExceptionMessage": "Object reference not set to an instance of an object.",
"ExceptionType": "System.NullReferenceException",
"StackTrace": " at Xena.Web.Api.ApiUserController.GetXenaUserMembershipList(ListOptions listOptions, String queryString) in C:\\Development\\Xena\\Xena\\src\\Xena.Web\\Api\\ApiUserController.cs:line 249\r\n at lambda_method(Closure , Object , Object[] )\r\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass6_1.<GetExecutor>b__3(Object instance, Object[] methodParameters)\r\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.Execute(Object instance, Object[] arguments)\r\n at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__1.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__6.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__5.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__5.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Web.Http.Dispatcher.HttpControllerDispatcher.<SendAsync>d__15.MoveNext()"
}
размер страницы требуется
Затем я обнаружил, что размер страницы был обязательным для заполнения.
https://my.xena.biz/Api/User/XenaUserMembership?PageSize=1
Результаты
"Count": 72,
"Entities": [
{
"Id": 1,
"MembershipId": 8326,
"FiscalSetupId": 7,
"UserId": 52522,
"ResourceId": 832544,
"ResourceName": "XXX XXXX",
"ResourceTheme": "theme-default",
"CurrencyAbbreviation": "DKK",
"FiscalSetupName": "TestCompany",
"VCardId": 54544,
"XenaSubscriptionId": 832140,
"SproomKey": null,
"PictureLastVersionId": 5427538,
"PictureUrl": "/Blob/Public/VCard/54544/Thumbnail/5427538",
"SecurityGroups": "Admin"
}
]
}
Я не регистратор, получающий ошибку, но я хочу получить полные результаты обратно.Там написано, что count = 72, как мне получить полный список всех 72 объектов?