Use query filter on service list


I’m trying to filter the list of service.

I want to only have the list of service I needs.

I think I do something wrong with the query go-bxpr but not sure what.

Here is my code, that don’t filter my list of services:

package main

import (

        nomad ""
//        ""

func main() {
        config := nomad.Config{
                Address:    "",
                Region:     "global",

        client, _ := nomad.NewClient(&config)

        opts := &nomad.QueryOptions{
                AllowStale: false,
                Filter: "Services.ServiceName contains my-service",

        stubs, _, _ := client.Services().List(opts)

        for _, stub := range stubs {
                for _, service := range stub.Services {
                        fmt.Print(service.ServiceName + "\n")

Thank you for your help

Hi @quentin.vallin, I think the /v1/services endpoint doesn’t actually support filtering yet, at least our docs don’t mention any supported parameters.

It does seem like that could be useful though (along with support for pagination) - feel free to open a feature request issue on GitHub.

Hi @seth.hoenig !

Thank you for your reply. I was confused because the nomad go api allow a query in the List call api package - - Go Packages

Can we specify that Filter is not supported on Servoces.List() ?