ireceptor-plus / issues

0 stars 0 forks source link

stats API for covid19-1 not working in swagger editor #88

Closed schristley closed 2 years ago

schristley commented 2 years ago

I loaded up the stats API in the swagger editor then used it to send requests. While it works for the IPA1 server, the COVID19-1 server gives an error:

TypeError: Not allowed to request resource
bcorrie commented 2 years ago

This is a weird swagger problem, I think something to do with an non-https entry point. I am pretty sure if you put the CURL command that the swagger editor says it is using into a command line curl command it will work.

This CURL in swagger on covid19-1 fails:

curl -X 'POST' \
  'http://covid19-1.ireceptor.org/irplus/v1/stats/rearrangement/count' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "auth_token": "string",
  "repertoires": [
    {
      "repertoire": {
        "repertoire_id": "5ed6859e99011334ac05e847"
      }
    }
  ],
  "statistics": [
    "rearrangement_count",
    "duplicate_count"
  ]
}'

But it works from the command line.

schristley commented 2 years ago

Oh, duh. I spaced on covid19-1 being http vs https. It's mostly likely this #42 issue then.

bcorrie commented 2 years ago

Certainly something similar... Will close this issue.