Skip to main content

New

Basic

This method interacts with the Basic New endpoint to retrieve an empty resource pre-filled with default values.

Usage

const response = await userService.new();

Parameters

ParameterTypeDescription
axiosRequestConfigAxiosRequestConfig (optional)Axios request configuration for fine-tuning the HTTP request.

Response

PropTypeDescription
successbooleanIndicates whether the request was successful.
statusnumberHTTP status code of the response.
messagestringA message providing additional information about the response, especially in case of errors.
rawobjectRaw data received from the server.
dataModelParsed data represented as an array of Model instances.
headersobject[AxiosHeaders]Axios headers associated with the response.
{
success: true,
status: 200,
raw: {
_id: '975c0e8b955c6379056783ac',
name: '',
role: 'user',
public: false,
_permissions: {}
},
data: Model {
_id: [Getter/Setter],
name: [Getter/Setter],
role: [Getter/Setter],
public: [Getter/Setter],
_permissions: [Getter/Setter]
},
headers: Object [AxiosHeaders] {}
}