Hey folks, I'm struggling to update a build alias via the API using powershell. I can't seem to find the correct body syntax to update the BuildWeightDistribution. I've tried both curl and HTTPie.
https POST https://myid.playfabapi.com/MultiplayerServer/UpdateBuildAlias X-EntityToken:"mytolken" Content-Type:application/json AliasID=eac3d4fd-fae1-4e68-8b82-f8d01c133a66 AliasName=Development BuildSelectionCriteria:="[{"BuildWeightDistribution":{"5584dfb4-4e5d-47bc-9f4c-42b503bb4ce2":"1"}}]"
Result:
'BuildSelectionCriteria:=[{BuildWeightDistribution:{5584dfb4-4e5d-47bc-9f4c-42b503bb4ce2:1}}]': Expecting property name enclosed in double quotes: line 1 column 3 (char 2)
Invoke-WebRequest "https://myid.playfabapi.com/MultiplayerServer/UpdateBuildAlias" -Method POST -Headers @{"Content-Type" = "application/json"; "X-EntityToken" = "mytolken";} -body @{"AliasId" = "eac3d4fd-fae1-4e68-8b82-f8d01c133a66"}
Result
Invoke-WebRequest : {"code":400,"status":"BadRequest","retryAfterSeconds":null,"error":"InvalidRequest","errorCode":1071,"errorMessage":"Invalid JSON in
request","errorHash":"2f36f079c8f0511f52a0125f636ca730","errorDetails":{"ValidationError":["Unexpected character encountered while parsing value: A. Path '', line 0, position 0."]}}
Could i have a sample of the syntax to use to access the BuildWeightDistribution please.
Many thanks.