Skip to content

Feature/delete service stats endpoint#72

Merged
eguzki merged 10 commits intofeature/delete-service-stats-integrationfrom
feature/delete-service-stats-endpoint
Feb 22, 2019
Merged

Feature/delete service stats endpoint#72
eguzki merged 10 commits intofeature/delete-service-stats-integrationfrom
feature/delete-service-stats-endpoint

Conversation

@eguzki
Copy link
Copy Markdown
Member

@eguzki eguzki commented Feb 6, 2019

New endpoint to delete stats in internal API

DELETE /internal/services/#{service_id}/stats

Request body

{
  "deletejobdef": {
    "applications": ["1"],
    "metrics": ["5"], 
    "from": 1483228800, 
    "to": 1483228800, 
    "users": ["1"]
  }
}

@eguzki eguzki requested review from davidor and unleashed February 6, 2019 11:31
@eguzki eguzki mentioned this pull request Feb 6, 2019
3 tasks
Comment thread app/api/internal/stats.rb Outdated
@eguzki
Copy link
Copy Markdown
Member Author

eguzki commented Feb 14, 2019

ping @unleashed @davidor

Comment thread app/api/internal/stats.rb Outdated
Comment thread lib/3scale/backend/stats/delete_job_def.rb
Comment thread lib/3scale/backend/stats/delete_job_def.rb Outdated
Comment thread app/api/internal/stats.rb
Comment thread app/api/internal/stats.rb
Comment thread lib/3scale/backend/stats/delete_job_def.rb Outdated
Comment thread lib/3scale/backend/stats/delete_job_def.rb Outdated
Comment thread lib/3scale/backend/stats/delete_job_def.rb Outdated
@eguzki eguzki force-pushed the feature/delete-service-stats-endpoint branch from e2d5e2f to 9516ec3 Compare February 21, 2019 13:50
@eguzki
Copy link
Copy Markdown
Member Author

eguzki commented Feb 21, 2019

all coments resolved. Ready for a new review @davidor

Comment thread lib/3scale/backend/stats/delete_job_def.rb Outdated
Comment thread lib/3scale/backend/stats/delete_job_def.rb Outdated
@davidor
Copy link
Copy Markdown
Contributor

davidor commented Feb 22, 2019

@eguzki , I added a couple of comments. The rest looks good to me.

@eguzki eguzki merged commit b99a1ed into feature/delete-service-stats-integration Feb 22, 2019
@bors bors Bot deleted the feature/delete-service-stats-endpoint branch February 22, 2019 17:18

private

def validate
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I forgot to mention that we should probably put some kind of limit on the to parameter or on the time interval between to and from. Otherwise, someone could send a call to delete all the keys from 1970 up until now or something like that. We can fix this in the integration branch later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants