
EricC.41029 (Customer) asked a question.
This is the API I'm using api/v1/policies?status=ACTIVE&limit=1&type=OKTA_SIGN_ON&expand=RULES&q=abx but it the limit= and q= doesn't do anything . It's still listing all the policies .

We use cookies to provide the best website experience and to help understand marketing efforts. We may also share data with ad partners to reach potential customers across the web. To learn more, visit our Privacy Policy. Click here for Your Privacy Choices. You may also opt out of this sharing by signaling your preference via GPC, applicable only to the browser signaling the opt-out.
More information
These cookies are necessary for the website to function and cannot be switched off in our systems. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms. You can set your browser to block or alert you about these cookies, but some parts of the site will not then work. These cookies do not store any personally identifiable information.
These cookies enable the website to provide enhanced functionality and personalisation. They may be set by us or by third party providers whose services we have added to our pages. If you do not allow these cookies then some or all of these services may not function properly.
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us to know which pages are the most and least popular and see how visitors move around the site. All information these cookies collect is aggregated and therefore anonymous. If you do not allow these cookies we will not know when you have visited our site, and will not be able to monitor its performance.
These cookies may be set through our site by our advertising partners. They may be used by those companies to build a profile of your interests and show you relevant adverts on other sites. They do not store directly personal information, but are based on uniquely identifying your browser and internet device. If you do not allow these cookies, you will experience less targeted advertising.
Select All

We use cookies to provide the best website experience and to help understand marketing efforts. We may also share data with ad partners to reach potential customers across the web. To learn more, visit our Privacy Policy. Click here for Your Privacy Choices. You may also opt out of this sharing by signaling your preference via GPC, applicable only to the browser signaling the opt-out.
More information
These cookies are necessary for the website to function and cannot be switched off in our systems. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms. You can set your browser to block or alert you about these cookies, but some parts of the site will not then work. These cookies do not store any personally identifiable information.
These cookies enable the website to provide enhanced functionality and personalisation. They may be set by us or by third party providers whose services we have added to our pages. If you do not allow these cookies then some or all of these services may not function properly.
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us to know which pages are the most and least popular and see how visitors move around the site. All information these cookies collect is aggregated and therefore anonymous. If you do not allow these cookies we will not know when you have visited our site, and will not be able to monitor its performance.
These cookies may be set through our site by our advertising partners. They may be used by those companies to build a profile of your interests and show you relevant adverts on other sites. They do not store directly personal information, but are based on uniquely identifying your browser and internet device. If you do not allow these cookies, you will experience less targeted advertising.
Select All
Hi @EricC.41029 (Customer) , Thank you for reaching out to the Okta Community!
I just tested it and seems to be working fine for me with the caveat that the order of parameters is important and that the "q" filter works as "startsWith" method, so perhaps that's what is influencing your results.
I have 3 policies, two of which are ACTIVE and as you can see in the below screenshot, I have two that start with the word "test", one active, one inactive.
I ran the following call and got the expected results: "TEST - MFA only (no password)".
/api/v1/policies?type=OKTA_SIGN_ON&status=ACTIVE&limit=1&q=test
If my answer helped, remember to mark it as best to increase its visibility for other members of the Okta Community who might have the same questions as you.
Hope my answer helps!
--
Help others in the community by liking or hitting Select as Best if this response helped you.
Hi , it doesn't work the same for me . I've tried exactly the same order and query string like yours but I'm still getting multiple results . I should be expecting empty result here because there is no policy that contains "test"
I'm not sure what is wrong in your configuration for it to result in that.
I recommend trying to use the Okta API Collections if you are using POSTMAN to test it by leveraging one of the available calls listed there to see if it makes any difference.
For example, I used the "GET Rule" call one under the Policy API collection ( {{url}}/api/v1/policies/{{policyId}}/rules/{{ruleId}} ) and just modified the call to fit my needs with /api/v1/policies?type=OKTA_SIGN_ON&status=ACTIVE&limit=1&q=test
Regards.
--
Help others in the community by liking or hitting Select as Best if this response helped you.
Hi , I've found out the issue , seems like Okta Version 2024.09.1 C is able to reproduce this while Version 2024.09.1 E is working fine . I guess we will have to wait for Okta version upgrade
Acknowledged. If you have a paid account with us, I recommend opening a case to work with my colleagues from the Support Team on this.
Regards.
--
Help others in the community by liking or hitting Select as Best if this response helped you.