Change devices details

Change devices details

POST https://api.upswift.io/v1/devices_details

Using this call you can change the details of your devices.

Request Body

{"message": "Success"}

You can set whichever parameters you would like to change on each request.

Example

import json
import requests



#Upswift tokens
user_token = "<user_token>"
device_token = "<device_token>"

json_content = {'user_token': user_token,
                'device_token': device_token,
                'device_name': 'new_device_name',
                'group': 'Production',
                'tag': 'test_tag',
                'apps': [{'app_name': 'default_app', 'version': 'v1.1'}],
                'description': 'Some kind of description for that device'}

call_request = requests.post("https://api.upswift.io/v1/devices_details", json=json_content)
call_response = json.loads(call_request.text)

if call_request.status_code != 200:
    if call_request.status_code == 429:
        error = "API limit reached"
    else:
        error = call_response["error_message"]
    print(error)

Last updated