Apollo icon indicating copy to clipboard operation
Apollo copied to clipboard

Web service calls for ShowStatus and Update status not working as expected

Open childers opened this issue 1 year ago • 1 comments

We have two status options for annotations, and these have to be manually updated for each new organism. The only way I can sort out how to do it is through the admin interface, which is clunky, and I can't seem to get the web service calls set right to add in the new organism to these statuses. The reason I'm looking into using the web service calls directly is that it is that the web interface is less manageable as we get up to a hundred organisms, and it would also be nice to script this as part of our onboarding process.

When I try the web service endpoint, it gives limited information only for the FeatureTypes (e.g. gene, mRNA, etc). It does not return any information on what organisms have this status available.

One option would be to add in options for "all", so the status can be globally available. This would be nice to have on both the FeatureType and the Organism fields.

Alternatively, is there something I am just missing when making these calls? What does the command need to look like to get the list of organisms?

Ideally, I'd just like to add my new organism to a status, but I could also handle two calls, one to get a list of all organisms, then a second call to update the status with the full list.

For reference, here is the JSON returned when I use showStatus for "Approved". curl -i -X POST -H "Content-Type: application/json" -d '{ "username": "<user>", "password": "<pass>", name: "Approved"}' https://<server>/apollo/availableStatus/showStatus

  "class": "org.bbop.apollo.AvailableStatus",
  "id": 2524193,
  "featureTypes": [
    {
      "class": "org.bbop.apollo.FeatureType",
      "id": 16
    },
    {
      "class": "org.bbop.apollo.FeatureType",
      "id": 10
    },
    {
      "class": "org.bbop.apollo.FeatureType",
      "id": 6
    },
    {
      "class": "org.bbop.apollo.FeatureType",
      "id": 7
    },
    {
      "class": "org.bbop.apollo.FeatureType",
      "id": 5
    },
    {
      "class": "org.bbop.apollo.FeatureType",
      "id": 12
    },
    {
      "class": "org.bbop.apollo.FeatureType",
      "id": 13
    },
    {
      "class": "org.bbop.apollo.FeatureType",
      "id": 14
    },
    {
      "class": "org.bbop.apollo.FeatureType",
      "id": 8
    },
    {
      "class": "org.bbop.apollo.FeatureType",
      "id": 15
    },
    {
      "class": "org.bbop.apollo.FeatureType",
      "id": 9
    },
    {
      "class": "org.bbop.apollo.FeatureType",
      "id": 11
    }
  ],
  "value": "Approved"
}```

childers avatar Mar 29 '23 20:03 childers