Skip to content

New API type for group applications #933

@GAsplund

Description

@GAsplund

Having developed on a new application, CashIT, I saw that the INFO API type would not be enough for this use case. According to the current design, the application must be able to:

  • Fetch the name of any group
    Allows the name of a group to be displayed in tables when the current user is not a part of that group
  • Fetch the members of any group
    This information is needed so that forms can be pre-filled with the members of a group
  • Fetch the name of any member
    This information is needed so that tables can be filled in lists

There are probably more use cases here, but I probably forgot about them.

The reason that this needs to be done on an API-level is that in this case, the division treasurer should be able to make changed on behalf of another group.

I propose a new API type with the following endpoints:

  • /group - Get information about a group. The data structure could be as follows:
{
  id: string;
  name: string;
  prettyName: string;
  groupMembers: {
    id: string;
    nick: string;
    firstName: string;
    lastName: string;
  }[];
  superGroup: {
    id: string;
    name: string;
    prettyName: string;
    type: string;
  }
}
  • /user - Get information about a given user
    Same structure as /user is today on the INFO API type

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions