Query on Ali baba Cloud Billing API BOA - alibaba-cloud

I was trying to get some data by using one of the api call QueryInstanceBill
The resulted JSON seems to be long and there is no date column to filter on how i got those many records.
Could someone here help me out

To be able to filter by date, The billing date only used when Granularity is DAILY,format: YYYY-MM-DD. Example 2020-07-29
You can also use the "BillingCycle" field in the request:
The billing cycle. Format: YYYY-MM. Example: 2020-07
Documentation:
https://www.alibabacloud.com/help/doc-detail/100400.htm

QueryInstanceBill API returns data for billing cycle which is usually for a month (YYYY-MM)
If you want data for a particular date then in request parameter provide the value for field "BillingDate" in format: YYYY-MM-DD
and the value for field "Granularity" should be "DAILY"
Check out the documentation:
https://www.alibabacloud.com/help/doc-detail/100400.htm
Also, you can use OpenAPI Explorer, I have provided BillingCycle as "2019-10", BillingDate as "2019-10-15" and Granularity as "DAILY":
https://api.aliyun.com/#/?product=BssOpenApi&version=2017-12-14&api=QueryInstanceBill&params={%22RegionId%22:%22cn-hangzhou%22,%22Granularity%22:%22DAILY%22,%22BillingCycle%22:%222019-10%22,%22BillingDate%22:%222019-10-15%22}&tab=DEMO&lang=JAVA

Related

Microsoft Graph API: Filter messages received last month

I was wondering if Microsoft Graph has filtering available to retrieve emails only received last month that is from 1st day of last month to last day of last month.
Also, I save custom user properties with each email called "CompletedTime". I would also like to know if there is any filtering which would only pull emails which has value in custom user property "CompletedTime".
Thank you in advance.
KQL has a reserved keyword for last month https://learn.microsoft.com/en-us/sharepoint/dev/general-development/keyword-query-language-kql-syntax-reference so something like
https://graph.microsoft.com/v1.0/me/messages?$search="received:\"last month\""&$select=subject,receivedDateTime&$Top=1000
Should work to return the last months email, you could also do a filter or a search using a date range.
Also, I save custom user properties with each email called "CompletedTime". I would also like to know if there is any filtering which would only pull emails which has value in custom user property "CompletedTime".
If you know what the extended property representation of the property is then you can use a Filter on that. (If you don't know what the extended property is then use a MAPI editor like OutlookSpy of mfcmapi to work it out.

400 - Bad Request while saving Date Only field in CRM using Web API

I am using Microsoft Dynamics 365 Web API approach to interacting with CRM data.
Here I want to update the field with type: DATE and TIME.
Date value I am passing in the request body is as below:
"packfirstday":"1-15-2018"
Except for above, I have also tried with DateTime and with different date formats.
e.g.
mm-dd-yyyy
m-dd-yyyy
mm/dd/yyyy
yyyy/mm/dd
yyyy-mm-dd
PS: I try to post without date field it is saving details successfully.
The problem is not with the code, the simple misunderstanding.
There are 2 components namely Behavior & Format. You have Format set as 'Date only' not the Behavior. Behavior decides the Database terms whereas Format is used for displaying datepicker controls in Form.
So when you set the field in web api with only date part - the CRM database expects time part also.
Either set behavior also as date only, so this will work:
"packfirstday":"2018-01-15" //YYYY-mm-dd format
Or change your code to pass time part also:
"packfirstday":"2018-01-15T11:10:00.000Z" //UTC offset
Since user local behavior still expects the time part.

What is the expected date format for the mailchimp export API?

I'm trying to use the mailchimp export API in order to keep our internal database in sync with a list we've got in mailchimp.
To do this, I am using the mailchimp export API https://apidocs.mailchimp.com/export/1.0/. According to the documentation, you can pass a since parameter, which I have done with success, but only when I pass a date like this 2015-10-01, but I would like to add a a time factor to it.
I've tried UTC, as well as various other formats.
Does anyone know how to format a date time value for this since parameter?

Listing messages with more precision than yyyy/mm/dd

I'm trying to get all the messages sent to a user after a certain point in time, by using the Gmail API. I've successfully retrieved messages after a certain date by using the query q=after:2015/01/19 in the API Explorer.
I would like to be more specific than this and specify an hour and a minute of the day. Is this possible? I ask since the Advanced Search-specification only contains the most useful operators.
You can use a search query to list messages after a certain date with second accuracy.
Use the search term after:SOME_TIME_IN_SECONDS_SINCE_EPOCH. Gmail supports the after keyword using a timestamp instead of the yyyy/mm/dd format.

Facebook Graph API feed order by created_time

I`m using query like
me/feed?fields=id,status_type,link,full_picture,type,description,name&since=2014-08-28T11:24:13&limit=30
But API response contains latest post at top
I want to see the post that created after 2014-08-28
What can I do for it?
As https://developers.facebook.com/docs/graph-api/using-graph-api/v2.2#paging outlines, you have to use Unix timestamps for the since parameter:
since : A Unix timestamp or strtotime data value that points to the start of the range of time-based data.

Resources