Update Thing Name

This guide will show you how you can update your Thing anem via API.

Please note that in order to update Thing description we will need to run 2 API commands:

1. Get Thing cas value

2. Update Thing Information

1st API command - get Thing cas value

Get Thing information

GET https://console.monogoto.io/thing/ThingId_ICCID_{ICCID}

Path Parameters

NameTypeDescription

ICCID*

String

The ICCID of your SIM

Headers

NameTypeDescription

YOUR_TOKEN*

String

Your authentication token

{
  "Type": "string",
  "PricePlanInnerId": "string",
  "ThingId": "string",
  "CustomerId": "string",
  "ThingName": "string",
  "ThingDescription": "string",
  "ThingsGroupId": "string",
  "ExternalUniqueId": "string",
  "ExternalUniqueType": "string",
  "ExternalBatchId": "string",
  "BatchId": "string",
  "SubProfId": "string",
  "NetworkProviderId": "string",
  "RoamingPolicyId": "string",
  "GeoDistance": 0,
  "ThingTag": [
    "string"
  ],
  "Latitude": 0,
  "Longitude": 0,
  "FencingRadius": 0,
  "UnavailabilityTime": "2022-05-30T09:53:47.060Z",
  "IPv4": "string",
  "IPv4PoolId": "string",
  "IPv4AllocationPolicy": "string",
  "IPv4Lock": true,
  "IPv6": "string",
  "IPv6PoolId": "string",
  "IPv6AllocationPolicy": "string",
  "IPv6Lock": true,
  "FwBlockAttempts": 0,
  "StreetAddress": "string",
  "Remarks": "string",
  "hss": {
    "serviceSelection": "string",
    "pdnType": 0,
    "vplmnDynamicAddressAllowed": 0,
    "PDNgwAllocationType": 0,
    "ambr": {
      "maxRequestedBandwidthUL": 0,
      "maxRequestedBandwidthDL": 0
    },
    "epsQos": {
      "qosClassIden": 0,
      "priorityLevel": 0,
      "preemptionCapability": 0,
      "preemptionVulnerability": 0
    }
  },
  "State": "string",
  "BillingState": "string",
  "DateCreated": 0,
  "DateModified": 0,
  "DateAssignedToCustomer": 0,
  "IMEI": "string",
  "MasterIMEI": "string",
  "LockMasterImei": true,
  "IMSI": "string",
  "MSISDN": "string",
  "VcsAccountId": "string",
  "LastLocation": {
    "Timestamp": 0,
    "Type": "string",
    "Latitude": 0,
    "MCC": "string",
    "MNC": "string",
    "Longitude": 0,
    "AccuracyInKM": 0,
    "IMSI": "string",
    "IsLocationTypeAccurate": true,
    "CellId": 0,
    "Lac": 0
  },
  "LastAccuracyLocation": {
    "Timestamp": 0,
    "Type": "string",
    "Latitude": 0,
    "MCC": "string",
    "MNC": "string",
    "Longitude": 0,
    "AccuracyInKM": 0,
    "IMSI": "string",
    "IsLocationTypeAccurate": true,
    "CellId": 0,
    "Lac": 0
  },
  "RoamingRestrictions": [
    {
      "BlockRoaming": true,
      "BlockSMS": true,
      "BlockMOVoiceFlag": true,
      "BlockMTVoiceFlag": true,
      "DataRestrictionByterateLimit": "string",
      "MNOId": "string",
      "Preferred": true,
      "RoamingPartnerId": 0,
      "RoamingPlanId": "string",
      "ByterateFlag": true,
      "BlockMOSMSFlag": true
    }
  ],
  "Block": {
    "Data2G": true,
    "Data": true,
    "LTEData": true,
    "Data5G": true,
    "SMS_MO": true,
    "SMS_MT": true,
    "Supplementary_Services": true,
    "Voice_International": true,
    "Voice_International_Exc_Home": true,
    "Voice_MO": true,
    "Voice_MT": true,
    "Voice_Premium": true
  },
  "ActualUsage": {
    "MO_SMS_CDR_": 0,
    "Data_": 0,
    "Voice_": 0,
    "Alarm": 0
  },
  "APN": {
    "ShortId": "string",
    "DateModified": "string",
    "Name": "string",
    "ApnId": "string",
    "Description": "string",
    "IpRange": "string",
    "Ipv6Range": "string",
    "Type": "string",
    "InterfaceName": "string",
    "ServedByJpU": true,
    "DynamicIPAddress": true,
    "pdpsub": {
      "Delay-Class": 0,
      "Mean-Throughput": 0,
      "Pdp-ContextId": 0,
      "Peak-Throughput": 0,
      "Precedence-Class": 0,
      "Reliability-Class": 0,
      "PreferredDataMode": 0,
      "NonIpDataDelvMechanism": 0,
      "NonIPPDNTypeIndicator": 0,
      "qos": {
        "Delivery-Of-Erroneous-SDU": 0,
        "Delivery-Order": 0,
        "Guaranteed-Bit-Rate-For-DownLink": 0,
        "Guaranteed-Bit-Rate-For-Uplink": 0,
        "Guaranteed-Bit-Rate-ForDownlink(extended)": 0,
        "Maximum-Bit-Rate-For-Downlink": 0,
        "Maximum-Bit-Rate-For-Downlink(extended)": 0,
        "Maximum-Bit-Rate-For-Uplink": 0,
        "Maximum-SDU-Size": 0,
        "Priority": 0,
        "Residual-BER": 0,
        "SDU-Error-Ratio": 0,
        "Signaling-Indication": 0,
        "Source-Statistics-Descriptor": 0,
        "Traffic-Class": 0,
        "Traffic-Handling-Priority": 0,
        "Transfer-Delay": 0
      }
    }
  },
  "cas": "string"
}

