Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HTTP request, save in variables #1569

Open
mat-ti opened this issue Jun 12, 2024 · 3 comments
Open

HTTP request, save in variables #1569

mat-ti opened this issue Jun 12, 2024 · 3 comments

Comments

@mat-ti
Copy link

mat-ti commented Jun 12, 2024

I'm using the HTTP Request Integration to run a Job Template in AWX. With the ID of the Job a started I'll do the 2nd request to get the result.

URL: http://awx.domain.net/api/v2/jobs/{{awx_job_id}}/
When I press the button "Test the request" I receive valid data, which looks like this stripped down snippet:

  "statusCode": 200,
  "data": {
    "id": 487,
    "type": "job",
    "url": "/api/v2/jobs/487/",
    "created": "2024-06-12T10:08:00.069585Z",
    "modified": "2024-06-12T10:08:00.513772Z",
    "job_type": "run",
    "project": 27,
    "status": "successful",
    "failed": false,
    "started": "2024-06-12T10:08:00.710642Z",
    "finished": "2024-06-12T10:08:11.602719Z"
    },
    "job_template": 59,
    "webhook_guid": "",
    "host_status_counts": {
      "ok": 1
    },
    "custom_virtualenv": null
  }
}

While im Testing the complete flow, the request is still working, but typebot seems to have an issue to safe the Response in the variables. My Check for printing these variables is here:

data.status: running (should be successful)
data.id 487
data.failed: false
data.started: 2024-06-12T10:08:00.710642Z
data.finished: (should be a timestamp like above)

Thanks you for helping me out.

@baptisteArno
Copy link
Owner

Can you provide a reproduction? I don't understand the issue.

@mat-ti
Copy link
Author

mat-ti commented Jun 13, 2024

Sorry for my misleading spelling. The HTTP request shows me all the data and I can also see in my response that valid data is coming back. The same HTTP response is made in the flow. This data is saved in a variable and then output using the text module. The content of the variable is then empty or has a different value.
The background is that I want to query the status of the AWX job and wait for it to be successful, but the variable then says e.g. pending

@baptisteArno
Copy link
Owner

Can you provide a reproduction? I need to reproduce the bug you are mentioning

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants