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 Job "POST User Exports" endpoint #241

Merged
merged 5 commits into from
Apr 14, 2020
Merged

Add Job "POST User Exports" endpoint #241

merged 5 commits into from
Apr 14, 2020

Conversation

lbalmaceda
Copy link
Contributor

@lbalmaceda lbalmaceda commented Apr 3, 2020

Changes

Adds the following endpoint:

  • POST Users Export Job (by connection id)

References

Will close #95

Testing

  • This change adds test coverage
  • This change has been tested on the latest version of the platform/language or why not

Checklist

@lbalmaceda lbalmaceda requested a review from a team April 3, 2020 21:14
@lbalmaceda lbalmaceda added this to the v1-Next milestone Apr 3, 2020
@jimmyjames jimmyjames requested review from jimmyjames and removed request for a team April 6, 2020 15:44
jimmyjames
jimmyjames previously approved these changes Apr 6, 2020
Copy link
Contributor

@jimmyjames jimmyjames left a comment

Choose a reason for hiding this comment

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

This change looks good. Do we have work captured to add support for the other missing Jobs endpoints, such as getting a job's error details and creating an export/import users job?

@lbalmaceda
Copy link
Contributor Author

Yes, my intention was to add them to this PR. Let me mark it as in progress.

src/main/java/com/auth0/client/mgmt/JobsEntity.java Outdated Show resolved Hide resolved
@JsonProperty("export_as")
private String exportAs;

public UsersExportField(String name) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Keeping this one handy as seems to be the default scenario. If the alternative constructor is not required, I can replace it with a setter for export_as

@@ -117,7 +119,7 @@ public void jsonResponse(String path, int statusCode) throws IOException {
server.enqueue(response);
}

public void rateLimitReachedResponse(long limit, long remaining, long reset) throws IOException {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

linter pointed out exceptions not thrown, and auto-closing of buffer (with jdk 8 try/catch)

@lbalmaceda
Copy link
Contributor Author

I'm working on adding the import users endpoint to this PR.

@lbalmaceda lbalmaceda changed the title Add missing Job endpoints Add Job/UserExports endpoint Apr 13, 2020
@lbalmaceda
Copy link
Contributor Author

I'm going to keep this one for the User Exports endpoint and add the remaining endpoints in separate PRs.

@lbalmaceda lbalmaceda changed the title Add Job/UserExports endpoint Add Job "POST User Exports" endpoint Apr 14, 2020
@lbalmaceda lbalmaceda merged commit 2227e81 into master Apr 14, 2020
@lbalmaceda lbalmaceda deleted the add-user-exports branch April 14, 2020 16:23
@jimmyjames jimmyjames modified the milestones: v1-Next, 1.16.0 Apr 24, 2020
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.

Support for POST /api/v2/jobs/users-exports
3 participants