Alteryx Server Discussions

Find answers, ask questions, and share expertise about Alteryx Server.

Server API update workflow not working

14 - Magnetar

I am trying to update an existing workflow using the endpoint PUT /v3/workflows/{workflowId}. I have created the updateWorkflowContract and have the workflowId on another field. The response that I am getting is this:

Server API PUT (12) The request to failed with an HTTP 400 Bad Request error. Error message: The request is invalid.


I get the same response if I try from Swagger. I have already tried inserting another number, higher and lower, for the version ID, but nothing works. 


Ultimately what I am trying to do is to change a series of workflows from public to private. The user running the API call is not the owner of the workflow, but it's a curator. I have added the user to the studio where the workflow is located, no luck. 





  "name": "challenge_8_start_file",
  "versionId": "1",
  "makePublished": true,
  "ownerId": "5f8490490ecb3409443f39d2",
  "workerTag": "",
  "districtTags": [
  "comments": "",
  "isPublic": false,
  "isReadyForMigration": false,
  "othersMayDownload": true,
  "othersCanExecute": true,
  "executionMode": "Standard",
  "hasPrivateDataExemption": false







  "message": "The request is invalid.",
  "modelState": {
    "updateWorkflowContract.VersionId": [
      "The provided version ID is invalid."




The published workflow version is 1.


Server version: 2022.1.1.30961



@gabrielvilella - The reason you're getting that error is because you're using the versionNumber value instead from your workflow instead of the versionId. 


  • In order to get the versionId value for your workflow, you will need to use the GET /v3/workflows/{workflowId} endpoint. 
  • The GET /v3/workflows/ endpoint will only return the versionNumber for your workflows and not the needed versionId.