I've been trying to use the graphQL explorer to mockup an API call so that I can iterate over projects and export their details. I've attempted several variations on formatting the searchString parameter and keep getting an error:
"message": "Exception while fetching data (/projects_search) : $: Failed to convert argument value",
Has anyone been able to get this to work? Example call below
query projects_search {
projects_search(containerId:"ari:cloud:townsquare:<cloudid>:workspace/<workspaceid>"
, searchString:"test"){
pageInfo {
startCursor
endCursor
}
}
}
I'm finding that searchString does not filter results when keywords are entered that I know for a fact appear in valid project names. My API calls are now resorting to pulling all projects and then filtering client-side. Is this a known issue or user error? Can more examples of filtering please be provided, perhaps on this page: https://developer.atlassian.com/platform/projects/graphql/#queries_projectssearch
@Reid DeWolfe @Prasanna Ravichandran Do either of you have working examples of server-side filtering?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
The error usually happens when the `containerId` or `searchString` format is invalid.
Try these checks:
1. **Verify containerId format**
* Replace `<cloudid>` and `<workspaceid>` with actual values
* Do not include angle brackets (`< >`)
* Example:
```
ari:cloud:townsquare:12345678-xxxx-xxxx-xxxx-123456789abc:workspace/abcd1234
```
2. **Ensure searchString is a plain string**
* Use simple text (no special characters or quotes inside)
* Example: `"test"`
3. **Confirm the container type**
* `townsquare` is for Atlas
* If you are querying Jira projects, you may need a different API or container
4. **Check permissions**
* You must have access to that workspace/project
* Otherwise the API can fail with conversion errors
5. **Try a minimal query first**
```
query {
projects_search(
containerId: "your-valid-container-id",
searchString: "test"
) {
pageInfo {
startCursor
endCursor
}
}
}
```
If it still fails, the most common cause is an incorrect `containerId`.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.