Search Conduit saying invalid constraint when using constraints specified in documentation

I’m attempting to use the conduit projects.search API in order to retrieve the project IDs of projects to add via conduit to issues and repositories.

However, when I utilise the “name” or “slug” constraints, it errors and says that the constraint is not supported, as seen below.

Nothing is really clear or informative here, as I have followed the documentation.

Any help would be appreciated.

Kind regards,
redstonedesigner

Can you show me the documentation you followed?

I have a local copy of this pulled onto my instance.

https://secure.phabricator.com/conduit/method/project.search/

The test was done with the inbuilt query console.

What did you type into the “constraints” textarea?

Why did you type the text that you typed (for example, were you following some piece of documentation which told you what to type)?

I entered [{"type":"slugs","value":["administrators"]}].

I was following the example provided in the “constraints” section of the documentation, where it describes the following syntax: { ... "constraints": { "authors": ["PHID-USER-1111", "PHID-USER-2222"], "statuses": ["open", "closed"], ... }, ... }

After noticing the “depreciated” warning next to “names” and thinking it was something to do with the fact that the “slugs” method was ‘new’, I also attempted to use “names” as the constraint type. I entered [{"type":"name","value":"Administrators"}]. I receive the same error:

Can you walk me through how you got from this example…

Screen Shot 2020-07-08 at 11.54.56 AM

…to this structure?

[
  {
    "type": "slugs",
    "value": ["administrators"]
  }
]

In particular, where did “type” and “value” come from?

Ah…

Probably from my previous work on the Diffusion create repository API…

Apologies.

For those that come across this topic in the future, I am now using {"slugs":["administrators"]} in the constraints option.