Skip to main content
Solved

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

  • 23 May 2024
  • 4 replies
  • 71 views

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": b
    {
      "field": "name",
      "direction": "asc"
    }
  ],
  "page": {
    "offset": 0,
    "length": 100
  }
}

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 +2

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 +2

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