Hello World
Let's make your first API call to Duro. This guide will walk you through a simple query to verify your setup.
Basic Query
Here's a simple query to get your libraries:
query GetAllLibraries {
organization {
findAll {
libraries {
id
name
}
}
}
}
Example Response
{
"data": {
"organization": {
"findAll": [
{
"libraries": [
{
"id": "fc28b204-0cd0-46b3-96eb-b0720c16c423",
"name": "Main Library"
}
]
}
]
}
}
}
Complete Example
Here's a complete example using curl:
curl 'https://api.durohub.com/graphql' \
-H 'x-api-key: YOUR_API_TOKEN' \
-H 'Content-Type: application/json' \
-d '{"query":"query { organization { findAll { libraries { id name } } } }"}'
Next Steps
Learn about working with Components and Products.
Last updated