Skip to content

Register a User

API Overview

This is the first API used during system initialization. Before performing subsequent actions, create the corresponding account first. Currently, only one account can be created at a time; batch user registration will be provided in a later version.

API URL

POST  Http://{anymetrics_host:anymetrics_port}/anymetrics/api/v1/user/add

For how to obtain anymetrics_host:anymetrics_port, see Calling APIs

Request Parameters

Common Request Parameters (HEADERS)

None

Request Parameters

Parameter Type Required Max Length Description Example Value
account String Yes 32 Account account123
password String Yes 32 Password 12345678
nickname String Yes 64 Username NameTest

Response Parameters

Parameter Type Required Max Length Description Example Value
code String Yes 32 API response code 200
succeess boolean Yes Whether successful true
errorMsg String Yes 512 Error message NULL
detailErrorMsg String Yes 512 Error details returned when the request fails NULL
traceId String Yes 128 traceId fdde343f9ff2dcd70.292.16857691758642861
data String Yes 32 Returned userId 478209624953061376

Request Example

{
    "account":"account123",
    "password":"12345678",
    "nickname":"nickName123"
}

Response Example

{
    "data": "478209624953061376",
    "success": true,
    "code": "200",
    "errorMsg": null,
    "detailErrorMsg": null,
    "traceId": "2bc7df9f294144deab6535e0b2a9b546.155.17234444592120865"
}