-
Notifications
You must be signed in to change notification settings - Fork 0
/
queries.github-graphql-nb
1 lines (1 loc) · 8.34 KB
/
queries.github-graphql-nb
1
{"cells":[{"code":"# Github API - v4 GraphQL","kind":"markdown"},{"code":"## Verify Access\n\nMake an initial query to ensure you have base API acces.","kind":"markdown"},{"code":"query {\n viewer {\n login\n id\n }\n}","kind":"code"},{"code":"## Backup Enterprise","kind":"markdown"},{"code":"### Enterprise Config","kind":"markdown"},{"code":"query {\n enterprise\t(slug: \"\") {\n avatarUrl\n billingInfo {\n allLicensableUsersCount\n assetPacks\n bandwidthQuota\n bandwidthUsage\n bandwidthUsagePercentage\n storageQuota\n storageUsage\n storageUsagePercentage\n totalAvailableLicenses\n totalLicenses\n }\n createdAt\n databaseId\n description\n descriptionHTML\n id\n location\n # members\n name\n # organizations\n ownerInfo {\n # admins\n allowPrivateRepositoryForkingSetting\n defaultRepositoryPermissionSetting\n # domains\n ipAllowListEnabledSetting\n # ipAllowListEntries\n ipAllowListForInstalledAppsEnabledSetting\n isUpdatingTwoFactorRequirement\n membersCanChangeRepositoryVisibilitySetting\n membersCanCreateInternalRepositoriesSetting\n membersCanCreatePrivateRepositoriesSetting\n membersCanCreatePublicRepositoriesSetting\n membersCanCreateRepositoriesSetting\n membersCanDeleteIssuesSetting\n membersCanDeleteRepositoriesSetting\n membersCanInviteCollaboratorsSetting\n membersCanMakePurchasesSetting\n membersCanUpdateProtectedBranchesSetting\n membersCanViewDependencyInsightsSetting\n notificationDeliveryRestrictionEnabledSetting\n organizationProjectsSetting\n repositoryProjectsSetting\n samlIdentityProvider {\n digestMethod\n id\n idpCertificate\n issuer\n recoveryCodes\n signatureMethod\n ssoUrl\n }\n teamDiscussionsSetting\n twoFactorRequiredSetting\n }\n resourcePath\n slug\n url\n viewerIsAdmin\n websiteUrl\n }\n}\n","kind":"code"},{"code":"### Members","kind":"markdown"},{"code":"{\n enterprise(slug: \"\") {\n members(first: 10) {\n edges {\n node {\n # ... on User {\n # id\n # email\n # name\n # login\n # }\n ... on EnterpriseUserAccount {\n id\n name\n login\n user {\n id\n }\n }\n }\n }\n pageInfo {\n hasNextPage\n endCursor\n hasPreviousPage\n startCursor\n }\n }\n }\n}","kind":"code"},{"code":"### Organizations","kind":"markdown"},{"code":" {\n enterprise(slug: \"ge-appliances\") {\n organizations(first: 10) {\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n edges {\n node {\n login\n name\n }\n }\n }\n }\n}","kind":"code"},{"code":"### Admins","kind":"markdown"},{"code":"{\n enterprise(slug: \"\") {\n ownerInfo {\n admins(first: 10) {\n pageInfo {\n startCursor\n hasPreviousPage\n hasNextPage\n endCursor\n }\n edges {\n node {\n login\n name\n email\n }\n }\n }\n }\n }\n}","kind":"code"},{"code":"### Domains","kind":"markdown"},{"code":"{\n enterprise(slug: \"\") {\n ownerInfo {\n domains(first: 10) {\n pageInfo {\n startCursor\n hasPreviousPage\n hasNextPage\n endCursor\n }\n edges {\n node {\n domain\n createdAt\n databaseId\n dnsHostName\n hasFoundHostName\n hasFoundVerificationToken\n id\n isApproved\n isRequiredForPolicyEnforcement\n isVerified\n owner {\n ... on Enterprise {\n id\n name\n url\n }\n ... on Organization {\n id\n email\n name\n url\n }\n }\n punycodeEncodedDomain\n tokenExpirationTime\n updatedAt\n verificationToken\n }\n }\n }\n }\n }\n}","kind":"code"},{"code":"### IP Allow List","kind":"markdown"},{"code":"{\n enterprise(slug: \"\") {\n ownerInfo {\n ipAllowListEntries(first: 10) {\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n edges {\n node {\n allowListValue\n createdAt\n id\n isActive\n name\n owner {\n ... on App {\n id\n name\n url\n }\n ... on Enterprise {\n id\n name\n url\n }\n ... on Organization {\n id\n email\n name\n url\n }\n }\n updatedAt\n }\n }\n }\n }\n }\n}","kind":"code"},{"code":"### Enterprise Server Installations","kind":"markdown"},{"code":"{\n enterprise(slug: \"\") {\n ownerInfo {\n enterpriseServerInstallations(first: 10) {\n edges {\n node {\n createdAt\n customerName\n hostName\n id\n isConnected\n updatedAt\n }\n }\n pageInfo {\n startCursor\n hasPreviousPage\n hasNextPage\n endCursor\n }\n }\n }\n }\n}","kind":"code"},{"code":"### OIDC Provider","kind":"markdown"},{"code":"{\n enterprise(slug: \"\") {\n ownerInfo {\n oidcProvider {\n id\n providerType\n tenantId\n externalIdentities(first: 10) {\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n edges {\n node {\n guid\n id\n samlIdentity {\n emails {\n value\n type\n primary\n }\n familyName\n givenName\n groups\n nameId\n username\n }\n }\n }\n }\n }\n }\n }\n}","kind":"code"},{"code":"### Outside Collaborators","kind":"markdown"},{"code":"{\n enterprise(slug: \"\") {\n ownerInfo {\n outsideCollaborators(first: 10) {\n pageInfo {\n startCursor\n hasPreviousPage\n hasNextPage\n endCursor\n }\n edges {\n node {\n id\n email\n login\n name\n url\n }\n }\n }\n }\n }\n}","kind":"code"},{"code":"### Support Entitlements","kind":"markdown"},{"code":"{\n enterprise(slug: \"\") {\n ownerInfo {\n supportEntitlements(first: 10) {\n pageInfo {\n startCursor\n hasPreviousPage\n hasNextPage\n endCursor\n }\n edges {\n node {\n ... on EnterpriseUserAccount {\n id\n name\n url\n }\n ... on User {\n id\n email\n url\n }\n }\n }\n }\n }\n }\n}","kind":"code"},{"code":"### SAML Identity Users","kind":"markdown"},{"code":"{\n enterprise(slug: \"\") {\n ownerInfo {\n samlIdentityProvider {\n externalIdentities(first: 10) {\n edges {\n node {\n guid\n id\n samlIdentity {\n nameId\n username\n givenName\n familyName\n attributes {\n metadata\n name\n value\n }\n }\n user {\n id\n }\n }\n }\n pageInfo {\n endCursor\n hasNextPage\n hasPreviousPage\n startCursor\n }\n }\n }\n }\n }\n}","kind":"code"}]}