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

Handling json object with an array #6

Open
aivgi opened this issue Sep 1, 2024 · 0 comments
Open

Handling json object with an array #6

aivgi opened this issue Sep 1, 2024 · 0 comments

Comments

@aivgi
Copy link

aivgi commented Sep 1, 2024

1ST THING

This is just AWESOME!

EXAMPLE RESPONSE

This is the response from my API

{
  "data": [
    {
      "scanId": "609a746a-1263-422d-b0c9-4a941bc8fdd5",
      "scanIndex": 20,
      "environmentName": "Default",
      "environmentId": "37971b21-8002-49bf-9727-a0ac8abf65ba",
      "progressPrecentage": 100,
      "status": "Completed",
      "apis": 12,
      "issues": 25,
      "highIssues": 10,
      "mediumIssues": 8,
      "lowIssues": 6,
      "infoIssues": 1,
      "duration": "00:00:33.684",
      "date": "2024-09-01T23:36:23.397548+00:00",
      "testProfileId": "62f5921c-d200-4f6f-a104-29674ad30a94",
      "workerPool": "default_pool",
      "applicationId": "35a579eb-036e-43e7-b682-0984dc1c45f0"
    }
  ]
}

CONTEXT

I'm trying to capture the value for data[0].highIssues

EXPECTED BEHAVIOR

      - name: Check API Status
        uses: mydea/action-wait-for-api@v1
        with:
          url: ${{env.SCAN_URL}}
          expected-response-field: "data[0].highIssues"
          expected-response-field-value: "10"
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

1 participant