Skip to content

Instantly share code, notes, and snippets.

@alongubkin
Created September 6, 2021 16:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alongubkin/c00ddeb130b72d5b3f7deac63ab770bf to your computer and use it in GitHub Desktop.
Save alongubkin/c00ddeb130b72d5b3f7deac63ab770bf to your computer and use it in GitHub Desktop.
Get models & versions through GraphQL API
curl --request POST \
--url <APORIA_HOST>/v1/tenant-hasura/v1/graphql \
--header 'Authorization: Bearer <TOKEN>' \
--header 'Content-Type: application/json' \
--data \
'{
"query": "query { models { id name versions { id name } } }",
"variables": {}
}'
@alongubkin
Copy link
Author

Example output:

{
   "data": {
      "models": [
         {
            "id": "xgb-fraud-detection-ks9n",
            "name": "XGB Fraud Detection",
            "versions": [
               {
                  "id": "ea191cf1-154c-48f6-af5b-62cb16fa28d4",
                  "name": "v1"
               },
               ...
            ]
         }
      ]
   }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment