Skip to main content
Solved

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


Forum|alt.badge.img+2
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
  }
}

Best answer by DATTA.KOTHAMASU

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.

View original
Did this topic help answer your question?

4 replies

DATTA.KOTHAMASU
Navigator | Tier 3
Forum|alt.badge.img+11
  • Navigator | Tier 3
  • 23 replies
  • Answer
  • May 23, 2024

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.


Forum|alt.badge.img+2
  • Author
  • Cadet | Tier 2
  • 4 replies
  • May 23, 2024
DATTA.KOTHAMASU wrote:

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’.


DATTA.KOTHAMASU
Navigator | Tier 3
Forum|alt.badge.img+11

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.


Forum|alt.badge.img+2
  • Author
  • Cadet | Tier 2
  • 4 replies
  • May 23, 2024
DATTA.KOTHAMASU wrote:

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings