Solved

[Bot Scheduler API] I do not know the cause of the API error..


Badge +1
hello.I would like to find a list of only the active schedules set in CR.If you try to use the request sample Json listed in the list of automations available to you, it will fail with the message 'Invalid parameter passed'. (fields and values ​​are correct)So, if you try to edit the Json like below, you will get a response.However, it seems that the filter values ​​are not applied properly. All created schedules are viewed regardless of filter conditions. Do you know what the problem is?

 

{
  "filter": {
    "operator": "NONE",
    "operands": [{
      "operator": "eq",
      "field": "status",
      "value": "active"
    }]
  },
  "sort": [
    {
      "field": "name",
      "direction": "asc"
    }
  ],
  "page": {
    "offset": 0,
    "length": 100
  }
}

icon

Best answer by DATTA.KOTHAMASU 23 May 2024, 06:21

View original

4 replies

Userlevel 2
Badge +8

Hi, You can use the following filter to see only the ACTIVE schedules.


{
  "filter": {
      "operator": "eq",
      "field": "status",
      "value": "1"
  },
  "sort": [
    {
      "field": "name",
      "direction": "asc"
    }
  ],
  "page": {
    "offset": 0,
    "length": 100
  }
}

 

Please mark the response as a solution if it helps you.

Badge +1

Hi, You can use the following filter to see only the ACTIVE schedules.


{
  "filter": {
      "operator": "eq",
      "field": "status",
      "value": "1"
  },
  "sort": [
    {
      "field": "name",
      "direction": "asc"
    }
  ],
  "page": {
    "offset": 0,
    "length": 100
  }
}

 

Please mark the response as a solution if it helps you.

 

OMG Fxxx God Damm! (It's not a swear word in a bad way)

I'm really happy.

You are my savior. thank you

The problem I had been unable to solve all day was solved.

Could you please tell me why the Value of the ‘Status’ field is “1”?

In the sample, the strings were recorded as ‘active’ and ‘inactive’.

Userlevel 2
Badge +8

Hi, I also had the same confusion when the documentation showed an example of comparing a field with a text value. I learned from a previous troubleshooting experience that sometimes the display value may not match the actual data value in the backend. I assumed that the Active status could be stored as status_active or active or 1 or true, and it worked when I used 1.

Please help to mark the response as a solution as it worked for you.

Badge +1

Hi, I also had the same confusion when the documentation showed an example of comparing a field with a text value. I learned from a previous troubleshooting experience that sometimes the display value may not match the actual data value in the backend. I assumed that the Active status could be stored as status_active or active or 1 or true, and it worked when I used 1.

Please help to mark the response as a solution as it worked for you.

Thanks for your reply.There seems to be a difference from the actual saved value.From now on, let’s check the DB data directly.

Reply