util/requests.py
def modify_box(box_json, observation_uuid: str, association_uuid: str, retry=True):
    """
    Modifies a box with a given association_uuid
    :param box_json: JSON of bounding box data
    :param observation_uuid: Observation UUID
    :param association_uuid: UUID in associations table to modify
    :param retry: Retry after authentication failure
    :return: HTTP response JSON if success, else None
    """
    token = check_auth()

    request_data = {
        'observation_uuid': observation_uuid,
        'link_name': 'bounding box',
        'link_value': json.dumps(box_json),
        'mime_type': 'application/json'
    }

    response = requests.put(
        util.utils.get_property('endpoints', 'assoc') + '/{}'.format(association_uuid),
        data=request_data,
        headers={
            'Authorization': 'BEARER {}'.format(token)
        }
    )
    return response.json()

    Modifies a box with a given association_uuid
    :param box_json: JSON of bounding box data
    :param observation_uuid: Observation UUID
    :param association_uuid: UUID in associations table to modify
    :param retry: Retry after authentication failure
    :return: HTTP response JSON if success, else None
    
Modifies a box with a given association_uuid
Modifies a box with a given association_uuid
def modify_box(box_json, observation_uuid: str, association_uuid: str, retry=True):
    token = check_auth()
    request_data = {
        'observation_uuid': observation_uuid,
        'link_name': 'bounding box',
        'link_value': json.dumps(box_json),
        'mime_type': 'application/json'
    }
    response = requests.put(
        util.utils.get_property('endpoints', 'assoc') + '/{}'.format(association_uuid),
        data=request_data,
        headers={
            'Authorization': 'BEARER {}'.format(token)
        }
    )
    return response.json()
def modify_box ( box_json , observation_uuid : str , association_uuid : str , retry = True ) : token = check_auth ( ) request_data = { 'observation_uuid' : observation_uuid , 'link_name' : 'bounding box' , 'link_value' : json . dumps ( box_json ) , 'mime_type' : 'application/json' } response = requests . put ( util . utils . get_property ( 'endpoints' , 'assoc' ) + '/{}' . format ( association_uuid ) , data = request_data , headers = { 'Authorization' : 'BEARER {}' . format ( token ) } ) return response . json ( )
Modifies a box with a given association_uuid
Modifies a box with a given association_uuid
"""
    Modifies a box with a given association_uuid
    :param box_json: JSON of bounding box data
    :param observation_uuid: Observation UUID
    :param association_uuid: UUID in associations table to modify
    :param retry: Retry after authentication failure
    :return: HTTP response JSON if success, else None
    """
HTTP response JSON if success, else None
HTTP response JSON if success else None
box_json
JSON of bounding box data
JSON of bounding box data
observation_uuid
str
None
association_uuid
str
UUID in associations table to modify
UUID in associations table to modify
retry
Retry after authentication failure
Retry after authentication failure