发票创建日期的对象过滤器
Object Filter for Inovice create date
我正在使用 rest API 来获取创建日期大于某个日期(例如:2015 年 9 月 1 日之后)的发票。
GET
https://{{sluser}}:{{slkey}}@api.softlayer.com/rest/v3.1/SoftLayer_Account/getInvoices?objectFilter={"createDate":{"operation":"greaterThanDate","options":[{"name":"date", "value":"10/01/2015"}]}}&resultLimit=1,5
但这似乎是给前 5 张发票。我现在可以问 objectFilter 有什么问题吗?另外,如何指定日期格式 dd-MM-YYYY
或 mm-dd-yyyy
或 yyyy-mm-dd
?
尝试以下 REST 请求:
https://[username]:[apikey] @api.softlayer.com/rest/v3/SoftLayer_Account/getInvoices?objectFilter={ "invoices": { "createDate": { "operation": "greaterThanDate", "options": [ { "name": "date", "value": [ "01/22/2016" ] } ] } } }&objectMask=mask[createDate]
Method: GET
其中: date format
是 mm-dd-yyyy
.
这是另一个使用“betweenDate”的例子:
https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Account/getInvoices?objectFilter={ "invoices": { "createDate": { "operation": "betweenDate", "options": [ { "name": "startDate", "value": ["02/01/2014"] }, { "name": "endDate", "value": ["02/13/2014"] } ] } } }&objectMask=mask[createDate]
Method: GET
参考文献:
我正在使用 rest API 来获取创建日期大于某个日期(例如:2015 年 9 月 1 日之后)的发票。
GET
https://{{sluser}}:{{slkey}}@api.softlayer.com/rest/v3.1/SoftLayer_Account/getInvoices?objectFilter={"createDate":{"operation":"greaterThanDate","options":[{"name":"date", "value":"10/01/2015"}]}}&resultLimit=1,5
但这似乎是给前 5 张发票。我现在可以问 objectFilter 有什么问题吗?另外,如何指定日期格式 dd-MM-YYYY
或 mm-dd-yyyy
或 yyyy-mm-dd
?
尝试以下 REST 请求:
https://[username]:[apikey] @api.softlayer.com/rest/v3/SoftLayer_Account/getInvoices?objectFilter={ "invoices": { "createDate": { "operation": "greaterThanDate", "options": [ { "name": "date", "value": [ "01/22/2016" ] } ] } } }&objectMask=mask[createDate]
Method: GET
其中: date format
是 mm-dd-yyyy
.
这是另一个使用“betweenDate”的例子:
https://[username]:[apikey]@api.softlayer.com/rest/v3/SoftLayer_Account/getInvoices?objectFilter={ "invoices": { "createDate": { "operation": "betweenDate", "options": [ { "name": "startDate", "value": ["02/01/2014"] }, { "name": "endDate", "value": ["02/13/2014"] } ] } } }&objectMask=mask[createDate]
Method: GET
参考文献: