Skip to content

Conversation

PGDeve
Copy link
Collaborator

@PGDeve PGDeve commented Oct 7, 2025

Issue

Context

New query parameters for GET /clients/{clientId}/purposes API v2:

  • eservicesIds: list of eserviceId to filter the list of purposes (see issue 1398).
  • states: list of states to filter the list of purposes based on current version state (see issues 1421).

Moved from n (i.e. the number of purposes linked to a specific client) GET /purposes/{id} calls, to a single GET /purposes with the new purposesIds query parameter.

Impacted Services

  • m2m-gateway, purpose-process

Manual Tests

Tests on 4 purposes linked to client ce703dc9-f511-4e1e-8655-cf7744229d31 and 2 e-services. One of those is archived.

No filters

nofilter

EservicesIds

eservicesIds2

States

states

Client with no Purposes

client-no-purposes

Copy link
Collaborator

@ecamellini ecamellini left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR looks good overall 🚀
I have a doubt regarding an issue we had in the past when filtering resources with a set of IDs in a listing - maybe we should port that discussion to Slack and decide how to proceed

Comment on lines +164 to +173
- in: query
name: purposesIds
description: comma separated sequence of purposes IDs
schema:
type: array
items:
type: string
format: uuid
default: []
explode: false
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at the PR, I just remembered why we had a call for each purpose instead of a filter like this one on the listing - more details in this task we opened about this issue in the API V2 the board: PIN-7204

Maybe we could verify if the issue is still reproducible, then decide what to do - I would ask more details to @galales, who opened the task for this feature, and also pointed out this issue in the first place when we were implementing this call

Copy link
Collaborator

@Viktor-K Viktor-K left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍🏻

@PGDeve PGDeve changed the title feature: Add EservicesIds and States filters to GET /clients/{clientId}/purposes (PIN-7672) feature: Add EserviceIds and States filters to GET /clients/{clientId}/purposes (PIN-7672) Oct 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants