Returns json data a message.

  • URL
    https://short.admicro.vn/api/alias-update

  • Method:
    POST

  • Header Params
    Required: token=[string]

  • Data Params
    Required: { old_alias = [string], new_alias = [string] }

  • Success Response:

    • Content: { msg : "success" }

  • Error Response:

    • Content:
      { error : "Token is invalid" } ||
      { msg : "parameters invalid" } ||
      {msg : "alias invalid" } ||
      { msg : "Old alias not found" } ||
      {msg : "New alias already exists" } ||
      { msg : "Alias ​​must be not null and must be different" }
       

Sample Call:

$.ajax({

    url: "https://short.admicro.vn/api/alias-update",

    headers: {"token": "1ee8be85a91e3600816fad0a38401cc"},

    dataType: "json",

    data: {"old_alias": "X3sW8D","new_alias" : "test-ajax"},

    type : "POST",

    success : function(r) {

      console.log(r);

    }

});