All URIs are relative to https://smac-poc.mcs-group.com.my/
Method | HTTP request | Description |
---|---|---|
ApiUsersAssociatedSmacsGet | GET /api/Users/associated-smacs | Gets the SMACs associated with the user. |
ApiUsersAuthenticatePost | POST /api/Users/authenticate | Performs user authentication. |
ApiUsersForgotPasswordPost | POST /api/Users/forgot-password | Initiates password reset procedure. |
ApiUsersRefreshTokenPost | POST /api/Users/refresh-token | Retrieves new access token. |
ApiUsersRegisterPost | POST /api/Users/register | Register an account. |
ApiUsersResendEmailConfirmationPost | POST /api/Users/resend-email-confirmation | Resend email confirmation. |
ApiUsersRevokeTokenPost | POST /api/Users/revoke-token | Revokes a refresh token. |
ApiUsersRolesPost | POST /api/Users/roles | Gets the authenticated user's roles. |
ApiUsersUploadProfilePhotoPost | POST /api/Users/upload-profile-photo | Uploads current user profile photo. |
ApiUsersUserProfilePost | POST /api/Users/user-profile | Gets the current user profile. |
AssociatedSmacsResponse ApiUsersAssociatedSmacsGet ()
Gets the SMACs associated with the user.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class ApiUsersAssociatedSmacsGetExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://smac-poc.mcs-group.com.my/";
// Configure Bearer token for authorization: bearer
config.AccessToken = "YOUR_BEARER_TOKEN";
var apiInstance = new UsersApi(config);
try
{
// Gets the SMACs associated with the user.
AssociatedSmacsResponse result = apiInstance.ApiUsersAssociatedSmacsGet();
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling UsersApi.ApiUsersAssociatedSmacsGet: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Gets the SMACs associated with the user.
ApiResponse<AssociatedSmacsResponse> response = apiInstance.ApiUsersAssociatedSmacsGetWithHttpInfo();
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling UsersApi.ApiUsersAssociatedSmacsGetWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Success | - |
403 | Forbidden | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AuthenticateResponse ApiUsersAuthenticatePost (AuthenticateRequest authenticateRequest = null)
Performs user authentication.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class ApiUsersAuthenticatePostExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://smac-poc.mcs-group.com.my/";
var apiInstance = new UsersApi(config);
var authenticateRequest = new AuthenticateRequest(); // AuthenticateRequest | (optional)
try
{
// Performs user authentication.
AuthenticateResponse result = apiInstance.ApiUsersAuthenticatePost(authenticateRequest);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling UsersApi.ApiUsersAuthenticatePost: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Performs user authentication.
ApiResponse<AuthenticateResponse> response = apiInstance.ApiUsersAuthenticatePostWithHttpInfo(authenticateRequest);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling UsersApi.ApiUsersAuthenticatePostWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
authenticateRequest | AuthenticateRequest | [optional] |
No authorization required
- Content-Type: application/json-patch+json, application/json, text/json, application/*+json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Authenticated | - |
400 | Incorrect credential provided | - |
401 | Unauthorized | - |
403 | Forbidden | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
string ApiUsersForgotPasswordPost (EmailRequest emailRequest = null)
Initiates password reset procedure.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class ApiUsersForgotPasswordPostExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://smac-poc.mcs-group.com.my/";
var apiInstance = new UsersApi(config);
var emailRequest = new EmailRequest(); // EmailRequest | (optional)
try
{
// Initiates password reset procedure.
string result = apiInstance.ApiUsersForgotPasswordPost(emailRequest);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling UsersApi.ApiUsersForgotPasswordPost: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Initiates password reset procedure.
ApiResponse<string> response = apiInstance.ApiUsersForgotPasswordPostWithHttpInfo(emailRequest);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling UsersApi.ApiUsersForgotPasswordPostWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
emailRequest | EmailRequest | [optional] |
string
No authorization required
- Content-Type: application/json-patch+json, application/json, text/json, application/*+json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Success | - |
400 | Bad Request | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
AuthenticateResponse ApiUsersRefreshTokenPost (RefreshTokenRequest refreshTokenRequest = null)
Retrieves new access token.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class ApiUsersRefreshTokenPostExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://smac-poc.mcs-group.com.my/";
var apiInstance = new UsersApi(config);
var refreshTokenRequest = new RefreshTokenRequest(); // RefreshTokenRequest | (optional)
try
{
// Retrieves new access token.
AuthenticateResponse result = apiInstance.ApiUsersRefreshTokenPost(refreshTokenRequest);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling UsersApi.ApiUsersRefreshTokenPost: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Retrieves new access token.
ApiResponse<AuthenticateResponse> response = apiInstance.ApiUsersRefreshTokenPostWithHttpInfo(refreshTokenRequest);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling UsersApi.ApiUsersRefreshTokenPostWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
refreshTokenRequest | RefreshTokenRequest | [optional] |
No authorization required
- Content-Type: application/json-patch+json, application/json, text/json, application/*+json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Success | - |
400 | Bad Request | - |
401 | Refresh token expired | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
string ApiUsersRegisterPost (RegisterRequest registerRequest = null)
Register an account.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class ApiUsersRegisterPostExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://smac-poc.mcs-group.com.my/";
var apiInstance = new UsersApi(config);
var registerRequest = new RegisterRequest(); // RegisterRequest | (optional)
try
{
// Register an account.
string result = apiInstance.ApiUsersRegisterPost(registerRequest);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling UsersApi.ApiUsersRegisterPost: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Register an account.
ApiResponse<string> response = apiInstance.ApiUsersRegisterPostWithHttpInfo(registerRequest);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling UsersApi.ApiUsersRegisterPostWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
registerRequest | RegisterRequest | [optional] |
string
No authorization required
- Content-Type: application/json-patch+json, application/json, text/json, application/*+json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Success | - |
400 | Bad Request | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
string ApiUsersResendEmailConfirmationPost (EmailRequest emailRequest = null)
Resend email confirmation.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class ApiUsersResendEmailConfirmationPostExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://smac-poc.mcs-group.com.my/";
var apiInstance = new UsersApi(config);
var emailRequest = new EmailRequest(); // EmailRequest | (optional)
try
{
// Resend email confirmation.
string result = apiInstance.ApiUsersResendEmailConfirmationPost(emailRequest);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling UsersApi.ApiUsersResendEmailConfirmationPost: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Resend email confirmation.
ApiResponse<string> response = apiInstance.ApiUsersResendEmailConfirmationPostWithHttpInfo(emailRequest);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling UsersApi.ApiUsersResendEmailConfirmationPostWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
emailRequest | EmailRequest | [optional] |
string
No authorization required
- Content-Type: application/json-patch+json, application/json, text/json, application/*+json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Success | - |
400 | Bad Request | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
string ApiUsersRevokeTokenPost (RevokeTokenRequest revokeTokenRequest = null)
Revokes a refresh token.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class ApiUsersRevokeTokenPostExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://smac-poc.mcs-group.com.my/";
// Configure Bearer token for authorization: bearer
config.AccessToken = "YOUR_BEARER_TOKEN";
var apiInstance = new UsersApi(config);
var revokeTokenRequest = new RevokeTokenRequest(); // RevokeTokenRequest | (optional)
try
{
// Revokes a refresh token.
string result = apiInstance.ApiUsersRevokeTokenPost(revokeTokenRequest);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling UsersApi.ApiUsersRevokeTokenPost: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Revokes a refresh token.
ApiResponse<string> response = apiInstance.ApiUsersRevokeTokenPostWithHttpInfo(revokeTokenRequest);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling UsersApi.ApiUsersRevokeTokenPostWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
revokeTokenRequest | RevokeTokenRequest | [optional] |
string
- Content-Type: application/json-patch+json, application/json, text/json, application/*+json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Success | - |
400 | Bad Request | - |
404 | Not Found | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
List<string> ApiUsersRolesPost ()
Gets the authenticated user's roles.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class ApiUsersRolesPostExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://smac-poc.mcs-group.com.my/";
// Configure Bearer token for authorization: bearer
config.AccessToken = "YOUR_BEARER_TOKEN";
var apiInstance = new UsersApi(config);
try
{
// Gets the authenticated user's roles.
List<string> result = apiInstance.ApiUsersRolesPost();
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling UsersApi.ApiUsersRolesPost: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Gets the authenticated user's roles.
ApiResponse<List<string>> response = apiInstance.ApiUsersRolesPostWithHttpInfo();
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling UsersApi.ApiUsersRolesPostWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
This endpoint does not need any parameter.
List
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Success | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UploadPhotoResponse ApiUsersUploadProfilePhotoPost (UploadPhotoRequest uploadPhotoRequest = null)
Uploads current user profile photo.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class ApiUsersUploadProfilePhotoPostExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://smac-poc.mcs-group.com.my/";
// Configure Bearer token for authorization: bearer
config.AccessToken = "YOUR_BEARER_TOKEN";
var apiInstance = new UsersApi(config);
var uploadPhotoRequest = new UploadPhotoRequest(); // UploadPhotoRequest | The request parameters (optional)
try
{
// Uploads current user profile photo.
UploadPhotoResponse result = apiInstance.ApiUsersUploadProfilePhotoPost(uploadPhotoRequest);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling UsersApi.ApiUsersUploadProfilePhotoPost: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Uploads current user profile photo.
ApiResponse<UploadPhotoResponse> response = apiInstance.ApiUsersUploadProfilePhotoPostWithHttpInfo(uploadPhotoRequest);
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling UsersApi.ApiUsersUploadProfilePhotoPostWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
Name | Type | Description | Notes |
---|---|---|---|
uploadPhotoRequest | UploadPhotoRequest | The request parameters | [optional] |
- Content-Type: application/json-patch+json, application/json, text/json, application/*+json
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Success | - |
400 | Bad Request | - |
403 | Forbidden | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
UserProfileResponse ApiUsersUserProfilePost ()
Gets the current user profile.
using System.Collections.Generic;
using System.Diagnostics;
using Org.OpenAPITools.Api;
using Org.OpenAPITools.Client;
using Org.OpenAPITools.Model;
namespace Example
{
public class ApiUsersUserProfilePostExample
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://smac-poc.mcs-group.com.my/";
// Configure Bearer token for authorization: bearer
config.AccessToken = "YOUR_BEARER_TOKEN";
var apiInstance = new UsersApi(config);
try
{
// Gets the current user profile.
UserProfileResponse result = apiInstance.ApiUsersUserProfilePost();
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling UsersApi.ApiUsersUserProfilePost: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
This returns an ApiResponse object which contains the response data, status code and headers.
try
{
// Gets the current user profile.
ApiResponse<UserProfileResponse> response = apiInstance.ApiUsersUserProfilePostWithHttpInfo();
Debug.Write("Status Code: " + response.StatusCode);
Debug.Write("Response Headers: " + response.Headers);
Debug.Write("Response Body: " + response.Data);
}
catch (ApiException e)
{
Debug.Print("Exception when calling UsersApi.ApiUsersUserProfilePostWithHttpInfo: " + e.Message);
Debug.Print("Status Code: " + e.ErrorCode);
Debug.Print(e.StackTrace);
}
This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
Status code | Description | Response headers |
---|---|---|
200 | Success | - |
401 | Unauthorized | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]