Help
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Copilot Lvl 2
Message 1 of 2

apiv4 returns 502

When I do  request to the apiv4 like the one above of a plus 70 repos organization, fails with error 502.

If I reduce what Im asking for, I could get the information. Is some kind of limit of the size of the answer?

 

{
  organization(login:\"%s\"){
  isVerified
  requiresTwoFactorAuthentication
  membersWithRole(first: 100) {
    edges {
      role
      node {
        id
        login
        publicKeys(first: 100) {
          totalCount
          edges {
            node {
              key
            }
          }
        }
        gists(first: 100) {
          edges {
            node {
              name
              files(limit:1) {
                encodedName
                encoding
                extension
                name
                size
                text
              }
            }
          }
        }
      }
    }
  }
  repositories(first: 100) {
    edges {
      node {
        nameWithOwner
        defaultBranchRef {
          name
        }
        branchProtectionRules(first:100) {
          edges {
            node {
              requiresApprovingReviews
              requiredApprovingReviewCount
              isAdminEnforced
              pattern
            }
          }
        }
        collaborators(affiliation:ALL) {
          edges {
            permission
            node {
              id
            }
          }
        }
      }
    }
  }
  }
}
1 Reply
Highlighted
Community Manager
Message 2 of 2

Re: apiv4 returns 502

Yes, there are both time and node limitations on what you can request from the API. You can find information on the node limitations in the API documentation. Additionally, if your request takes too long to run, you'll receive a timeout error, which I believe is what you're running into.

 

Let us know if you have more questions.