Add your Thing ICCID and Token in the GET request to successfully obtain the Thing info.

Example using cURL:

curl -X GET \
     --url "https://console.monogoto.io/thing/ThingId_ICCID_{THING_ICCID}/" \
     -H "accept: application/json" \
     -H "Authorization: Bearer {YOUR_TOKEN}"

Example of response to our request:

      "State": "ACTIVE",
      "Status": "Serving",
      "SubProfId": "SubProfId_5652ayf1-er9c-4914-a60b-630cc4af0a2b",
      "ThingId": "ThingId_ICCID_8912372646888991",
      "Type": "MobileSubscriber",
      "VcsAccountId": null,
      "cas": 1236781245913489491,
      "ActualUsage": {
        "MO_SMS_CDR_": 3,
        "Data_": 45919688,
        "Voice_": 0,
        "Alarm": 0

2nd API command - Update Thing Information

Put Thing information

PUT https://console.monogoto.io/thing/update

Headers

NameTypeDescription

YOUR_TOKEN*

String

Your authentication token

Request Body

NameTypeDescription

ICCID*

String

The ICCID of your SIM

NEW_NAME*

String

Name you wish your Thing to have

CAS*

String

Value to confirm that you are using latest information for Thing

{
  "PricePlanInnerId": "string",
  "ThingId": "string",
  "ThingName": "string",
  "ThingDescription": "string",
  "ThingsGroupId": "string",
  "NetworkProviderId": "string",
  "RoamingPolicyId": "string",
  "ThingTag": [
    "string"
  ],
  "Latitude": 0,
  "Longitude": 0,
  "FencingRadius": 0,
  "UnavailabilityTime": "2022-06-21T10:57:26.629Z",
  "IPv4": "string",
  "IPv4Lock": true,
  "IPv6": "string",
  "IPv6Lock": true,
  "PIN1": "string",
  "PIN2": "string",
  "PUK1": "string",
  "PUK2": "string",
  "FwBlockAttempts": 0,
  "StreetAddress": "string",
  "Remarks": "string",
  "MasterIMEI": "string",
  "LockMasterImei": true,
  "MSISDN": "string",
  "RoamingPolicies": [
    {
      "NetworkProviderId": "string",
      "RoamingPolicyId": "string",
      "RoamingRestrictions": [
        {
          "BlockRoaming": true,
          "BlockSMS": true,
          "BlockMOVoiceFlag": true,
          "BlockMTVoiceFlag": true,
          "DataRestrictionByterateLimit": "string",
          "MNOId": "string",
          "Preferred": true,
          "RoamingPartnerId": 0,
          "RoamingPlanId": "string",
          "ByterateFlag": true,
          "BlockMOSMSFlag": true
        }
      ]
    }
  ],
  "Block": {
    "Data2G": true,
    "Data": true,
    "LTEData": true,
    "Data5G": true,
    "SMS_MO": true,
    "SMS_MT": true,
    "Supplementary_Services": true,
    "Voice_International": true,
    "Voice_International_Exc_Home": true,
    "Voice_MO": true,
    "Voice_MT": true,
    "Voice_Premium": true
  },
  "SimType": "string",
  "cas": "string",
  "PricePlans": [
    {
      "NetworkProviderId": "string",
      "PricePlanInnerId": "string",
      "Override": false
    }
  ]
}

Example using cURL:

curl -X PUT \
   --url "https://console.monogoto.io/thing/update/" \
   -H "accept: application/json" \
   -H "Content-Type: application/json" \
   -H "Authorization: Bearer {YOUR_TOKEN}" \
   -d "{ \"ThingId\": \"ThingId_ICCID_{ICCID}\", \"ThingName\": \"{NEW_NAME}\", \"cas\": \"{CAS}\"}"

Expected response:

{
    Thing undefined successfully saved.
}

Last updated