All URIs are relative to https://api.equinix.com/metal/v1
Method | HTTP request | Description |
---|---|---|
CreatePasswordResetToken | Post /reset-password | Create a password reset token |
ResetPassword | Delete /reset-password | Reset current user password |
CreatePasswordResetToken(ctx).Email(email).Execute()
Create a password reset token
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/equinix/equinix-sdk-go/services/metalv1"
)
func main() {
email := "email_example" // string | Email of user to create password reset token
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.PasswordResetTokensApi.CreatePasswordResetToken(context.Background()).Email(email).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PasswordResetTokensApi.CreatePasswordResetToken``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Other parameters are passed through a pointer to a apiCreatePasswordResetTokenRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
string | Email of user to create password reset token |
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
NewPassword ResetPassword(ctx).Execute()
Reset current user password
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/equinix/equinix-sdk-go/services/metalv1"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.PasswordResetTokensApi.ResetPassword(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `PasswordResetTokensApi.ResetPassword``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ResetPassword`: NewPassword
fmt.Fprintf(os.Stdout, "Response from `PasswordResetTokensApi.ResetPassword`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiResetPasswordRequest struct via the builder pattern
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]