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

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

Open
childers opened this issue Mar 29, 2023 · 1 comment
Open

Comments

@childers
Copy link
Collaborator

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"
}```

@garrettjstevens
Copy link
Contributor

Global statuses are possible, if you don't select an organism or a feature when creating the status, they should be available everywhere.

I have noticed that there seems to be a bug, though, in the admin interface so that once you select a feature type, you aren't able to un-select it and make the status global, so it's something you can probably only currently test with a new status and not an existing one.

Let me know if making a new global status works for you, and if you're able to delete and re-create your existing statuses as global.

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