Cloud Pak for Security

 View Only
Expand all | Collapse all

Invalid period specified. Must be one of DAY/WEEK/MONTH.

  • 1.  Invalid period specified. Must be one of DAY/WEEK/MONTH.

    Posted Wed October 26, 2022 09:24 AM
    Invalid period specified. Must be one of DAY/WEEK/MONTH. I get this error while trying to write custom code that sends request to CP4S Rest api.
    /stats/incidents_by_type_over_time/?start_date={Timestamp_start}&end_date={Timestamp_end} - My endpoint.
    I was using epoch time but CP4S returned me some mad output. Do you know how time format should look like ? Especially this week in the middle, its crazy.
    Regards,
    Michał


    ------------------------------
    Michał Dziepak
    ------------------------------


  • 2.  RE: Invalid period specified. Must be one of DAY/WEEK/MONTH.

    Posted Wed April 19, 2023 09:26 AM
    Edited by JOHN HANDROP Wed April 19, 2023 09:26 AM

    In case someone else runs into this.

    Incidents CP4S Rest API supports epoch time in ms, while stats does not.



    ------------------------------
    JOHN HANDROP
    ------------------------------