Change devices details

Change devices details

POST https://api.connect.jfrog.io/v1/devices_details

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

Request Body

NameTypeDescription

apps

array

A list of JSON objects that include the apps and their versions that you want to modify: [{"app_name":"<name>", "version": "<version>"}] Set the <name> as the name of the app (must exist in Connect dashboard) and set the <version> as the version for that app.

tag

string

A tag to add to the device.

user_token

string

This is your account token. Can be found under the Settings category on Connect dashboard.

device_token

string

This is your device token.

device_name

string

A new name for that device.

group

string

The name of the group you want to switch for that device (the group must exist at the dashboard).

software_version

string

Deprecated parameter - Use the apps parameter to modify software versions.

address

string

A new address for that device. Please note, the address will be validated using Google Maps. Available only for Premium/Special plans.

lat

string

A new Latitude for the device. (must be called with the lng parameter). Available only for Premium/Special plans.

lng

string

A new Longitude for the device. (must be called with the lat parameter). Available only for Premium/Special plans.

description

string

The description of the device. Can be anything you want.

{"message": "Success"}

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

Example

import json
import requests



#Connect 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.connect.jfrog.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