Endpoint: https://mysite.atlassian.net/gateway/api/graphql
query{
confluence {
findSpaces(cloudId: "my-cloud-id) {
edges {
node {
id
name
}
}
}
}
}
I am getting Error: {
"errors": [
{
"message": "You MUST provide a 'X-ExperimentalApi : confluence-agg-beta' HTTP header to use the field 'findSpaces' (confluence/findSpaces)",
"extensions": {
"statusCode": 400,
"errorSource": "GRAPHQL_GATEWAY",
"classification": "ExecutionAborted"
}
},
{
"message": "Warning : You MUST provide a query operation name. In the future operations without names will be banned.",
"extensions": {
"statusCode": 400,
"errorSource": "GRAPHQL_GATEWAY",
"classification": "ExecutionAborted"
}
}
],
"data": null,
"extensions": {
"gateway": {
"request_id": "65dac168fdba4a00b87caaf0ac1e7b81",
"crossRegion": false,
"edgeCrossRegion": false,
"deprecatedFieldsUsed": []
}
}
}
How to I get all pages information in a Space, I need page tree structure in a Space. Also I am not able to get blogpost ID in findSPace, Space and spaces in the GraphQL methods. Could please help on this issue.
Hi @Ravi Prasad . You have 2 errors you need to deal with.
1. You MUST provide a query operation name
You need to provide an operation name on your query document. An operation name is an arbitrary text that declares the purpose of your query.
query your_operation_name {
confluence {
findSpaces(cloudId: "my-cloud-id") {
edges {
node {
id
name
}
}
}
}
2. You MUST provide a 'X-ExperimentalApi : confluence-agg-beta' HTTP header to use the field 'findSpaces' (confluence/findSpaces)
You'll get this kind of error when your query contains fields that are in the Beta release stage.
You have to explicitly opt in to use beta fields, and you do so via adding the X-ExperimentalApi header with findSpaces as a value. You can add multiple values separated by comma too.
This is how the whole request would look like in GraphiQL
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.