MW API DOCUMENTATION
Get Term Condition
GET
API_END_POINT/mw_term_condition/
Terminology:
MW: the short name of MagicWeaver
CP: the short name of Client Partner who is a business client of MagicWeaver
MW-X-SECRET: A long secret/password string, provided by MW. It is shared by MW and CP for authenticating sign-in and sign-up requests and passing user information from CP sides to MW with encryption.
JWT: an encrypted token generate with jwt module of Python or other software with same algorithm
MW-JWT: is generated by MW server, used for authenticating service access and identifying user
MW-X-JWT: is generated by MW server or/and CP server with exactly same algorithm and secret key string. MW and CP use it for identifying each other for data and information exchange. For example, MW uses it to identify a CP and authenticate service access.
CP-JWT: is generated by CP server, used for authenticating their service access and identifying user account
Sign up
POST
API_END_POINT/sign_up/<partner>/
This endpoint allows you to get free cakes.
Path Parameters
Name | Type | Description |
---|---|---|
partner | string | partner short name e.g. 'MW' |
Request Body
Name | Type | Description |
---|---|---|
"json" | string | {“email”: “xxx@xxx.xxx”, ”password”: “xxxxxxxxxx”} |
Sign in from mw app
POST
API_END_POINT/sign_in/<partner>
Path Parameters
Name | Type | Description |
---|---|---|
partner | string | partner short name e.g. 'MW' |
Request Body
Name | Type | Description |
---|---|---|
"json" | string | {"email": "xxx@xxx.xxx", "password": "xxxxxxxxxx"} |
Sign in from CP app
POST
API_END_POINT/sign_in/<partner>
Path Parameters
Name | Type | Description |
---|---|---|
partner | string | partner short name e.g. 'MW' |
Request Body
Name | Type | Description |
---|---|---|
"json" | string | {"mw_x_jwt": MW-X-JWT string} |
Reset Password
POST
API_END_POINT/request_reset_passwd/<partner>/
Path Parameters
Name | Type | Description |
---|---|---|
partner | string | partner short name e.g. 'MW' |
Request Body
Name | Type | Description |
---|---|---|
"json" | string | {"email": "useremail@xxx.com"} |
POST
API_END_POINT/change_passwd/
Request Body
Name | Type | Description |
---|---|---|
"json" | string | { "old_password": "test", "new_password": "Wide", "confirm_password": "Wide"} |
Create Profile
POST
API_END_POINT/create_profile/
Headers
Name | Type | Description |
---|---|---|
"mw-jwt" | string |
|
Request Body
Name | Type | Description |
---|---|---|
json | string |
|
Delete profile
POST
API_END_POINT/delete_profile_by_id/<profile_id>/
Path Parameters
Name | Type | Description |
---|---|---|
profile_id | string |
Headers
Name | Type | Description |
---|---|---|
mw-jwt | string | MW_JWT string(obtained when sign in) |
Update profile
POST
API_END_POINT/update_profile/<profile_id>
Path Parameters
Name | Type | Description |
---|---|---|
profile_id | string |
Headers
Name | Type | Description |
---|---|---|
mw-jwt | string | MW_JWT string(obtained when sign in) |
Request Body
Name | Type | Description |
---|---|---|
json | string |
|
Update measurements
POST
API_END_POINT/update_measurements/<profile_id>/
Path Parameters
Name | Type | Description |
---|---|---|
profile_id | string |
Headers
Name | Type | Description |
---|---|---|
mw-jwt | string | MW_JWT string(obtained when sign in) |
Request Body
Name | Type | Description |
---|---|---|
json | string |
|
Show 3D Model
GET
API_END_POINTshow_3d_models_in_js_viewer_by_profile_id/<profile_id>/
Path Parameters
Name | Type | Description |
---|---|---|
profile_id | string |
Headers
Name | Type | Description |
---|---|---|
mw-jwt | string | MW_JWT string(obtained when sign in) |
Ger Profile Measurements
POST
API_END_POINT/get_measurements_by_profile_id/<profile_id>/
Path Parameters
Name | Type | Description |
---|---|---|
profile_id | string |
Headers
Name | Type | Description |
---|---|---|
mw-jwt | string | MW_JWT string(obtained when sign in) |
Request Body
Name | Type | Description |
---|---|---|
json | string | { "parts": [], # names of body parts to calculate measurement for } |
Get Profile Info
GET
API_END_POINT/get_profile_info_by_id/<profile_id>/
Path Parameters
Name | Type | Description |
---|---|---|
profile_id | string |
Headers
Name | Type | Description |
---|---|---|
mw-jwt | string | MW_JWT string(obtained when sign in |
List Profiles
GET
API_END_POINT/list_profiles/app_list/<sort_method>/
Path Parameters
Name | Type | Description |
---|---|---|
sort_method | string | "time" or "name" or "process_status" |
Headers
Name | Type | Description |
---|---|---|
mw-jwt | string | MW_JWT string(obtained when sign in) |
Get Single Profile
GET
API_END_POINT/list_profiles/app_list/<sort_method>/
Path Parameters
Name | Type | Description |
---|---|---|
profile_id | string |
Headers
Name | Type | Description |
---|---|---|
mw-jwt | string | MW_JWT string(obtained when sign in) |
GET
API_END_POINT/get_app_config
Path Parameters
Name | Type | Description |
---|---|---|
string |
Last updated