Skip to content

Commit 17f5a12

Browse files
committed
DSpace#211: type request param name change to avoid confusion with rest object type &
error codes endpoint changes + IT: - missing/wrong query param accountRequestType => 400 bad request - email not valid domain => 422 unprocessable entity
1 parent b38979c commit 17f5a12

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

epersonregistrations.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Also exposes whether it's a new user registration, or a password reset for an ex
3333
```
3434

3535
## Create new EPerson registration
36-
**POST /api/eperson/registrations**
36+
**POST /api/eperson/registrations?accountRequestType={requestType_forgot_or_register}**
3737

3838
To create a new EPerson registration, perform a post with the JSON below to the eperson registrations endpoint (without being authenticated).
3939

@@ -44,7 +44,7 @@ To create a new EPerson registration, perform a post with the JSON below to the
4444
}
4545
```
4646

47-
Requires query parameter 'type' set with either 'register' or 'forgot' value, depending on the action requested.
47+
Requires query parameter 'accountRequestType' set with either 'register' or 'forgot' value, depending on the action requested.
4848

4949
No other properties can be set (e.g. the name cannot be defined)
5050
If successful, an email will be sent with a token allowing the user to continue the registration
@@ -53,9 +53,10 @@ Verifying whether a new registration can be created can happen using the "eperso
5353

5454
Status codes:
5555
* 201 Created - if the operation succeed
56-
* 400 Bad Request - if e.g. the e-mail address is in a domain that is not allowed in config `authentication-password.domain.valid`
56+
* 400 Bad Request - if e.g. the query param 'accountRequestType' is not present or contains something else than forgot or register
5757
* 401 Unauthorized - if registration is disabled, you are not authorized to create a new registration
58-
* 422 Unprocessable Entity - if the email address was omitted
58+
* 422 Unprocessable Entity - if the email address was omitted or the e-mail address is in a domain that is not allowed in config `authentication-password.domain.valid`
59+
5960

6061
## Forgot password
6162

0 commit comments

Comments
 (0)