Exchange Graph
Getting started
The Exchange Graph API provides one endpoint that accepts POST requests. The endpoint can be found at https://anypoint.mulesoft.com/graph/api/v1/graphql
.
Using an access token
If you want to access your organization's private content, obtain an access token from the Access Management portal. See Access Management portal.
Sending a request
Exchange Graph API accepts POST requests. The body of the request must be in JSON with the following fields:
{
"query": "{{GRAPH QUERY}}", // This field contains the Graph Query
"variables": {
"accessToken":"{{ACCESS TOKEN}}" // Send your Core Service access token (optional)
}
}
For example, to get the groupId, assetId, and version of the Mule 4.x assets, execute the following request:
curl -X POST \
https://anypoint.mulesoft.com/graph/api/v1/graphql \
-H 'content-type: application/json' \
-d '{"query":"{assets(query: {tags: {key: \"min-mule-version\", value: \"4.0.0\"}}) {groupId assetId version}}"}'
For more information about the available ways to query the graph, see Querying the graph.
The response fields can be found in the Query response schema.