Zoom GraphQL overview
Beta
Zoom GraphQL is in a public beta. See the GraphQL beta FAQ for details.
GraphQL is a query language for APIs as well as a runtime environment for filling those queries with data.
Introduction to GraphQL
GraphQL operations have a single entry point to fetch (query) or modify (mutate) data by describing it with syntax that mirrors its response payload. Here is the Zoom GraphQL endpoint:
https://api.zoom.us/v3/graphql
With a GraphQL operation, you can describe the data that you want in your request, rather than sending multiple requests, like with RESTful API endpoints. With GraphQL, you can define the schema with your own custom objects using multiple fields.
REST APIs: under fetching and over fetching
Traditionally when using Rest APIs, the entities live on a bunch of endpoints on a server. When you make a request, it returns all the entities from that request. There are two drawbacks in this use case, under fetching and over fetching.
Under fetching
With REST APIs, you may need to make multiple requests to fetch multiple entities. For example, if you want to get the list of users in your Zoom account and all of their meetings, you'll need to call more than one API endpoint. This is an example of under fetching because you're not getting all the data you need in one response.
Over fetching
In some cases, you may only want a small subset of the data entity. With REST APIs, you'd still have to request all of the data from an API. For example, if you only want to receive the user email and user ID from an API that sends all user data, it will send that data and more. This is an example of over fetching as you are getting more data than you need in a response.
Advantages of GraphQL
GraphQL enables you to create a query to fetch only the data you need. Here's an example that requests a user's profile details, meeting details, and recording details in a single query. The RESTful alternative would be multiple queries to multiple API endpoints.
{
user(userId: "me") {
profile {
id
email
employeeUniqueId
firstName
lastName
role {
id
name
}
}
meetings(first: 100, meetingType: PREVIOUS_MEETINGS) {
edges {
id
topic
startTime
}
}
recordings(first: 100) {
edges {
uuid
topic
}
}
}
}
GraphQL operations
GraphQL operations consist mainly of queries and mutations.
Queries
If you're used to REST APIs, you're probably familiar with the HTTP GET method to fetch data. With GraphQL, you'd use queries, such as the one shown earlier to request user details.
Mutations
REST APIs use HTTP methods such as DELETE, PUT, PATCH, and POST to modify data. GraphQL uses mutations. For example, the following to create a user:
mutation($input:UserCreateInput!){
createUser(input:$input)
{
id
email
type
firstName
lastName
}
}
input: {
action: "CREATE",
userInfo: {
email: "first.last@example.com",
type: "Licensed",
firstName: "first",
lastName: "last"
}
}
Entities available
Zoom GraphQL is built on top of the Zoom API. You can access the following entities using Zoom GraphQL:
- Chat channels (partial)
- Cloud recording
- Dashboards
- Groups (partial)
- Meetings
- Reports (partial)
- Users
- Webinars
See the Zoom GraphQL API playground or Postman collection for details.
Not available for Video SDK
GraphQL is not available for Video SDK.
Postman collection
Go to the Zoom GraphQL Collection in Postman to see sample queries and mutations. See Using Postman to query for details.