Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add change log count to user response payload #5451

Closed
mitchell852 opened this issue Jan 21, 2021 · 3 comments · Fixed by #5904
Closed

Add change log count to user response payload #5451

mitchell852 opened this issue Jan 21, 2021 · 3 comments · Fixed by #5904
Assignees
Labels
new feature A new feature, capability or behavior Traffic Ops related to Traffic Ops Traffic Portal v1 related to Traffic Portal version 1
Milestone

Comments

@mitchell852
Copy link
Member

mitchell852 commented Jan 21, 2021

I'm submitting a ...

  • new feature / enhancement request

Traffic Control components affected ...

  • Traffic Ops
  • Traffic Portal

Current behavior:

I don't believe there is a way currently via TP and/or the TO API to see how many change log entries have been created by a particular user. IMO this information would be helpful when evaluating user activity along with #5412

New behavior:

Do one of 2 things or maybe both:

  1. Add changeLogCount to the response payload of the user TO api endpoints (this would require a join to the log table)
  2. add query param support such as GET /logs?username=

Anything else:

If this is added to the api, then it needs to be added to TP as well. I.e.

@mitchell852 mitchell852 added new feature A new feature, capability or behavior Traffic Ops related to Traffic Ops Traffic Portal v1 related to Traffic Portal version 1 labels Jan 21, 2021
@ocket8888
Copy link
Contributor

Per API spec guidelines if you did GET /logs?user=someone&limit=0 then you could get back

{
	"response": [],
	"summary": {
		"count": 50
	}
}

assuming someone had 50 associated changelog entries. If we implement summary on that endpoint, that is.

@mitchell852
Copy link
Member Author

mitchell852 commented Jan 21, 2021

what i meant was something like this for GET /users

    "response": [
      {
        "username": "my-username",
        "email": "email@email.com",
        ...
        "changeLogCount": 50,
      }
    ],

in addition to providing the user query param to the logs endpoint: GET /logs?user=someone

@rimashah25
Copy link
Contributor

I can take this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature A new feature, capability or behavior Traffic Ops related to Traffic Ops Traffic Portal v1 related to Traffic Portal version 1
Projects
None yet
3 participants