I am trying to work on an external Python script that will allow me to update values stored in standard datastore. The idea is to be able to configure certain game attributes like increasing coins to be awarded without logging into Roblox Studio.
Below is the Python script that I am using
query_params = {
"entryKey": 3518363222,
"datastoreName": "PlayerAwards"
}
update_attributes = {"Date": '2023/05/04', "Count": 2}
headers = {
"x-api-key": TOKEN_ID,
"roblox-entry-attributes": json.dumps(update_attributes)
}
response = requests.post(f"{BASE_URL}/datastores/v1/universes/{UNIVERSE_ID}/standard-datastores/datastore/entries/entry", params = query_params, headers = headers)
print(response.json())
Below is the response that I am getting from response.json
{‘error’: ‘INVALID_ARGUMENT’, ‘message’: ‘Invalid content length, it should be positive.’, ‘errorDetails’: [{‘errorDetailType’: ‘DatastoreErrorInfo’, ‘datastoreErrorCode’: ‘InvalidContentLength’}]}
I am able to run other APIs like get on the same datastore so I know all other configuration is correct