Successfactors API 限制每个请求的记录数 return

Successfactors API limit number of records return per request

我正在使用 python 从 Successfactor API 检索数据。有一个实体很重,以至于每个请求的默认 1000 条记录 return 总是导致服务器超时。

我想减少每个请求的记录数 return 以避免服务器超时问题。

我试过 $top = 100 ...但无法移动到下一个 100,因为 returned 结果中没有 __next link 也没有 $offset选项。

我已尝试将列数 return 限制为非 NavigationProperties。仍然没有帮助。

有人知道怎么解决吗?

下面是一个例子:

https://xxxx.successfactors.com/odata/v2/JobRequisition?$format=JSON&&$filter=lastModifiedDateTime ge datetime'2015-08-27T00:00:00' and lastModifiedDateTime le datetime'2015-08-27T23:59: 59'&$select=age,appTemplateId,assessRatingScaleName,cReq1UpApprover,cReqAddSourcing,cReqAdvertCost,cReqAdvertDetails,cReqAdvertDraftCopy,cReqAlternateLocation,cReqAppID,cReqAssignmentValue,cReqAward,cReqCancelCost,cReqCancelReason,cReqCancelbyELT,cReqChangetoterms,cReqChargeRate,cReqCompany,cReqContractDuration,cReqCoreSourcing, cReqCurrentEndDate,cReqDateShortlist,cReqDescServices,cReqEstAgencyCost,cReqEstCostOfHire,cReqExtensionEndDate,cReqExtensionStartDate,cReqFirstName,cReqFlexiWork,cReqHMPositionTitle,cReqHSE,cReqHiringManagerComments,cReqHoursPerWeek,cReqInt1Req,cReqJBComments,cReqLastName,cReqLimitedTermDuration,cReqLinkedInProject,cReqMarketMapInfo,cReqMaxRate,cReqNewDate,cReqOfferTarget,cReqOriginalREQID,cReqOriginalStartDate,cReqPOApprover1, cReqPOApprover2、cReqPOApprover3、cReqPreIdenCand、cReqPreferredName、cReqPropAccumPOSpend、cReqRat eCardCode,cReqRateEndRange,cReqRateStartRange,cReqRateWSuper,cReqRecSearchFirm,cReqRemEndRange,cReqRemStartRange,cReqReplacementFor,cReqRequirements,cReqResTeamComments,cReqRetainer1,cReqRetainer2,cReqRetainer3,c​​ReqRoleInfo,cReqRosterPatDetails,cReqSecondSourcing,cReqSrcPlan,cReqStartDate,cReqStartofRoster,cReqTesting,cReqTotalPOValuetodate,cReqTravel,cReqUserID,candidateProgress,city, closedDateTime,corporatePosting,costCenterId,country,createdDateTime,currency,defaultLanguage,deleted,department,division,erpAmount,extPostEndDate,extPostStartDate,formDataId,formDueDate,instCongofStartReq,instrConfirmStarted,instrContractExtnReq,instrContractHistory,instrContractReq,instrEmpReq,instrExecAssignmentInfo,instrFurtherInstructions,instrInterview1,instrJobBrief, instrNewHireName,instrPosDetails,instrPostingDetails,instrProposedContractCosts,instrProposedExtn,instrRateCardRate,instrReqCost,instrReqDetails,instrResTimeframe,instrRoleInfo,instrSrcPlan,instrToManager,internalStatus,intranetPosting, isDraft,jobCode,jobGrade,jobGradeCode,jobReqGUId,jobReqId,jobRole,jobStartDate,lastModifiedBy,lastModifiedDateTime,lastModifiedProxyUserId,location,numberOpenings,openingsFilled,overallScaleName,positionNumber,postalcode,ratedApplicantCount,relocationCost,reverseScalelate,stat[TotempidType,TotItempstateItimedState] =13=]

您尝试过使用 $skip 吗?

https://xxxx.successfactors.com/odata/v2/JobRequisition?
$format=JSON&$filter=lastModifiedDateTime ge datetime'2015-08-27T00:00:00' 
and lastModifiedDateTime le datetime'2015-08-27T23:59:59'
&$top=100&$skip=100

这应该导致集合 100-200,而不是 0-100...

检查这个:https://blogs.sap.com/2013/03/20/using-odatas-top-skip-and-count/

我认为 "automatic" 不可能通过 next-link 或其他方式实现此目的,这是不存在的。 我建议先使用 $count 来计算总和。然后使用 top 和 skip 命令检索页面大小。