For the complete documentation index, see llms.txt. This page is also available as Markdown.

Querying Segments

You can query all the configured segments using the GraphQL Segments endpoint. You are able to query all the names and identifiers of the segments.

curl -0 -v -X POST https://api.nosto.com/v1/graphql \
-u ":<token>" \
-H 'Content-Type: application/graphql' \
-d @- << EOF
query {
  segments{
    segments{
      id,
      name
    },
    affinities{
      topBrands{
        name,
        score
      },
      topCategories{
        name,
        score
      },
      topProductTypes{
        name,
        score
      },
      topSkus {
        attribute,
        values{
          name,
          score
        }
      }
    }
  }
}
EOF

Sample Output

Last updated

Was this helpful?