diff --git a/content/discussions/index.md b/content/discussions/index.md index e96625582d61..3b0541f445dd 100644 --- a/content/discussions/index.md +++ b/content/discussions/index.md @@ -11,6 +11,7 @@ redirect_from: - /organizations/collaborating-with-your-team/pinning-a-team-discussion - /organizations/collaborating-with-your-team - /rest/teams/discussion-comments + - /rest/teams/discussions featuredLinks: startHere: - /discussions/collaborating-with-your-community-using-discussions/about-discussions diff --git a/content/rest/teams/discussions.md b/content/rest/teams/discussions.md deleted file mode 100644 index cc9c0d59f74c..000000000000 --- a/content/rest/teams/discussions.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -title: REST API endpoints for team discussions -allowTitleToDifferFromFilename: true -shortTitle: Discussions -intro: >- - Use the REST API to get, create, edit, and delete discussion posts on a team's - page. -versions: # DO NOT MANUALLY EDIT. CHANGES WILL BE OVERWRITTEN BY A 🤖 - fpt: '*' - ghec: '*' - ghes: '*' -topics: - - API -autogenerated: rest ---- - -{% data reusables.organizations.team-discussions-api-deprecation %} - - diff --git a/content/rest/teams/index.md b/content/rest/teams/index.md index 6d362ba646ad..4f97d6519d92 100644 --- a/content/rest/teams/index.md +++ b/content/rest/teams/index.md @@ -15,7 +15,6 @@ versions: topics: - API children: - - /discussions - /external-groups - /members - /team-sync diff --git a/eslint.config.ts b/eslint.config.ts index 510b63d1c776..8d2ed2888c58 100644 --- a/eslint.config.ts +++ b/eslint.config.ts @@ -97,7 +97,7 @@ export default [ // Disabled rules to review 'no-console': 'off', // 800+ - '@typescript-eslint/no-explicit-any': 'off', // 1000+ + '@typescript-eslint/no-explicit-any': 'off', }, }, diff --git a/src/automated-pipelines/components/AutomatedPageContext.tsx b/src/automated-pipelines/components/AutomatedPageContext.tsx index 50efe899b9f2..7f567ae55cd0 100644 --- a/src/automated-pipelines/components/AutomatedPageContext.tsx +++ b/src/automated-pipelines/components/AutomatedPageContext.tsx @@ -1,6 +1,8 @@ import { createContext, useContext } from 'react' +import type { IncomingMessage } from 'http' import type { JSX } from 'react' import type { MiniTocItem } from '@/frame/components/context/ArticleContext' +import type { Context } from '@/types' export type AutomatedPageContextT = { title: string @@ -25,15 +27,35 @@ export const useAutomatedPageContext = (): AutomatedPageContextT => { return context } -export const getAutomatedPageContextFromRequest = (req: any): AutomatedPageContextT => { - const page = req.context.page +type AutomatedPageContextRequest = { context?: Partial } | IncomingMessage + +type AutomatedPage = { + title: string + intro: string + product?: string + permissions?: string + rawPermissions?: string +} + +export const getAutomatedPageContextFromRequest = ( + req: AutomatedPageContextRequest, +): AutomatedPageContextT => { + const context = 'context' in req ? ((req.context as Partial | undefined) ?? {}) : {} + const page = context.page as AutomatedPage | undefined + + if (!page) { + throw new Error('"getAutomatedPageContextFromRequest" requires req.context.page') + } + + const renderedPage = context.renderedPage ?? '' + const miniTocItems = context.miniTocItems ?? [] return { title: page.title, intro: page.intro, - renderedPage: req.context.renderedPage || '', - miniTocItems: req.context.miniTocItems || [], - product: page.product || '', - permissions: page.permissions || '', + renderedPage, + miniTocItems, + product: page.product ?? '', + permissions: page.permissions ?? page.rawPermissions ?? '', } } diff --git a/src/content-linter/lib/linting-rules/image-file-kebab-case.ts b/src/content-linter/lib/linting-rules/image-file-kebab-case.ts index 96535ee93dd5..dd0e94c930e6 100644 --- a/src/content-linter/lib/linting-rules/image-file-kebab-case.ts +++ b/src/content-linter/lib/linting-rules/image-file-kebab-case.ts @@ -18,7 +18,7 @@ export const imageFileKebabCase = { suggestedFileName, imageFileName, [token.line.indexOf(imageFileName) + 1, imageFileName.length], - null, // Todo add fix + null, ) } }) diff --git a/src/deployments/production/README.md b/src/deployments/production/README.md index 37de6f425038..c3b88752f3ea 100644 --- a/src/deployments/production/README.md +++ b/src/deployments/production/README.md @@ -1,6 +1,6 @@ # Production deploys -For internal Docs relating to our production deploys see [TODO Docs-Engineering URL] + ## Auto deploys diff --git a/src/fixtures/fixtures/rest-redirects.json b/src/fixtures/fixtures/rest-redirects.json index 7533942ba49b..872699d5d4c6 100644 --- a/src/fixtures/fixtures/rest-redirects.json +++ b/src/fixtures/fixtures/rest-redirects.json @@ -493,7 +493,7 @@ "/v3/scim": "/en/enterprise-cloud@latest/rest/scim", "/v3/search": "/en/rest/search", "/v3/teams/discussion_comments": "/en/discussions", - "/v3/teams/discussions": "/en/rest/teams/discussions", + "/v3/teams/discussions": "/en/discussions", "/v3/teams": "/en/rest/teams", "/v3/teams/members": "/en/rest/teams/members", "/v3/teams/team_sync": "/en/enterprise-cloud@latest/rest/teams/team-sync", diff --git a/src/fixtures/tests/annotations.ts b/src/fixtures/tests/annotations.ts index f75df8e8b895..9a87ca2401ac 100644 --- a/src/fixtures/tests/annotations.ts +++ b/src/fixtures/tests/annotations.ts @@ -22,7 +22,7 @@ describe('annotations', () => { expect(annotation.find('.annotate-inline').length).toBe(1) expect(annotation.find('.annotate-row').length).toBe(3) const notes = $('.annotate-row .annotate-note p', annotation) - const noteTexts = notes.map((i: number, el: any) => $(el).text()).get() + const noteTexts = notes.map((_, el) => $(el).text()).get() expect(noteTexts).toEqual(["Let's get started", 'This is just a sample', 'End of the script']) } // Second code snippet block @@ -33,7 +33,7 @@ describe('annotations', () => { expect(annotation.find('.annotate-inline').length).toBe(1) expect(annotation.find('.annotate-row').length).toBe(2) const notes = $('.annotate-row .annotate-note p', annotation) - const noteTexts = notes.map((i: number, el: any) => $(el).text()).get() + const noteTexts = notes.map((_, el) => $(el).text()).get() expect(noteTexts).toEqual(['Has to start with a comment.', 'This is the if statement']) } // Yaml code snippet that starts with an empty comment @@ -44,7 +44,7 @@ describe('annotations', () => { expect(annotation.find('.annotate-inline').length).toBe(1) expect(annotation.find('.annotate-row').length).toBe(3) const notes = $('.annotate-row .annotate-note p', annotation) - const noteTexts = notes.map((i: number, el: any) => $(el).text()).get() + const noteTexts = notes.map((_, el) => $(el).text()).get() expect(noteTexts).toEqual([ 'Configures this workflow to run every time a change is pushed to the branch called release.', "This job checks out the repository contents ...\nAnd here's the second comment line.", diff --git a/src/frame/tests/find-page-middleware.ts b/src/frame/tests/find-page-middleware.ts index cf36fc9c4e2f..ab42f6d23883 100644 --- a/src/frame/tests/find-page-middleware.ts +++ b/src/frame/tests/find-page-middleware.ts @@ -1,45 +1,52 @@ import { fileURLToPath } from 'url' import path from 'path' import http from 'http' +import { Socket } from 'net' import { describe, expect, test } from 'vitest' import type { Response } from 'express' import Page from '@/frame/lib/page' import findPage from '@/frame/middleware/find-page' -import type { ExtendedRequest } from '@/types' +import type { ExtendedRequest, Context } from '@/types' const __dirname = path.dirname(fileURLToPath(import.meta.url)) +type TestResponse = Response & { _status?: number; _message?: string } + function makeRequestResponse( url: string, currentVersion = 'free-pro-team@latest', -): [ExtendedRequest, Response & { _status?: number; _message?: string }] { - const req = new http.IncomingMessage(null as any) as ExtendedRequest +): [ExtendedRequest, TestResponse] { + const req = new http.IncomingMessage(new Socket()) as ExtendedRequest + + Object.defineProperty(req, 'path', { + value: url, + writable: true, + }) + req.method = 'GET' req.url = url - // @ts-expect-error - path is read-only but we need to set it for testing - req.path = url req.cookies = {} req.headers = {} - // Custom keys on the request + const context: Context = { + currentVersion, + pages: {}, + } + req.pagePath = url - req.context = {} - req.context.currentVersion = currentVersion - req.context.pages = {} + req.context = context - const res = new http.ServerResponse(req) as Response & { - _status?: number - _message?: string - } - res.status = function (code: number) { + const res = new http.ServerResponse(req) as TestResponse + res.status = function status(this: TestResponse, code: number) { this._status = code - return { + return Object.assign(this, { send: (message: string) => { this._message = message + return this }, - } as any + }) } return [req, res] @@ -56,7 +63,7 @@ describe('find page middleware', () => { }) if (page && req.context) { req.context.pages = { - '/en/foo/bar': page as any, + '/en/foo/bar': page, } } @@ -88,7 +95,7 @@ describe('find page middleware', () => { }) if (page && req.context) { req.context.pages = { - '/en/page-with-redirects': page as any, + '/en/page-with-redirects': page, } } @@ -98,6 +105,7 @@ describe('find page middleware', () => { }) expect(req.context?.page).toBeInstanceOf(Page) }) + test('finds it for non-fpt version URLS', async () => { const [req, res] = makeRequestResponse('/en/page-with-redirects', 'enterprise-cloud@latest') const page = await Page.init({ @@ -107,7 +115,7 @@ describe('find page middleware', () => { }) if (page && req.context) { req.context.pages = { - '/en/page-with-redirects': page as any, + '/en/page-with-redirects': page, } } @@ -129,7 +137,7 @@ describe('find page middleware', () => { }) if (page && req.context) { req.context.pages = { - '/en/page-with-redirects': page as any, + '/en/page-with-redirects': page, } } diff --git a/src/frame/tests/resolve-recommended.test.ts b/src/frame/tests/resolve-recommended.test.ts index a9667a5cd93a..4eacb50767b3 100644 --- a/src/frame/tests/resolve-recommended.test.ts +++ b/src/frame/tests/resolve-recommended.test.ts @@ -1,6 +1,6 @@ import { describe, test, expect, vi, beforeEach } from 'vitest' import type { Response, NextFunction } from 'express' -import type { ExtendedRequest } from '@/types' +import type { ExtendedRequest, Page, ResolvedArticle } from '@/types' import findPage from '@/frame/lib/find-page' import resolveRecommended from '../middleware/resolve-recommended' @@ -17,23 +17,38 @@ vi.mock('@/content-render/index', () => ({ describe('resolveRecommended middleware', () => { const mockFindPage = vi.mocked(findPage) - const createMockRequest = (pageData: any = {}, contextData: any = {}): ExtendedRequest => - ({ - context: { - page: pageData, - pages: { + type TestPage = Partial & { + rawRecommended?: string[] + spotlight?: Array<{ article: string }> + } + + const createMockRequest = ( + pageData: TestPage = {}, + contextData: Partial & { pages?: Record } = {}, + ): ExtendedRequest => { + const { pages: pagesOverride, ...restContext } = contextData + const hasPagesOverride = Object.prototype.hasOwnProperty.call(contextData, 'pages') + const pages = hasPagesOverride + ? pagesOverride + : ({ '/test-article': { title: 'Test Article', intro: 'Test intro', relativePath: 'test/article.md', - }, - }, + } as unknown as Page, + } as Record) + + return { + context: { + page: pageData as Page, + pages, redirects: {}, currentVersion: 'free-pro-team@latest', currentLanguage: 'en', - ...contextData, + ...restContext, }, - }) as ExtendedRequest + } as unknown as ExtendedRequest + } const mockRes = {} as Response const mockNext = vi.fn() as NextFunction @@ -86,7 +101,7 @@ describe('resolveRecommended middleware', () => { applicableVersions: ['free-pro-team@latest'], } - mockFindPage.mockReturnValue(testPage as any) + mockFindPage.mockReturnValue(testPage as unknown as Page) const req = createMockRequest({ rawRecommended: ['/copilot/tutorials/article'] }) @@ -97,7 +112,7 @@ describe('resolveRecommended middleware', () => { req.context!.pages, req.context!.redirects, ) - expect((req.context!.page as any).recommended).toEqual([ + expect((req.context!.page as Page & { recommended?: ResolvedArticle[] }).recommended).toEqual([ { title: 'Test Article', intro: '

Test intro

', @@ -116,7 +131,7 @@ describe('resolveRecommended middleware', () => { applicableVersions: ['free-pro-team@latest'], } - mockFindPage.mockReturnValueOnce(testPage as any) + mockFindPage.mockReturnValueOnce(testPage as unknown as Page) const req = createMockRequest({ rawRecommended: ['/copilot/tutorials/article'], @@ -131,7 +146,7 @@ describe('resolveRecommended middleware', () => { req.context!.pages, req.context!.redirects, ) - expect((req.context!.page as any).recommended).toEqual([ + expect((req.context!.page as Page & { recommended?: ResolvedArticle[] }).recommended).toEqual([ { title: 'Test Article', intro: '

Test intro

', @@ -154,7 +169,9 @@ describe('resolveRecommended middleware', () => { req.context!.pages, req.context!.redirects, ) - expect((req.context!.page as any).recommended).toEqual([]) + expect((req.context!.page as Page & { recommended?: ResolvedArticle[] }).recommended).toEqual( + [], + ) expect(mockNext).toHaveBeenCalled() }) @@ -163,11 +180,13 @@ describe('resolveRecommended middleware', () => { throw new Error('Test error') }) - const req = createMockRequest({ rawRecommended: ['/error-article'] }) + const req = createMockRequest({ rawRecommended: ['/error-article'] as string[] }) await resolveRecommended(req, mockRes, mockNext) - expect((req.context!.page as any).recommended).toEqual([]) + expect((req.context!.page as Page & { recommended?: ResolvedArticle[] }).recommended).toEqual( + [], + ) expect(mockNext).toHaveBeenCalled() }) @@ -179,13 +198,13 @@ describe('resolveRecommended middleware', () => { applicableVersions: ['free-pro-team@latest'], } - mockFindPage.mockReturnValueOnce(testPage as any).mockReturnValueOnce(undefined) + mockFindPage.mockReturnValueOnce(testPage as unknown as Page).mockReturnValueOnce(undefined) const req = createMockRequest({ rawRecommended: ['/valid-article', '/invalid-article'] }) await resolveRecommended(req, mockRes, mockNext) - expect((req.context!.page as any).recommended).toEqual([ + expect((req.context!.page as Page & { recommended?: ResolvedArticle[] }).recommended).toEqual([ { title: 'Valid Article', intro: '

Valid intro

', @@ -205,7 +224,7 @@ describe('resolveRecommended middleware', () => { } // Mock findPage to fail on first call (content-relative) and succeed on second (page-relative) - mockFindPage.mockReturnValueOnce(undefined).mockReturnValueOnce(testPage as any) + mockFindPage.mockReturnValueOnce(undefined).mockReturnValueOnce(testPage as unknown as Page) const req = createMockRequest({ rawRecommended: ['relative-article'], @@ -225,7 +244,7 @@ describe('resolveRecommended middleware', () => { req.context!.pages, req.context!.redirects, ) - expect((req.context!.page as any).recommended).toEqual([ + expect((req.context!.page as Page & { recommended?: ResolvedArticle[] }).recommended).toEqual([ { title: 'Relative Article', intro: '

Relative intro

', @@ -244,7 +263,7 @@ describe('resolveRecommended middleware', () => { applicableVersions: ['free-pro-team@latest'], } - mockFindPage.mockReturnValue(testPage as any) + mockFindPage.mockReturnValue(testPage as unknown as Page) const req = createMockRequest({ rawRecommended: ['/copilot/tutorials/tutorial-page'] }) @@ -258,7 +277,7 @@ describe('resolveRecommended middleware', () => { // Verify that the href is a clean path without language/version, that gets // added on the React side. - expect((req.context!.page as any).recommended).toEqual([ + expect((req.context!.page as Page & { recommended?: ResolvedArticle[] }).recommended).toEqual([ { title: 'Tutorial Page', intro: '

Tutorial intro

', @@ -278,7 +297,7 @@ describe('resolveRecommended middleware', () => { applicableVersions: ['free-pro-team@latest'], // Not available in ghec } - mockFindPage.mockReturnValue(fptOnlyPage as any) + mockFindPage.mockReturnValue(fptOnlyPage as unknown as Page) // Create a request context where we're viewing the GHEC version const req = createMockRequest( @@ -292,7 +311,9 @@ describe('resolveRecommended middleware', () => { await resolveRecommended(req, mockRes, mockNext) // The recommended array should be empty since the article isn't available in enterprise-cloud - expect((req.context!.page as any).recommended).toEqual([]) + expect((req.context!.page as Page & { recommended?: ResolvedArticle[] }).recommended).toEqual( + [], + ) expect(mockNext).toHaveBeenCalled() }) }) diff --git a/src/github-apps/data/fpt-2022-11-28/fine-grained-pat-permissions.json b/src/github-apps/data/fpt-2022-11-28/fine-grained-pat-permissions.json index 0beca2ace32e..215267a8434b 100644 --- a/src/github-apps/data/fpt-2022-11-28/fine-grained-pat-permissions.json +++ b/src/github-apps/data/fpt-2022-11-28/fine-grained-pat-permissions.json @@ -2717,102 +2717,6 @@ } ] }, - "team_discussions": { - "title": "Team discussions", - "displayTitle": "Organization permissions for \"Team discussions\"", - "permissions": [ - { - "category": "teams", - "slug": "list-discussions", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions", - "additional-permissions": false, - "access": "read" - }, - { - "category": "teams", - "slug": "create-a-discussion", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions", - "additional-permissions": false, - "access": "write" - }, - { - "category": "teams", - "slug": "get-a-discussion", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", - "additional-permissions": false, - "access": "read" - }, - { - "category": "teams", - "slug": "update-a-discussion", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", - "additional-permissions": false, - "access": "write" - }, - { - "category": "teams", - "slug": "delete-a-discussion", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", - "additional-permissions": false, - "access": "write" - }, - { - "category": "teams", - "slug": "list-discussions-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions", - "additional-permissions": false, - "access": "read" - }, - { - "category": "teams", - "slug": "create-a-discussion-legacy", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/teams/{team_id}/discussions", - "additional-permissions": false, - "access": "write" - }, - { - "category": "teams", - "slug": "get-a-discussion-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}", - "additional-permissions": false, - "access": "read" - }, - { - "category": "teams", - "slug": "update-a-discussion-legacy", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}", - "additional-permissions": false, - "access": "write" - }, - { - "category": "teams", - "slug": "delete-a-discussion-legacy", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}", - "additional-permissions": false, - "access": "write" - } - ] - }, "organization_actions_variables": { "title": "Variables", "displayTitle": "Organization permissions for \"Variables\"", diff --git a/src/github-apps/data/fpt-2022-11-28/fine-grained-pat.json b/src/github-apps/data/fpt-2022-11-28/fine-grained-pat.json index 5749b155c2f8..2b4e5ca1abe2 100644 --- a/src/github-apps/data/fpt-2022-11-28/fine-grained-pat.json +++ b/src/github-apps/data/fpt-2022-11-28/fine-grained-pat.json @@ -4802,36 +4802,6 @@ "verb": "delete", "requestPath": "/orgs/{org}/teams/{team_slug}" }, - { - "slug": "list-discussions", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions" - }, - { - "slug": "create-a-discussion", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions" - }, - { - "slug": "get-a-discussion", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - }, - { - "slug": "update-a-discussion", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - }, - { - "slug": "delete-a-discussion", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - }, { "slug": "list-pending-team-invitations", "subcategory": "members", @@ -4910,36 +4880,6 @@ "verb": "delete", "requestPath": "/teams/{team_id}" }, - { - "slug": "list-discussions-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions" - }, - { - "slug": "create-a-discussion-legacy", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/teams/{team_id}/discussions" - }, - { - "slug": "get-a-discussion-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}" - }, - { - "slug": "update-a-discussion-legacy", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}" - }, - { - "slug": "delete-a-discussion-legacy", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}" - }, { "slug": "list-pending-team-invitations-legacy", "subcategory": "members", diff --git a/src/github-apps/data/fpt-2022-11-28/server-to-server-permissions.json b/src/github-apps/data/fpt-2022-11-28/server-to-server-permissions.json index 9c2b3f621b8d..2f100d856c92 100644 --- a/src/github-apps/data/fpt-2022-11-28/server-to-server-permissions.json +++ b/src/github-apps/data/fpt-2022-11-28/server-to-server-permissions.json @@ -3393,122 +3393,6 @@ } ] }, - "team_discussions": { - "title": "Team discussions", - "displayTitle": "Organization permissions for \"Team discussions\"", - "permissions": [ - { - "category": "teams", - "slug": "list-discussions", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions", - "access": "read", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - }, - { - "category": "teams", - "slug": "create-a-discussion", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions", - "access": "write", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - }, - { - "category": "teams", - "slug": "get-a-discussion", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", - "access": "read", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - }, - { - "category": "teams", - "slug": "update-a-discussion", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", - "access": "write", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - }, - { - "category": "teams", - "slug": "delete-a-discussion", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", - "access": "write", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - }, - { - "category": "teams", - "slug": "list-discussions-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions", - "access": "read", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - }, - { - "category": "teams", - "slug": "create-a-discussion-legacy", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/teams/{team_id}/discussions", - "access": "write", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - }, - { - "category": "teams", - "slug": "get-a-discussion-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}", - "access": "read", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - }, - { - "category": "teams", - "slug": "update-a-discussion-legacy", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}", - "access": "write", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - }, - { - "category": "teams", - "slug": "delete-a-discussion-legacy", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}", - "access": "write", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - } - ] - }, "organization_actions_variables": { "title": "Variables", "displayTitle": "Organization permissions for \"Variables\"", diff --git a/src/github-apps/data/fpt-2022-11-28/server-to-server-rest.json b/src/github-apps/data/fpt-2022-11-28/server-to-server-rest.json index d6587492e265..c2daa311fafc 100644 --- a/src/github-apps/data/fpt-2022-11-28/server-to-server-rest.json +++ b/src/github-apps/data/fpt-2022-11-28/server-to-server-rest.json @@ -4972,36 +4972,6 @@ "verb": "delete", "requestPath": "/orgs/{org}/teams/{team_slug}" }, - { - "slug": "list-discussions", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions" - }, - { - "slug": "create-a-discussion", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions" - }, - { - "slug": "get-a-discussion", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - }, - { - "slug": "update-a-discussion", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - }, - { - "slug": "delete-a-discussion", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - }, { "slug": "list-pending-team-invitations", "subcategory": "members", @@ -5080,36 +5050,6 @@ "verb": "delete", "requestPath": "/teams/{team_id}" }, - { - "slug": "list-discussions-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions" - }, - { - "slug": "create-a-discussion-legacy", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/teams/{team_id}/discussions" - }, - { - "slug": "get-a-discussion-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}" - }, - { - "slug": "update-a-discussion-legacy", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}" - }, - { - "slug": "delete-a-discussion-legacy", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}" - }, { "slug": "list-pending-team-invitations-legacy", "subcategory": "members", diff --git a/src/github-apps/data/fpt-2022-11-28/user-to-server-rest.json b/src/github-apps/data/fpt-2022-11-28/user-to-server-rest.json index 36944eea23b9..6d4a61e6e5dd 100644 --- a/src/github-apps/data/fpt-2022-11-28/user-to-server-rest.json +++ b/src/github-apps/data/fpt-2022-11-28/user-to-server-rest.json @@ -5458,36 +5458,6 @@ "verb": "delete", "requestPath": "/orgs/{org}/teams/{team_slug}" }, - { - "slug": "list-discussions", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions" - }, - { - "slug": "create-a-discussion", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions" - }, - { - "slug": "get-a-discussion", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - }, - { - "slug": "update-a-discussion", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - }, - { - "slug": "delete-a-discussion", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - }, { "slug": "list-pending-team-invitations", "subcategory": "members", @@ -5566,36 +5536,6 @@ "verb": "delete", "requestPath": "/teams/{team_id}" }, - { - "slug": "list-discussions-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions" - }, - { - "slug": "create-a-discussion-legacy", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/teams/{team_id}/discussions" - }, - { - "slug": "get-a-discussion-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}" - }, - { - "slug": "update-a-discussion-legacy", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}" - }, - { - "slug": "delete-a-discussion-legacy", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}" - }, { "slug": "list-pending-team-invitations-legacy", "subcategory": "members", diff --git a/src/github-apps/data/ghec-2022-11-28/fine-grained-pat-permissions.json b/src/github-apps/data/ghec-2022-11-28/fine-grained-pat-permissions.json index 756335eb7445..0902cfa2f688 100644 --- a/src/github-apps/data/ghec-2022-11-28/fine-grained-pat-permissions.json +++ b/src/github-apps/data/ghec-2022-11-28/fine-grained-pat-permissions.json @@ -3383,102 +3383,6 @@ } ] }, - "team_discussions": { - "title": "Team discussions", - "displayTitle": "Organization permissions for \"Team discussions\"", - "permissions": [ - { - "category": "teams", - "slug": "list-discussions", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions", - "additional-permissions": false, - "access": "read" - }, - { - "category": "teams", - "slug": "create-a-discussion", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions", - "additional-permissions": false, - "access": "write" - }, - { - "category": "teams", - "slug": "get-a-discussion", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", - "additional-permissions": false, - "access": "read" - }, - { - "category": "teams", - "slug": "update-a-discussion", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", - "additional-permissions": false, - "access": "write" - }, - { - "category": "teams", - "slug": "delete-a-discussion", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", - "additional-permissions": false, - "access": "write" - }, - { - "category": "teams", - "slug": "list-discussions-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions", - "additional-permissions": false, - "access": "read" - }, - { - "category": "teams", - "slug": "create-a-discussion-legacy", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/teams/{team_id}/discussions", - "additional-permissions": false, - "access": "write" - }, - { - "category": "teams", - "slug": "get-a-discussion-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}", - "additional-permissions": false, - "access": "read" - }, - { - "category": "teams", - "slug": "update-a-discussion-legacy", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}", - "additional-permissions": false, - "access": "write" - }, - { - "category": "teams", - "slug": "delete-a-discussion-legacy", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}", - "additional-permissions": false, - "access": "write" - } - ] - }, "organization_actions_variables": { "title": "Variables", "displayTitle": "Organization permissions for \"Variables\"", diff --git a/src/github-apps/data/ghec-2022-11-28/fine-grained-pat.json b/src/github-apps/data/ghec-2022-11-28/fine-grained-pat.json index 61dedf907a19..4560593e3bd1 100644 --- a/src/github-apps/data/ghec-2022-11-28/fine-grained-pat.json +++ b/src/github-apps/data/ghec-2022-11-28/fine-grained-pat.json @@ -5198,36 +5198,6 @@ "verb": "delete", "requestPath": "/orgs/{org}/teams/{team_slug}" }, - { - "slug": "list-discussions", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions" - }, - { - "slug": "create-a-discussion", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions" - }, - { - "slug": "get-a-discussion", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - }, - { - "slug": "update-a-discussion", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - }, - { - "slug": "delete-a-discussion", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - }, { "slug": "list-a-connection-between-an-external-group-and-a-team", "subcategory": "external-groups", @@ -5336,36 +5306,6 @@ "verb": "delete", "requestPath": "/teams/{team_id}" }, - { - "slug": "list-discussions-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions" - }, - { - "slug": "create-a-discussion-legacy", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/teams/{team_id}/discussions" - }, - { - "slug": "get-a-discussion-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}" - }, - { - "slug": "update-a-discussion-legacy", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}" - }, - { - "slug": "delete-a-discussion-legacy", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}" - }, { "slug": "list-pending-team-invitations-legacy", "subcategory": "members", diff --git a/src/github-apps/data/ghec-2022-11-28/server-to-server-permissions.json b/src/github-apps/data/ghec-2022-11-28/server-to-server-permissions.json index 59f01682fc9a..844dcbe023ae 100644 --- a/src/github-apps/data/ghec-2022-11-28/server-to-server-permissions.json +++ b/src/github-apps/data/ghec-2022-11-28/server-to-server-permissions.json @@ -4698,122 +4698,6 @@ } ] }, - "team_discussions": { - "title": "Team discussions", - "displayTitle": "Organization permissions for \"Team discussions\"", - "permissions": [ - { - "category": "teams", - "slug": "list-discussions", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions", - "access": "read", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - }, - { - "category": "teams", - "slug": "create-a-discussion", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions", - "access": "write", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - }, - { - "category": "teams", - "slug": "get-a-discussion", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", - "access": "read", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - }, - { - "category": "teams", - "slug": "update-a-discussion", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", - "access": "write", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - }, - { - "category": "teams", - "slug": "delete-a-discussion", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", - "access": "write", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - }, - { - "category": "teams", - "slug": "list-discussions-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions", - "access": "read", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - }, - { - "category": "teams", - "slug": "create-a-discussion-legacy", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/teams/{team_id}/discussions", - "access": "write", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - }, - { - "category": "teams", - "slug": "get-a-discussion-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}", - "access": "read", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - }, - { - "category": "teams", - "slug": "update-a-discussion-legacy", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}", - "access": "write", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - }, - { - "category": "teams", - "slug": "delete-a-discussion-legacy", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}", - "access": "write", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - } - ] - }, "organization_actions_variables": { "title": "Variables", "displayTitle": "Organization permissions for \"Variables\"", diff --git a/src/github-apps/data/ghec-2022-11-28/server-to-server-rest.json b/src/github-apps/data/ghec-2022-11-28/server-to-server-rest.json index dd1621e8d9d6..937d2641e350 100644 --- a/src/github-apps/data/ghec-2022-11-28/server-to-server-rest.json +++ b/src/github-apps/data/ghec-2022-11-28/server-to-server-rest.json @@ -5632,36 +5632,6 @@ "verb": "delete", "requestPath": "/orgs/{org}/teams/{team_slug}" }, - { - "slug": "list-discussions", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions" - }, - { - "slug": "create-a-discussion", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions" - }, - { - "slug": "get-a-discussion", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - }, - { - "slug": "update-a-discussion", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - }, - { - "slug": "delete-a-discussion", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - }, { "slug": "list-a-connection-between-an-external-group-and-a-team", "subcategory": "external-groups", @@ -5770,36 +5740,6 @@ "verb": "delete", "requestPath": "/teams/{team_id}" }, - { - "slug": "list-discussions-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions" - }, - { - "slug": "create-a-discussion-legacy", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/teams/{team_id}/discussions" - }, - { - "slug": "get-a-discussion-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}" - }, - { - "slug": "update-a-discussion-legacy", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}" - }, - { - "slug": "delete-a-discussion-legacy", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}" - }, { "slug": "list-pending-team-invitations-legacy", "subcategory": "members", diff --git a/src/github-apps/data/ghec-2022-11-28/user-to-server-rest.json b/src/github-apps/data/ghec-2022-11-28/user-to-server-rest.json index fb400e630934..ddad066b1eb4 100644 --- a/src/github-apps/data/ghec-2022-11-28/user-to-server-rest.json +++ b/src/github-apps/data/ghec-2022-11-28/user-to-server-rest.json @@ -6106,36 +6106,6 @@ "verb": "delete", "requestPath": "/orgs/{org}/teams/{team_slug}" }, - { - "slug": "list-discussions", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions" - }, - { - "slug": "create-a-discussion", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions" - }, - { - "slug": "get-a-discussion", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - }, - { - "slug": "update-a-discussion", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - }, - { - "slug": "delete-a-discussion", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - }, { "slug": "list-a-connection-between-an-external-group-and-a-team", "subcategory": "external-groups", @@ -6244,36 +6214,6 @@ "verb": "delete", "requestPath": "/teams/{team_id}" }, - { - "slug": "list-discussions-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions" - }, - { - "slug": "create-a-discussion-legacy", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/teams/{team_id}/discussions" - }, - { - "slug": "get-a-discussion-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}" - }, - { - "slug": "update-a-discussion-legacy", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}" - }, - { - "slug": "delete-a-discussion-legacy", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}" - }, { "slug": "list-pending-team-invitations-legacy", "subcategory": "members", diff --git a/src/github-apps/data/ghes-3.14-2022-11-28/fine-grained-pat-permissions.json b/src/github-apps/data/ghes-3.14-2022-11-28/fine-grained-pat-permissions.json index ae2cc58384f4..36afc65c3aa5 100644 --- a/src/github-apps/data/ghes-3.14-2022-11-28/fine-grained-pat-permissions.json +++ b/src/github-apps/data/ghes-3.14-2022-11-28/fine-grained-pat-permissions.json @@ -1523,102 +1523,6 @@ } ] }, - "team_discussions": { - "title": "Team discussions", - "displayTitle": "Organization permissions for \"Team discussions\"", - "permissions": [ - { - "category": "teams", - "slug": "list-discussions", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions", - "additional-permissions": false, - "access": "read" - }, - { - "category": "teams", - "slug": "create-a-discussion", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions", - "additional-permissions": false, - "access": "write" - }, - { - "category": "teams", - "slug": "get-a-discussion", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", - "additional-permissions": false, - "access": "read" - }, - { - "category": "teams", - "slug": "update-a-discussion", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", - "additional-permissions": false, - "access": "write" - }, - { - "category": "teams", - "slug": "delete-a-discussion", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", - "additional-permissions": false, - "access": "write" - }, - { - "category": "teams", - "slug": "list-discussions-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions", - "additional-permissions": false, - "access": "read" - }, - { - "category": "teams", - "slug": "create-a-discussion-legacy", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/teams/{team_id}/discussions", - "additional-permissions": false, - "access": "write" - }, - { - "category": "teams", - "slug": "get-a-discussion-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}", - "additional-permissions": false, - "access": "read" - }, - { - "category": "teams", - "slug": "update-a-discussion-legacy", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}", - "additional-permissions": false, - "access": "write" - }, - { - "category": "teams", - "slug": "delete-a-discussion-legacy", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}", - "additional-permissions": false, - "access": "write" - } - ] - }, "organization_actions_variables": { "title": "Variables", "displayTitle": "Organization permissions for \"Variables\"", diff --git a/src/github-apps/data/ghes-3.14-2022-11-28/fine-grained-pat.json b/src/github-apps/data/ghes-3.14-2022-11-28/fine-grained-pat.json index 2e68a8d8711b..c5d0ac5fe46f 100644 --- a/src/github-apps/data/ghes-3.14-2022-11-28/fine-grained-pat.json +++ b/src/github-apps/data/ghes-3.14-2022-11-28/fine-grained-pat.json @@ -3378,36 +3378,6 @@ "verb": "delete", "requestPath": "/orgs/{org}/teams/{team_slug}" }, - { - "slug": "list-discussions", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions" - }, - { - "slug": "create-a-discussion", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions" - }, - { - "slug": "get-a-discussion", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - }, - { - "slug": "update-a-discussion", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - }, - { - "slug": "delete-a-discussion", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - }, { "slug": "list-a-connection-between-an-external-group-and-a-team", "subcategory": "external-groups", @@ -3498,36 +3468,6 @@ "verb": "delete", "requestPath": "/teams/{team_id}" }, - { - "slug": "list-discussions-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions" - }, - { - "slug": "create-a-discussion-legacy", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/teams/{team_id}/discussions" - }, - { - "slug": "get-a-discussion-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}" - }, - { - "slug": "update-a-discussion-legacy", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}" - }, - { - "slug": "delete-a-discussion-legacy", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}" - }, { "slug": "list-team-members-legacy", "subcategory": "members", diff --git a/src/github-apps/data/ghes-3.14-2022-11-28/server-to-server-permissions.json b/src/github-apps/data/ghes-3.14-2022-11-28/server-to-server-permissions.json index c63448ebdc40..8db01b792f14 100644 --- a/src/github-apps/data/ghes-3.14-2022-11-28/server-to-server-permissions.json +++ b/src/github-apps/data/ghes-3.14-2022-11-28/server-to-server-permissions.json @@ -2085,122 +2085,6 @@ } ] }, - "team_discussions": { - "title": "Team discussions", - "displayTitle": "Organization permissions for \"Team discussions\"", - "permissions": [ - { - "category": "teams", - "slug": "list-discussions", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions", - "access": "read", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - }, - { - "category": "teams", - "slug": "create-a-discussion", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions", - "access": "write", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - }, - { - "category": "teams", - "slug": "get-a-discussion", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", - "access": "read", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - }, - { - "category": "teams", - "slug": "update-a-discussion", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", - "access": "write", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - }, - { - "category": "teams", - "slug": "delete-a-discussion", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", - "access": "write", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - }, - { - "category": "teams", - "slug": "list-discussions-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions", - "access": "read", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - }, - { - "category": "teams", - "slug": "create-a-discussion-legacy", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/teams/{team_id}/discussions", - "access": "write", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - }, - { - "category": "teams", - "slug": "get-a-discussion-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}", - "access": "read", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - }, - { - "category": "teams", - "slug": "update-a-discussion-legacy", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}", - "access": "write", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - }, - { - "category": "teams", - "slug": "delete-a-discussion-legacy", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}", - "access": "write", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - } - ] - }, "organization_actions_variables": { "title": "Variables", "displayTitle": "Organization permissions for \"Variables\"", diff --git a/src/github-apps/data/ghes-3.14-2022-11-28/server-to-server-rest.json b/src/github-apps/data/ghes-3.14-2022-11-28/server-to-server-rest.json index 0d9532f9e795..c1dac958087c 100644 --- a/src/github-apps/data/ghes-3.14-2022-11-28/server-to-server-rest.json +++ b/src/github-apps/data/ghes-3.14-2022-11-28/server-to-server-rest.json @@ -3856,36 +3856,6 @@ "verb": "delete", "requestPath": "/orgs/{org}/teams/{team_slug}" }, - { - "slug": "list-discussions", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions" - }, - { - "slug": "create-a-discussion", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions" - }, - { - "slug": "get-a-discussion", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - }, - { - "slug": "update-a-discussion", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - }, - { - "slug": "delete-a-discussion", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - }, { "slug": "list-a-connection-between-an-external-group-and-a-team", "subcategory": "external-groups", @@ -3976,36 +3946,6 @@ "verb": "delete", "requestPath": "/teams/{team_id}" }, - { - "slug": "list-discussions-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions" - }, - { - "slug": "create-a-discussion-legacy", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/teams/{team_id}/discussions" - }, - { - "slug": "get-a-discussion-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}" - }, - { - "slug": "update-a-discussion-legacy", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}" - }, - { - "slug": "delete-a-discussion-legacy", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}" - }, { "slug": "list-team-members-legacy", "subcategory": "members", diff --git a/src/github-apps/data/ghes-3.14-2022-11-28/user-to-server-rest.json b/src/github-apps/data/ghes-3.14-2022-11-28/user-to-server-rest.json index e1c3ef13c0c1..87f339be8c9c 100644 --- a/src/github-apps/data/ghes-3.14-2022-11-28/user-to-server-rest.json +++ b/src/github-apps/data/ghes-3.14-2022-11-28/user-to-server-rest.json @@ -4050,36 +4050,6 @@ "verb": "delete", "requestPath": "/orgs/{org}/teams/{team_slug}" }, - { - "slug": "list-discussions", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions" - }, - { - "slug": "create-a-discussion", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions" - }, - { - "slug": "get-a-discussion", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - }, - { - "slug": "update-a-discussion", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - }, - { - "slug": "delete-a-discussion", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - }, { "slug": "list-a-connection-between-an-external-group-and-a-team", "subcategory": "external-groups", @@ -4170,36 +4140,6 @@ "verb": "delete", "requestPath": "/teams/{team_id}" }, - { - "slug": "list-discussions-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions" - }, - { - "slug": "create-a-discussion-legacy", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/teams/{team_id}/discussions" - }, - { - "slug": "get-a-discussion-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}" - }, - { - "slug": "update-a-discussion-legacy", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}" - }, - { - "slug": "delete-a-discussion-legacy", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}" - }, { "slug": "list-team-members-legacy", "subcategory": "members", diff --git a/src/github-apps/data/ghes-3.15-2022-11-28/fine-grained-pat-permissions.json b/src/github-apps/data/ghes-3.15-2022-11-28/fine-grained-pat-permissions.json index 19be6f5e66dd..541750efdf14 100644 --- a/src/github-apps/data/ghes-3.15-2022-11-28/fine-grained-pat-permissions.json +++ b/src/github-apps/data/ghes-3.15-2022-11-28/fine-grained-pat-permissions.json @@ -1613,102 +1613,6 @@ } ] }, - "team_discussions": { - "title": "Team discussions", - "displayTitle": "Organization permissions for \"Team discussions\"", - "permissions": [ - { - "category": "teams", - "slug": "list-discussions", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions", - "additional-permissions": false, - "access": "read" - }, - { - "category": "teams", - "slug": "create-a-discussion", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions", - "additional-permissions": false, - "access": "write" - }, - { - "category": "teams", - "slug": "get-a-discussion", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", - "additional-permissions": false, - "access": "read" - }, - { - "category": "teams", - "slug": "update-a-discussion", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", - "additional-permissions": false, - "access": "write" - }, - { - "category": "teams", - "slug": "delete-a-discussion", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", - "additional-permissions": false, - "access": "write" - }, - { - "category": "teams", - "slug": "list-discussions-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions", - "additional-permissions": false, - "access": "read" - }, - { - "category": "teams", - "slug": "create-a-discussion-legacy", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/teams/{team_id}/discussions", - "additional-permissions": false, - "access": "write" - }, - { - "category": "teams", - "slug": "get-a-discussion-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}", - "additional-permissions": false, - "access": "read" - }, - { - "category": "teams", - "slug": "update-a-discussion-legacy", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}", - "additional-permissions": false, - "access": "write" - }, - { - "category": "teams", - "slug": "delete-a-discussion-legacy", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}", - "additional-permissions": false, - "access": "write" - } - ] - }, "organization_actions_variables": { "title": "Variables", "displayTitle": "Organization permissions for \"Variables\"", diff --git a/src/github-apps/data/ghes-3.15-2022-11-28/fine-grained-pat.json b/src/github-apps/data/ghes-3.15-2022-11-28/fine-grained-pat.json index 0d06014753ec..554c03bdd69c 100644 --- a/src/github-apps/data/ghes-3.15-2022-11-28/fine-grained-pat.json +++ b/src/github-apps/data/ghes-3.15-2022-11-28/fine-grained-pat.json @@ -3452,36 +3452,6 @@ "verb": "delete", "requestPath": "/orgs/{org}/teams/{team_slug}" }, - { - "slug": "list-discussions", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions" - }, - { - "slug": "create-a-discussion", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions" - }, - { - "slug": "get-a-discussion", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - }, - { - "slug": "update-a-discussion", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - }, - { - "slug": "delete-a-discussion", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - }, { "slug": "list-a-connection-between-an-external-group-and-a-team", "subcategory": "external-groups", @@ -3572,36 +3542,6 @@ "verb": "delete", "requestPath": "/teams/{team_id}" }, - { - "slug": "list-discussions-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions" - }, - { - "slug": "create-a-discussion-legacy", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/teams/{team_id}/discussions" - }, - { - "slug": "get-a-discussion-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}" - }, - { - "slug": "update-a-discussion-legacy", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}" - }, - { - "slug": "delete-a-discussion-legacy", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}" - }, { "slug": "list-team-members-legacy", "subcategory": "members", diff --git a/src/github-apps/data/ghes-3.15-2022-11-28/server-to-server-permissions.json b/src/github-apps/data/ghes-3.15-2022-11-28/server-to-server-permissions.json index 6ad071671599..f1aa07c97b8f 100644 --- a/src/github-apps/data/ghes-3.15-2022-11-28/server-to-server-permissions.json +++ b/src/github-apps/data/ghes-3.15-2022-11-28/server-to-server-permissions.json @@ -2195,122 +2195,6 @@ } ] }, - "team_discussions": { - "title": "Team discussions", - "displayTitle": "Organization permissions for \"Team discussions\"", - "permissions": [ - { - "category": "teams", - "slug": "list-discussions", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions", - "access": "read", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - }, - { - "category": "teams", - "slug": "create-a-discussion", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions", - "access": "write", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - }, - { - "category": "teams", - "slug": "get-a-discussion", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", - "access": "read", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - }, - { - "category": "teams", - "slug": "update-a-discussion", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", - "access": "write", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - }, - { - "category": "teams", - "slug": "delete-a-discussion", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", - "access": "write", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - }, - { - "category": "teams", - "slug": "list-discussions-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions", - "access": "read", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - }, - { - "category": "teams", - "slug": "create-a-discussion-legacy", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/teams/{team_id}/discussions", - "access": "write", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - }, - { - "category": "teams", - "slug": "get-a-discussion-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}", - "access": "read", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - }, - { - "category": "teams", - "slug": "update-a-discussion-legacy", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}", - "access": "write", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - }, - { - "category": "teams", - "slug": "delete-a-discussion-legacy", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}", - "access": "write", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - } - ] - }, "organization_actions_variables": { "title": "Variables", "displayTitle": "Organization permissions for \"Variables\"", diff --git a/src/github-apps/data/ghes-3.15-2022-11-28/server-to-server-rest.json b/src/github-apps/data/ghes-3.15-2022-11-28/server-to-server-rest.json index c9f3a16bd655..0a8901435672 100644 --- a/src/github-apps/data/ghes-3.15-2022-11-28/server-to-server-rest.json +++ b/src/github-apps/data/ghes-3.15-2022-11-28/server-to-server-rest.json @@ -3924,36 +3924,6 @@ "verb": "delete", "requestPath": "/orgs/{org}/teams/{team_slug}" }, - { - "slug": "list-discussions", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions" - }, - { - "slug": "create-a-discussion", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions" - }, - { - "slug": "get-a-discussion", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - }, - { - "slug": "update-a-discussion", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - }, - { - "slug": "delete-a-discussion", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - }, { "slug": "list-a-connection-between-an-external-group-and-a-team", "subcategory": "external-groups", @@ -4044,36 +4014,6 @@ "verb": "delete", "requestPath": "/teams/{team_id}" }, - { - "slug": "list-discussions-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions" - }, - { - "slug": "create-a-discussion-legacy", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/teams/{team_id}/discussions" - }, - { - "slug": "get-a-discussion-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}" - }, - { - "slug": "update-a-discussion-legacy", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}" - }, - { - "slug": "delete-a-discussion-legacy", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}" - }, { "slug": "list-team-members-legacy", "subcategory": "members", diff --git a/src/github-apps/data/ghes-3.15-2022-11-28/user-to-server-rest.json b/src/github-apps/data/ghes-3.15-2022-11-28/user-to-server-rest.json index d0c1dfc76910..f5f61f438e74 100644 --- a/src/github-apps/data/ghes-3.15-2022-11-28/user-to-server-rest.json +++ b/src/github-apps/data/ghes-3.15-2022-11-28/user-to-server-rest.json @@ -4124,36 +4124,6 @@ "verb": "delete", "requestPath": "/orgs/{org}/teams/{team_slug}" }, - { - "slug": "list-discussions", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions" - }, - { - "slug": "create-a-discussion", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions" - }, - { - "slug": "get-a-discussion", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - }, - { - "slug": "update-a-discussion", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - }, - { - "slug": "delete-a-discussion", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - }, { "slug": "list-a-connection-between-an-external-group-and-a-team", "subcategory": "external-groups", @@ -4244,36 +4214,6 @@ "verb": "delete", "requestPath": "/teams/{team_id}" }, - { - "slug": "list-discussions-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions" - }, - { - "slug": "create-a-discussion-legacy", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/teams/{team_id}/discussions" - }, - { - "slug": "get-a-discussion-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}" - }, - { - "slug": "update-a-discussion-legacy", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}" - }, - { - "slug": "delete-a-discussion-legacy", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}" - }, { "slug": "list-team-members-legacy", "subcategory": "members", diff --git a/src/github-apps/data/ghes-3.16-2022-11-28/fine-grained-pat-permissions.json b/src/github-apps/data/ghes-3.16-2022-11-28/fine-grained-pat-permissions.json index b4e060981955..513df1809668 100644 --- a/src/github-apps/data/ghes-3.16-2022-11-28/fine-grained-pat-permissions.json +++ b/src/github-apps/data/ghes-3.16-2022-11-28/fine-grained-pat-permissions.json @@ -1664,102 +1664,6 @@ } ] }, - "team_discussions": { - "title": "Team discussions", - "displayTitle": "Organization permissions for \"Team discussions\"", - "permissions": [ - { - "category": "teams", - "slug": "list-discussions", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions", - "additional-permissions": false, - "access": "read" - }, - { - "category": "teams", - "slug": "create-a-discussion", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions", - "additional-permissions": false, - "access": "write" - }, - { - "category": "teams", - "slug": "get-a-discussion", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", - "additional-permissions": false, - "access": "read" - }, - { - "category": "teams", - "slug": "update-a-discussion", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", - "additional-permissions": false, - "access": "write" - }, - { - "category": "teams", - "slug": "delete-a-discussion", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", - "additional-permissions": false, - "access": "write" - }, - { - "category": "teams", - "slug": "list-discussions-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions", - "additional-permissions": false, - "access": "read" - }, - { - "category": "teams", - "slug": "create-a-discussion-legacy", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/teams/{team_id}/discussions", - "additional-permissions": false, - "access": "write" - }, - { - "category": "teams", - "slug": "get-a-discussion-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}", - "additional-permissions": false, - "access": "read" - }, - { - "category": "teams", - "slug": "update-a-discussion-legacy", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}", - "additional-permissions": false, - "access": "write" - }, - { - "category": "teams", - "slug": "delete-a-discussion-legacy", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}", - "additional-permissions": false, - "access": "write" - } - ] - }, "organization_actions_variables": { "title": "Variables", "displayTitle": "Organization permissions for \"Variables\"", diff --git a/src/github-apps/data/ghes-3.16-2022-11-28/fine-grained-pat.json b/src/github-apps/data/ghes-3.16-2022-11-28/fine-grained-pat.json index ed9a1502fdc6..60d1ecd6f8b7 100644 --- a/src/github-apps/data/ghes-3.16-2022-11-28/fine-grained-pat.json +++ b/src/github-apps/data/ghes-3.16-2022-11-28/fine-grained-pat.json @@ -3490,36 +3490,6 @@ "verb": "delete", "requestPath": "/orgs/{org}/teams/{team_slug}" }, - { - "slug": "list-discussions", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions" - }, - { - "slug": "create-a-discussion", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions" - }, - { - "slug": "get-a-discussion", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - }, - { - "slug": "update-a-discussion", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - }, - { - "slug": "delete-a-discussion", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - }, { "slug": "list-a-connection-between-an-external-group-and-a-team", "subcategory": "external-groups", @@ -3610,36 +3580,6 @@ "verb": "delete", "requestPath": "/teams/{team_id}" }, - { - "slug": "list-discussions-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions" - }, - { - "slug": "create-a-discussion-legacy", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/teams/{team_id}/discussions" - }, - { - "slug": "get-a-discussion-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}" - }, - { - "slug": "update-a-discussion-legacy", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}" - }, - { - "slug": "delete-a-discussion-legacy", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}" - }, { "slug": "list-team-members-legacy", "subcategory": "members", diff --git a/src/github-apps/data/ghes-3.16-2022-11-28/server-to-server-permissions.json b/src/github-apps/data/ghes-3.16-2022-11-28/server-to-server-permissions.json index 5fbfebe73ea9..ba47503206b8 100644 --- a/src/github-apps/data/ghes-3.16-2022-11-28/server-to-server-permissions.json +++ b/src/github-apps/data/ghes-3.16-2022-11-28/server-to-server-permissions.json @@ -2256,122 +2256,6 @@ } ] }, - "team_discussions": { - "title": "Team discussions", - "displayTitle": "Organization permissions for \"Team discussions\"", - "permissions": [ - { - "category": "teams", - "slug": "list-discussions", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions", - "access": "read", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - }, - { - "category": "teams", - "slug": "create-a-discussion", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions", - "access": "write", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - }, - { - "category": "teams", - "slug": "get-a-discussion", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", - "access": "read", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - }, - { - "category": "teams", - "slug": "update-a-discussion", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", - "access": "write", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - }, - { - "category": "teams", - "slug": "delete-a-discussion", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", - "access": "write", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - }, - { - "category": "teams", - "slug": "list-discussions-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions", - "access": "read", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - }, - { - "category": "teams", - "slug": "create-a-discussion-legacy", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/teams/{team_id}/discussions", - "access": "write", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - }, - { - "category": "teams", - "slug": "get-a-discussion-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}", - "access": "read", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - }, - { - "category": "teams", - "slug": "update-a-discussion-legacy", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}", - "access": "write", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - }, - { - "category": "teams", - "slug": "delete-a-discussion-legacy", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}", - "access": "write", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - } - ] - }, "organization_actions_variables": { "title": "Variables", "displayTitle": "Organization permissions for \"Variables\"", diff --git a/src/github-apps/data/ghes-3.16-2022-11-28/server-to-server-rest.json b/src/github-apps/data/ghes-3.16-2022-11-28/server-to-server-rest.json index af9ea84812e9..cbb76b46d1e2 100644 --- a/src/github-apps/data/ghes-3.16-2022-11-28/server-to-server-rest.json +++ b/src/github-apps/data/ghes-3.16-2022-11-28/server-to-server-rest.json @@ -3962,36 +3962,6 @@ "verb": "delete", "requestPath": "/orgs/{org}/teams/{team_slug}" }, - { - "slug": "list-discussions", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions" - }, - { - "slug": "create-a-discussion", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions" - }, - { - "slug": "get-a-discussion", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - }, - { - "slug": "update-a-discussion", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - }, - { - "slug": "delete-a-discussion", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - }, { "slug": "list-a-connection-between-an-external-group-and-a-team", "subcategory": "external-groups", @@ -4082,36 +4052,6 @@ "verb": "delete", "requestPath": "/teams/{team_id}" }, - { - "slug": "list-discussions-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions" - }, - { - "slug": "create-a-discussion-legacy", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/teams/{team_id}/discussions" - }, - { - "slug": "get-a-discussion-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}" - }, - { - "slug": "update-a-discussion-legacy", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}" - }, - { - "slug": "delete-a-discussion-legacy", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}" - }, { "slug": "list-team-members-legacy", "subcategory": "members", diff --git a/src/github-apps/data/ghes-3.16-2022-11-28/user-to-server-rest.json b/src/github-apps/data/ghes-3.16-2022-11-28/user-to-server-rest.json index 90e83ab97452..440bba49ff2d 100644 --- a/src/github-apps/data/ghes-3.16-2022-11-28/user-to-server-rest.json +++ b/src/github-apps/data/ghes-3.16-2022-11-28/user-to-server-rest.json @@ -4162,36 +4162,6 @@ "verb": "delete", "requestPath": "/orgs/{org}/teams/{team_slug}" }, - { - "slug": "list-discussions", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions" - }, - { - "slug": "create-a-discussion", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions" - }, - { - "slug": "get-a-discussion", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - }, - { - "slug": "update-a-discussion", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - }, - { - "slug": "delete-a-discussion", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - }, { "slug": "list-a-connection-between-an-external-group-and-a-team", "subcategory": "external-groups", @@ -4282,36 +4252,6 @@ "verb": "delete", "requestPath": "/teams/{team_id}" }, - { - "slug": "list-discussions-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions" - }, - { - "slug": "create-a-discussion-legacy", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/teams/{team_id}/discussions" - }, - { - "slug": "get-a-discussion-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}" - }, - { - "slug": "update-a-discussion-legacy", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}" - }, - { - "slug": "delete-a-discussion-legacy", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}" - }, { "slug": "list-team-members-legacy", "subcategory": "members", diff --git a/src/github-apps/data/ghes-3.17-2022-11-28/fine-grained-pat-permissions.json b/src/github-apps/data/ghes-3.17-2022-11-28/fine-grained-pat-permissions.json index 1d80813ba776..4e3b78ef423e 100644 --- a/src/github-apps/data/ghes-3.17-2022-11-28/fine-grained-pat-permissions.json +++ b/src/github-apps/data/ghes-3.17-2022-11-28/fine-grained-pat-permissions.json @@ -1715,102 +1715,6 @@ } ] }, - "team_discussions": { - "title": "Team discussions", - "displayTitle": "Organization permissions for \"Team discussions\"", - "permissions": [ - { - "category": "teams", - "slug": "list-discussions", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions", - "additional-permissions": false, - "access": "read" - }, - { - "category": "teams", - "slug": "create-a-discussion", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions", - "additional-permissions": false, - "access": "write" - }, - { - "category": "teams", - "slug": "get-a-discussion", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", - "additional-permissions": false, - "access": "read" - }, - { - "category": "teams", - "slug": "update-a-discussion", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", - "additional-permissions": false, - "access": "write" - }, - { - "category": "teams", - "slug": "delete-a-discussion", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", - "additional-permissions": false, - "access": "write" - }, - { - "category": "teams", - "slug": "list-discussions-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions", - "additional-permissions": false, - "access": "read" - }, - { - "category": "teams", - "slug": "create-a-discussion-legacy", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/teams/{team_id}/discussions", - "additional-permissions": false, - "access": "write" - }, - { - "category": "teams", - "slug": "get-a-discussion-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}", - "additional-permissions": false, - "access": "read" - }, - { - "category": "teams", - "slug": "update-a-discussion-legacy", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}", - "additional-permissions": false, - "access": "write" - }, - { - "category": "teams", - "slug": "delete-a-discussion-legacy", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}", - "additional-permissions": false, - "access": "write" - } - ] - }, "organization_actions_variables": { "title": "Variables", "displayTitle": "Organization permissions for \"Variables\"", diff --git a/src/github-apps/data/ghes-3.17-2022-11-28/fine-grained-pat.json b/src/github-apps/data/ghes-3.17-2022-11-28/fine-grained-pat.json index 22d4ba587ff5..eceb669633c2 100644 --- a/src/github-apps/data/ghes-3.17-2022-11-28/fine-grained-pat.json +++ b/src/github-apps/data/ghes-3.17-2022-11-28/fine-grained-pat.json @@ -3538,36 +3538,6 @@ "verb": "delete", "requestPath": "/orgs/{org}/teams/{team_slug}" }, - { - "slug": "list-discussions", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions" - }, - { - "slug": "create-a-discussion", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions" - }, - { - "slug": "get-a-discussion", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - }, - { - "slug": "update-a-discussion", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - }, - { - "slug": "delete-a-discussion", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - }, { "slug": "list-a-connection-between-an-external-group-and-a-team", "subcategory": "external-groups", @@ -3658,36 +3628,6 @@ "verb": "delete", "requestPath": "/teams/{team_id}" }, - { - "slug": "list-discussions-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions" - }, - { - "slug": "create-a-discussion-legacy", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/teams/{team_id}/discussions" - }, - { - "slug": "get-a-discussion-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}" - }, - { - "slug": "update-a-discussion-legacy", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}" - }, - { - "slug": "delete-a-discussion-legacy", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}" - }, { "slug": "list-team-members-legacy", "subcategory": "members", diff --git a/src/github-apps/data/ghes-3.17-2022-11-28/server-to-server-permissions.json b/src/github-apps/data/ghes-3.17-2022-11-28/server-to-server-permissions.json index e9fc3042306f..b8f9965e83d9 100644 --- a/src/github-apps/data/ghes-3.17-2022-11-28/server-to-server-permissions.json +++ b/src/github-apps/data/ghes-3.17-2022-11-28/server-to-server-permissions.json @@ -2317,122 +2317,6 @@ } ] }, - "team_discussions": { - "title": "Team discussions", - "displayTitle": "Organization permissions for \"Team discussions\"", - "permissions": [ - { - "category": "teams", - "slug": "list-discussions", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions", - "access": "read", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - }, - { - "category": "teams", - "slug": "create-a-discussion", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions", - "access": "write", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - }, - { - "category": "teams", - "slug": "get-a-discussion", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", - "access": "read", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - }, - { - "category": "teams", - "slug": "update-a-discussion", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", - "access": "write", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - }, - { - "category": "teams", - "slug": "delete-a-discussion", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", - "access": "write", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - }, - { - "category": "teams", - "slug": "list-discussions-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions", - "access": "read", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - }, - { - "category": "teams", - "slug": "create-a-discussion-legacy", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/teams/{team_id}/discussions", - "access": "write", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - }, - { - "category": "teams", - "slug": "get-a-discussion-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}", - "access": "read", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - }, - { - "category": "teams", - "slug": "update-a-discussion-legacy", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}", - "access": "write", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - }, - { - "category": "teams", - "slug": "delete-a-discussion-legacy", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}", - "access": "write", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - } - ] - }, "organization_actions_variables": { "title": "Variables", "displayTitle": "Organization permissions for \"Variables\"", diff --git a/src/github-apps/data/ghes-3.17-2022-11-28/server-to-server-rest.json b/src/github-apps/data/ghes-3.17-2022-11-28/server-to-server-rest.json index 85cc4a3e2cc6..6148a87ae775 100644 --- a/src/github-apps/data/ghes-3.17-2022-11-28/server-to-server-rest.json +++ b/src/github-apps/data/ghes-3.17-2022-11-28/server-to-server-rest.json @@ -4004,36 +4004,6 @@ "verb": "delete", "requestPath": "/orgs/{org}/teams/{team_slug}" }, - { - "slug": "list-discussions", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions" - }, - { - "slug": "create-a-discussion", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions" - }, - { - "slug": "get-a-discussion", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - }, - { - "slug": "update-a-discussion", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - }, - { - "slug": "delete-a-discussion", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - }, { "slug": "list-a-connection-between-an-external-group-and-a-team", "subcategory": "external-groups", @@ -4124,36 +4094,6 @@ "verb": "delete", "requestPath": "/teams/{team_id}" }, - { - "slug": "list-discussions-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions" - }, - { - "slug": "create-a-discussion-legacy", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/teams/{team_id}/discussions" - }, - { - "slug": "get-a-discussion-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}" - }, - { - "slug": "update-a-discussion-legacy", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}" - }, - { - "slug": "delete-a-discussion-legacy", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}" - }, { "slug": "list-team-members-legacy", "subcategory": "members", diff --git a/src/github-apps/data/ghes-3.17-2022-11-28/user-to-server-rest.json b/src/github-apps/data/ghes-3.17-2022-11-28/user-to-server-rest.json index 4211a318babf..8108426c14ab 100644 --- a/src/github-apps/data/ghes-3.17-2022-11-28/user-to-server-rest.json +++ b/src/github-apps/data/ghes-3.17-2022-11-28/user-to-server-rest.json @@ -4210,36 +4210,6 @@ "verb": "delete", "requestPath": "/orgs/{org}/teams/{team_slug}" }, - { - "slug": "list-discussions", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions" - }, - { - "slug": "create-a-discussion", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions" - }, - { - "slug": "get-a-discussion", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - }, - { - "slug": "update-a-discussion", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - }, - { - "slug": "delete-a-discussion", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - }, { "slug": "list-a-connection-between-an-external-group-and-a-team", "subcategory": "external-groups", @@ -4330,36 +4300,6 @@ "verb": "delete", "requestPath": "/teams/{team_id}" }, - { - "slug": "list-discussions-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions" - }, - { - "slug": "create-a-discussion-legacy", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/teams/{team_id}/discussions" - }, - { - "slug": "get-a-discussion-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}" - }, - { - "slug": "update-a-discussion-legacy", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}" - }, - { - "slug": "delete-a-discussion-legacy", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}" - }, { "slug": "list-team-members-legacy", "subcategory": "members", diff --git a/src/github-apps/data/ghes-3.18-2022-11-28/fine-grained-pat-permissions.json b/src/github-apps/data/ghes-3.18-2022-11-28/fine-grained-pat-permissions.json index a21851712dcc..2a87bff8d911 100644 --- a/src/github-apps/data/ghes-3.18-2022-11-28/fine-grained-pat-permissions.json +++ b/src/github-apps/data/ghes-3.18-2022-11-28/fine-grained-pat-permissions.json @@ -1784,102 +1784,6 @@ } ] }, - "team_discussions": { - "title": "Team discussions", - "displayTitle": "Organization permissions for \"Team discussions\"", - "permissions": [ - { - "category": "teams", - "slug": "list-discussions", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions", - "additional-permissions": false, - "access": "read" - }, - { - "category": "teams", - "slug": "create-a-discussion", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions", - "additional-permissions": false, - "access": "write" - }, - { - "category": "teams", - "slug": "get-a-discussion", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", - "additional-permissions": false, - "access": "read" - }, - { - "category": "teams", - "slug": "update-a-discussion", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", - "additional-permissions": false, - "access": "write" - }, - { - "category": "teams", - "slug": "delete-a-discussion", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", - "additional-permissions": false, - "access": "write" - }, - { - "category": "teams", - "slug": "list-discussions-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions", - "additional-permissions": false, - "access": "read" - }, - { - "category": "teams", - "slug": "create-a-discussion-legacy", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/teams/{team_id}/discussions", - "additional-permissions": false, - "access": "write" - }, - { - "category": "teams", - "slug": "get-a-discussion-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}", - "additional-permissions": false, - "access": "read" - }, - { - "category": "teams", - "slug": "update-a-discussion-legacy", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}", - "additional-permissions": false, - "access": "write" - }, - { - "category": "teams", - "slug": "delete-a-discussion-legacy", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}", - "additional-permissions": false, - "access": "write" - } - ] - }, "organization_actions_variables": { "title": "Variables", "displayTitle": "Organization permissions for \"Variables\"", diff --git a/src/github-apps/data/ghes-3.18-2022-11-28/fine-grained-pat.json b/src/github-apps/data/ghes-3.18-2022-11-28/fine-grained-pat.json index 68321ae6ac32..b676b9ebb5fe 100644 --- a/src/github-apps/data/ghes-3.18-2022-11-28/fine-grained-pat.json +++ b/src/github-apps/data/ghes-3.18-2022-11-28/fine-grained-pat.json @@ -3586,36 +3586,6 @@ "verb": "delete", "requestPath": "/orgs/{org}/teams/{team_slug}" }, - { - "slug": "list-discussions", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions" - }, - { - "slug": "create-a-discussion", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions" - }, - { - "slug": "get-a-discussion", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - }, - { - "slug": "update-a-discussion", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - }, - { - "slug": "delete-a-discussion", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - }, { "slug": "list-a-connection-between-an-external-group-and-a-team", "subcategory": "external-groups", @@ -3706,36 +3676,6 @@ "verb": "delete", "requestPath": "/teams/{team_id}" }, - { - "slug": "list-discussions-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions" - }, - { - "slug": "create-a-discussion-legacy", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/teams/{team_id}/discussions" - }, - { - "slug": "get-a-discussion-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}" - }, - { - "slug": "update-a-discussion-legacy", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}" - }, - { - "slug": "delete-a-discussion-legacy", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}" - }, { "slug": "list-team-members-legacy", "subcategory": "members", diff --git a/src/github-apps/data/ghes-3.18-2022-11-28/server-to-server-permissions.json b/src/github-apps/data/ghes-3.18-2022-11-28/server-to-server-permissions.json index 575a3136b17b..71db361d947a 100644 --- a/src/github-apps/data/ghes-3.18-2022-11-28/server-to-server-permissions.json +++ b/src/github-apps/data/ghes-3.18-2022-11-28/server-to-server-permissions.json @@ -2472,122 +2472,6 @@ } ] }, - "team_discussions": { - "title": "Team discussions", - "displayTitle": "Organization permissions for \"Team discussions\"", - "permissions": [ - { - "category": "teams", - "slug": "list-discussions", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions", - "access": "read", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - }, - { - "category": "teams", - "slug": "create-a-discussion", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions", - "access": "write", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - }, - { - "category": "teams", - "slug": "get-a-discussion", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", - "access": "read", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - }, - { - "category": "teams", - "slug": "update-a-discussion", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", - "access": "write", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - }, - { - "category": "teams", - "slug": "delete-a-discussion", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", - "access": "write", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - }, - { - "category": "teams", - "slug": "list-discussions-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions", - "access": "read", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - }, - { - "category": "teams", - "slug": "create-a-discussion-legacy", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/teams/{team_id}/discussions", - "access": "write", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - }, - { - "category": "teams", - "slug": "get-a-discussion-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}", - "access": "read", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - }, - { - "category": "teams", - "slug": "update-a-discussion-legacy", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}", - "access": "write", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - }, - { - "category": "teams", - "slug": "delete-a-discussion-legacy", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}", - "access": "write", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - } - ] - }, "organization_actions_variables": { "title": "Variables", "displayTitle": "Organization permissions for \"Variables\"", diff --git a/src/github-apps/data/ghes-3.18-2022-11-28/server-to-server-rest.json b/src/github-apps/data/ghes-3.18-2022-11-28/server-to-server-rest.json index b18ab8a9e336..62814581d14a 100644 --- a/src/github-apps/data/ghes-3.18-2022-11-28/server-to-server-rest.json +++ b/src/github-apps/data/ghes-3.18-2022-11-28/server-to-server-rest.json @@ -4096,36 +4096,6 @@ "verb": "delete", "requestPath": "/orgs/{org}/teams/{team_slug}" }, - { - "slug": "list-discussions", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions" - }, - { - "slug": "create-a-discussion", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions" - }, - { - "slug": "get-a-discussion", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - }, - { - "slug": "update-a-discussion", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - }, - { - "slug": "delete-a-discussion", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - }, { "slug": "list-a-connection-between-an-external-group-and-a-team", "subcategory": "external-groups", @@ -4216,36 +4186,6 @@ "verb": "delete", "requestPath": "/teams/{team_id}" }, - { - "slug": "list-discussions-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions" - }, - { - "slug": "create-a-discussion-legacy", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/teams/{team_id}/discussions" - }, - { - "slug": "get-a-discussion-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}" - }, - { - "slug": "update-a-discussion-legacy", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}" - }, - { - "slug": "delete-a-discussion-legacy", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}" - }, { "slug": "list-team-members-legacy", "subcategory": "members", diff --git a/src/github-apps/data/ghes-3.18-2022-11-28/user-to-server-rest.json b/src/github-apps/data/ghes-3.18-2022-11-28/user-to-server-rest.json index 4e9e615650b2..342d2438a602 100644 --- a/src/github-apps/data/ghes-3.18-2022-11-28/user-to-server-rest.json +++ b/src/github-apps/data/ghes-3.18-2022-11-28/user-to-server-rest.json @@ -4302,36 +4302,6 @@ "verb": "delete", "requestPath": "/orgs/{org}/teams/{team_slug}" }, - { - "slug": "list-discussions", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions" - }, - { - "slug": "create-a-discussion", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions" - }, - { - "slug": "get-a-discussion", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - }, - { - "slug": "update-a-discussion", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - }, - { - "slug": "delete-a-discussion", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - }, { "slug": "list-a-connection-between-an-external-group-and-a-team", "subcategory": "external-groups", @@ -4422,36 +4392,6 @@ "verb": "delete", "requestPath": "/teams/{team_id}" }, - { - "slug": "list-discussions-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions" - }, - { - "slug": "create-a-discussion-legacy", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/teams/{team_id}/discussions" - }, - { - "slug": "get-a-discussion-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}" - }, - { - "slug": "update-a-discussion-legacy", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}" - }, - { - "slug": "delete-a-discussion-legacy", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}" - }, { "slug": "list-team-members-legacy", "subcategory": "members", diff --git a/src/github-apps/data/ghes-3.19-2022-11-28/fine-grained-pat-permissions.json b/src/github-apps/data/ghes-3.19-2022-11-28/fine-grained-pat-permissions.json index 011782c8e871..f5e77c6c29ce 100644 --- a/src/github-apps/data/ghes-3.19-2022-11-28/fine-grained-pat-permissions.json +++ b/src/github-apps/data/ghes-3.19-2022-11-28/fine-grained-pat-permissions.json @@ -1994,102 +1994,6 @@ } ] }, - "team_discussions": { - "title": "Team discussions", - "displayTitle": "Organization permissions for \"Team discussions\"", - "permissions": [ - { - "category": "teams", - "slug": "list-discussions", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions", - "additional-permissions": false, - "access": "read" - }, - { - "category": "teams", - "slug": "create-a-discussion", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions", - "additional-permissions": false, - "access": "write" - }, - { - "category": "teams", - "slug": "get-a-discussion", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", - "additional-permissions": false, - "access": "read" - }, - { - "category": "teams", - "slug": "update-a-discussion", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", - "additional-permissions": false, - "access": "write" - }, - { - "category": "teams", - "slug": "delete-a-discussion", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", - "additional-permissions": false, - "access": "write" - }, - { - "category": "teams", - "slug": "list-discussions-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions", - "additional-permissions": false, - "access": "read" - }, - { - "category": "teams", - "slug": "create-a-discussion-legacy", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/teams/{team_id}/discussions", - "additional-permissions": false, - "access": "write" - }, - { - "category": "teams", - "slug": "get-a-discussion-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}", - "additional-permissions": false, - "access": "read" - }, - { - "category": "teams", - "slug": "update-a-discussion-legacy", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}", - "additional-permissions": false, - "access": "write" - }, - { - "category": "teams", - "slug": "delete-a-discussion-legacy", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}", - "additional-permissions": false, - "access": "write" - } - ] - }, "organization_actions_variables": { "title": "Variables", "displayTitle": "Organization permissions for \"Variables\"", diff --git a/src/github-apps/data/ghes-3.19-2022-11-28/fine-grained-pat.json b/src/github-apps/data/ghes-3.19-2022-11-28/fine-grained-pat.json index 02c5c1fdf975..39ab7316f58a 100644 --- a/src/github-apps/data/ghes-3.19-2022-11-28/fine-grained-pat.json +++ b/src/github-apps/data/ghes-3.19-2022-11-28/fine-grained-pat.json @@ -3802,36 +3802,6 @@ "verb": "delete", "requestPath": "/orgs/{org}/teams/{team_slug}" }, - { - "slug": "list-discussions", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions" - }, - { - "slug": "create-a-discussion", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions" - }, - { - "slug": "get-a-discussion", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - }, - { - "slug": "update-a-discussion", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - }, - { - "slug": "delete-a-discussion", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - }, { "slug": "list-a-connection-between-an-external-group-and-a-team", "subcategory": "external-groups", @@ -3922,36 +3892,6 @@ "verb": "delete", "requestPath": "/teams/{team_id}" }, - { - "slug": "list-discussions-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions" - }, - { - "slug": "create-a-discussion-legacy", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/teams/{team_id}/discussions" - }, - { - "slug": "get-a-discussion-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}" - }, - { - "slug": "update-a-discussion-legacy", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}" - }, - { - "slug": "delete-a-discussion-legacy", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}" - }, { "slug": "list-team-members-legacy", "subcategory": "members", diff --git a/src/github-apps/data/ghes-3.19-2022-11-28/server-to-server-permissions.json b/src/github-apps/data/ghes-3.19-2022-11-28/server-to-server-permissions.json index f7b11c454795..5fd050985719 100644 --- a/src/github-apps/data/ghes-3.19-2022-11-28/server-to-server-permissions.json +++ b/src/github-apps/data/ghes-3.19-2022-11-28/server-to-server-permissions.json @@ -2892,122 +2892,6 @@ } ] }, - "team_discussions": { - "title": "Team discussions", - "displayTitle": "Organization permissions for \"Team discussions\"", - "permissions": [ - { - "category": "teams", - "slug": "list-discussions", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions", - "access": "read", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - }, - { - "category": "teams", - "slug": "create-a-discussion", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions", - "access": "write", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - }, - { - "category": "teams", - "slug": "get-a-discussion", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", - "access": "read", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - }, - { - "category": "teams", - "slug": "update-a-discussion", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", - "access": "write", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - }, - { - "category": "teams", - "slug": "delete-a-discussion", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", - "access": "write", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - }, - { - "category": "teams", - "slug": "list-discussions-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions", - "access": "read", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - }, - { - "category": "teams", - "slug": "create-a-discussion-legacy", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/teams/{team_id}/discussions", - "access": "write", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - }, - { - "category": "teams", - "slug": "get-a-discussion-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}", - "access": "read", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - }, - { - "category": "teams", - "slug": "update-a-discussion-legacy", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}", - "access": "write", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - }, - { - "category": "teams", - "slug": "delete-a-discussion-legacy", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}", - "access": "write", - "user-to-server": true, - "server-to-server": true, - "additional-permissions": false - } - ] - }, "organization_actions_variables": { "title": "Variables", "displayTitle": "Organization permissions for \"Variables\"", diff --git a/src/github-apps/data/ghes-3.19-2022-11-28/server-to-server-rest.json b/src/github-apps/data/ghes-3.19-2022-11-28/server-to-server-rest.json index 228f5b89ddf0..259d6f44a81a 100644 --- a/src/github-apps/data/ghes-3.19-2022-11-28/server-to-server-rest.json +++ b/src/github-apps/data/ghes-3.19-2022-11-28/server-to-server-rest.json @@ -4366,36 +4366,6 @@ "verb": "delete", "requestPath": "/orgs/{org}/teams/{team_slug}" }, - { - "slug": "list-discussions", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions" - }, - { - "slug": "create-a-discussion", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions" - }, - { - "slug": "get-a-discussion", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - }, - { - "slug": "update-a-discussion", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - }, - { - "slug": "delete-a-discussion", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - }, { "slug": "list-a-connection-between-an-external-group-and-a-team", "subcategory": "external-groups", @@ -4486,36 +4456,6 @@ "verb": "delete", "requestPath": "/teams/{team_id}" }, - { - "slug": "list-discussions-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions" - }, - { - "slug": "create-a-discussion-legacy", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/teams/{team_id}/discussions" - }, - { - "slug": "get-a-discussion-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}" - }, - { - "slug": "update-a-discussion-legacy", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}" - }, - { - "slug": "delete-a-discussion-legacy", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}" - }, { "slug": "list-team-members-legacy", "subcategory": "members", diff --git a/src/github-apps/data/ghes-3.19-2022-11-28/user-to-server-rest.json b/src/github-apps/data/ghes-3.19-2022-11-28/user-to-server-rest.json index f0ff0cad6482..30372a349977 100644 --- a/src/github-apps/data/ghes-3.19-2022-11-28/user-to-server-rest.json +++ b/src/github-apps/data/ghes-3.19-2022-11-28/user-to-server-rest.json @@ -4572,36 +4572,6 @@ "verb": "delete", "requestPath": "/orgs/{org}/teams/{team_slug}" }, - { - "slug": "list-discussions", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions" - }, - { - "slug": "create-a-discussion", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions" - }, - { - "slug": "get-a-discussion", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - }, - { - "slug": "update-a-discussion", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - }, - { - "slug": "delete-a-discussion", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}" - }, { "slug": "list-a-connection-between-an-external-group-and-a-team", "subcategory": "external-groups", @@ -4692,36 +4662,6 @@ "verb": "delete", "requestPath": "/teams/{team_id}" }, - { - "slug": "list-discussions-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions" - }, - { - "slug": "create-a-discussion-legacy", - "subcategory": "discussions", - "verb": "post", - "requestPath": "/teams/{team_id}/discussions" - }, - { - "slug": "get-a-discussion-legacy", - "subcategory": "discussions", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}" - }, - { - "slug": "update-a-discussion-legacy", - "subcategory": "discussions", - "verb": "patch", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}" - }, - { - "slug": "delete-a-discussion-legacy", - "subcategory": "discussions", - "verb": "delete", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}" - }, { "slug": "list-team-members-legacy", "subcategory": "members", diff --git a/src/github-apps/lib/config.json b/src/github-apps/lib/config.json index cca7e35ff1e9..9cbfeb53ec5b 100644 --- a/src/github-apps/lib/config.json +++ b/src/github-apps/lib/config.json @@ -60,5 +60,5 @@ "2022-11-28" ] }, - "sha": "733113fd6171aa4ab4ef9ecb71e23005b9b0b7a6" + "sha": "7c030db5ffcf2d5ba3a1b61eacaed65c27bad7c0" } \ No newline at end of file diff --git a/src/graphql/scripts/sync.ts b/src/graphql/scripts/sync.ts index 5cd1a5b94ec6..9d8a84ed3435 100755 --- a/src/graphql/scripts/sync.ts +++ b/src/graphql/scripts/sync.ts @@ -29,6 +29,27 @@ interface IgnoredChange { types: Array<{ type: string }> } +interface RawPreview { + title: string + toggled_on: string[] + toggled_by: string + announcement?: unknown + updates?: unknown +} + +interface UpcomingChangeEntry { + location: string + date: string + description: string + [key: string]: unknown +} + +interface UpcomingChangesDocument { + upcoming_changes: UpcomingChangeEntry[] +} + +type SchemaPreview = Omit & { toggled_by: string[] } + const graphqlStaticDir = 'src/graphql/data' const dataFilenames = JSON.parse( await fs.readFile('src/graphql/scripts/utils/data-filenames.json', 'utf8'), @@ -54,11 +75,10 @@ async function main() { // 1. UPDATE PREVIEWS const previewsPath = getDataFilepath('previews', graphqlVersion) - // GraphQL preview data structure - complex nested object from YAML - // Using any because processPreviews is an external utility without type definitions - const safeForPublicPreviews = yaml.load( + const rawPreviews = yaml.load( await getRemoteRawContent(previewsPath, graphqlVersion), - ) as any + ) as RawPreview[] + const safeForPublicPreviews: RawPreview[] = Array.isArray(rawPreviews) ? rawPreviews : [] const previewsJson = processPreviews(safeForPublicPreviews) await updateStaticFile( previewsJson, @@ -67,10 +87,9 @@ async function main() { // 2. UPDATE UPCOMING CHANGES const upcomingChangesPath = getDataFilepath('upcomingChanges', graphqlVersion) - // GraphQL upcoming changes data - contains upcoming_changes array - const previousUpcomingChanges = yaml.load(await fs.readFile(upcomingChangesPath, 'utf8')) as { - upcoming_changes: unknown[] - } + const previousUpcomingChanges = yaml.load( + await fs.readFile(upcomingChangesPath, 'utf8'), + ) as UpcomingChangesDocument const safeForPublicChanges = await getRemoteRawContent(upcomingChangesPath, graphqlVersion) await updateFile(upcomingChangesPath, safeForPublicChanges) const upcomingChangesJson = await processUpcomingChanges(safeForPublicChanges) @@ -85,10 +104,13 @@ async function main() { const previousSchemaString = await fs.readFile(previewFilePath, 'utf8') const latestSchema = await getRemoteRawContent(previewFilePath, graphqlVersion) await updateFile(previewFilePath, latestSchema) - // Using any because processSchemas returns complex GraphQL schema structures - const schemaJsonPerVersion = await processSchemas(latestSchema, safeForPublicPreviews) // This is slow! + const previewsForSchema: SchemaPreview[] = safeForPublicPreviews.map((preview) => ({ + ...preview, + toggled_by: [preview.toggled_by].flat(), + })) + const schemaJsonPerVersion = await processSchemas(latestSchema, previewsForSchema) // This is slow! await updateStaticFile( - schemaJsonPerVersion as any, + schemaJsonPerVersion, path.join(graphqlStaticDir, graphqlVersion, 'schema.json'), ) @@ -99,9 +121,8 @@ async function main() { previousSchemaString, latestSchema, safeForPublicPreviews, - previousUpcomingChanges.upcoming_changes as any, - (yaml.load(safeForPublicChanges) as { upcoming_changes: unknown[] }) - .upcoming_changes as any, + previousUpcomingChanges.upcoming_changes, + (yaml.load(safeForPublicChanges) as UpcomingChangesDocument).upcoming_changes, ) if (changelogEntry) { prependDatedEntry( @@ -225,8 +246,8 @@ async function updateFile(filepath: string, content: string) { } // JSON data from GraphQL schema processing - complex nested structures -// Using any because the structure varies (arrays, objects, nested schemas, etc.) -async function updateStaticFile(json: any, filepath: string) { +// Serialize unknown shapes because the structure varies (arrays, objects, nested schemas, etc.) +async function updateStaticFile(json: unknown, filepath: string) { console.log(`Updating static file ${filepath}`) const jsonString = JSON.stringify(json, null, 2) return updateFile(filepath, jsonString) diff --git a/src/landings/components/ProductGuidesContext.tsx b/src/landings/components/ProductGuidesContext.tsx index 35a3c26158bb..d79cbc216003 100644 --- a/src/landings/components/ProductGuidesContext.tsx +++ b/src/landings/components/ProductGuidesContext.tsx @@ -7,7 +7,7 @@ export type LearningTrack = { trackProduct: string title: string description: string - guides?: Array<{ href: string; page?: { type: string }; title: string; intro: string }> + guides?: Array<{ href: string; type: string | null; title: string; intro: string }> } export type ArticleGuide = { @@ -60,7 +60,7 @@ export const getProductGuidesContextFromRequest = (req: ExtendedRequest): Produc title: (guide.title as string) || '', intro: (guide.intro as string) || '', href: (guide.href as string) || '', - page: guide.page as { type: string } | undefined, + type: ((guide.page as any)?.type as string) || null, }), ), }), diff --git a/src/landings/context/LandingContext.tsx b/src/landings/context/LandingContext.tsx index 20bdfec9d0bc..8564ec1e8c81 100644 --- a/src/landings/context/LandingContext.tsx +++ b/src/landings/context/LandingContext.tsx @@ -2,7 +2,7 @@ import { createContext, useContext } from 'react' import { getFeaturedLinksFromReq } from '@/landings/components/ProductLandingContext' import { mapRawTocItemToTocItem } from '@/landings/types' import type { TocItem } from '@/landings/types' -import type { LearningTrack } from '@/types' +import type { ExtendedRequest, Context, LearningTrack } from '@/types' import type { JourneyTrack } from '@/journeys/lib/journey-path-resolver' import type { FeaturedLink } from '@/landings/components/ProductLandingContext' @@ -23,13 +23,24 @@ export type LandingContextT = { heroImage?: string // For landing pages with carousels recommended?: Array<{ title: string; intro: string; href: string; category: string[] }> // Resolved article data - introLinks?: Record + introLinks?: Record | null // For journey landing pages journeyTracks?: JourneyTrack[] // For article grid category filtering includedCategories?: string[] } +type LandingPage = NonNullable & { + recommended?: LandingContextT['recommended'] + includedCategories?: string[] + heroImage?: string + product?: string + permissions?: string + rawPermissions?: string + introLinks?: Record | null + resolvedJourneyTracks?: JourneyTrack[] +} + export const LandingContext = createContext(null) export const useLandingContext = (): LandingContextT => { @@ -46,38 +57,50 @@ export const useLandingContext = (): LandingContextT => { * Server-side function to create LandingContext data from a request. */ export const getLandingContextFromRequest = async ( - req: any, + req: ExtendedRequest, landingType: LandingType, ): Promise => { - const page = req.context.page - - let recommended: Array<{ title: string; intro: string; href: string; category: string[] }> = [] + const context = (req.context ?? {}) as Context & { + journeyTracks?: JourneyTrack[] + page?: LandingPage + } + const page = context.page as LandingPage | undefined - if (landingType === 'discovery' || landingType === 'bespoke') { - // Use resolved recommended articles from the page after middleware processing - if (page.recommended && Array.isArray(page.recommended) && page.recommended.length > 0) { - recommended = page.recommended - } + if (!page) { + throw new Error('"getLandingContextFromRequest" requires req.context.page') } + const recommended = + landingType !== 'discovery' && landingType !== 'bespoke' + ? [] + : Array.isArray(page.recommended) + ? (page.recommended as LandingContextT['recommended']) + : [] + // Note: Journey tracks are resolved in middleware and added to the request // context to avoid the error using server side apis client side - const journeyTracks: JourneyTrack[] = [] + const journeyTracks: JourneyTrack[] = Array.isArray(context.journeyTracks) + ? context.journeyTracks + : Array.isArray(page.resolvedJourneyTracks) + ? page.resolvedJourneyTracks + : [] + + const tocItems = (context.genericTocFlat || context.genericTocNested || []).map( + mapRawTocItemToTocItem, + ) return { landingType, title: page.title, - productCallout: page.product || '', - permissions: page.permissions || '', + productCallout: page.product ?? '', + permissions: page.permissions ?? page.rawPermissions ?? '', intro: page.intro, - tocItems: (req.context.genericTocFlat || req.context.genericTocNested || []).map( - mapRawTocItemToTocItem, - ), - variant: req.context.genericTocFlat ? 'expanded' : 'compact', + tocItems, + variant: context.genericTocFlat ? 'expanded' : 'compact', featuredLinks: getFeaturedLinksFromReq(req), - renderedPage: req.context.renderedPage, - currentLearningTrack: req.context.currentLearningTrack, - currentLayout: req.context.currentLayoutName, + renderedPage: context.renderedPage ?? '', + currentLearningTrack: context.currentLearningTrack ?? undefined, + currentLayout: context.currentLayoutName ?? '', heroImage: page.heroImage || '/assets/images/banner-images/hero-1', introLinks: page.introLinks || null, recommended, diff --git a/src/learning-track/components/guides/LearningTrack.tsx b/src/learning-track/components/guides/LearningTrack.tsx index 1e87aec54fd0..c5acf10e92a6 100644 --- a/src/learning-track/components/guides/LearningTrack.tsx +++ b/src/learning-track/components/guides/LearningTrack.tsx @@ -31,9 +31,7 @@ export const LearningTrack = ({ track }: Props) => {
    {track.guides.map((guide) => (
  1. - - {tObject('guide_types')[guide.page?.type || ''] as string} - + {tObject('guide_types')[guide.type || ''] as string} renderContent(linkHref, context, opts), - () => '', // todo get english linkHref + (enContext: Context) => renderContent(linkHref, enContext, opts), ) : linkHref // If the link was `{% ifversion ghes %}/admin/foo/bar{% endifversion %}` diff --git a/src/learning-track/lib/process-learning-tracks.ts b/src/learning-track/lib/process-learning-tracks.ts index e4871081b33a..9ac8a5a5571f 100644 --- a/src/learning-track/lib/process-learning-tracks.ts +++ b/src/learning-track/lib/process-learning-tracks.ts @@ -25,7 +25,7 @@ export default async function processLearningTracks( ? await executeWithFallback( context, () => renderContent(rawTrackName, context, renderOpts), - () => '', // todo use english rawTrackName + (enContext: Context) => renderContent(rawTrackName, enContext, renderOpts), ) : rawTrackName if (!renderedTrackName) continue diff --git a/src/learning-track/middleware/learning-track.ts b/src/learning-track/middleware/learning-track.ts index 28e9402890a9..014e986621cc 100644 --- a/src/learning-track/middleware/learning-track.ts +++ b/src/learning-track/middleware/learning-track.ts @@ -86,7 +86,17 @@ export default async function learningTrack( const trackTitle = await executeWithFallback( req.context, () => renderContent(track.title, req.context, renderOpts), - () => '', // todo use english track.title + (enContext: Context) => { + const allEnglishLearningTracks = getDeepDataByLanguage( + 'learning-tracks', + 'en', + ) as LearningTracks + const enTrack = allEnglishLearningTracks[trackProduct]?.[trackName] + if (!enTrack) { + throw new Error(`English learning track not found: ${trackProduct}.${trackName}`) + } + return renderContent(enTrack.title, enContext, renderOpts) + }, ) const currentLearningTrack: CurrentLearningTrack = { trackName, trackProduct, trackTitle } @@ -176,7 +186,7 @@ async function indexOfLearningTrackGuide( const renderedGuidePath = await executeWithFallback( context, () => renderContent(trackGuidePaths[i], context, renderOpts), - () => '', // todo use english trackGuidePaths[i] + (enContext: Context) => renderContent(trackGuidePaths[i], enContext, renderOpts), ) if (!renderedGuidePath) continue diff --git a/src/links/scripts/action-injections.ts b/src/links/scripts/action-injections.ts index c7a0cfcd1d57..928bc6996ddb 100644 --- a/src/links/scripts/action-injections.ts +++ b/src/links/scripts/action-injections.ts @@ -14,7 +14,7 @@ export type CoreInject = { debug: (message: string) => void warning: (message: string) => void error: (message: string) => void - setOutput: (name: string, value: any) => void + setOutput: (name: string, value: unknown) => void setFailed: (message: string) => void } // Directs core logging to console @@ -24,7 +24,7 @@ export function getCoreInject(debug: boolean): CoreInject { debug: (message: string) => (debug ? console.warn(chalk.blue(message)) : {}), warning: (message: string) => console.warn(chalk.yellow(message)), error: console.error, - setOutput: (name: string, value: any) => { + setOutput: (name: string, value: unknown) => { if (debug) { console.log(`Output "${name}" set to: "${value}"`) } diff --git a/src/links/scripts/debug-time-taken.ts b/src/links/scripts/debug-time-taken.ts index 12ca8c636644..c8e7d53cd8ce 100644 --- a/src/links/scripts/debug-time-taken.ts +++ b/src/links/scripts/debug-time-taken.ts @@ -1,9 +1,9 @@ -import coreLib from '@actions/core' - const timeInstances = new Map() +type CoreLike = { warning: (message: string | Error) => void; debug: (message: string) => void } + /* Meant to be called before debugTimeEnd with the same instanceName to behave like console.time() */ -export function debugTimeStart(core: typeof coreLib, instanceName: string) { +export function debugTimeStart(core: CoreLike, instanceName: string) { if (timeInstances.has(instanceName)) { core.warning(`instanceName: ${instanceName} has already been used for a debug instance.`) return @@ -13,7 +13,7 @@ export function debugTimeStart(core: typeof coreLib, instanceName: string) { } /* Meant to be called after debugTimeStart with the same instanceName to behave like console.timeEnd() */ -export function debugTimeEnd(core: typeof coreLib, instanceName: string) { +export function debugTimeEnd(core: CoreLike, instanceName: string) { if (!timeInstances.has(instanceName)) { core.warning( `Invalid instanceName: ${instanceName} in debugTimeEnd. Did you call debugTimeStart first with the same instanceName?`, diff --git a/src/links/scripts/rendered-content-link-checker.ts b/src/links/scripts/rendered-content-link-checker.ts index 7b2110ed932b..646b46dc214c 100755 --- a/src/links/scripts/rendered-content-link-checker.ts +++ b/src/links/scripts/rendered-content-link-checker.ts @@ -75,7 +75,7 @@ type Options = { verboseUrl?: string bail?: boolean commentLimitToExternalLinks?: boolean - actionContext?: any + actionContext?: ReturnType & { pull_request?: { number?: number } } concurrency?: number } @@ -277,7 +277,7 @@ if (import.meta.url.endsWith(process.argv[1])) { */ async function main( - core: any, + core: CoreInject, octokit: Octokit, uploadArtifact: UploadArtifact, opts: Options = {}, @@ -337,9 +337,14 @@ async function main( shuffle(pageList) } - debugTimeStart(core, 'getPages') + const coreForDebug = core as { + warning: (message: string | Error, properties?: { [key: string]: unknown }) => void + debug: (message: string) => void + } + + debugTimeStart(coreForDebug, 'getPages') const pages = getPages(pageList, languages, filters, files, max) - debugTimeEnd(core, 'getPages') + debugTimeEnd(coreForDebug, 'getPages') if (checkExternalLinks && pages.length >= 100) { core.warning( @@ -371,7 +376,7 @@ async function main( ) } - debugTimeStart(core, 'processPages') + debugTimeStart(coreForDebug, 'processPages') const t0 = new Date().getTime() const flawsGroups = await limitConcurrency( pages, @@ -388,7 +393,7 @@ async function main( concurrency, // Limit concurrent page checks ) const t1 = new Date().getTime() - debugTimeEnd(core, 'processPages') + debugTimeEnd(coreForDebug, 'processPages') await externalLinkCheckerDB.write() @@ -413,7 +418,7 @@ async function main( if (createReport) { core.info(`Creating issue for flaws...`) const reportProps = { - core, + core: coreLib, octokit, reportTitle: `${uniqueHrefs.size} broken links found`, reportBody: flawIssueDisplay(flaws, opts), @@ -424,7 +429,7 @@ async function main( if (linkReports) { const linkProps = { - core, + core: coreLib, octokit, newReport, reportRepository, @@ -465,7 +470,7 @@ async function main( } async function commentOnPR(core: CoreInject, octokit: Octokit, flaws: LinkFlaw[], opts: Options) { - const { actionContext = {} } = opts + const { actionContext = {} as Options['actionContext'] } = opts const { owner, repo } = actionContext const pullNumber = actionContext?.pull_request?.number if (!owner || !repo || !pullNumber) { @@ -718,7 +723,7 @@ async function processPage( } async function processPermalink( - core: any, + core: CoreInject, permalink: Permalink, page: Page, pageMap: PageMap, @@ -925,7 +930,7 @@ let globalCacheHitCount = 0 let globalCacheMissCount = 0 async function checkHrefLink( - core: any, + core: CoreInject, href: string, $: cheerio.Root, redirects: Redirects, @@ -1302,7 +1307,7 @@ function summarizeCounts(core: CoreInject, pages: Page[], tookSeconds: number) { core.info(`~${pagesPerSecond.toFixed(1)} pages per second.`) } -function shuffle(array: any[]) { +function shuffle(array: T[]) { let currentIndex = array.length let randomIndex diff --git a/src/pages/README.md b/src/pages/README.md index f0c364a983bc..f360d269ee37 100644 --- a/src/pages/README.md +++ b/src/pages/README.md @@ -140,4 +140,3 @@ npm run dev ``` Routes should load without errors and render correct content from subject directories. - diff --git a/src/redirects/lib/static/developer.json b/src/redirects/lib/static/developer.json index 391424e01d31..d1994d8976fd 100644 --- a/src/redirects/lib/static/developer.json +++ b/src/redirects/lib/static/developer.json @@ -3072,7 +3072,7 @@ "/v3/repos/statuses": "/rest/commits/statuses", "/v3/repos/traffic": "/rest/metrics/traffic", "/v3/teams/discussion_comments": "/discussions", - "/v3/teams/discussions": "/rest/teams/discussions", + "/v3/teams/discussions": "/discussions", "/v3/teams/members": "/rest/teams/members", "/v3/teams/team_sync": "/enterprise-cloud@latest/rest/teams/team-sync", "/v3/users/blocking": "/rest/users/blocking", diff --git a/src/rest/data/fpt-2022-11-28/schema.json b/src/rest/data/fpt-2022-11-28/schema.json index f2fa0cbe1e89..01eab55fea03 100644 --- a/src/rest/data/fpt-2022-11-28/schema.json +++ b/src/rest/data/fpt-2022-11-28/schema.json @@ -784319,3973 +784319,6 @@ } } ], - "discussions": [ - { - "serverUrl": "https://api.github.com", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions", - "title": "List discussions", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "org", - "description": "

    The organization name. The name is not case sensitive.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "team_slug", - "description": "

    The slug of the team name.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "direction", - "description": "

    The direction to sort the results by.

    ", - "in": "query", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "per_page", - "description": "

    The number of results per page (max 100). For more information, see \"Using pagination in the REST API.\"

    ", - "in": "query", - "schema": { - "type": "integer", - "default": 30 - } - }, - { - "name": "page", - "description": "

    The page number of the results to fetch. For more information, see \"Using pagination in the REST API.\"

    ", - "in": "query", - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "pinned", - "in": "query", - "required": false, - "description": "

    Pinned discussions only filter

    ", - "schema": { - "type": "string" - } - } - ], - "bodyParameters": [], - "descriptionHTML": "

    List all discussions on a team's page.

    \n

    Note

    \n

    \nYou can also specify a team by org_id and team_id using the route GET /organizations/{org_id}/team/{team_id}/discussions.

    \n
    \n

    OAuth app tokens and personal access tokens (classic) need the read:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "parameters": { - "org": "ORG", - "team_slug": "TEAM_SLUG" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

    Response

    ", - "example": [ - { - "author": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "body": "Hi! This is an area for us to collaborate as a team.", - "body_html": "

    Hi! This is an area for us to collaborate as a team

    ", - "body_version": "0d495416a700fb06133c612575d92bfb", - "created_at": "2018-01-25T18:56:31Z", - "last_edited_at": null, - "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1", - "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==", - "number": 1, - "pinned": false, - "private": false, - "team_url": "https://api.github.com/teams/2343027", - "title": "Our first team post", - "updated_at": "2018-01-25T18:56:31Z", - "url": "https://api.github.com/teams/2343027/discussions/1", - "reactions": { - "url": "https://api.github.com/teams/2343027/discussions/1/reactions", - "total_count": 5, - "+1": 3, - "-1": 1, - "laugh": 0, - "confused": 0, - "heart": 1, - "hooray": 0, - "eyes": 1, - "rocket": 1 - } - } - ], - "schema": { - "type": "array", - "items": { - "title": "Team Discussion", - "description": "A team discussion is a persistent record of a free-form conversation within a team.", - "type": "object", - "properties": { - "author": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "format": "int64", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - }, - "user_view_type": { - "type": "string", - "examples": [ - "public" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "body": { - "description": "The main text of the discussion.", - "type": "string", - "examples": [ - "Please suggest improvements to our workflow in comments." - ] - }, - "body_html": { - "type": "string", - "examples": [ - "

    Hi! This is an area for us to collaborate as a team

    " - ] - }, - "body_version": { - "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.", - "type": "string", - "examples": [ - "0307116bbf7ced493b8d8a346c650b71" - ] - }, - "created_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "last_edited_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/orgs/github/teams/justice-league/discussions/1" - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDE0OlRlYW1EaXNjdXNzaW9uMQ==" - ] - }, - "number": { - "description": "The unique sequence number of a team discussion.", - "type": "integer", - "examples": [ - 42 - ] - }, - "pinned": { - "description": "Whether or not this discussion should be pinned for easy retrieval.", - "type": "boolean", - "examples": [ - true - ] - }, - "private": { - "description": "Whether or not this discussion should be restricted to team members and organization owners.", - "type": "boolean", - "examples": [ - true - ] - }, - "team_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027" - ] - }, - "title": { - "description": "The title of the discussion.", - "type": "string", - "examples": [ - "How can we improve our workflow?" - ] - }, - "updated_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027/discussions/1" - ] - }, - "reactions": { - "title": "Reaction Rollup", - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri" - }, - "total_count": { - "type": "integer" - }, - "+1": { - "type": "integer" - }, - "-1": { - "type": "integer" - }, - "laugh": { - "type": "integer" - }, - "confused": { - "type": "integer" - }, - "heart": { - "type": "integer" - }, - "hooray": { - "type": "integer" - }, - "eyes": { - "type": "integer" - }, - "rocket": { - "type": "integer" - } - }, - "required": [ - "url", - "total_count", - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "eyes", - "rocket" - ] - } - }, - "required": [ - "author", - "body", - "body_html", - "body_version", - "created_at", - "last_edited_at", - "html_url", - "pinned", - "private", - "node_id", - "number", - "team_url", - "title", - "updated_at", - "url" - ] - } - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

    OK

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "read" - } - ] - } - }, - { - "serverUrl": "https://api.github.com", - "verb": "post", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions", - "title": "Create a discussion", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "org", - "description": "

    The organization name. The name is not case sensitive.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "team_slug", - "description": "

    The slug of the team name.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "bodyParameters": [ - { - "type": "string", - "name": "title", - "in": "body", - "description": "

    The discussion post's title.

    ", - "isRequired": true - }, - { - "type": "string", - "name": "body", - "in": "body", - "description": "

    The discussion post's body text.

    ", - "isRequired": true - }, - { - "type": "boolean", - "name": "private", - "in": "body", - "description": "

    Private posts are only visible to team members, organization owners, and team maintainers. Public posts are visible to all members of the organization. Set to true to create a private post.

    ", - "default": false - } - ], - "descriptionHTML": "

    Creates a new discussion post on a team's page.

    \n

    This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see \"Rate limits for the API\" and \"Best practices for using the REST API.\"

    \n

    Note

    \n

    \nYou can also specify a team by org_id and team_id using the route POST /organizations/{org_id}/team/{team_id}/discussions.

    \n
    \n

    OAuth app tokens and personal access tokens (classic) need the write:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "contentType": "application/json", - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "bodyParameters": { - "title": "Our first team post", - "body": "Hi! This is an area for us to collaborate as a team." - }, - "parameters": { - "org": "ORG", - "team_slug": "TEAM_SLUG" - } - }, - "response": { - "statusCode": "201", - "contentType": "application/json", - "description": "

    Response

    ", - "example": { - "author": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "body": "Hi! This is an area for us to collaborate as a team.", - "body_html": "

    Hi! This is an area for us to collaborate as a team

    ", - "body_version": "0d495416a700fb06133c612575d92bfb", - "created_at": "2018-01-25T18:56:31Z", - "last_edited_at": null, - "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1", - "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==", - "number": 1, - "pinned": false, - "private": false, - "team_url": "https://api.github.com/teams/2343027", - "title": "Our first team post", - "updated_at": "2018-01-25T18:56:31Z", - "url": "https://api.github.com/teams/2343027/discussions/1", - "reactions": { - "url": "https://api.github.com/teams/2343027/discussions/1/reactions", - "total_count": 5, - "+1": 3, - "-1": 1, - "laugh": 0, - "confused": 0, - "heart": 1, - "hooray": 0, - "eyes": 1, - "rocket": 1 - } - }, - "schema": { - "title": "Team Discussion", - "description": "A team discussion is a persistent record of a free-form conversation within a team.", - "type": "object", - "properties": { - "author": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "format": "int64", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - }, - "user_view_type": { - "type": "string", - "examples": [ - "public" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "body": { - "description": "The main text of the discussion.", - "type": "string", - "examples": [ - "Please suggest improvements to our workflow in comments." - ] - }, - "body_html": { - "type": "string", - "examples": [ - "

    Hi! This is an area for us to collaborate as a team

    " - ] - }, - "body_version": { - "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.", - "type": "string", - "examples": [ - "0307116bbf7ced493b8d8a346c650b71" - ] - }, - "created_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "last_edited_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/orgs/github/teams/justice-league/discussions/1" - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDE0OlRlYW1EaXNjdXNzaW9uMQ==" - ] - }, - "number": { - "description": "The unique sequence number of a team discussion.", - "type": "integer", - "examples": [ - 42 - ] - }, - "pinned": { - "description": "Whether or not this discussion should be pinned for easy retrieval.", - "type": "boolean", - "examples": [ - true - ] - }, - "private": { - "description": "Whether or not this discussion should be restricted to team members and organization owners.", - "type": "boolean", - "examples": [ - true - ] - }, - "team_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027" - ] - }, - "title": { - "description": "The title of the discussion.", - "type": "string", - "examples": [ - "How can we improve our workflow?" - ] - }, - "updated_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027/discussions/1" - ] - }, - "reactions": { - "title": "Reaction Rollup", - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri" - }, - "total_count": { - "type": "integer" - }, - "+1": { - "type": "integer" - }, - "-1": { - "type": "integer" - }, - "laugh": { - "type": "integer" - }, - "confused": { - "type": "integer" - }, - "heart": { - "type": "integer" - }, - "hooray": { - "type": "integer" - }, - "eyes": { - "type": "integer" - }, - "rocket": { - "type": "integer" - } - }, - "required": [ - "url", - "total_count", - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "eyes", - "rocket" - ] - } - }, - "required": [ - "author", - "body", - "body_html", - "body_version", - "created_at", - "last_edited_at", - "html_url", - "pinned", - "private", - "node_id", - "number", - "team_url", - "title", - "updated_at", - "url" - ] - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "201", - "description": "

    Created

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "write" - } - ] - } - }, - { - "serverUrl": "https://api.github.com", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", - "title": "Get a discussion", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "org", - "description": "

    The organization name. The name is not case sensitive.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "team_slug", - "description": "

    The slug of the team name.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "discussion_number", - "description": "

    The number that identifies the discussion.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "bodyParameters": [], - "descriptionHTML": "

    Get a specific discussion on a team's page.

    \n

    Note

    \n

    \nYou can also specify a team by org_id and team_id using the route GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}.

    \n
    \n

    OAuth app tokens and personal access tokens (classic) need the read:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "parameters": { - "org": "ORG", - "team_slug": "TEAM_SLUG", - "discussion_number": "DISCUSSION_NUMBER" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

    Response

    ", - "example": { - "author": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "body": "Hi! This is an area for us to collaborate as a team.", - "body_html": "

    Hi! This is an area for us to collaborate as a team

    ", - "body_version": "0d495416a700fb06133c612575d92bfb", - "created_at": "2018-01-25T18:56:31Z", - "last_edited_at": null, - "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1", - "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==", - "number": 1, - "pinned": false, - "private": false, - "team_url": "https://api.github.com/teams/2343027", - "title": "Our first team post", - "updated_at": "2018-01-25T18:56:31Z", - "url": "https://api.github.com/teams/2343027/discussions/1", - "reactions": { - "url": "https://api.github.com/teams/2343027/discussions/1/reactions", - "total_count": 5, - "+1": 3, - "-1": 1, - "laugh": 0, - "confused": 0, - "heart": 1, - "hooray": 0, - "eyes": 1, - "rocket": 1 - } - }, - "schema": { - "title": "Team Discussion", - "description": "A team discussion is a persistent record of a free-form conversation within a team.", - "type": "object", - "properties": { - "author": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "format": "int64", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - }, - "user_view_type": { - "type": "string", - "examples": [ - "public" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "body": { - "description": "The main text of the discussion.", - "type": "string", - "examples": [ - "Please suggest improvements to our workflow in comments." - ] - }, - "body_html": { - "type": "string", - "examples": [ - "

    Hi! This is an area for us to collaborate as a team

    " - ] - }, - "body_version": { - "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.", - "type": "string", - "examples": [ - "0307116bbf7ced493b8d8a346c650b71" - ] - }, - "created_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "last_edited_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/orgs/github/teams/justice-league/discussions/1" - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDE0OlRlYW1EaXNjdXNzaW9uMQ==" - ] - }, - "number": { - "description": "The unique sequence number of a team discussion.", - "type": "integer", - "examples": [ - 42 - ] - }, - "pinned": { - "description": "Whether or not this discussion should be pinned for easy retrieval.", - "type": "boolean", - "examples": [ - true - ] - }, - "private": { - "description": "Whether or not this discussion should be restricted to team members and organization owners.", - "type": "boolean", - "examples": [ - true - ] - }, - "team_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027" - ] - }, - "title": { - "description": "The title of the discussion.", - "type": "string", - "examples": [ - "How can we improve our workflow?" - ] - }, - "updated_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027/discussions/1" - ] - }, - "reactions": { - "title": "Reaction Rollup", - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri" - }, - "total_count": { - "type": "integer" - }, - "+1": { - "type": "integer" - }, - "-1": { - "type": "integer" - }, - "laugh": { - "type": "integer" - }, - "confused": { - "type": "integer" - }, - "heart": { - "type": "integer" - }, - "hooray": { - "type": "integer" - }, - "eyes": { - "type": "integer" - }, - "rocket": { - "type": "integer" - } - }, - "required": [ - "url", - "total_count", - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "eyes", - "rocket" - ] - } - }, - "required": [ - "author", - "body", - "body_html", - "body_version", - "created_at", - "last_edited_at", - "html_url", - "pinned", - "private", - "node_id", - "number", - "team_url", - "title", - "updated_at", - "url" - ] - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

    OK

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "read" - } - ] - } - }, - { - "serverUrl": "https://api.github.com", - "verb": "patch", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", - "title": "Update a discussion", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "org", - "description": "

    The organization name. The name is not case sensitive.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "team_slug", - "description": "

    The slug of the team name.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "discussion_number", - "description": "

    The number that identifies the discussion.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "bodyParameters": [ - { - "type": "string", - "name": "title", - "in": "body", - "description": "

    The discussion post's title.

    " - }, - { - "type": "string", - "name": "body", - "in": "body", - "description": "

    The discussion post's body text.

    " - } - ], - "descriptionHTML": "

    Edits the title and body text of a discussion post. Only the parameters you provide are updated.

    \n

    Note

    \n

    \nYou can also specify a team by org_id and team_id using the route PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}.

    \n
    \n

    OAuth app tokens and personal access tokens (classic) need the write:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "contentType": "application/json", - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "bodyParameters": { - "title": "Welcome to our first team post" - }, - "parameters": { - "org": "ORG", - "team_slug": "TEAM_SLUG", - "discussion_number": "DISCUSSION_NUMBER" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

    Response

    ", - "example": { - "author": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "body": "Hi! This is an area for us to collaborate as a team.", - "body_html": "

    Hi! This is an area for us to collaborate as a team

    ", - "body_version": "0d495416a700fb06133c612575d92bfb", - "created_at": "2018-01-25T18:56:31Z", - "last_edited_at": "2018-01-26T18:22:20Z", - "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1", - "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==", - "number": 1, - "pinned": false, - "private": false, - "team_url": "https://api.github.com/teams/2343027", - "title": "Welcome to our first team post", - "updated_at": "2018-01-26T18:22:20Z", - "url": "https://api.github.com/teams/2343027/discussions/1", - "reactions": { - "url": "https://api.github.com/teams/2343027/discussions/1/reactions", - "total_count": 5, - "+1": 3, - "-1": 1, - "laugh": 0, - "confused": 0, - "heart": 1, - "hooray": 0, - "eyes": 1, - "rocket": 1 - } - }, - "schema": { - "title": "Team Discussion", - "description": "A team discussion is a persistent record of a free-form conversation within a team.", - "type": "object", - "properties": { - "author": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "format": "int64", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - }, - "user_view_type": { - "type": "string", - "examples": [ - "public" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "body": { - "description": "The main text of the discussion.", - "type": "string", - "examples": [ - "Please suggest improvements to our workflow in comments." - ] - }, - "body_html": { - "type": "string", - "examples": [ - "

    Hi! This is an area for us to collaborate as a team

    " - ] - }, - "body_version": { - "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.", - "type": "string", - "examples": [ - "0307116bbf7ced493b8d8a346c650b71" - ] - }, - "created_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "last_edited_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/orgs/github/teams/justice-league/discussions/1" - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDE0OlRlYW1EaXNjdXNzaW9uMQ==" - ] - }, - "number": { - "description": "The unique sequence number of a team discussion.", - "type": "integer", - "examples": [ - 42 - ] - }, - "pinned": { - "description": "Whether or not this discussion should be pinned for easy retrieval.", - "type": "boolean", - "examples": [ - true - ] - }, - "private": { - "description": "Whether or not this discussion should be restricted to team members and organization owners.", - "type": "boolean", - "examples": [ - true - ] - }, - "team_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027" - ] - }, - "title": { - "description": "The title of the discussion.", - "type": "string", - "examples": [ - "How can we improve our workflow?" - ] - }, - "updated_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027/discussions/1" - ] - }, - "reactions": { - "title": "Reaction Rollup", - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri" - }, - "total_count": { - "type": "integer" - }, - "+1": { - "type": "integer" - }, - "-1": { - "type": "integer" - }, - "laugh": { - "type": "integer" - }, - "confused": { - "type": "integer" - }, - "heart": { - "type": "integer" - }, - "hooray": { - "type": "integer" - }, - "eyes": { - "type": "integer" - }, - "rocket": { - "type": "integer" - } - }, - "required": [ - "url", - "total_count", - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "eyes", - "rocket" - ] - } - }, - "required": [ - "author", - "body", - "body_html", - "body_version", - "created_at", - "last_edited_at", - "html_url", - "pinned", - "private", - "node_id", - "number", - "team_url", - "title", - "updated_at", - "url" - ] - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

    OK

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "write" - } - ] - } - }, - { - "serverUrl": "https://api.github.com", - "verb": "delete", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", - "title": "Delete a discussion", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "org", - "description": "

    The organization name. The name is not case sensitive.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "team_slug", - "description": "

    The slug of the team name.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "discussion_number", - "description": "

    The number that identifies the discussion.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "bodyParameters": [], - "descriptionHTML": "

    Delete a discussion from a team's page.

    \n

    Note

    \n

    \nYou can also specify a team by org_id and team_id using the route DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}.

    \n
    \n

    OAuth app tokens and personal access tokens (classic) need the write:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "parameters": { - "org": "ORG", - "team_slug": "TEAM_SLUG", - "discussion_number": "DISCUSSION_NUMBER" - } - }, - "response": { - "statusCode": "204", - "description": "

    Response

    " - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "204", - "description": "

    No Content

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "write" - } - ] - } - }, - { - "serverUrl": "https://api.github.com", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions", - "title": "List discussions (Legacy)", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "team_id", - "description": "

    The unique identifier of the team.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "direction", - "description": "

    The direction to sort the results by.

    ", - "in": "query", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "per_page", - "description": "

    The number of results per page (max 100). For more information, see \"Using pagination in the REST API.\"

    ", - "in": "query", - "schema": { - "type": "integer", - "default": 30 - } - }, - { - "name": "page", - "description": "

    The page number of the results to fetch. For more information, see \"Using pagination in the REST API.\"

    ", - "in": "query", - "schema": { - "type": "integer", - "default": 1 - } - } - ], - "bodyParameters": [], - "descriptionHTML": "

    Warning

    \n

    \nEndpoint closing down notice: This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new List discussions endpoint.

    \n
    \n

    List all discussions on a team's page.

    \n

    OAuth app tokens and personal access tokens (classic) need the read:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "parameters": { - "team_id": "TEAM_ID" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

    Response

    ", - "example": [ - { - "author": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "body": "Hi! This is an area for us to collaborate as a team.", - "body_html": "

    Hi! This is an area for us to collaborate as a team

    ", - "body_version": "0d495416a700fb06133c612575d92bfb", - "created_at": "2018-01-25T18:56:31Z", - "last_edited_at": null, - "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1", - "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==", - "number": 1, - "pinned": false, - "private": false, - "team_url": "https://api.github.com/teams/2343027", - "title": "Our first team post", - "updated_at": "2018-01-25T18:56:31Z", - "url": "https://api.github.com/teams/2343027/discussions/1", - "reactions": { - "url": "https://api.github.com/teams/2343027/discussions/1/reactions", - "total_count": 5, - "+1": 3, - "-1": 1, - "laugh": 0, - "confused": 0, - "heart": 1, - "hooray": 0, - "eyes": 1, - "rocket": 1 - } - } - ], - "schema": { - "type": "array", - "items": { - "title": "Team Discussion", - "description": "A team discussion is a persistent record of a free-form conversation within a team.", - "type": "object", - "properties": { - "author": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "format": "int64", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - }, - "user_view_type": { - "type": "string", - "examples": [ - "public" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "body": { - "description": "The main text of the discussion.", - "type": "string", - "examples": [ - "Please suggest improvements to our workflow in comments." - ] - }, - "body_html": { - "type": "string", - "examples": [ - "

    Hi! This is an area for us to collaborate as a team

    " - ] - }, - "body_version": { - "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.", - "type": "string", - "examples": [ - "0307116bbf7ced493b8d8a346c650b71" - ] - }, - "created_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "last_edited_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/orgs/github/teams/justice-league/discussions/1" - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDE0OlRlYW1EaXNjdXNzaW9uMQ==" - ] - }, - "number": { - "description": "The unique sequence number of a team discussion.", - "type": "integer", - "examples": [ - 42 - ] - }, - "pinned": { - "description": "Whether or not this discussion should be pinned for easy retrieval.", - "type": "boolean", - "examples": [ - true - ] - }, - "private": { - "description": "Whether or not this discussion should be restricted to team members and organization owners.", - "type": "boolean", - "examples": [ - true - ] - }, - "team_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027" - ] - }, - "title": { - "description": "The title of the discussion.", - "type": "string", - "examples": [ - "How can we improve our workflow?" - ] - }, - "updated_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027/discussions/1" - ] - }, - "reactions": { - "title": "Reaction Rollup", - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri" - }, - "total_count": { - "type": "integer" - }, - "+1": { - "type": "integer" - }, - "-1": { - "type": "integer" - }, - "laugh": { - "type": "integer" - }, - "confused": { - "type": "integer" - }, - "heart": { - "type": "integer" - }, - "hooray": { - "type": "integer" - }, - "eyes": { - "type": "integer" - }, - "rocket": { - "type": "integer" - } - }, - "required": [ - "url", - "total_count", - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "eyes", - "rocket" - ] - } - }, - "required": [ - "author", - "body", - "body_html", - "body_version", - "created_at", - "last_edited_at", - "html_url", - "pinned", - "private", - "node_id", - "number", - "team_url", - "title", - "updated_at", - "url" - ] - } - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

    OK

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "read" - } - ] - } - }, - { - "serverUrl": "https://api.github.com", - "verb": "post", - "requestPath": "/teams/{team_id}/discussions", - "title": "Create a discussion (Legacy)", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "team_id", - "description": "

    The unique identifier of the team.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "bodyParameters": [ - { - "type": "string", - "name": "title", - "in": "body", - "description": "

    The discussion post's title.

    ", - "isRequired": true - }, - { - "type": "string", - "name": "body", - "in": "body", - "description": "

    The discussion post's body text.

    ", - "isRequired": true - }, - { - "type": "boolean", - "name": "private", - "in": "body", - "description": "

    Private posts are only visible to team members, organization owners, and team maintainers. Public posts are visible to all members of the organization. Set to true to create a private post.

    ", - "default": false - } - ], - "descriptionHTML": "

    Warning

    \n

    \nEndpoint closing down notice: This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new Create a discussion endpoint.

    \n
    \n

    Creates a new discussion post on a team's page.

    \n

    This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see \"Rate limits for the API\" and \"Best practices for using the REST API.\"

    \n

    OAuth app tokens and personal access tokens (classic) need the write:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "contentType": "application/json", - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "bodyParameters": { - "title": "Our first team post", - "body": "Hi! This is an area for us to collaborate as a team." - }, - "parameters": { - "team_id": "TEAM_ID" - } - }, - "response": { - "statusCode": "201", - "contentType": "application/json", - "description": "

    Response

    ", - "example": { - "author": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "body": "Hi! This is an area for us to collaborate as a team.", - "body_html": "

    Hi! This is an area for us to collaborate as a team

    ", - "body_version": "0d495416a700fb06133c612575d92bfb", - "created_at": "2018-01-25T18:56:31Z", - "last_edited_at": null, - "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1", - "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==", - "number": 1, - "pinned": false, - "private": false, - "team_url": "https://api.github.com/teams/2343027", - "title": "Our first team post", - "updated_at": "2018-01-25T18:56:31Z", - "url": "https://api.github.com/teams/2343027/discussions/1", - "reactions": { - "url": "https://api.github.com/teams/2343027/discussions/1/reactions", - "total_count": 5, - "+1": 3, - "-1": 1, - "laugh": 0, - "confused": 0, - "heart": 1, - "hooray": 0, - "eyes": 1, - "rocket": 1 - } - }, - "schema": { - "title": "Team Discussion", - "description": "A team discussion is a persistent record of a free-form conversation within a team.", - "type": "object", - "properties": { - "author": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "format": "int64", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - }, - "user_view_type": { - "type": "string", - "examples": [ - "public" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "body": { - "description": "The main text of the discussion.", - "type": "string", - "examples": [ - "Please suggest improvements to our workflow in comments." - ] - }, - "body_html": { - "type": "string", - "examples": [ - "

    Hi! This is an area for us to collaborate as a team

    " - ] - }, - "body_version": { - "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.", - "type": "string", - "examples": [ - "0307116bbf7ced493b8d8a346c650b71" - ] - }, - "created_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "last_edited_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/orgs/github/teams/justice-league/discussions/1" - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDE0OlRlYW1EaXNjdXNzaW9uMQ==" - ] - }, - "number": { - "description": "The unique sequence number of a team discussion.", - "type": "integer", - "examples": [ - 42 - ] - }, - "pinned": { - "description": "Whether or not this discussion should be pinned for easy retrieval.", - "type": "boolean", - "examples": [ - true - ] - }, - "private": { - "description": "Whether or not this discussion should be restricted to team members and organization owners.", - "type": "boolean", - "examples": [ - true - ] - }, - "team_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027" - ] - }, - "title": { - "description": "The title of the discussion.", - "type": "string", - "examples": [ - "How can we improve our workflow?" - ] - }, - "updated_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027/discussions/1" - ] - }, - "reactions": { - "title": "Reaction Rollup", - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri" - }, - "total_count": { - "type": "integer" - }, - "+1": { - "type": "integer" - }, - "-1": { - "type": "integer" - }, - "laugh": { - "type": "integer" - }, - "confused": { - "type": "integer" - }, - "heart": { - "type": "integer" - }, - "hooray": { - "type": "integer" - }, - "eyes": { - "type": "integer" - }, - "rocket": { - "type": "integer" - } - }, - "required": [ - "url", - "total_count", - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "eyes", - "rocket" - ] - } - }, - "required": [ - "author", - "body", - "body_html", - "body_version", - "created_at", - "last_edited_at", - "html_url", - "pinned", - "private", - "node_id", - "number", - "team_url", - "title", - "updated_at", - "url" - ] - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "201", - "description": "

    Created

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "write" - } - ] - } - }, - { - "serverUrl": "https://api.github.com", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}", - "title": "Get a discussion (Legacy)", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "team_id", - "description": "

    The unique identifier of the team.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "discussion_number", - "description": "

    The number that identifies the discussion.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "bodyParameters": [], - "descriptionHTML": "

    Warning

    \n

    \nEndpoint closing down notice: This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new Get a discussion endpoint.

    \n
    \n

    Get a specific discussion on a team's page.

    \n

    OAuth app tokens and personal access tokens (classic) need the read:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "parameters": { - "team_id": "TEAM_ID", - "discussion_number": "DISCUSSION_NUMBER" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

    Response

    ", - "example": { - "author": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "body": "Hi! This is an area for us to collaborate as a team.", - "body_html": "

    Hi! This is an area for us to collaborate as a team

    ", - "body_version": "0d495416a700fb06133c612575d92bfb", - "created_at": "2018-01-25T18:56:31Z", - "last_edited_at": null, - "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1", - "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==", - "number": 1, - "pinned": false, - "private": false, - "team_url": "https://api.github.com/teams/2343027", - "title": "Our first team post", - "updated_at": "2018-01-25T18:56:31Z", - "url": "https://api.github.com/teams/2343027/discussions/1", - "reactions": { - "url": "https://api.github.com/teams/2343027/discussions/1/reactions", - "total_count": 5, - "+1": 3, - "-1": 1, - "laugh": 0, - "confused": 0, - "heart": 1, - "hooray": 0, - "eyes": 1, - "rocket": 1 - } - }, - "schema": { - "title": "Team Discussion", - "description": "A team discussion is a persistent record of a free-form conversation within a team.", - "type": "object", - "properties": { - "author": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "format": "int64", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - }, - "user_view_type": { - "type": "string", - "examples": [ - "public" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "body": { - "description": "The main text of the discussion.", - "type": "string", - "examples": [ - "Please suggest improvements to our workflow in comments." - ] - }, - "body_html": { - "type": "string", - "examples": [ - "

    Hi! This is an area for us to collaborate as a team

    " - ] - }, - "body_version": { - "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.", - "type": "string", - "examples": [ - "0307116bbf7ced493b8d8a346c650b71" - ] - }, - "created_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "last_edited_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/orgs/github/teams/justice-league/discussions/1" - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDE0OlRlYW1EaXNjdXNzaW9uMQ==" - ] - }, - "number": { - "description": "The unique sequence number of a team discussion.", - "type": "integer", - "examples": [ - 42 - ] - }, - "pinned": { - "description": "Whether or not this discussion should be pinned for easy retrieval.", - "type": "boolean", - "examples": [ - true - ] - }, - "private": { - "description": "Whether or not this discussion should be restricted to team members and organization owners.", - "type": "boolean", - "examples": [ - true - ] - }, - "team_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027" - ] - }, - "title": { - "description": "The title of the discussion.", - "type": "string", - "examples": [ - "How can we improve our workflow?" - ] - }, - "updated_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027/discussions/1" - ] - }, - "reactions": { - "title": "Reaction Rollup", - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri" - }, - "total_count": { - "type": "integer" - }, - "+1": { - "type": "integer" - }, - "-1": { - "type": "integer" - }, - "laugh": { - "type": "integer" - }, - "confused": { - "type": "integer" - }, - "heart": { - "type": "integer" - }, - "hooray": { - "type": "integer" - }, - "eyes": { - "type": "integer" - }, - "rocket": { - "type": "integer" - } - }, - "required": [ - "url", - "total_count", - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "eyes", - "rocket" - ] - } - }, - "required": [ - "author", - "body", - "body_html", - "body_version", - "created_at", - "last_edited_at", - "html_url", - "pinned", - "private", - "node_id", - "number", - "team_url", - "title", - "updated_at", - "url" - ] - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

    OK

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "read" - } - ] - } - }, - { - "serverUrl": "https://api.github.com", - "verb": "patch", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}", - "title": "Update a discussion (Legacy)", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "team_id", - "description": "

    The unique identifier of the team.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "discussion_number", - "description": "

    The number that identifies the discussion.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "bodyParameters": [ - { - "type": "string", - "name": "title", - "in": "body", - "description": "

    The discussion post's title.

    " - }, - { - "type": "string", - "name": "body", - "in": "body", - "description": "

    The discussion post's body text.

    " - } - ], - "descriptionHTML": "

    Warning

    \n

    \nEndpoint closing down notice: This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new Update a discussion endpoint.

    \n
    \n

    Edits the title and body text of a discussion post. Only the parameters you provide are updated.

    \n

    OAuth app tokens and personal access tokens (classic) need the write:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "contentType": "application/json", - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "bodyParameters": { - "title": "Welcome to our first team post" - }, - "parameters": { - "team_id": "TEAM_ID", - "discussion_number": "DISCUSSION_NUMBER" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

    Response

    ", - "example": { - "author": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "body": "Hi! This is an area for us to collaborate as a team.", - "body_html": "

    Hi! This is an area for us to collaborate as a team

    ", - "body_version": "0d495416a700fb06133c612575d92bfb", - "created_at": "2018-01-25T18:56:31Z", - "last_edited_at": "2018-01-26T18:22:20Z", - "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1", - "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==", - "number": 1, - "pinned": false, - "private": false, - "team_url": "https://api.github.com/teams/2343027", - "title": "Welcome to our first team post", - "updated_at": "2018-01-26T18:22:20Z", - "url": "https://api.github.com/teams/2343027/discussions/1", - "reactions": { - "url": "https://api.github.com/teams/2343027/discussions/1/reactions", - "total_count": 5, - "+1": 3, - "-1": 1, - "laugh": 0, - "confused": 0, - "heart": 1, - "hooray": 0, - "eyes": 1, - "rocket": 1 - } - }, - "schema": { - "title": "Team Discussion", - "description": "A team discussion is a persistent record of a free-form conversation within a team.", - "type": "object", - "properties": { - "author": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "format": "int64", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - }, - "user_view_type": { - "type": "string", - "examples": [ - "public" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "body": { - "description": "The main text of the discussion.", - "type": "string", - "examples": [ - "Please suggest improvements to our workflow in comments." - ] - }, - "body_html": { - "type": "string", - "examples": [ - "

    Hi! This is an area for us to collaborate as a team

    " - ] - }, - "body_version": { - "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.", - "type": "string", - "examples": [ - "0307116bbf7ced493b8d8a346c650b71" - ] - }, - "created_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "last_edited_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/orgs/github/teams/justice-league/discussions/1" - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDE0OlRlYW1EaXNjdXNzaW9uMQ==" - ] - }, - "number": { - "description": "The unique sequence number of a team discussion.", - "type": "integer", - "examples": [ - 42 - ] - }, - "pinned": { - "description": "Whether or not this discussion should be pinned for easy retrieval.", - "type": "boolean", - "examples": [ - true - ] - }, - "private": { - "description": "Whether or not this discussion should be restricted to team members and organization owners.", - "type": "boolean", - "examples": [ - true - ] - }, - "team_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027" - ] - }, - "title": { - "description": "The title of the discussion.", - "type": "string", - "examples": [ - "How can we improve our workflow?" - ] - }, - "updated_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027/discussions/1" - ] - }, - "reactions": { - "title": "Reaction Rollup", - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri" - }, - "total_count": { - "type": "integer" - }, - "+1": { - "type": "integer" - }, - "-1": { - "type": "integer" - }, - "laugh": { - "type": "integer" - }, - "confused": { - "type": "integer" - }, - "heart": { - "type": "integer" - }, - "hooray": { - "type": "integer" - }, - "eyes": { - "type": "integer" - }, - "rocket": { - "type": "integer" - } - }, - "required": [ - "url", - "total_count", - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "eyes", - "rocket" - ] - } - }, - "required": [ - "author", - "body", - "body_html", - "body_version", - "created_at", - "last_edited_at", - "html_url", - "pinned", - "private", - "node_id", - "number", - "team_url", - "title", - "updated_at", - "url" - ] - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

    OK

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "write" - } - ] - } - }, - { - "serverUrl": "https://api.github.com", - "verb": "delete", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}", - "title": "Delete a discussion (Legacy)", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "team_id", - "description": "

    The unique identifier of the team.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "discussion_number", - "description": "

    The number that identifies the discussion.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "bodyParameters": [], - "descriptionHTML": "

    Warning

    \n

    \nEndpoint closing down notice: This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new Delete a discussion endpoint.

    \n
    \n

    Delete a discussion from a team's page.

    \n

    OAuth app tokens and personal access tokens (classic) need the write:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "parameters": { - "team_id": "TEAM_ID", - "discussion_number": "DISCUSSION_NUMBER" - } - }, - "response": { - "statusCode": "204", - "description": "

    Response

    " - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "204", - "description": "

    No Content

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "write" - } - ] - } - } - ], "members": [ { "serverUrl": "https://api.github.com", diff --git a/src/rest/data/ghec-2022-11-28/schema.json b/src/rest/data/ghec-2022-11-28/schema.json index fdd3d937693d..7c514a2ec535 100644 --- a/src/rest/data/ghec-2022-11-28/schema.json +++ b/src/rest/data/ghec-2022-11-28/schema.json @@ -844463,3973 +844463,6 @@ } } ], - "discussions": [ - { - "serverUrl": "https://api.github.com", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions", - "title": "List discussions", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "org", - "description": "

    The organization name. The name is not case sensitive.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "team_slug", - "description": "

    The slug of the team name.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "direction", - "description": "

    The direction to sort the results by.

    ", - "in": "query", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "per_page", - "description": "

    The number of results per page (max 100). For more information, see \"Using pagination in the REST API.\"

    ", - "in": "query", - "schema": { - "type": "integer", - "default": 30 - } - }, - { - "name": "page", - "description": "

    The page number of the results to fetch. For more information, see \"Using pagination in the REST API.\"

    ", - "in": "query", - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "pinned", - "in": "query", - "required": false, - "description": "

    Pinned discussions only filter

    ", - "schema": { - "type": "string" - } - } - ], - "bodyParameters": [], - "descriptionHTML": "

    List all discussions on a team's page.

    \n

    Note

    \n

    \nYou can also specify a team by org_id and team_id using the route GET /organizations/{org_id}/team/{team_id}/discussions.

    \n
    \n

    OAuth app tokens and personal access tokens (classic) need the read:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "parameters": { - "org": "ORG", - "team_slug": "TEAM_SLUG" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

    Response

    ", - "example": [ - { - "author": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "body": "Hi! This is an area for us to collaborate as a team.", - "body_html": "

    Hi! This is an area for us to collaborate as a team

    ", - "body_version": "0d495416a700fb06133c612575d92bfb", - "created_at": "2018-01-25T18:56:31Z", - "last_edited_at": null, - "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1", - "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==", - "number": 1, - "pinned": false, - "private": false, - "team_url": "https://api.github.com/teams/2343027", - "title": "Our first team post", - "updated_at": "2018-01-25T18:56:31Z", - "url": "https://api.github.com/teams/2343027/discussions/1", - "reactions": { - "url": "https://api.github.com/teams/2343027/discussions/1/reactions", - "total_count": 5, - "+1": 3, - "-1": 1, - "laugh": 0, - "confused": 0, - "heart": 1, - "hooray": 0, - "eyes": 1, - "rocket": 1 - } - } - ], - "schema": { - "type": "array", - "items": { - "title": "Team Discussion", - "description": "A team discussion is a persistent record of a free-form conversation within a team.", - "type": "object", - "properties": { - "author": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "format": "int64", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - }, - "user_view_type": { - "type": "string", - "examples": [ - "public" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "body": { - "description": "The main text of the discussion.", - "type": "string", - "examples": [ - "Please suggest improvements to our workflow in comments." - ] - }, - "body_html": { - "type": "string", - "examples": [ - "

    Hi! This is an area for us to collaborate as a team

    " - ] - }, - "body_version": { - "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.", - "type": "string", - "examples": [ - "0307116bbf7ced493b8d8a346c650b71" - ] - }, - "created_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "last_edited_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/orgs/github/teams/justice-league/discussions/1" - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDE0OlRlYW1EaXNjdXNzaW9uMQ==" - ] - }, - "number": { - "description": "The unique sequence number of a team discussion.", - "type": "integer", - "examples": [ - 42 - ] - }, - "pinned": { - "description": "Whether or not this discussion should be pinned for easy retrieval.", - "type": "boolean", - "examples": [ - true - ] - }, - "private": { - "description": "Whether or not this discussion should be restricted to team members and organization owners.", - "type": "boolean", - "examples": [ - true - ] - }, - "team_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027" - ] - }, - "title": { - "description": "The title of the discussion.", - "type": "string", - "examples": [ - "How can we improve our workflow?" - ] - }, - "updated_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027/discussions/1" - ] - }, - "reactions": { - "title": "Reaction Rollup", - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri" - }, - "total_count": { - "type": "integer" - }, - "+1": { - "type": "integer" - }, - "-1": { - "type": "integer" - }, - "laugh": { - "type": "integer" - }, - "confused": { - "type": "integer" - }, - "heart": { - "type": "integer" - }, - "hooray": { - "type": "integer" - }, - "eyes": { - "type": "integer" - }, - "rocket": { - "type": "integer" - } - }, - "required": [ - "url", - "total_count", - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "eyes", - "rocket" - ] - } - }, - "required": [ - "author", - "body", - "body_html", - "body_version", - "created_at", - "last_edited_at", - "html_url", - "pinned", - "private", - "node_id", - "number", - "team_url", - "title", - "updated_at", - "url" - ] - } - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

    OK

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "read" - } - ] - } - }, - { - "serverUrl": "https://api.github.com", - "verb": "post", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions", - "title": "Create a discussion", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "org", - "description": "

    The organization name. The name is not case sensitive.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "team_slug", - "description": "

    The slug of the team name.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "bodyParameters": [ - { - "type": "string", - "name": "title", - "in": "body", - "description": "

    The discussion post's title.

    ", - "isRequired": true - }, - { - "type": "string", - "name": "body", - "in": "body", - "description": "

    The discussion post's body text.

    ", - "isRequired": true - }, - { - "type": "boolean", - "name": "private", - "in": "body", - "description": "

    Private posts are only visible to team members, organization owners, and team maintainers. Public posts are visible to all members of the organization. Set to true to create a private post.

    ", - "default": false - } - ], - "descriptionHTML": "

    Creates a new discussion post on a team's page.

    \n

    This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see \"Rate limits for the API\" and \"Best practices for using the REST API.\"

    \n

    Note

    \n

    \nYou can also specify a team by org_id and team_id using the route POST /organizations/{org_id}/team/{team_id}/discussions.

    \n
    \n

    OAuth app tokens and personal access tokens (classic) need the write:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "contentType": "application/json", - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "bodyParameters": { - "title": "Our first team post", - "body": "Hi! This is an area for us to collaborate as a team." - }, - "parameters": { - "org": "ORG", - "team_slug": "TEAM_SLUG" - } - }, - "response": { - "statusCode": "201", - "contentType": "application/json", - "description": "

    Response

    ", - "example": { - "author": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "body": "Hi! This is an area for us to collaborate as a team.", - "body_html": "

    Hi! This is an area for us to collaborate as a team

    ", - "body_version": "0d495416a700fb06133c612575d92bfb", - "created_at": "2018-01-25T18:56:31Z", - "last_edited_at": null, - "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1", - "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==", - "number": 1, - "pinned": false, - "private": false, - "team_url": "https://api.github.com/teams/2343027", - "title": "Our first team post", - "updated_at": "2018-01-25T18:56:31Z", - "url": "https://api.github.com/teams/2343027/discussions/1", - "reactions": { - "url": "https://api.github.com/teams/2343027/discussions/1/reactions", - "total_count": 5, - "+1": 3, - "-1": 1, - "laugh": 0, - "confused": 0, - "heart": 1, - "hooray": 0, - "eyes": 1, - "rocket": 1 - } - }, - "schema": { - "title": "Team Discussion", - "description": "A team discussion is a persistent record of a free-form conversation within a team.", - "type": "object", - "properties": { - "author": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "format": "int64", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - }, - "user_view_type": { - "type": "string", - "examples": [ - "public" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "body": { - "description": "The main text of the discussion.", - "type": "string", - "examples": [ - "Please suggest improvements to our workflow in comments." - ] - }, - "body_html": { - "type": "string", - "examples": [ - "

    Hi! This is an area for us to collaborate as a team

    " - ] - }, - "body_version": { - "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.", - "type": "string", - "examples": [ - "0307116bbf7ced493b8d8a346c650b71" - ] - }, - "created_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "last_edited_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/orgs/github/teams/justice-league/discussions/1" - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDE0OlRlYW1EaXNjdXNzaW9uMQ==" - ] - }, - "number": { - "description": "The unique sequence number of a team discussion.", - "type": "integer", - "examples": [ - 42 - ] - }, - "pinned": { - "description": "Whether or not this discussion should be pinned for easy retrieval.", - "type": "boolean", - "examples": [ - true - ] - }, - "private": { - "description": "Whether or not this discussion should be restricted to team members and organization owners.", - "type": "boolean", - "examples": [ - true - ] - }, - "team_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027" - ] - }, - "title": { - "description": "The title of the discussion.", - "type": "string", - "examples": [ - "How can we improve our workflow?" - ] - }, - "updated_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027/discussions/1" - ] - }, - "reactions": { - "title": "Reaction Rollup", - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri" - }, - "total_count": { - "type": "integer" - }, - "+1": { - "type": "integer" - }, - "-1": { - "type": "integer" - }, - "laugh": { - "type": "integer" - }, - "confused": { - "type": "integer" - }, - "heart": { - "type": "integer" - }, - "hooray": { - "type": "integer" - }, - "eyes": { - "type": "integer" - }, - "rocket": { - "type": "integer" - } - }, - "required": [ - "url", - "total_count", - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "eyes", - "rocket" - ] - } - }, - "required": [ - "author", - "body", - "body_html", - "body_version", - "created_at", - "last_edited_at", - "html_url", - "pinned", - "private", - "node_id", - "number", - "team_url", - "title", - "updated_at", - "url" - ] - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "201", - "description": "

    Created

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "write" - } - ] - } - }, - { - "serverUrl": "https://api.github.com", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", - "title": "Get a discussion", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "org", - "description": "

    The organization name. The name is not case sensitive.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "team_slug", - "description": "

    The slug of the team name.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "discussion_number", - "description": "

    The number that identifies the discussion.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "bodyParameters": [], - "descriptionHTML": "

    Get a specific discussion on a team's page.

    \n

    Note

    \n

    \nYou can also specify a team by org_id and team_id using the route GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}.

    \n
    \n

    OAuth app tokens and personal access tokens (classic) need the read:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "parameters": { - "org": "ORG", - "team_slug": "TEAM_SLUG", - "discussion_number": "DISCUSSION_NUMBER" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

    Response

    ", - "example": { - "author": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "body": "Hi! This is an area for us to collaborate as a team.", - "body_html": "

    Hi! This is an area for us to collaborate as a team

    ", - "body_version": "0d495416a700fb06133c612575d92bfb", - "created_at": "2018-01-25T18:56:31Z", - "last_edited_at": null, - "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1", - "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==", - "number": 1, - "pinned": false, - "private": false, - "team_url": "https://api.github.com/teams/2343027", - "title": "Our first team post", - "updated_at": "2018-01-25T18:56:31Z", - "url": "https://api.github.com/teams/2343027/discussions/1", - "reactions": { - "url": "https://api.github.com/teams/2343027/discussions/1/reactions", - "total_count": 5, - "+1": 3, - "-1": 1, - "laugh": 0, - "confused": 0, - "heart": 1, - "hooray": 0, - "eyes": 1, - "rocket": 1 - } - }, - "schema": { - "title": "Team Discussion", - "description": "A team discussion is a persistent record of a free-form conversation within a team.", - "type": "object", - "properties": { - "author": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "format": "int64", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - }, - "user_view_type": { - "type": "string", - "examples": [ - "public" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "body": { - "description": "The main text of the discussion.", - "type": "string", - "examples": [ - "Please suggest improvements to our workflow in comments." - ] - }, - "body_html": { - "type": "string", - "examples": [ - "

    Hi! This is an area for us to collaborate as a team

    " - ] - }, - "body_version": { - "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.", - "type": "string", - "examples": [ - "0307116bbf7ced493b8d8a346c650b71" - ] - }, - "created_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "last_edited_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/orgs/github/teams/justice-league/discussions/1" - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDE0OlRlYW1EaXNjdXNzaW9uMQ==" - ] - }, - "number": { - "description": "The unique sequence number of a team discussion.", - "type": "integer", - "examples": [ - 42 - ] - }, - "pinned": { - "description": "Whether or not this discussion should be pinned for easy retrieval.", - "type": "boolean", - "examples": [ - true - ] - }, - "private": { - "description": "Whether or not this discussion should be restricted to team members and organization owners.", - "type": "boolean", - "examples": [ - true - ] - }, - "team_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027" - ] - }, - "title": { - "description": "The title of the discussion.", - "type": "string", - "examples": [ - "How can we improve our workflow?" - ] - }, - "updated_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027/discussions/1" - ] - }, - "reactions": { - "title": "Reaction Rollup", - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri" - }, - "total_count": { - "type": "integer" - }, - "+1": { - "type": "integer" - }, - "-1": { - "type": "integer" - }, - "laugh": { - "type": "integer" - }, - "confused": { - "type": "integer" - }, - "heart": { - "type": "integer" - }, - "hooray": { - "type": "integer" - }, - "eyes": { - "type": "integer" - }, - "rocket": { - "type": "integer" - } - }, - "required": [ - "url", - "total_count", - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "eyes", - "rocket" - ] - } - }, - "required": [ - "author", - "body", - "body_html", - "body_version", - "created_at", - "last_edited_at", - "html_url", - "pinned", - "private", - "node_id", - "number", - "team_url", - "title", - "updated_at", - "url" - ] - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

    OK

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "read" - } - ] - } - }, - { - "serverUrl": "https://api.github.com", - "verb": "patch", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", - "title": "Update a discussion", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "org", - "description": "

    The organization name. The name is not case sensitive.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "team_slug", - "description": "

    The slug of the team name.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "discussion_number", - "description": "

    The number that identifies the discussion.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "bodyParameters": [ - { - "type": "string", - "name": "title", - "in": "body", - "description": "

    The discussion post's title.

    " - }, - { - "type": "string", - "name": "body", - "in": "body", - "description": "

    The discussion post's body text.

    " - } - ], - "descriptionHTML": "

    Edits the title and body text of a discussion post. Only the parameters you provide are updated.

    \n

    Note

    \n

    \nYou can also specify a team by org_id and team_id using the route PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}.

    \n
    \n

    OAuth app tokens and personal access tokens (classic) need the write:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "contentType": "application/json", - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "bodyParameters": { - "title": "Welcome to our first team post" - }, - "parameters": { - "org": "ORG", - "team_slug": "TEAM_SLUG", - "discussion_number": "DISCUSSION_NUMBER" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

    Response

    ", - "example": { - "author": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "body": "Hi! This is an area for us to collaborate as a team.", - "body_html": "

    Hi! This is an area for us to collaborate as a team

    ", - "body_version": "0d495416a700fb06133c612575d92bfb", - "created_at": "2018-01-25T18:56:31Z", - "last_edited_at": "2018-01-26T18:22:20Z", - "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1", - "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==", - "number": 1, - "pinned": false, - "private": false, - "team_url": "https://api.github.com/teams/2343027", - "title": "Welcome to our first team post", - "updated_at": "2018-01-26T18:22:20Z", - "url": "https://api.github.com/teams/2343027/discussions/1", - "reactions": { - "url": "https://api.github.com/teams/2343027/discussions/1/reactions", - "total_count": 5, - "+1": 3, - "-1": 1, - "laugh": 0, - "confused": 0, - "heart": 1, - "hooray": 0, - "eyes": 1, - "rocket": 1 - } - }, - "schema": { - "title": "Team Discussion", - "description": "A team discussion is a persistent record of a free-form conversation within a team.", - "type": "object", - "properties": { - "author": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "format": "int64", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - }, - "user_view_type": { - "type": "string", - "examples": [ - "public" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "body": { - "description": "The main text of the discussion.", - "type": "string", - "examples": [ - "Please suggest improvements to our workflow in comments." - ] - }, - "body_html": { - "type": "string", - "examples": [ - "

    Hi! This is an area for us to collaborate as a team

    " - ] - }, - "body_version": { - "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.", - "type": "string", - "examples": [ - "0307116bbf7ced493b8d8a346c650b71" - ] - }, - "created_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "last_edited_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/orgs/github/teams/justice-league/discussions/1" - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDE0OlRlYW1EaXNjdXNzaW9uMQ==" - ] - }, - "number": { - "description": "The unique sequence number of a team discussion.", - "type": "integer", - "examples": [ - 42 - ] - }, - "pinned": { - "description": "Whether or not this discussion should be pinned for easy retrieval.", - "type": "boolean", - "examples": [ - true - ] - }, - "private": { - "description": "Whether or not this discussion should be restricted to team members and organization owners.", - "type": "boolean", - "examples": [ - true - ] - }, - "team_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027" - ] - }, - "title": { - "description": "The title of the discussion.", - "type": "string", - "examples": [ - "How can we improve our workflow?" - ] - }, - "updated_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027/discussions/1" - ] - }, - "reactions": { - "title": "Reaction Rollup", - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri" - }, - "total_count": { - "type": "integer" - }, - "+1": { - "type": "integer" - }, - "-1": { - "type": "integer" - }, - "laugh": { - "type": "integer" - }, - "confused": { - "type": "integer" - }, - "heart": { - "type": "integer" - }, - "hooray": { - "type": "integer" - }, - "eyes": { - "type": "integer" - }, - "rocket": { - "type": "integer" - } - }, - "required": [ - "url", - "total_count", - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "eyes", - "rocket" - ] - } - }, - "required": [ - "author", - "body", - "body_html", - "body_version", - "created_at", - "last_edited_at", - "html_url", - "pinned", - "private", - "node_id", - "number", - "team_url", - "title", - "updated_at", - "url" - ] - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

    OK

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "write" - } - ] - } - }, - { - "serverUrl": "https://api.github.com", - "verb": "delete", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", - "title": "Delete a discussion", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "org", - "description": "

    The organization name. The name is not case sensitive.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "team_slug", - "description": "

    The slug of the team name.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "discussion_number", - "description": "

    The number that identifies the discussion.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "bodyParameters": [], - "descriptionHTML": "

    Delete a discussion from a team's page.

    \n

    Note

    \n

    \nYou can also specify a team by org_id and team_id using the route DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}.

    \n
    \n

    OAuth app tokens and personal access tokens (classic) need the write:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "parameters": { - "org": "ORG", - "team_slug": "TEAM_SLUG", - "discussion_number": "DISCUSSION_NUMBER" - } - }, - "response": { - "statusCode": "204", - "description": "

    Response

    " - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "204", - "description": "

    No Content

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "write" - } - ] - } - }, - { - "serverUrl": "https://api.github.com", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions", - "title": "List discussions (Legacy)", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "team_id", - "description": "

    The unique identifier of the team.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "direction", - "description": "

    The direction to sort the results by.

    ", - "in": "query", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "per_page", - "description": "

    The number of results per page (max 100). For more information, see \"Using pagination in the REST API.\"

    ", - "in": "query", - "schema": { - "type": "integer", - "default": 30 - } - }, - { - "name": "page", - "description": "

    The page number of the results to fetch. For more information, see \"Using pagination in the REST API.\"

    ", - "in": "query", - "schema": { - "type": "integer", - "default": 1 - } - } - ], - "bodyParameters": [], - "descriptionHTML": "

    Warning

    \n

    \nEndpoint closing down notice: This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new List discussions endpoint.

    \n
    \n

    List all discussions on a team's page.

    \n

    OAuth app tokens and personal access tokens (classic) need the read:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "parameters": { - "team_id": "TEAM_ID" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

    Response

    ", - "example": [ - { - "author": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "body": "Hi! This is an area for us to collaborate as a team.", - "body_html": "

    Hi! This is an area for us to collaborate as a team

    ", - "body_version": "0d495416a700fb06133c612575d92bfb", - "created_at": "2018-01-25T18:56:31Z", - "last_edited_at": null, - "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1", - "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==", - "number": 1, - "pinned": false, - "private": false, - "team_url": "https://api.github.com/teams/2343027", - "title": "Our first team post", - "updated_at": "2018-01-25T18:56:31Z", - "url": "https://api.github.com/teams/2343027/discussions/1", - "reactions": { - "url": "https://api.github.com/teams/2343027/discussions/1/reactions", - "total_count": 5, - "+1": 3, - "-1": 1, - "laugh": 0, - "confused": 0, - "heart": 1, - "hooray": 0, - "eyes": 1, - "rocket": 1 - } - } - ], - "schema": { - "type": "array", - "items": { - "title": "Team Discussion", - "description": "A team discussion is a persistent record of a free-form conversation within a team.", - "type": "object", - "properties": { - "author": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "format": "int64", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - }, - "user_view_type": { - "type": "string", - "examples": [ - "public" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "body": { - "description": "The main text of the discussion.", - "type": "string", - "examples": [ - "Please suggest improvements to our workflow in comments." - ] - }, - "body_html": { - "type": "string", - "examples": [ - "

    Hi! This is an area for us to collaborate as a team

    " - ] - }, - "body_version": { - "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.", - "type": "string", - "examples": [ - "0307116bbf7ced493b8d8a346c650b71" - ] - }, - "created_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "last_edited_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/orgs/github/teams/justice-league/discussions/1" - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDE0OlRlYW1EaXNjdXNzaW9uMQ==" - ] - }, - "number": { - "description": "The unique sequence number of a team discussion.", - "type": "integer", - "examples": [ - 42 - ] - }, - "pinned": { - "description": "Whether or not this discussion should be pinned for easy retrieval.", - "type": "boolean", - "examples": [ - true - ] - }, - "private": { - "description": "Whether or not this discussion should be restricted to team members and organization owners.", - "type": "boolean", - "examples": [ - true - ] - }, - "team_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027" - ] - }, - "title": { - "description": "The title of the discussion.", - "type": "string", - "examples": [ - "How can we improve our workflow?" - ] - }, - "updated_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027/discussions/1" - ] - }, - "reactions": { - "title": "Reaction Rollup", - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri" - }, - "total_count": { - "type": "integer" - }, - "+1": { - "type": "integer" - }, - "-1": { - "type": "integer" - }, - "laugh": { - "type": "integer" - }, - "confused": { - "type": "integer" - }, - "heart": { - "type": "integer" - }, - "hooray": { - "type": "integer" - }, - "eyes": { - "type": "integer" - }, - "rocket": { - "type": "integer" - } - }, - "required": [ - "url", - "total_count", - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "eyes", - "rocket" - ] - } - }, - "required": [ - "author", - "body", - "body_html", - "body_version", - "created_at", - "last_edited_at", - "html_url", - "pinned", - "private", - "node_id", - "number", - "team_url", - "title", - "updated_at", - "url" - ] - } - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

    OK

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "read" - } - ] - } - }, - { - "serverUrl": "https://api.github.com", - "verb": "post", - "requestPath": "/teams/{team_id}/discussions", - "title": "Create a discussion (Legacy)", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "team_id", - "description": "

    The unique identifier of the team.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "bodyParameters": [ - { - "type": "string", - "name": "title", - "in": "body", - "description": "

    The discussion post's title.

    ", - "isRequired": true - }, - { - "type": "string", - "name": "body", - "in": "body", - "description": "

    The discussion post's body text.

    ", - "isRequired": true - }, - { - "type": "boolean", - "name": "private", - "in": "body", - "description": "

    Private posts are only visible to team members, organization owners, and team maintainers. Public posts are visible to all members of the organization. Set to true to create a private post.

    ", - "default": false - } - ], - "descriptionHTML": "

    Warning

    \n

    \nEndpoint closing down notice: This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new Create a discussion endpoint.

    \n
    \n

    Creates a new discussion post on a team's page.

    \n

    This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see \"Rate limits for the API\" and \"Best practices for using the REST API.\"

    \n

    OAuth app tokens and personal access tokens (classic) need the write:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "contentType": "application/json", - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "bodyParameters": { - "title": "Our first team post", - "body": "Hi! This is an area for us to collaborate as a team." - }, - "parameters": { - "team_id": "TEAM_ID" - } - }, - "response": { - "statusCode": "201", - "contentType": "application/json", - "description": "

    Response

    ", - "example": { - "author": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "body": "Hi! This is an area for us to collaborate as a team.", - "body_html": "

    Hi! This is an area for us to collaborate as a team

    ", - "body_version": "0d495416a700fb06133c612575d92bfb", - "created_at": "2018-01-25T18:56:31Z", - "last_edited_at": null, - "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1", - "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==", - "number": 1, - "pinned": false, - "private": false, - "team_url": "https://api.github.com/teams/2343027", - "title": "Our first team post", - "updated_at": "2018-01-25T18:56:31Z", - "url": "https://api.github.com/teams/2343027/discussions/1", - "reactions": { - "url": "https://api.github.com/teams/2343027/discussions/1/reactions", - "total_count": 5, - "+1": 3, - "-1": 1, - "laugh": 0, - "confused": 0, - "heart": 1, - "hooray": 0, - "eyes": 1, - "rocket": 1 - } - }, - "schema": { - "title": "Team Discussion", - "description": "A team discussion is a persistent record of a free-form conversation within a team.", - "type": "object", - "properties": { - "author": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "format": "int64", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - }, - "user_view_type": { - "type": "string", - "examples": [ - "public" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "body": { - "description": "The main text of the discussion.", - "type": "string", - "examples": [ - "Please suggest improvements to our workflow in comments." - ] - }, - "body_html": { - "type": "string", - "examples": [ - "

    Hi! This is an area for us to collaborate as a team

    " - ] - }, - "body_version": { - "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.", - "type": "string", - "examples": [ - "0307116bbf7ced493b8d8a346c650b71" - ] - }, - "created_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "last_edited_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/orgs/github/teams/justice-league/discussions/1" - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDE0OlRlYW1EaXNjdXNzaW9uMQ==" - ] - }, - "number": { - "description": "The unique sequence number of a team discussion.", - "type": "integer", - "examples": [ - 42 - ] - }, - "pinned": { - "description": "Whether or not this discussion should be pinned for easy retrieval.", - "type": "boolean", - "examples": [ - true - ] - }, - "private": { - "description": "Whether or not this discussion should be restricted to team members and organization owners.", - "type": "boolean", - "examples": [ - true - ] - }, - "team_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027" - ] - }, - "title": { - "description": "The title of the discussion.", - "type": "string", - "examples": [ - "How can we improve our workflow?" - ] - }, - "updated_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027/discussions/1" - ] - }, - "reactions": { - "title": "Reaction Rollup", - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri" - }, - "total_count": { - "type": "integer" - }, - "+1": { - "type": "integer" - }, - "-1": { - "type": "integer" - }, - "laugh": { - "type": "integer" - }, - "confused": { - "type": "integer" - }, - "heart": { - "type": "integer" - }, - "hooray": { - "type": "integer" - }, - "eyes": { - "type": "integer" - }, - "rocket": { - "type": "integer" - } - }, - "required": [ - "url", - "total_count", - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "eyes", - "rocket" - ] - } - }, - "required": [ - "author", - "body", - "body_html", - "body_version", - "created_at", - "last_edited_at", - "html_url", - "pinned", - "private", - "node_id", - "number", - "team_url", - "title", - "updated_at", - "url" - ] - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "201", - "description": "

    Created

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "write" - } - ] - } - }, - { - "serverUrl": "https://api.github.com", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}", - "title": "Get a discussion (Legacy)", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "team_id", - "description": "

    The unique identifier of the team.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "discussion_number", - "description": "

    The number that identifies the discussion.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "bodyParameters": [], - "descriptionHTML": "

    Warning

    \n

    \nEndpoint closing down notice: This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new Get a discussion endpoint.

    \n
    \n

    Get a specific discussion on a team's page.

    \n

    OAuth app tokens and personal access tokens (classic) need the read:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "parameters": { - "team_id": "TEAM_ID", - "discussion_number": "DISCUSSION_NUMBER" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

    Response

    ", - "example": { - "author": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "body": "Hi! This is an area for us to collaborate as a team.", - "body_html": "

    Hi! This is an area for us to collaborate as a team

    ", - "body_version": "0d495416a700fb06133c612575d92bfb", - "created_at": "2018-01-25T18:56:31Z", - "last_edited_at": null, - "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1", - "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==", - "number": 1, - "pinned": false, - "private": false, - "team_url": "https://api.github.com/teams/2343027", - "title": "Our first team post", - "updated_at": "2018-01-25T18:56:31Z", - "url": "https://api.github.com/teams/2343027/discussions/1", - "reactions": { - "url": "https://api.github.com/teams/2343027/discussions/1/reactions", - "total_count": 5, - "+1": 3, - "-1": 1, - "laugh": 0, - "confused": 0, - "heart": 1, - "hooray": 0, - "eyes": 1, - "rocket": 1 - } - }, - "schema": { - "title": "Team Discussion", - "description": "A team discussion is a persistent record of a free-form conversation within a team.", - "type": "object", - "properties": { - "author": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "format": "int64", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - }, - "user_view_type": { - "type": "string", - "examples": [ - "public" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "body": { - "description": "The main text of the discussion.", - "type": "string", - "examples": [ - "Please suggest improvements to our workflow in comments." - ] - }, - "body_html": { - "type": "string", - "examples": [ - "

    Hi! This is an area for us to collaborate as a team

    " - ] - }, - "body_version": { - "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.", - "type": "string", - "examples": [ - "0307116bbf7ced493b8d8a346c650b71" - ] - }, - "created_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "last_edited_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/orgs/github/teams/justice-league/discussions/1" - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDE0OlRlYW1EaXNjdXNzaW9uMQ==" - ] - }, - "number": { - "description": "The unique sequence number of a team discussion.", - "type": "integer", - "examples": [ - 42 - ] - }, - "pinned": { - "description": "Whether or not this discussion should be pinned for easy retrieval.", - "type": "boolean", - "examples": [ - true - ] - }, - "private": { - "description": "Whether or not this discussion should be restricted to team members and organization owners.", - "type": "boolean", - "examples": [ - true - ] - }, - "team_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027" - ] - }, - "title": { - "description": "The title of the discussion.", - "type": "string", - "examples": [ - "How can we improve our workflow?" - ] - }, - "updated_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027/discussions/1" - ] - }, - "reactions": { - "title": "Reaction Rollup", - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri" - }, - "total_count": { - "type": "integer" - }, - "+1": { - "type": "integer" - }, - "-1": { - "type": "integer" - }, - "laugh": { - "type": "integer" - }, - "confused": { - "type": "integer" - }, - "heart": { - "type": "integer" - }, - "hooray": { - "type": "integer" - }, - "eyes": { - "type": "integer" - }, - "rocket": { - "type": "integer" - } - }, - "required": [ - "url", - "total_count", - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "eyes", - "rocket" - ] - } - }, - "required": [ - "author", - "body", - "body_html", - "body_version", - "created_at", - "last_edited_at", - "html_url", - "pinned", - "private", - "node_id", - "number", - "team_url", - "title", - "updated_at", - "url" - ] - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

    OK

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "read" - } - ] - } - }, - { - "serverUrl": "https://api.github.com", - "verb": "patch", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}", - "title": "Update a discussion (Legacy)", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "team_id", - "description": "

    The unique identifier of the team.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "discussion_number", - "description": "

    The number that identifies the discussion.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "bodyParameters": [ - { - "type": "string", - "name": "title", - "in": "body", - "description": "

    The discussion post's title.

    " - }, - { - "type": "string", - "name": "body", - "in": "body", - "description": "

    The discussion post's body text.

    " - } - ], - "descriptionHTML": "

    Warning

    \n

    \nEndpoint closing down notice: This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new Update a discussion endpoint.

    \n
    \n

    Edits the title and body text of a discussion post. Only the parameters you provide are updated.

    \n

    OAuth app tokens and personal access tokens (classic) need the write:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "contentType": "application/json", - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "bodyParameters": { - "title": "Welcome to our first team post" - }, - "parameters": { - "team_id": "TEAM_ID", - "discussion_number": "DISCUSSION_NUMBER" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

    Response

    ", - "example": { - "author": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "body": "Hi! This is an area for us to collaborate as a team.", - "body_html": "

    Hi! This is an area for us to collaborate as a team

    ", - "body_version": "0d495416a700fb06133c612575d92bfb", - "created_at": "2018-01-25T18:56:31Z", - "last_edited_at": "2018-01-26T18:22:20Z", - "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1", - "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==", - "number": 1, - "pinned": false, - "private": false, - "team_url": "https://api.github.com/teams/2343027", - "title": "Welcome to our first team post", - "updated_at": "2018-01-26T18:22:20Z", - "url": "https://api.github.com/teams/2343027/discussions/1", - "reactions": { - "url": "https://api.github.com/teams/2343027/discussions/1/reactions", - "total_count": 5, - "+1": 3, - "-1": 1, - "laugh": 0, - "confused": 0, - "heart": 1, - "hooray": 0, - "eyes": 1, - "rocket": 1 - } - }, - "schema": { - "title": "Team Discussion", - "description": "A team discussion is a persistent record of a free-form conversation within a team.", - "type": "object", - "properties": { - "author": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "format": "int64", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - }, - "user_view_type": { - "type": "string", - "examples": [ - "public" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "body": { - "description": "The main text of the discussion.", - "type": "string", - "examples": [ - "Please suggest improvements to our workflow in comments." - ] - }, - "body_html": { - "type": "string", - "examples": [ - "

    Hi! This is an area for us to collaborate as a team

    " - ] - }, - "body_version": { - "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.", - "type": "string", - "examples": [ - "0307116bbf7ced493b8d8a346c650b71" - ] - }, - "created_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "last_edited_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/orgs/github/teams/justice-league/discussions/1" - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDE0OlRlYW1EaXNjdXNzaW9uMQ==" - ] - }, - "number": { - "description": "The unique sequence number of a team discussion.", - "type": "integer", - "examples": [ - 42 - ] - }, - "pinned": { - "description": "Whether or not this discussion should be pinned for easy retrieval.", - "type": "boolean", - "examples": [ - true - ] - }, - "private": { - "description": "Whether or not this discussion should be restricted to team members and organization owners.", - "type": "boolean", - "examples": [ - true - ] - }, - "team_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027" - ] - }, - "title": { - "description": "The title of the discussion.", - "type": "string", - "examples": [ - "How can we improve our workflow?" - ] - }, - "updated_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027/discussions/1" - ] - }, - "reactions": { - "title": "Reaction Rollup", - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri" - }, - "total_count": { - "type": "integer" - }, - "+1": { - "type": "integer" - }, - "-1": { - "type": "integer" - }, - "laugh": { - "type": "integer" - }, - "confused": { - "type": "integer" - }, - "heart": { - "type": "integer" - }, - "hooray": { - "type": "integer" - }, - "eyes": { - "type": "integer" - }, - "rocket": { - "type": "integer" - } - }, - "required": [ - "url", - "total_count", - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "eyes", - "rocket" - ] - } - }, - "required": [ - "author", - "body", - "body_html", - "body_version", - "created_at", - "last_edited_at", - "html_url", - "pinned", - "private", - "node_id", - "number", - "team_url", - "title", - "updated_at", - "url" - ] - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

    OK

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "write" - } - ] - } - }, - { - "serverUrl": "https://api.github.com", - "verb": "delete", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}", - "title": "Delete a discussion (Legacy)", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "team_id", - "description": "

    The unique identifier of the team.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "discussion_number", - "description": "

    The number that identifies the discussion.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "bodyParameters": [], - "descriptionHTML": "

    Warning

    \n

    \nEndpoint closing down notice: This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new Delete a discussion endpoint.

    \n
    \n

    Delete a discussion from a team's page.

    \n

    OAuth app tokens and personal access tokens (classic) need the write:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "parameters": { - "team_id": "TEAM_ID", - "discussion_number": "DISCUSSION_NUMBER" - } - }, - "response": { - "statusCode": "204", - "description": "

    Response

    " - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "204", - "description": "

    No Content

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "write" - } - ] - } - } - ], "external-groups": [ { "serverUrl": "https://api.github.com", diff --git a/src/rest/data/ghes-3.14-2022-11-28/schema.json b/src/rest/data/ghes-3.14-2022-11-28/schema.json index f9eb3b225525..1117a25bea3a 100644 --- a/src/rest/data/ghes-3.14-2022-11-28/schema.json +++ b/src/rest/data/ghes-3.14-2022-11-28/schema.json @@ -695834,3973 +695834,6 @@ } } ], - "discussions": [ - { - "serverUrl": "http(s)://HOSTNAME/api/v3", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions", - "title": "List discussions", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "org", - "description": "

    The organization name. The name is not case sensitive.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "team_slug", - "description": "

    The slug of the team name.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "direction", - "description": "

    The direction to sort the results by.

    ", - "in": "query", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "per_page", - "description": "

    The number of results per page (max 100). For more information, see \"Using pagination in the REST API.\"

    ", - "in": "query", - "schema": { - "type": "integer", - "default": 30 - } - }, - { - "name": "page", - "description": "

    The page number of the results to fetch. For more information, see \"Using pagination in the REST API.\"

    ", - "in": "query", - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "pinned", - "in": "query", - "required": false, - "description": "

    Pinned discussions only filter

    ", - "schema": { - "type": "string" - } - } - ], - "bodyParameters": [], - "descriptionHTML": "

    List all discussions on a team's page.

    \n

    Note

    \n

    \nYou can also specify a team by org_id and team_id using the route GET /organizations/{org_id}/team/{team_id}/discussions.

    \n
    \n

    OAuth app tokens and personal access tokens (classic) need the read:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "parameters": { - "org": "ORG", - "team_slug": "TEAM_SLUG" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

    Response

    ", - "example": [ - { - "author": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "body": "Hi! This is an area for us to collaborate as a team.", - "body_html": "

    Hi! This is an area for us to collaborate as a team

    ", - "body_version": "0d495416a700fb06133c612575d92bfb", - "created_at": "2018-01-25T18:56:31Z", - "last_edited_at": null, - "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1", - "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==", - "number": 1, - "pinned": false, - "private": false, - "team_url": "https://api.github.com/teams/2343027", - "title": "Our first team post", - "updated_at": "2018-01-25T18:56:31Z", - "url": "https://api.github.com/teams/2343027/discussions/1", - "reactions": { - "url": "https://api.github.com/teams/2343027/discussions/1/reactions", - "total_count": 5, - "+1": 3, - "-1": 1, - "laugh": 0, - "confused": 0, - "heart": 1, - "hooray": 0, - "eyes": 1, - "rocket": 1 - } - } - ], - "schema": { - "type": "array", - "items": { - "title": "Team Discussion", - "description": "A team discussion is a persistent record of a free-form conversation within a team.", - "type": "object", - "properties": { - "author": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "format": "int64", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - }, - "user_view_type": { - "type": "string", - "examples": [ - "public" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "body": { - "description": "The main text of the discussion.", - "type": "string", - "examples": [ - "Please suggest improvements to our workflow in comments." - ] - }, - "body_html": { - "type": "string", - "examples": [ - "

    Hi! This is an area for us to collaborate as a team

    " - ] - }, - "body_version": { - "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.", - "type": "string", - "examples": [ - "0307116bbf7ced493b8d8a346c650b71" - ] - }, - "created_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "last_edited_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/orgs/github/teams/justice-league/discussions/1" - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDE0OlRlYW1EaXNjdXNzaW9uMQ==" - ] - }, - "number": { - "description": "The unique sequence number of a team discussion.", - "type": "integer", - "examples": [ - 42 - ] - }, - "pinned": { - "description": "Whether or not this discussion should be pinned for easy retrieval.", - "type": "boolean", - "examples": [ - true - ] - }, - "private": { - "description": "Whether or not this discussion should be restricted to team members and organization owners.", - "type": "boolean", - "examples": [ - true - ] - }, - "team_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027" - ] - }, - "title": { - "description": "The title of the discussion.", - "type": "string", - "examples": [ - "How can we improve our workflow?" - ] - }, - "updated_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027/discussions/1" - ] - }, - "reactions": { - "title": "Reaction Rollup", - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri" - }, - "total_count": { - "type": "integer" - }, - "+1": { - "type": "integer" - }, - "-1": { - "type": "integer" - }, - "laugh": { - "type": "integer" - }, - "confused": { - "type": "integer" - }, - "heart": { - "type": "integer" - }, - "hooray": { - "type": "integer" - }, - "eyes": { - "type": "integer" - }, - "rocket": { - "type": "integer" - } - }, - "required": [ - "url", - "total_count", - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "eyes", - "rocket" - ] - } - }, - "required": [ - "author", - "body", - "body_html", - "body_version", - "created_at", - "last_edited_at", - "html_url", - "pinned", - "private", - "node_id", - "number", - "team_url", - "title", - "updated_at", - "url" - ] - } - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

    OK

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "read" - } - ] - } - }, - { - "serverUrl": "http(s)://HOSTNAME/api/v3", - "verb": "post", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions", - "title": "Create a discussion", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "org", - "description": "

    The organization name. The name is not case sensitive.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "team_slug", - "description": "

    The slug of the team name.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "bodyParameters": [ - { - "type": "string", - "name": "title", - "in": "body", - "description": "

    The discussion post's title.

    ", - "isRequired": true - }, - { - "type": "string", - "name": "body", - "in": "body", - "description": "

    The discussion post's body text.

    ", - "isRequired": true - }, - { - "type": "boolean", - "name": "private", - "in": "body", - "description": "

    Private posts are only visible to team members, organization owners, and team maintainers. Public posts are visible to all members of the organization. Set to true to create a private post.

    ", - "default": false - } - ], - "descriptionHTML": "

    Creates a new discussion post on a team's page.

    \n

    This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see \"Rate limits for the API\" and \"Best practices for using the REST API.\"

    \n

    Note

    \n

    \nYou can also specify a team by org_id and team_id using the route POST /organizations/{org_id}/team/{team_id}/discussions.

    \n
    \n

    OAuth app tokens and personal access tokens (classic) need the write:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "contentType": "application/json", - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "bodyParameters": { - "title": "Our first team post", - "body": "Hi! This is an area for us to collaborate as a team." - }, - "parameters": { - "org": "ORG", - "team_slug": "TEAM_SLUG" - } - }, - "response": { - "statusCode": "201", - "contentType": "application/json", - "description": "

    Response

    ", - "example": { - "author": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "body": "Hi! This is an area for us to collaborate as a team.", - "body_html": "

    Hi! This is an area for us to collaborate as a team

    ", - "body_version": "0d495416a700fb06133c612575d92bfb", - "created_at": "2018-01-25T18:56:31Z", - "last_edited_at": null, - "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1", - "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==", - "number": 1, - "pinned": false, - "private": false, - "team_url": "https://api.github.com/teams/2343027", - "title": "Our first team post", - "updated_at": "2018-01-25T18:56:31Z", - "url": "https://api.github.com/teams/2343027/discussions/1", - "reactions": { - "url": "https://api.github.com/teams/2343027/discussions/1/reactions", - "total_count": 5, - "+1": 3, - "-1": 1, - "laugh": 0, - "confused": 0, - "heart": 1, - "hooray": 0, - "eyes": 1, - "rocket": 1 - } - }, - "schema": { - "title": "Team Discussion", - "description": "A team discussion is a persistent record of a free-form conversation within a team.", - "type": "object", - "properties": { - "author": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "format": "int64", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - }, - "user_view_type": { - "type": "string", - "examples": [ - "public" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "body": { - "description": "The main text of the discussion.", - "type": "string", - "examples": [ - "Please suggest improvements to our workflow in comments." - ] - }, - "body_html": { - "type": "string", - "examples": [ - "

    Hi! This is an area for us to collaborate as a team

    " - ] - }, - "body_version": { - "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.", - "type": "string", - "examples": [ - "0307116bbf7ced493b8d8a346c650b71" - ] - }, - "created_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "last_edited_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/orgs/github/teams/justice-league/discussions/1" - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDE0OlRlYW1EaXNjdXNzaW9uMQ==" - ] - }, - "number": { - "description": "The unique sequence number of a team discussion.", - "type": "integer", - "examples": [ - 42 - ] - }, - "pinned": { - "description": "Whether or not this discussion should be pinned for easy retrieval.", - "type": "boolean", - "examples": [ - true - ] - }, - "private": { - "description": "Whether or not this discussion should be restricted to team members and organization owners.", - "type": "boolean", - "examples": [ - true - ] - }, - "team_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027" - ] - }, - "title": { - "description": "The title of the discussion.", - "type": "string", - "examples": [ - "How can we improve our workflow?" - ] - }, - "updated_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027/discussions/1" - ] - }, - "reactions": { - "title": "Reaction Rollup", - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri" - }, - "total_count": { - "type": "integer" - }, - "+1": { - "type": "integer" - }, - "-1": { - "type": "integer" - }, - "laugh": { - "type": "integer" - }, - "confused": { - "type": "integer" - }, - "heart": { - "type": "integer" - }, - "hooray": { - "type": "integer" - }, - "eyes": { - "type": "integer" - }, - "rocket": { - "type": "integer" - } - }, - "required": [ - "url", - "total_count", - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "eyes", - "rocket" - ] - } - }, - "required": [ - "author", - "body", - "body_html", - "body_version", - "created_at", - "last_edited_at", - "html_url", - "pinned", - "private", - "node_id", - "number", - "team_url", - "title", - "updated_at", - "url" - ] - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "201", - "description": "

    Created

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "write" - } - ] - } - }, - { - "serverUrl": "http(s)://HOSTNAME/api/v3", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", - "title": "Get a discussion", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "org", - "description": "

    The organization name. The name is not case sensitive.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "team_slug", - "description": "

    The slug of the team name.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "discussion_number", - "description": "

    The number that identifies the discussion.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "bodyParameters": [], - "descriptionHTML": "

    Get a specific discussion on a team's page.

    \n

    Note

    \n

    \nYou can also specify a team by org_id and team_id using the route GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}.

    \n
    \n

    OAuth app tokens and personal access tokens (classic) need the read:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "parameters": { - "org": "ORG", - "team_slug": "TEAM_SLUG", - "discussion_number": "DISCUSSION_NUMBER" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

    Response

    ", - "example": { - "author": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "body": "Hi! This is an area for us to collaborate as a team.", - "body_html": "

    Hi! This is an area for us to collaborate as a team

    ", - "body_version": "0d495416a700fb06133c612575d92bfb", - "created_at": "2018-01-25T18:56:31Z", - "last_edited_at": null, - "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1", - "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==", - "number": 1, - "pinned": false, - "private": false, - "team_url": "https://api.github.com/teams/2343027", - "title": "Our first team post", - "updated_at": "2018-01-25T18:56:31Z", - "url": "https://api.github.com/teams/2343027/discussions/1", - "reactions": { - "url": "https://api.github.com/teams/2343027/discussions/1/reactions", - "total_count": 5, - "+1": 3, - "-1": 1, - "laugh": 0, - "confused": 0, - "heart": 1, - "hooray": 0, - "eyes": 1, - "rocket": 1 - } - }, - "schema": { - "title": "Team Discussion", - "description": "A team discussion is a persistent record of a free-form conversation within a team.", - "type": "object", - "properties": { - "author": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "format": "int64", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - }, - "user_view_type": { - "type": "string", - "examples": [ - "public" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "body": { - "description": "The main text of the discussion.", - "type": "string", - "examples": [ - "Please suggest improvements to our workflow in comments." - ] - }, - "body_html": { - "type": "string", - "examples": [ - "

    Hi! This is an area for us to collaborate as a team

    " - ] - }, - "body_version": { - "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.", - "type": "string", - "examples": [ - "0307116bbf7ced493b8d8a346c650b71" - ] - }, - "created_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "last_edited_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/orgs/github/teams/justice-league/discussions/1" - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDE0OlRlYW1EaXNjdXNzaW9uMQ==" - ] - }, - "number": { - "description": "The unique sequence number of a team discussion.", - "type": "integer", - "examples": [ - 42 - ] - }, - "pinned": { - "description": "Whether or not this discussion should be pinned for easy retrieval.", - "type": "boolean", - "examples": [ - true - ] - }, - "private": { - "description": "Whether or not this discussion should be restricted to team members and organization owners.", - "type": "boolean", - "examples": [ - true - ] - }, - "team_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027" - ] - }, - "title": { - "description": "The title of the discussion.", - "type": "string", - "examples": [ - "How can we improve our workflow?" - ] - }, - "updated_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027/discussions/1" - ] - }, - "reactions": { - "title": "Reaction Rollup", - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri" - }, - "total_count": { - "type": "integer" - }, - "+1": { - "type": "integer" - }, - "-1": { - "type": "integer" - }, - "laugh": { - "type": "integer" - }, - "confused": { - "type": "integer" - }, - "heart": { - "type": "integer" - }, - "hooray": { - "type": "integer" - }, - "eyes": { - "type": "integer" - }, - "rocket": { - "type": "integer" - } - }, - "required": [ - "url", - "total_count", - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "eyes", - "rocket" - ] - } - }, - "required": [ - "author", - "body", - "body_html", - "body_version", - "created_at", - "last_edited_at", - "html_url", - "pinned", - "private", - "node_id", - "number", - "team_url", - "title", - "updated_at", - "url" - ] - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

    OK

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "read" - } - ] - } - }, - { - "serverUrl": "http(s)://HOSTNAME/api/v3", - "verb": "patch", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", - "title": "Update a discussion", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "org", - "description": "

    The organization name. The name is not case sensitive.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "team_slug", - "description": "

    The slug of the team name.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "discussion_number", - "description": "

    The number that identifies the discussion.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "bodyParameters": [ - { - "type": "string", - "name": "title", - "in": "body", - "description": "

    The discussion post's title.

    " - }, - { - "type": "string", - "name": "body", - "in": "body", - "description": "

    The discussion post's body text.

    " - } - ], - "descriptionHTML": "

    Edits the title and body text of a discussion post. Only the parameters you provide are updated.

    \n

    Note

    \n

    \nYou can also specify a team by org_id and team_id using the route PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}.

    \n
    \n

    OAuth app tokens and personal access tokens (classic) need the write:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "contentType": "application/json", - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "bodyParameters": { - "title": "Welcome to our first team post" - }, - "parameters": { - "org": "ORG", - "team_slug": "TEAM_SLUG", - "discussion_number": "DISCUSSION_NUMBER" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

    Response

    ", - "example": { - "author": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "body": "Hi! This is an area for us to collaborate as a team.", - "body_html": "

    Hi! This is an area for us to collaborate as a team

    ", - "body_version": "0d495416a700fb06133c612575d92bfb", - "created_at": "2018-01-25T18:56:31Z", - "last_edited_at": "2018-01-26T18:22:20Z", - "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1", - "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==", - "number": 1, - "pinned": false, - "private": false, - "team_url": "https://api.github.com/teams/2343027", - "title": "Welcome to our first team post", - "updated_at": "2018-01-26T18:22:20Z", - "url": "https://api.github.com/teams/2343027/discussions/1", - "reactions": { - "url": "https://api.github.com/teams/2343027/discussions/1/reactions", - "total_count": 5, - "+1": 3, - "-1": 1, - "laugh": 0, - "confused": 0, - "heart": 1, - "hooray": 0, - "eyes": 1, - "rocket": 1 - } - }, - "schema": { - "title": "Team Discussion", - "description": "A team discussion is a persistent record of a free-form conversation within a team.", - "type": "object", - "properties": { - "author": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "format": "int64", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - }, - "user_view_type": { - "type": "string", - "examples": [ - "public" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "body": { - "description": "The main text of the discussion.", - "type": "string", - "examples": [ - "Please suggest improvements to our workflow in comments." - ] - }, - "body_html": { - "type": "string", - "examples": [ - "

    Hi! This is an area for us to collaborate as a team

    " - ] - }, - "body_version": { - "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.", - "type": "string", - "examples": [ - "0307116bbf7ced493b8d8a346c650b71" - ] - }, - "created_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "last_edited_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/orgs/github/teams/justice-league/discussions/1" - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDE0OlRlYW1EaXNjdXNzaW9uMQ==" - ] - }, - "number": { - "description": "The unique sequence number of a team discussion.", - "type": "integer", - "examples": [ - 42 - ] - }, - "pinned": { - "description": "Whether or not this discussion should be pinned for easy retrieval.", - "type": "boolean", - "examples": [ - true - ] - }, - "private": { - "description": "Whether or not this discussion should be restricted to team members and organization owners.", - "type": "boolean", - "examples": [ - true - ] - }, - "team_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027" - ] - }, - "title": { - "description": "The title of the discussion.", - "type": "string", - "examples": [ - "How can we improve our workflow?" - ] - }, - "updated_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027/discussions/1" - ] - }, - "reactions": { - "title": "Reaction Rollup", - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri" - }, - "total_count": { - "type": "integer" - }, - "+1": { - "type": "integer" - }, - "-1": { - "type": "integer" - }, - "laugh": { - "type": "integer" - }, - "confused": { - "type": "integer" - }, - "heart": { - "type": "integer" - }, - "hooray": { - "type": "integer" - }, - "eyes": { - "type": "integer" - }, - "rocket": { - "type": "integer" - } - }, - "required": [ - "url", - "total_count", - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "eyes", - "rocket" - ] - } - }, - "required": [ - "author", - "body", - "body_html", - "body_version", - "created_at", - "last_edited_at", - "html_url", - "pinned", - "private", - "node_id", - "number", - "team_url", - "title", - "updated_at", - "url" - ] - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

    OK

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "write" - } - ] - } - }, - { - "serverUrl": "http(s)://HOSTNAME/api/v3", - "verb": "delete", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", - "title": "Delete a discussion", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "org", - "description": "

    The organization name. The name is not case sensitive.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "team_slug", - "description": "

    The slug of the team name.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "discussion_number", - "description": "

    The number that identifies the discussion.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "bodyParameters": [], - "descriptionHTML": "

    Delete a discussion from a team's page.

    \n

    Note

    \n

    \nYou can also specify a team by org_id and team_id using the route DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}.

    \n
    \n

    OAuth app tokens and personal access tokens (classic) need the write:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "parameters": { - "org": "ORG", - "team_slug": "TEAM_SLUG", - "discussion_number": "DISCUSSION_NUMBER" - } - }, - "response": { - "statusCode": "204", - "description": "

    Response

    " - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "204", - "description": "

    No Content

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "write" - } - ] - } - }, - { - "serverUrl": "http(s)://HOSTNAME/api/v3", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions", - "title": "List discussions (Legacy)", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "team_id", - "description": "

    The unique identifier of the team.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "direction", - "description": "

    The direction to sort the results by.

    ", - "in": "query", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "per_page", - "description": "

    The number of results per page (max 100). For more information, see \"Using pagination in the REST API.\"

    ", - "in": "query", - "schema": { - "type": "integer", - "default": 30 - } - }, - { - "name": "page", - "description": "

    The page number of the results to fetch. For more information, see \"Using pagination in the REST API.\"

    ", - "in": "query", - "schema": { - "type": "integer", - "default": 1 - } - } - ], - "bodyParameters": [], - "descriptionHTML": "

    Warning

    \n

    \nEndpoint closing down notice: This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new List discussions endpoint.

    \n
    \n

    List all discussions on a team's page.

    \n

    OAuth app tokens and personal access tokens (classic) need the read:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "parameters": { - "team_id": "TEAM_ID" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

    Response

    ", - "example": [ - { - "author": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "body": "Hi! This is an area for us to collaborate as a team.", - "body_html": "

    Hi! This is an area for us to collaborate as a team

    ", - "body_version": "0d495416a700fb06133c612575d92bfb", - "created_at": "2018-01-25T18:56:31Z", - "last_edited_at": null, - "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1", - "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==", - "number": 1, - "pinned": false, - "private": false, - "team_url": "https://api.github.com/teams/2343027", - "title": "Our first team post", - "updated_at": "2018-01-25T18:56:31Z", - "url": "https://api.github.com/teams/2343027/discussions/1", - "reactions": { - "url": "https://api.github.com/teams/2343027/discussions/1/reactions", - "total_count": 5, - "+1": 3, - "-1": 1, - "laugh": 0, - "confused": 0, - "heart": 1, - "hooray": 0, - "eyes": 1, - "rocket": 1 - } - } - ], - "schema": { - "type": "array", - "items": { - "title": "Team Discussion", - "description": "A team discussion is a persistent record of a free-form conversation within a team.", - "type": "object", - "properties": { - "author": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "format": "int64", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - }, - "user_view_type": { - "type": "string", - "examples": [ - "public" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "body": { - "description": "The main text of the discussion.", - "type": "string", - "examples": [ - "Please suggest improvements to our workflow in comments." - ] - }, - "body_html": { - "type": "string", - "examples": [ - "

    Hi! This is an area for us to collaborate as a team

    " - ] - }, - "body_version": { - "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.", - "type": "string", - "examples": [ - "0307116bbf7ced493b8d8a346c650b71" - ] - }, - "created_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "last_edited_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/orgs/github/teams/justice-league/discussions/1" - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDE0OlRlYW1EaXNjdXNzaW9uMQ==" - ] - }, - "number": { - "description": "The unique sequence number of a team discussion.", - "type": "integer", - "examples": [ - 42 - ] - }, - "pinned": { - "description": "Whether or not this discussion should be pinned for easy retrieval.", - "type": "boolean", - "examples": [ - true - ] - }, - "private": { - "description": "Whether or not this discussion should be restricted to team members and organization owners.", - "type": "boolean", - "examples": [ - true - ] - }, - "team_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027" - ] - }, - "title": { - "description": "The title of the discussion.", - "type": "string", - "examples": [ - "How can we improve our workflow?" - ] - }, - "updated_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027/discussions/1" - ] - }, - "reactions": { - "title": "Reaction Rollup", - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri" - }, - "total_count": { - "type": "integer" - }, - "+1": { - "type": "integer" - }, - "-1": { - "type": "integer" - }, - "laugh": { - "type": "integer" - }, - "confused": { - "type": "integer" - }, - "heart": { - "type": "integer" - }, - "hooray": { - "type": "integer" - }, - "eyes": { - "type": "integer" - }, - "rocket": { - "type": "integer" - } - }, - "required": [ - "url", - "total_count", - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "eyes", - "rocket" - ] - } - }, - "required": [ - "author", - "body", - "body_html", - "body_version", - "created_at", - "last_edited_at", - "html_url", - "pinned", - "private", - "node_id", - "number", - "team_url", - "title", - "updated_at", - "url" - ] - } - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

    OK

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "read" - } - ] - } - }, - { - "serverUrl": "http(s)://HOSTNAME/api/v3", - "verb": "post", - "requestPath": "/teams/{team_id}/discussions", - "title": "Create a discussion (Legacy)", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "team_id", - "description": "

    The unique identifier of the team.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "bodyParameters": [ - { - "type": "string", - "name": "title", - "in": "body", - "description": "

    The discussion post's title.

    ", - "isRequired": true - }, - { - "type": "string", - "name": "body", - "in": "body", - "description": "

    The discussion post's body text.

    ", - "isRequired": true - }, - { - "type": "boolean", - "name": "private", - "in": "body", - "description": "

    Private posts are only visible to team members, organization owners, and team maintainers. Public posts are visible to all members of the organization. Set to true to create a private post.

    ", - "default": false - } - ], - "descriptionHTML": "

    Warning

    \n

    \nEndpoint closing down notice: This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new Create a discussion endpoint.

    \n
    \n

    Creates a new discussion post on a team's page.

    \n

    This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see \"Rate limits for the API\" and \"Best practices for using the REST API.\"

    \n

    OAuth app tokens and personal access tokens (classic) need the write:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "contentType": "application/json", - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "bodyParameters": { - "title": "Our first team post", - "body": "Hi! This is an area for us to collaborate as a team." - }, - "parameters": { - "team_id": "TEAM_ID" - } - }, - "response": { - "statusCode": "201", - "contentType": "application/json", - "description": "

    Response

    ", - "example": { - "author": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "body": "Hi! This is an area for us to collaborate as a team.", - "body_html": "

    Hi! This is an area for us to collaborate as a team

    ", - "body_version": "0d495416a700fb06133c612575d92bfb", - "created_at": "2018-01-25T18:56:31Z", - "last_edited_at": null, - "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1", - "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==", - "number": 1, - "pinned": false, - "private": false, - "team_url": "https://api.github.com/teams/2343027", - "title": "Our first team post", - "updated_at": "2018-01-25T18:56:31Z", - "url": "https://api.github.com/teams/2343027/discussions/1", - "reactions": { - "url": "https://api.github.com/teams/2343027/discussions/1/reactions", - "total_count": 5, - "+1": 3, - "-1": 1, - "laugh": 0, - "confused": 0, - "heart": 1, - "hooray": 0, - "eyes": 1, - "rocket": 1 - } - }, - "schema": { - "title": "Team Discussion", - "description": "A team discussion is a persistent record of a free-form conversation within a team.", - "type": "object", - "properties": { - "author": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "format": "int64", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - }, - "user_view_type": { - "type": "string", - "examples": [ - "public" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "body": { - "description": "The main text of the discussion.", - "type": "string", - "examples": [ - "Please suggest improvements to our workflow in comments." - ] - }, - "body_html": { - "type": "string", - "examples": [ - "

    Hi! This is an area for us to collaborate as a team

    " - ] - }, - "body_version": { - "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.", - "type": "string", - "examples": [ - "0307116bbf7ced493b8d8a346c650b71" - ] - }, - "created_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "last_edited_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/orgs/github/teams/justice-league/discussions/1" - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDE0OlRlYW1EaXNjdXNzaW9uMQ==" - ] - }, - "number": { - "description": "The unique sequence number of a team discussion.", - "type": "integer", - "examples": [ - 42 - ] - }, - "pinned": { - "description": "Whether or not this discussion should be pinned for easy retrieval.", - "type": "boolean", - "examples": [ - true - ] - }, - "private": { - "description": "Whether or not this discussion should be restricted to team members and organization owners.", - "type": "boolean", - "examples": [ - true - ] - }, - "team_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027" - ] - }, - "title": { - "description": "The title of the discussion.", - "type": "string", - "examples": [ - "How can we improve our workflow?" - ] - }, - "updated_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027/discussions/1" - ] - }, - "reactions": { - "title": "Reaction Rollup", - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri" - }, - "total_count": { - "type": "integer" - }, - "+1": { - "type": "integer" - }, - "-1": { - "type": "integer" - }, - "laugh": { - "type": "integer" - }, - "confused": { - "type": "integer" - }, - "heart": { - "type": "integer" - }, - "hooray": { - "type": "integer" - }, - "eyes": { - "type": "integer" - }, - "rocket": { - "type": "integer" - } - }, - "required": [ - "url", - "total_count", - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "eyes", - "rocket" - ] - } - }, - "required": [ - "author", - "body", - "body_html", - "body_version", - "created_at", - "last_edited_at", - "html_url", - "pinned", - "private", - "node_id", - "number", - "team_url", - "title", - "updated_at", - "url" - ] - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "201", - "description": "

    Created

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "write" - } - ] - } - }, - { - "serverUrl": "http(s)://HOSTNAME/api/v3", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}", - "title": "Get a discussion (Legacy)", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "team_id", - "description": "

    The unique identifier of the team.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "discussion_number", - "description": "

    The number that identifies the discussion.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "bodyParameters": [], - "descriptionHTML": "

    Warning

    \n

    \nEndpoint closing down notice: This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new Get a discussion endpoint.

    \n
    \n

    Get a specific discussion on a team's page.

    \n

    OAuth app tokens and personal access tokens (classic) need the read:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "parameters": { - "team_id": "TEAM_ID", - "discussion_number": "DISCUSSION_NUMBER" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

    Response

    ", - "example": { - "author": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "body": "Hi! This is an area for us to collaborate as a team.", - "body_html": "

    Hi! This is an area for us to collaborate as a team

    ", - "body_version": "0d495416a700fb06133c612575d92bfb", - "created_at": "2018-01-25T18:56:31Z", - "last_edited_at": null, - "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1", - "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==", - "number": 1, - "pinned": false, - "private": false, - "team_url": "https://api.github.com/teams/2343027", - "title": "Our first team post", - "updated_at": "2018-01-25T18:56:31Z", - "url": "https://api.github.com/teams/2343027/discussions/1", - "reactions": { - "url": "https://api.github.com/teams/2343027/discussions/1/reactions", - "total_count": 5, - "+1": 3, - "-1": 1, - "laugh": 0, - "confused": 0, - "heart": 1, - "hooray": 0, - "eyes": 1, - "rocket": 1 - } - }, - "schema": { - "title": "Team Discussion", - "description": "A team discussion is a persistent record of a free-form conversation within a team.", - "type": "object", - "properties": { - "author": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "format": "int64", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - }, - "user_view_type": { - "type": "string", - "examples": [ - "public" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "body": { - "description": "The main text of the discussion.", - "type": "string", - "examples": [ - "Please suggest improvements to our workflow in comments." - ] - }, - "body_html": { - "type": "string", - "examples": [ - "

    Hi! This is an area for us to collaborate as a team

    " - ] - }, - "body_version": { - "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.", - "type": "string", - "examples": [ - "0307116bbf7ced493b8d8a346c650b71" - ] - }, - "created_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "last_edited_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/orgs/github/teams/justice-league/discussions/1" - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDE0OlRlYW1EaXNjdXNzaW9uMQ==" - ] - }, - "number": { - "description": "The unique sequence number of a team discussion.", - "type": "integer", - "examples": [ - 42 - ] - }, - "pinned": { - "description": "Whether or not this discussion should be pinned for easy retrieval.", - "type": "boolean", - "examples": [ - true - ] - }, - "private": { - "description": "Whether or not this discussion should be restricted to team members and organization owners.", - "type": "boolean", - "examples": [ - true - ] - }, - "team_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027" - ] - }, - "title": { - "description": "The title of the discussion.", - "type": "string", - "examples": [ - "How can we improve our workflow?" - ] - }, - "updated_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027/discussions/1" - ] - }, - "reactions": { - "title": "Reaction Rollup", - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri" - }, - "total_count": { - "type": "integer" - }, - "+1": { - "type": "integer" - }, - "-1": { - "type": "integer" - }, - "laugh": { - "type": "integer" - }, - "confused": { - "type": "integer" - }, - "heart": { - "type": "integer" - }, - "hooray": { - "type": "integer" - }, - "eyes": { - "type": "integer" - }, - "rocket": { - "type": "integer" - } - }, - "required": [ - "url", - "total_count", - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "eyes", - "rocket" - ] - } - }, - "required": [ - "author", - "body", - "body_html", - "body_version", - "created_at", - "last_edited_at", - "html_url", - "pinned", - "private", - "node_id", - "number", - "team_url", - "title", - "updated_at", - "url" - ] - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

    OK

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "read" - } - ] - } - }, - { - "serverUrl": "http(s)://HOSTNAME/api/v3", - "verb": "patch", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}", - "title": "Update a discussion (Legacy)", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "team_id", - "description": "

    The unique identifier of the team.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "discussion_number", - "description": "

    The number that identifies the discussion.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "bodyParameters": [ - { - "type": "string", - "name": "title", - "in": "body", - "description": "

    The discussion post's title.

    " - }, - { - "type": "string", - "name": "body", - "in": "body", - "description": "

    The discussion post's body text.

    " - } - ], - "descriptionHTML": "

    Warning

    \n

    \nEndpoint closing down notice: This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new Update a discussion endpoint.

    \n
    \n

    Edits the title and body text of a discussion post. Only the parameters you provide are updated.

    \n

    OAuth app tokens and personal access tokens (classic) need the write:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "contentType": "application/json", - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "bodyParameters": { - "title": "Welcome to our first team post" - }, - "parameters": { - "team_id": "TEAM_ID", - "discussion_number": "DISCUSSION_NUMBER" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

    Response

    ", - "example": { - "author": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "body": "Hi! This is an area for us to collaborate as a team.", - "body_html": "

    Hi! This is an area for us to collaborate as a team

    ", - "body_version": "0d495416a700fb06133c612575d92bfb", - "created_at": "2018-01-25T18:56:31Z", - "last_edited_at": "2018-01-26T18:22:20Z", - "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1", - "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==", - "number": 1, - "pinned": false, - "private": false, - "team_url": "https://api.github.com/teams/2343027", - "title": "Welcome to our first team post", - "updated_at": "2018-01-26T18:22:20Z", - "url": "https://api.github.com/teams/2343027/discussions/1", - "reactions": { - "url": "https://api.github.com/teams/2343027/discussions/1/reactions", - "total_count": 5, - "+1": 3, - "-1": 1, - "laugh": 0, - "confused": 0, - "heart": 1, - "hooray": 0, - "eyes": 1, - "rocket": 1 - } - }, - "schema": { - "title": "Team Discussion", - "description": "A team discussion is a persistent record of a free-form conversation within a team.", - "type": "object", - "properties": { - "author": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "format": "int64", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - }, - "user_view_type": { - "type": "string", - "examples": [ - "public" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "body": { - "description": "The main text of the discussion.", - "type": "string", - "examples": [ - "Please suggest improvements to our workflow in comments." - ] - }, - "body_html": { - "type": "string", - "examples": [ - "

    Hi! This is an area for us to collaborate as a team

    " - ] - }, - "body_version": { - "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.", - "type": "string", - "examples": [ - "0307116bbf7ced493b8d8a346c650b71" - ] - }, - "created_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "last_edited_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/orgs/github/teams/justice-league/discussions/1" - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDE0OlRlYW1EaXNjdXNzaW9uMQ==" - ] - }, - "number": { - "description": "The unique sequence number of a team discussion.", - "type": "integer", - "examples": [ - 42 - ] - }, - "pinned": { - "description": "Whether or not this discussion should be pinned for easy retrieval.", - "type": "boolean", - "examples": [ - true - ] - }, - "private": { - "description": "Whether or not this discussion should be restricted to team members and organization owners.", - "type": "boolean", - "examples": [ - true - ] - }, - "team_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027" - ] - }, - "title": { - "description": "The title of the discussion.", - "type": "string", - "examples": [ - "How can we improve our workflow?" - ] - }, - "updated_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027/discussions/1" - ] - }, - "reactions": { - "title": "Reaction Rollup", - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri" - }, - "total_count": { - "type": "integer" - }, - "+1": { - "type": "integer" - }, - "-1": { - "type": "integer" - }, - "laugh": { - "type": "integer" - }, - "confused": { - "type": "integer" - }, - "heart": { - "type": "integer" - }, - "hooray": { - "type": "integer" - }, - "eyes": { - "type": "integer" - }, - "rocket": { - "type": "integer" - } - }, - "required": [ - "url", - "total_count", - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "eyes", - "rocket" - ] - } - }, - "required": [ - "author", - "body", - "body_html", - "body_version", - "created_at", - "last_edited_at", - "html_url", - "pinned", - "private", - "node_id", - "number", - "team_url", - "title", - "updated_at", - "url" - ] - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

    OK

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "write" - } - ] - } - }, - { - "serverUrl": "http(s)://HOSTNAME/api/v3", - "verb": "delete", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}", - "title": "Delete a discussion (Legacy)", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "team_id", - "description": "

    The unique identifier of the team.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "discussion_number", - "description": "

    The number that identifies the discussion.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "bodyParameters": [], - "descriptionHTML": "

    Warning

    \n

    \nEndpoint closing down notice: This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new Delete a discussion endpoint.

    \n
    \n

    Delete a discussion from a team's page.

    \n

    OAuth app tokens and personal access tokens (classic) need the write:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "parameters": { - "team_id": "TEAM_ID", - "discussion_number": "DISCUSSION_NUMBER" - } - }, - "response": { - "statusCode": "204", - "description": "

    Response

    " - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "204", - "description": "

    No Content

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "write" - } - ] - } - } - ], "external-groups": [ { "serverUrl": "http(s)://HOSTNAME/api/v3", diff --git a/src/rest/data/ghes-3.15-2022-11-28/schema.json b/src/rest/data/ghes-3.15-2022-11-28/schema.json index 94105baf7da5..db457cfffabc 100644 --- a/src/rest/data/ghes-3.15-2022-11-28/schema.json +++ b/src/rest/data/ghes-3.15-2022-11-28/schema.json @@ -700952,3973 +700952,6 @@ } } ], - "discussions": [ - { - "serverUrl": "http(s)://HOSTNAME/api/v3", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions", - "title": "List discussions", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "org", - "description": "

    The organization name. The name is not case sensitive.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "team_slug", - "description": "

    The slug of the team name.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "direction", - "description": "

    The direction to sort the results by.

    ", - "in": "query", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "per_page", - "description": "

    The number of results per page (max 100). For more information, see \"Using pagination in the REST API.\"

    ", - "in": "query", - "schema": { - "type": "integer", - "default": 30 - } - }, - { - "name": "page", - "description": "

    The page number of the results to fetch. For more information, see \"Using pagination in the REST API.\"

    ", - "in": "query", - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "pinned", - "in": "query", - "required": false, - "description": "

    Pinned discussions only filter

    ", - "schema": { - "type": "string" - } - } - ], - "bodyParameters": [], - "descriptionHTML": "

    List all discussions on a team's page.

    \n

    Note

    \n

    \nYou can also specify a team by org_id and team_id using the route GET /organizations/{org_id}/team/{team_id}/discussions.

    \n
    \n

    OAuth app tokens and personal access tokens (classic) need the read:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "parameters": { - "org": "ORG", - "team_slug": "TEAM_SLUG" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

    Response

    ", - "example": [ - { - "author": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "body": "Hi! This is an area for us to collaborate as a team.", - "body_html": "

    Hi! This is an area for us to collaborate as a team

    ", - "body_version": "0d495416a700fb06133c612575d92bfb", - "created_at": "2018-01-25T18:56:31Z", - "last_edited_at": null, - "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1", - "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==", - "number": 1, - "pinned": false, - "private": false, - "team_url": "https://api.github.com/teams/2343027", - "title": "Our first team post", - "updated_at": "2018-01-25T18:56:31Z", - "url": "https://api.github.com/teams/2343027/discussions/1", - "reactions": { - "url": "https://api.github.com/teams/2343027/discussions/1/reactions", - "total_count": 5, - "+1": 3, - "-1": 1, - "laugh": 0, - "confused": 0, - "heart": 1, - "hooray": 0, - "eyes": 1, - "rocket": 1 - } - } - ], - "schema": { - "type": "array", - "items": { - "title": "Team Discussion", - "description": "A team discussion is a persistent record of a free-form conversation within a team.", - "type": "object", - "properties": { - "author": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "format": "int64", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - }, - "user_view_type": { - "type": "string", - "examples": [ - "public" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "body": { - "description": "The main text of the discussion.", - "type": "string", - "examples": [ - "Please suggest improvements to our workflow in comments." - ] - }, - "body_html": { - "type": "string", - "examples": [ - "

    Hi! This is an area for us to collaborate as a team

    " - ] - }, - "body_version": { - "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.", - "type": "string", - "examples": [ - "0307116bbf7ced493b8d8a346c650b71" - ] - }, - "created_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "last_edited_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/orgs/github/teams/justice-league/discussions/1" - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDE0OlRlYW1EaXNjdXNzaW9uMQ==" - ] - }, - "number": { - "description": "The unique sequence number of a team discussion.", - "type": "integer", - "examples": [ - 42 - ] - }, - "pinned": { - "description": "Whether or not this discussion should be pinned for easy retrieval.", - "type": "boolean", - "examples": [ - true - ] - }, - "private": { - "description": "Whether or not this discussion should be restricted to team members and organization owners.", - "type": "boolean", - "examples": [ - true - ] - }, - "team_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027" - ] - }, - "title": { - "description": "The title of the discussion.", - "type": "string", - "examples": [ - "How can we improve our workflow?" - ] - }, - "updated_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027/discussions/1" - ] - }, - "reactions": { - "title": "Reaction Rollup", - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri" - }, - "total_count": { - "type": "integer" - }, - "+1": { - "type": "integer" - }, - "-1": { - "type": "integer" - }, - "laugh": { - "type": "integer" - }, - "confused": { - "type": "integer" - }, - "heart": { - "type": "integer" - }, - "hooray": { - "type": "integer" - }, - "eyes": { - "type": "integer" - }, - "rocket": { - "type": "integer" - } - }, - "required": [ - "url", - "total_count", - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "eyes", - "rocket" - ] - } - }, - "required": [ - "author", - "body", - "body_html", - "body_version", - "created_at", - "last_edited_at", - "html_url", - "pinned", - "private", - "node_id", - "number", - "team_url", - "title", - "updated_at", - "url" - ] - } - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

    OK

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "read" - } - ] - } - }, - { - "serverUrl": "http(s)://HOSTNAME/api/v3", - "verb": "post", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions", - "title": "Create a discussion", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "org", - "description": "

    The organization name. The name is not case sensitive.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "team_slug", - "description": "

    The slug of the team name.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "bodyParameters": [ - { - "type": "string", - "name": "title", - "in": "body", - "description": "

    The discussion post's title.

    ", - "isRequired": true - }, - { - "type": "string", - "name": "body", - "in": "body", - "description": "

    The discussion post's body text.

    ", - "isRequired": true - }, - { - "type": "boolean", - "name": "private", - "in": "body", - "description": "

    Private posts are only visible to team members, organization owners, and team maintainers. Public posts are visible to all members of the organization. Set to true to create a private post.

    ", - "default": false - } - ], - "descriptionHTML": "

    Creates a new discussion post on a team's page.

    \n

    This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see \"Rate limits for the API\" and \"Best practices for using the REST API.\"

    \n

    Note

    \n

    \nYou can also specify a team by org_id and team_id using the route POST /organizations/{org_id}/team/{team_id}/discussions.

    \n
    \n

    OAuth app tokens and personal access tokens (classic) need the write:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "contentType": "application/json", - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "bodyParameters": { - "title": "Our first team post", - "body": "Hi! This is an area for us to collaborate as a team." - }, - "parameters": { - "org": "ORG", - "team_slug": "TEAM_SLUG" - } - }, - "response": { - "statusCode": "201", - "contentType": "application/json", - "description": "

    Response

    ", - "example": { - "author": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "body": "Hi! This is an area for us to collaborate as a team.", - "body_html": "

    Hi! This is an area for us to collaborate as a team

    ", - "body_version": "0d495416a700fb06133c612575d92bfb", - "created_at": "2018-01-25T18:56:31Z", - "last_edited_at": null, - "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1", - "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==", - "number": 1, - "pinned": false, - "private": false, - "team_url": "https://api.github.com/teams/2343027", - "title": "Our first team post", - "updated_at": "2018-01-25T18:56:31Z", - "url": "https://api.github.com/teams/2343027/discussions/1", - "reactions": { - "url": "https://api.github.com/teams/2343027/discussions/1/reactions", - "total_count": 5, - "+1": 3, - "-1": 1, - "laugh": 0, - "confused": 0, - "heart": 1, - "hooray": 0, - "eyes": 1, - "rocket": 1 - } - }, - "schema": { - "title": "Team Discussion", - "description": "A team discussion is a persistent record of a free-form conversation within a team.", - "type": "object", - "properties": { - "author": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "format": "int64", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - }, - "user_view_type": { - "type": "string", - "examples": [ - "public" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "body": { - "description": "The main text of the discussion.", - "type": "string", - "examples": [ - "Please suggest improvements to our workflow in comments." - ] - }, - "body_html": { - "type": "string", - "examples": [ - "

    Hi! This is an area for us to collaborate as a team

    " - ] - }, - "body_version": { - "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.", - "type": "string", - "examples": [ - "0307116bbf7ced493b8d8a346c650b71" - ] - }, - "created_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "last_edited_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/orgs/github/teams/justice-league/discussions/1" - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDE0OlRlYW1EaXNjdXNzaW9uMQ==" - ] - }, - "number": { - "description": "The unique sequence number of a team discussion.", - "type": "integer", - "examples": [ - 42 - ] - }, - "pinned": { - "description": "Whether or not this discussion should be pinned for easy retrieval.", - "type": "boolean", - "examples": [ - true - ] - }, - "private": { - "description": "Whether or not this discussion should be restricted to team members and organization owners.", - "type": "boolean", - "examples": [ - true - ] - }, - "team_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027" - ] - }, - "title": { - "description": "The title of the discussion.", - "type": "string", - "examples": [ - "How can we improve our workflow?" - ] - }, - "updated_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027/discussions/1" - ] - }, - "reactions": { - "title": "Reaction Rollup", - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri" - }, - "total_count": { - "type": "integer" - }, - "+1": { - "type": "integer" - }, - "-1": { - "type": "integer" - }, - "laugh": { - "type": "integer" - }, - "confused": { - "type": "integer" - }, - "heart": { - "type": "integer" - }, - "hooray": { - "type": "integer" - }, - "eyes": { - "type": "integer" - }, - "rocket": { - "type": "integer" - } - }, - "required": [ - "url", - "total_count", - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "eyes", - "rocket" - ] - } - }, - "required": [ - "author", - "body", - "body_html", - "body_version", - "created_at", - "last_edited_at", - "html_url", - "pinned", - "private", - "node_id", - "number", - "team_url", - "title", - "updated_at", - "url" - ] - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "201", - "description": "

    Created

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "write" - } - ] - } - }, - { - "serverUrl": "http(s)://HOSTNAME/api/v3", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", - "title": "Get a discussion", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "org", - "description": "

    The organization name. The name is not case sensitive.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "team_slug", - "description": "

    The slug of the team name.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "discussion_number", - "description": "

    The number that identifies the discussion.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "bodyParameters": [], - "descriptionHTML": "

    Get a specific discussion on a team's page.

    \n

    Note

    \n

    \nYou can also specify a team by org_id and team_id using the route GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}.

    \n
    \n

    OAuth app tokens and personal access tokens (classic) need the read:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "parameters": { - "org": "ORG", - "team_slug": "TEAM_SLUG", - "discussion_number": "DISCUSSION_NUMBER" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

    Response

    ", - "example": { - "author": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "body": "Hi! This is an area for us to collaborate as a team.", - "body_html": "

    Hi! This is an area for us to collaborate as a team

    ", - "body_version": "0d495416a700fb06133c612575d92bfb", - "created_at": "2018-01-25T18:56:31Z", - "last_edited_at": null, - "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1", - "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==", - "number": 1, - "pinned": false, - "private": false, - "team_url": "https://api.github.com/teams/2343027", - "title": "Our first team post", - "updated_at": "2018-01-25T18:56:31Z", - "url": "https://api.github.com/teams/2343027/discussions/1", - "reactions": { - "url": "https://api.github.com/teams/2343027/discussions/1/reactions", - "total_count": 5, - "+1": 3, - "-1": 1, - "laugh": 0, - "confused": 0, - "heart": 1, - "hooray": 0, - "eyes": 1, - "rocket": 1 - } - }, - "schema": { - "title": "Team Discussion", - "description": "A team discussion is a persistent record of a free-form conversation within a team.", - "type": "object", - "properties": { - "author": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "format": "int64", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - }, - "user_view_type": { - "type": "string", - "examples": [ - "public" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "body": { - "description": "The main text of the discussion.", - "type": "string", - "examples": [ - "Please suggest improvements to our workflow in comments." - ] - }, - "body_html": { - "type": "string", - "examples": [ - "

    Hi! This is an area for us to collaborate as a team

    " - ] - }, - "body_version": { - "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.", - "type": "string", - "examples": [ - "0307116bbf7ced493b8d8a346c650b71" - ] - }, - "created_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "last_edited_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/orgs/github/teams/justice-league/discussions/1" - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDE0OlRlYW1EaXNjdXNzaW9uMQ==" - ] - }, - "number": { - "description": "The unique sequence number of a team discussion.", - "type": "integer", - "examples": [ - 42 - ] - }, - "pinned": { - "description": "Whether or not this discussion should be pinned for easy retrieval.", - "type": "boolean", - "examples": [ - true - ] - }, - "private": { - "description": "Whether or not this discussion should be restricted to team members and organization owners.", - "type": "boolean", - "examples": [ - true - ] - }, - "team_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027" - ] - }, - "title": { - "description": "The title of the discussion.", - "type": "string", - "examples": [ - "How can we improve our workflow?" - ] - }, - "updated_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027/discussions/1" - ] - }, - "reactions": { - "title": "Reaction Rollup", - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri" - }, - "total_count": { - "type": "integer" - }, - "+1": { - "type": "integer" - }, - "-1": { - "type": "integer" - }, - "laugh": { - "type": "integer" - }, - "confused": { - "type": "integer" - }, - "heart": { - "type": "integer" - }, - "hooray": { - "type": "integer" - }, - "eyes": { - "type": "integer" - }, - "rocket": { - "type": "integer" - } - }, - "required": [ - "url", - "total_count", - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "eyes", - "rocket" - ] - } - }, - "required": [ - "author", - "body", - "body_html", - "body_version", - "created_at", - "last_edited_at", - "html_url", - "pinned", - "private", - "node_id", - "number", - "team_url", - "title", - "updated_at", - "url" - ] - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

    OK

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "read" - } - ] - } - }, - { - "serverUrl": "http(s)://HOSTNAME/api/v3", - "verb": "patch", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", - "title": "Update a discussion", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "org", - "description": "

    The organization name. The name is not case sensitive.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "team_slug", - "description": "

    The slug of the team name.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "discussion_number", - "description": "

    The number that identifies the discussion.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "bodyParameters": [ - { - "type": "string", - "name": "title", - "in": "body", - "description": "

    The discussion post's title.

    " - }, - { - "type": "string", - "name": "body", - "in": "body", - "description": "

    The discussion post's body text.

    " - } - ], - "descriptionHTML": "

    Edits the title and body text of a discussion post. Only the parameters you provide are updated.

    \n

    Note

    \n

    \nYou can also specify a team by org_id and team_id using the route PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}.

    \n
    \n

    OAuth app tokens and personal access tokens (classic) need the write:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "contentType": "application/json", - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "bodyParameters": { - "title": "Welcome to our first team post" - }, - "parameters": { - "org": "ORG", - "team_slug": "TEAM_SLUG", - "discussion_number": "DISCUSSION_NUMBER" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

    Response

    ", - "example": { - "author": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "body": "Hi! This is an area for us to collaborate as a team.", - "body_html": "

    Hi! This is an area for us to collaborate as a team

    ", - "body_version": "0d495416a700fb06133c612575d92bfb", - "created_at": "2018-01-25T18:56:31Z", - "last_edited_at": "2018-01-26T18:22:20Z", - "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1", - "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==", - "number": 1, - "pinned": false, - "private": false, - "team_url": "https://api.github.com/teams/2343027", - "title": "Welcome to our first team post", - "updated_at": "2018-01-26T18:22:20Z", - "url": "https://api.github.com/teams/2343027/discussions/1", - "reactions": { - "url": "https://api.github.com/teams/2343027/discussions/1/reactions", - "total_count": 5, - "+1": 3, - "-1": 1, - "laugh": 0, - "confused": 0, - "heart": 1, - "hooray": 0, - "eyes": 1, - "rocket": 1 - } - }, - "schema": { - "title": "Team Discussion", - "description": "A team discussion is a persistent record of a free-form conversation within a team.", - "type": "object", - "properties": { - "author": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "format": "int64", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - }, - "user_view_type": { - "type": "string", - "examples": [ - "public" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "body": { - "description": "The main text of the discussion.", - "type": "string", - "examples": [ - "Please suggest improvements to our workflow in comments." - ] - }, - "body_html": { - "type": "string", - "examples": [ - "

    Hi! This is an area for us to collaborate as a team

    " - ] - }, - "body_version": { - "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.", - "type": "string", - "examples": [ - "0307116bbf7ced493b8d8a346c650b71" - ] - }, - "created_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "last_edited_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/orgs/github/teams/justice-league/discussions/1" - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDE0OlRlYW1EaXNjdXNzaW9uMQ==" - ] - }, - "number": { - "description": "The unique sequence number of a team discussion.", - "type": "integer", - "examples": [ - 42 - ] - }, - "pinned": { - "description": "Whether or not this discussion should be pinned for easy retrieval.", - "type": "boolean", - "examples": [ - true - ] - }, - "private": { - "description": "Whether or not this discussion should be restricted to team members and organization owners.", - "type": "boolean", - "examples": [ - true - ] - }, - "team_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027" - ] - }, - "title": { - "description": "The title of the discussion.", - "type": "string", - "examples": [ - "How can we improve our workflow?" - ] - }, - "updated_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027/discussions/1" - ] - }, - "reactions": { - "title": "Reaction Rollup", - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri" - }, - "total_count": { - "type": "integer" - }, - "+1": { - "type": "integer" - }, - "-1": { - "type": "integer" - }, - "laugh": { - "type": "integer" - }, - "confused": { - "type": "integer" - }, - "heart": { - "type": "integer" - }, - "hooray": { - "type": "integer" - }, - "eyes": { - "type": "integer" - }, - "rocket": { - "type": "integer" - } - }, - "required": [ - "url", - "total_count", - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "eyes", - "rocket" - ] - } - }, - "required": [ - "author", - "body", - "body_html", - "body_version", - "created_at", - "last_edited_at", - "html_url", - "pinned", - "private", - "node_id", - "number", - "team_url", - "title", - "updated_at", - "url" - ] - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

    OK

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "write" - } - ] - } - }, - { - "serverUrl": "http(s)://HOSTNAME/api/v3", - "verb": "delete", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", - "title": "Delete a discussion", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "org", - "description": "

    The organization name. The name is not case sensitive.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "team_slug", - "description": "

    The slug of the team name.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "discussion_number", - "description": "

    The number that identifies the discussion.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "bodyParameters": [], - "descriptionHTML": "

    Delete a discussion from a team's page.

    \n

    Note

    \n

    \nYou can also specify a team by org_id and team_id using the route DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}.

    \n
    \n

    OAuth app tokens and personal access tokens (classic) need the write:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "parameters": { - "org": "ORG", - "team_slug": "TEAM_SLUG", - "discussion_number": "DISCUSSION_NUMBER" - } - }, - "response": { - "statusCode": "204", - "description": "

    Response

    " - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "204", - "description": "

    No Content

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "write" - } - ] - } - }, - { - "serverUrl": "http(s)://HOSTNAME/api/v3", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions", - "title": "List discussions (Legacy)", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "team_id", - "description": "

    The unique identifier of the team.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "direction", - "description": "

    The direction to sort the results by.

    ", - "in": "query", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "per_page", - "description": "

    The number of results per page (max 100). For more information, see \"Using pagination in the REST API.\"

    ", - "in": "query", - "schema": { - "type": "integer", - "default": 30 - } - }, - { - "name": "page", - "description": "

    The page number of the results to fetch. For more information, see \"Using pagination in the REST API.\"

    ", - "in": "query", - "schema": { - "type": "integer", - "default": 1 - } - } - ], - "bodyParameters": [], - "descriptionHTML": "

    Warning

    \n

    \nEndpoint closing down notice: This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new List discussions endpoint.

    \n
    \n

    List all discussions on a team's page.

    \n

    OAuth app tokens and personal access tokens (classic) need the read:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "parameters": { - "team_id": "TEAM_ID" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

    Response

    ", - "example": [ - { - "author": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "body": "Hi! This is an area for us to collaborate as a team.", - "body_html": "

    Hi! This is an area for us to collaborate as a team

    ", - "body_version": "0d495416a700fb06133c612575d92bfb", - "created_at": "2018-01-25T18:56:31Z", - "last_edited_at": null, - "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1", - "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==", - "number": 1, - "pinned": false, - "private": false, - "team_url": "https://api.github.com/teams/2343027", - "title": "Our first team post", - "updated_at": "2018-01-25T18:56:31Z", - "url": "https://api.github.com/teams/2343027/discussions/1", - "reactions": { - "url": "https://api.github.com/teams/2343027/discussions/1/reactions", - "total_count": 5, - "+1": 3, - "-1": 1, - "laugh": 0, - "confused": 0, - "heart": 1, - "hooray": 0, - "eyes": 1, - "rocket": 1 - } - } - ], - "schema": { - "type": "array", - "items": { - "title": "Team Discussion", - "description": "A team discussion is a persistent record of a free-form conversation within a team.", - "type": "object", - "properties": { - "author": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "format": "int64", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - }, - "user_view_type": { - "type": "string", - "examples": [ - "public" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "body": { - "description": "The main text of the discussion.", - "type": "string", - "examples": [ - "Please suggest improvements to our workflow in comments." - ] - }, - "body_html": { - "type": "string", - "examples": [ - "

    Hi! This is an area for us to collaborate as a team

    " - ] - }, - "body_version": { - "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.", - "type": "string", - "examples": [ - "0307116bbf7ced493b8d8a346c650b71" - ] - }, - "created_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "last_edited_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/orgs/github/teams/justice-league/discussions/1" - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDE0OlRlYW1EaXNjdXNzaW9uMQ==" - ] - }, - "number": { - "description": "The unique sequence number of a team discussion.", - "type": "integer", - "examples": [ - 42 - ] - }, - "pinned": { - "description": "Whether or not this discussion should be pinned for easy retrieval.", - "type": "boolean", - "examples": [ - true - ] - }, - "private": { - "description": "Whether or not this discussion should be restricted to team members and organization owners.", - "type": "boolean", - "examples": [ - true - ] - }, - "team_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027" - ] - }, - "title": { - "description": "The title of the discussion.", - "type": "string", - "examples": [ - "How can we improve our workflow?" - ] - }, - "updated_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027/discussions/1" - ] - }, - "reactions": { - "title": "Reaction Rollup", - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri" - }, - "total_count": { - "type": "integer" - }, - "+1": { - "type": "integer" - }, - "-1": { - "type": "integer" - }, - "laugh": { - "type": "integer" - }, - "confused": { - "type": "integer" - }, - "heart": { - "type": "integer" - }, - "hooray": { - "type": "integer" - }, - "eyes": { - "type": "integer" - }, - "rocket": { - "type": "integer" - } - }, - "required": [ - "url", - "total_count", - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "eyes", - "rocket" - ] - } - }, - "required": [ - "author", - "body", - "body_html", - "body_version", - "created_at", - "last_edited_at", - "html_url", - "pinned", - "private", - "node_id", - "number", - "team_url", - "title", - "updated_at", - "url" - ] - } - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

    OK

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "read" - } - ] - } - }, - { - "serverUrl": "http(s)://HOSTNAME/api/v3", - "verb": "post", - "requestPath": "/teams/{team_id}/discussions", - "title": "Create a discussion (Legacy)", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "team_id", - "description": "

    The unique identifier of the team.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "bodyParameters": [ - { - "type": "string", - "name": "title", - "in": "body", - "description": "

    The discussion post's title.

    ", - "isRequired": true - }, - { - "type": "string", - "name": "body", - "in": "body", - "description": "

    The discussion post's body text.

    ", - "isRequired": true - }, - { - "type": "boolean", - "name": "private", - "in": "body", - "description": "

    Private posts are only visible to team members, organization owners, and team maintainers. Public posts are visible to all members of the organization. Set to true to create a private post.

    ", - "default": false - } - ], - "descriptionHTML": "

    Warning

    \n

    \nEndpoint closing down notice: This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new Create a discussion endpoint.

    \n
    \n

    Creates a new discussion post on a team's page.

    \n

    This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see \"Rate limits for the API\" and \"Best practices for using the REST API.\"

    \n

    OAuth app tokens and personal access tokens (classic) need the write:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "contentType": "application/json", - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "bodyParameters": { - "title": "Our first team post", - "body": "Hi! This is an area for us to collaborate as a team." - }, - "parameters": { - "team_id": "TEAM_ID" - } - }, - "response": { - "statusCode": "201", - "contentType": "application/json", - "description": "

    Response

    ", - "example": { - "author": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "body": "Hi! This is an area for us to collaborate as a team.", - "body_html": "

    Hi! This is an area for us to collaborate as a team

    ", - "body_version": "0d495416a700fb06133c612575d92bfb", - "created_at": "2018-01-25T18:56:31Z", - "last_edited_at": null, - "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1", - "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==", - "number": 1, - "pinned": false, - "private": false, - "team_url": "https://api.github.com/teams/2343027", - "title": "Our first team post", - "updated_at": "2018-01-25T18:56:31Z", - "url": "https://api.github.com/teams/2343027/discussions/1", - "reactions": { - "url": "https://api.github.com/teams/2343027/discussions/1/reactions", - "total_count": 5, - "+1": 3, - "-1": 1, - "laugh": 0, - "confused": 0, - "heart": 1, - "hooray": 0, - "eyes": 1, - "rocket": 1 - } - }, - "schema": { - "title": "Team Discussion", - "description": "A team discussion is a persistent record of a free-form conversation within a team.", - "type": "object", - "properties": { - "author": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "format": "int64", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - }, - "user_view_type": { - "type": "string", - "examples": [ - "public" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "body": { - "description": "The main text of the discussion.", - "type": "string", - "examples": [ - "Please suggest improvements to our workflow in comments." - ] - }, - "body_html": { - "type": "string", - "examples": [ - "

    Hi! This is an area for us to collaborate as a team

    " - ] - }, - "body_version": { - "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.", - "type": "string", - "examples": [ - "0307116bbf7ced493b8d8a346c650b71" - ] - }, - "created_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "last_edited_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/orgs/github/teams/justice-league/discussions/1" - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDE0OlRlYW1EaXNjdXNzaW9uMQ==" - ] - }, - "number": { - "description": "The unique sequence number of a team discussion.", - "type": "integer", - "examples": [ - 42 - ] - }, - "pinned": { - "description": "Whether or not this discussion should be pinned for easy retrieval.", - "type": "boolean", - "examples": [ - true - ] - }, - "private": { - "description": "Whether or not this discussion should be restricted to team members and organization owners.", - "type": "boolean", - "examples": [ - true - ] - }, - "team_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027" - ] - }, - "title": { - "description": "The title of the discussion.", - "type": "string", - "examples": [ - "How can we improve our workflow?" - ] - }, - "updated_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027/discussions/1" - ] - }, - "reactions": { - "title": "Reaction Rollup", - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri" - }, - "total_count": { - "type": "integer" - }, - "+1": { - "type": "integer" - }, - "-1": { - "type": "integer" - }, - "laugh": { - "type": "integer" - }, - "confused": { - "type": "integer" - }, - "heart": { - "type": "integer" - }, - "hooray": { - "type": "integer" - }, - "eyes": { - "type": "integer" - }, - "rocket": { - "type": "integer" - } - }, - "required": [ - "url", - "total_count", - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "eyes", - "rocket" - ] - } - }, - "required": [ - "author", - "body", - "body_html", - "body_version", - "created_at", - "last_edited_at", - "html_url", - "pinned", - "private", - "node_id", - "number", - "team_url", - "title", - "updated_at", - "url" - ] - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "201", - "description": "

    Created

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "write" - } - ] - } - }, - { - "serverUrl": "http(s)://HOSTNAME/api/v3", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}", - "title": "Get a discussion (Legacy)", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "team_id", - "description": "

    The unique identifier of the team.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "discussion_number", - "description": "

    The number that identifies the discussion.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "bodyParameters": [], - "descriptionHTML": "

    Warning

    \n

    \nEndpoint closing down notice: This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new Get a discussion endpoint.

    \n
    \n

    Get a specific discussion on a team's page.

    \n

    OAuth app tokens and personal access tokens (classic) need the read:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "parameters": { - "team_id": "TEAM_ID", - "discussion_number": "DISCUSSION_NUMBER" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

    Response

    ", - "example": { - "author": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "body": "Hi! This is an area for us to collaborate as a team.", - "body_html": "

    Hi! This is an area for us to collaborate as a team

    ", - "body_version": "0d495416a700fb06133c612575d92bfb", - "created_at": "2018-01-25T18:56:31Z", - "last_edited_at": null, - "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1", - "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==", - "number": 1, - "pinned": false, - "private": false, - "team_url": "https://api.github.com/teams/2343027", - "title": "Our first team post", - "updated_at": "2018-01-25T18:56:31Z", - "url": "https://api.github.com/teams/2343027/discussions/1", - "reactions": { - "url": "https://api.github.com/teams/2343027/discussions/1/reactions", - "total_count": 5, - "+1": 3, - "-1": 1, - "laugh": 0, - "confused": 0, - "heart": 1, - "hooray": 0, - "eyes": 1, - "rocket": 1 - } - }, - "schema": { - "title": "Team Discussion", - "description": "A team discussion is a persistent record of a free-form conversation within a team.", - "type": "object", - "properties": { - "author": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "format": "int64", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - }, - "user_view_type": { - "type": "string", - "examples": [ - "public" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "body": { - "description": "The main text of the discussion.", - "type": "string", - "examples": [ - "Please suggest improvements to our workflow in comments." - ] - }, - "body_html": { - "type": "string", - "examples": [ - "

    Hi! This is an area for us to collaborate as a team

    " - ] - }, - "body_version": { - "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.", - "type": "string", - "examples": [ - "0307116bbf7ced493b8d8a346c650b71" - ] - }, - "created_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "last_edited_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/orgs/github/teams/justice-league/discussions/1" - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDE0OlRlYW1EaXNjdXNzaW9uMQ==" - ] - }, - "number": { - "description": "The unique sequence number of a team discussion.", - "type": "integer", - "examples": [ - 42 - ] - }, - "pinned": { - "description": "Whether or not this discussion should be pinned for easy retrieval.", - "type": "boolean", - "examples": [ - true - ] - }, - "private": { - "description": "Whether or not this discussion should be restricted to team members and organization owners.", - "type": "boolean", - "examples": [ - true - ] - }, - "team_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027" - ] - }, - "title": { - "description": "The title of the discussion.", - "type": "string", - "examples": [ - "How can we improve our workflow?" - ] - }, - "updated_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027/discussions/1" - ] - }, - "reactions": { - "title": "Reaction Rollup", - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri" - }, - "total_count": { - "type": "integer" - }, - "+1": { - "type": "integer" - }, - "-1": { - "type": "integer" - }, - "laugh": { - "type": "integer" - }, - "confused": { - "type": "integer" - }, - "heart": { - "type": "integer" - }, - "hooray": { - "type": "integer" - }, - "eyes": { - "type": "integer" - }, - "rocket": { - "type": "integer" - } - }, - "required": [ - "url", - "total_count", - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "eyes", - "rocket" - ] - } - }, - "required": [ - "author", - "body", - "body_html", - "body_version", - "created_at", - "last_edited_at", - "html_url", - "pinned", - "private", - "node_id", - "number", - "team_url", - "title", - "updated_at", - "url" - ] - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

    OK

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "read" - } - ] - } - }, - { - "serverUrl": "http(s)://HOSTNAME/api/v3", - "verb": "patch", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}", - "title": "Update a discussion (Legacy)", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "team_id", - "description": "

    The unique identifier of the team.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "discussion_number", - "description": "

    The number that identifies the discussion.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "bodyParameters": [ - { - "type": "string", - "name": "title", - "in": "body", - "description": "

    The discussion post's title.

    " - }, - { - "type": "string", - "name": "body", - "in": "body", - "description": "

    The discussion post's body text.

    " - } - ], - "descriptionHTML": "

    Warning

    \n

    \nEndpoint closing down notice: This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new Update a discussion endpoint.

    \n
    \n

    Edits the title and body text of a discussion post. Only the parameters you provide are updated.

    \n

    OAuth app tokens and personal access tokens (classic) need the write:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "contentType": "application/json", - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "bodyParameters": { - "title": "Welcome to our first team post" - }, - "parameters": { - "team_id": "TEAM_ID", - "discussion_number": "DISCUSSION_NUMBER" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

    Response

    ", - "example": { - "author": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "body": "Hi! This is an area for us to collaborate as a team.", - "body_html": "

    Hi! This is an area for us to collaborate as a team

    ", - "body_version": "0d495416a700fb06133c612575d92bfb", - "created_at": "2018-01-25T18:56:31Z", - "last_edited_at": "2018-01-26T18:22:20Z", - "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1", - "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==", - "number": 1, - "pinned": false, - "private": false, - "team_url": "https://api.github.com/teams/2343027", - "title": "Welcome to our first team post", - "updated_at": "2018-01-26T18:22:20Z", - "url": "https://api.github.com/teams/2343027/discussions/1", - "reactions": { - "url": "https://api.github.com/teams/2343027/discussions/1/reactions", - "total_count": 5, - "+1": 3, - "-1": 1, - "laugh": 0, - "confused": 0, - "heart": 1, - "hooray": 0, - "eyes": 1, - "rocket": 1 - } - }, - "schema": { - "title": "Team Discussion", - "description": "A team discussion is a persistent record of a free-form conversation within a team.", - "type": "object", - "properties": { - "author": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "format": "int64", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - }, - "user_view_type": { - "type": "string", - "examples": [ - "public" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "body": { - "description": "The main text of the discussion.", - "type": "string", - "examples": [ - "Please suggest improvements to our workflow in comments." - ] - }, - "body_html": { - "type": "string", - "examples": [ - "

    Hi! This is an area for us to collaborate as a team

    " - ] - }, - "body_version": { - "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.", - "type": "string", - "examples": [ - "0307116bbf7ced493b8d8a346c650b71" - ] - }, - "created_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "last_edited_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/orgs/github/teams/justice-league/discussions/1" - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDE0OlRlYW1EaXNjdXNzaW9uMQ==" - ] - }, - "number": { - "description": "The unique sequence number of a team discussion.", - "type": "integer", - "examples": [ - 42 - ] - }, - "pinned": { - "description": "Whether or not this discussion should be pinned for easy retrieval.", - "type": "boolean", - "examples": [ - true - ] - }, - "private": { - "description": "Whether or not this discussion should be restricted to team members and organization owners.", - "type": "boolean", - "examples": [ - true - ] - }, - "team_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027" - ] - }, - "title": { - "description": "The title of the discussion.", - "type": "string", - "examples": [ - "How can we improve our workflow?" - ] - }, - "updated_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027/discussions/1" - ] - }, - "reactions": { - "title": "Reaction Rollup", - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri" - }, - "total_count": { - "type": "integer" - }, - "+1": { - "type": "integer" - }, - "-1": { - "type": "integer" - }, - "laugh": { - "type": "integer" - }, - "confused": { - "type": "integer" - }, - "heart": { - "type": "integer" - }, - "hooray": { - "type": "integer" - }, - "eyes": { - "type": "integer" - }, - "rocket": { - "type": "integer" - } - }, - "required": [ - "url", - "total_count", - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "eyes", - "rocket" - ] - } - }, - "required": [ - "author", - "body", - "body_html", - "body_version", - "created_at", - "last_edited_at", - "html_url", - "pinned", - "private", - "node_id", - "number", - "team_url", - "title", - "updated_at", - "url" - ] - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

    OK

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "write" - } - ] - } - }, - { - "serverUrl": "http(s)://HOSTNAME/api/v3", - "verb": "delete", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}", - "title": "Delete a discussion (Legacy)", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "team_id", - "description": "

    The unique identifier of the team.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "discussion_number", - "description": "

    The number that identifies the discussion.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "bodyParameters": [], - "descriptionHTML": "

    Warning

    \n

    \nEndpoint closing down notice: This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new Delete a discussion endpoint.

    \n
    \n

    Delete a discussion from a team's page.

    \n

    OAuth app tokens and personal access tokens (classic) need the write:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "parameters": { - "team_id": "TEAM_ID", - "discussion_number": "DISCUSSION_NUMBER" - } - }, - "response": { - "statusCode": "204", - "description": "

    Response

    " - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "204", - "description": "

    No Content

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "write" - } - ] - } - } - ], "external-groups": [ { "serverUrl": "http(s)://HOSTNAME/api/v3", diff --git a/src/rest/data/ghes-3.16-2022-11-28/schema.json b/src/rest/data/ghes-3.16-2022-11-28/schema.json index a58e62f3bbce..539a7e2354cb 100644 --- a/src/rest/data/ghes-3.16-2022-11-28/schema.json +++ b/src/rest/data/ghes-3.16-2022-11-28/schema.json @@ -708165,3973 +708165,6 @@ } } ], - "discussions": [ - { - "serverUrl": "http(s)://HOSTNAME/api/v3", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions", - "title": "List discussions", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "org", - "description": "

    The organization name. The name is not case sensitive.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "team_slug", - "description": "

    The slug of the team name.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "direction", - "description": "

    The direction to sort the results by.

    ", - "in": "query", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "per_page", - "description": "

    The number of results per page (max 100). For more information, see \"Using pagination in the REST API.\"

    ", - "in": "query", - "schema": { - "type": "integer", - "default": 30 - } - }, - { - "name": "page", - "description": "

    The page number of the results to fetch. For more information, see \"Using pagination in the REST API.\"

    ", - "in": "query", - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "pinned", - "in": "query", - "required": false, - "description": "

    Pinned discussions only filter

    ", - "schema": { - "type": "string" - } - } - ], - "bodyParameters": [], - "descriptionHTML": "

    List all discussions on a team's page.

    \n

    Note

    \n

    \nYou can also specify a team by org_id and team_id using the route GET /organizations/{org_id}/team/{team_id}/discussions.

    \n
    \n

    OAuth app tokens and personal access tokens (classic) need the read:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "parameters": { - "org": "ORG", - "team_slug": "TEAM_SLUG" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

    Response

    ", - "example": [ - { - "author": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "body": "Hi! This is an area for us to collaborate as a team.", - "body_html": "

    Hi! This is an area for us to collaborate as a team

    ", - "body_version": "0d495416a700fb06133c612575d92bfb", - "created_at": "2018-01-25T18:56:31Z", - "last_edited_at": null, - "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1", - "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==", - "number": 1, - "pinned": false, - "private": false, - "team_url": "https://api.github.com/teams/2343027", - "title": "Our first team post", - "updated_at": "2018-01-25T18:56:31Z", - "url": "https://api.github.com/teams/2343027/discussions/1", - "reactions": { - "url": "https://api.github.com/teams/2343027/discussions/1/reactions", - "total_count": 5, - "+1": 3, - "-1": 1, - "laugh": 0, - "confused": 0, - "heart": 1, - "hooray": 0, - "eyes": 1, - "rocket": 1 - } - } - ], - "schema": { - "type": "array", - "items": { - "title": "Team Discussion", - "description": "A team discussion is a persistent record of a free-form conversation within a team.", - "type": "object", - "properties": { - "author": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "format": "int64", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - }, - "user_view_type": { - "type": "string", - "examples": [ - "public" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "body": { - "description": "The main text of the discussion.", - "type": "string", - "examples": [ - "Please suggest improvements to our workflow in comments." - ] - }, - "body_html": { - "type": "string", - "examples": [ - "

    Hi! This is an area for us to collaborate as a team

    " - ] - }, - "body_version": { - "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.", - "type": "string", - "examples": [ - "0307116bbf7ced493b8d8a346c650b71" - ] - }, - "created_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "last_edited_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/orgs/github/teams/justice-league/discussions/1" - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDE0OlRlYW1EaXNjdXNzaW9uMQ==" - ] - }, - "number": { - "description": "The unique sequence number of a team discussion.", - "type": "integer", - "examples": [ - 42 - ] - }, - "pinned": { - "description": "Whether or not this discussion should be pinned for easy retrieval.", - "type": "boolean", - "examples": [ - true - ] - }, - "private": { - "description": "Whether or not this discussion should be restricted to team members and organization owners.", - "type": "boolean", - "examples": [ - true - ] - }, - "team_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027" - ] - }, - "title": { - "description": "The title of the discussion.", - "type": "string", - "examples": [ - "How can we improve our workflow?" - ] - }, - "updated_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027/discussions/1" - ] - }, - "reactions": { - "title": "Reaction Rollup", - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri" - }, - "total_count": { - "type": "integer" - }, - "+1": { - "type": "integer" - }, - "-1": { - "type": "integer" - }, - "laugh": { - "type": "integer" - }, - "confused": { - "type": "integer" - }, - "heart": { - "type": "integer" - }, - "hooray": { - "type": "integer" - }, - "eyes": { - "type": "integer" - }, - "rocket": { - "type": "integer" - } - }, - "required": [ - "url", - "total_count", - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "eyes", - "rocket" - ] - } - }, - "required": [ - "author", - "body", - "body_html", - "body_version", - "created_at", - "last_edited_at", - "html_url", - "pinned", - "private", - "node_id", - "number", - "team_url", - "title", - "updated_at", - "url" - ] - } - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

    OK

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "read" - } - ] - } - }, - { - "serverUrl": "http(s)://HOSTNAME/api/v3", - "verb": "post", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions", - "title": "Create a discussion", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "org", - "description": "

    The organization name. The name is not case sensitive.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "team_slug", - "description": "

    The slug of the team name.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "bodyParameters": [ - { - "type": "string", - "name": "title", - "in": "body", - "description": "

    The discussion post's title.

    ", - "isRequired": true - }, - { - "type": "string", - "name": "body", - "in": "body", - "description": "

    The discussion post's body text.

    ", - "isRequired": true - }, - { - "type": "boolean", - "name": "private", - "in": "body", - "description": "

    Private posts are only visible to team members, organization owners, and team maintainers. Public posts are visible to all members of the organization. Set to true to create a private post.

    ", - "default": false - } - ], - "descriptionHTML": "

    Creates a new discussion post on a team's page.

    \n

    This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see \"Rate limits for the API\" and \"Best practices for using the REST API.\"

    \n

    Note

    \n

    \nYou can also specify a team by org_id and team_id using the route POST /organizations/{org_id}/team/{team_id}/discussions.

    \n
    \n

    OAuth app tokens and personal access tokens (classic) need the write:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "contentType": "application/json", - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "bodyParameters": { - "title": "Our first team post", - "body": "Hi! This is an area for us to collaborate as a team." - }, - "parameters": { - "org": "ORG", - "team_slug": "TEAM_SLUG" - } - }, - "response": { - "statusCode": "201", - "contentType": "application/json", - "description": "

    Response

    ", - "example": { - "author": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "body": "Hi! This is an area for us to collaborate as a team.", - "body_html": "

    Hi! This is an area for us to collaborate as a team

    ", - "body_version": "0d495416a700fb06133c612575d92bfb", - "created_at": "2018-01-25T18:56:31Z", - "last_edited_at": null, - "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1", - "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==", - "number": 1, - "pinned": false, - "private": false, - "team_url": "https://api.github.com/teams/2343027", - "title": "Our first team post", - "updated_at": "2018-01-25T18:56:31Z", - "url": "https://api.github.com/teams/2343027/discussions/1", - "reactions": { - "url": "https://api.github.com/teams/2343027/discussions/1/reactions", - "total_count": 5, - "+1": 3, - "-1": 1, - "laugh": 0, - "confused": 0, - "heart": 1, - "hooray": 0, - "eyes": 1, - "rocket": 1 - } - }, - "schema": { - "title": "Team Discussion", - "description": "A team discussion is a persistent record of a free-form conversation within a team.", - "type": "object", - "properties": { - "author": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "format": "int64", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - }, - "user_view_type": { - "type": "string", - "examples": [ - "public" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "body": { - "description": "The main text of the discussion.", - "type": "string", - "examples": [ - "Please suggest improvements to our workflow in comments." - ] - }, - "body_html": { - "type": "string", - "examples": [ - "

    Hi! This is an area for us to collaborate as a team

    " - ] - }, - "body_version": { - "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.", - "type": "string", - "examples": [ - "0307116bbf7ced493b8d8a346c650b71" - ] - }, - "created_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "last_edited_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/orgs/github/teams/justice-league/discussions/1" - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDE0OlRlYW1EaXNjdXNzaW9uMQ==" - ] - }, - "number": { - "description": "The unique sequence number of a team discussion.", - "type": "integer", - "examples": [ - 42 - ] - }, - "pinned": { - "description": "Whether or not this discussion should be pinned for easy retrieval.", - "type": "boolean", - "examples": [ - true - ] - }, - "private": { - "description": "Whether or not this discussion should be restricted to team members and organization owners.", - "type": "boolean", - "examples": [ - true - ] - }, - "team_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027" - ] - }, - "title": { - "description": "The title of the discussion.", - "type": "string", - "examples": [ - "How can we improve our workflow?" - ] - }, - "updated_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027/discussions/1" - ] - }, - "reactions": { - "title": "Reaction Rollup", - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri" - }, - "total_count": { - "type": "integer" - }, - "+1": { - "type": "integer" - }, - "-1": { - "type": "integer" - }, - "laugh": { - "type": "integer" - }, - "confused": { - "type": "integer" - }, - "heart": { - "type": "integer" - }, - "hooray": { - "type": "integer" - }, - "eyes": { - "type": "integer" - }, - "rocket": { - "type": "integer" - } - }, - "required": [ - "url", - "total_count", - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "eyes", - "rocket" - ] - } - }, - "required": [ - "author", - "body", - "body_html", - "body_version", - "created_at", - "last_edited_at", - "html_url", - "pinned", - "private", - "node_id", - "number", - "team_url", - "title", - "updated_at", - "url" - ] - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "201", - "description": "

    Created

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "write" - } - ] - } - }, - { - "serverUrl": "http(s)://HOSTNAME/api/v3", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", - "title": "Get a discussion", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "org", - "description": "

    The organization name. The name is not case sensitive.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "team_slug", - "description": "

    The slug of the team name.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "discussion_number", - "description": "

    The number that identifies the discussion.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "bodyParameters": [], - "descriptionHTML": "

    Get a specific discussion on a team's page.

    \n

    Note

    \n

    \nYou can also specify a team by org_id and team_id using the route GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}.

    \n
    \n

    OAuth app tokens and personal access tokens (classic) need the read:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "parameters": { - "org": "ORG", - "team_slug": "TEAM_SLUG", - "discussion_number": "DISCUSSION_NUMBER" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

    Response

    ", - "example": { - "author": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "body": "Hi! This is an area for us to collaborate as a team.", - "body_html": "

    Hi! This is an area for us to collaborate as a team

    ", - "body_version": "0d495416a700fb06133c612575d92bfb", - "created_at": "2018-01-25T18:56:31Z", - "last_edited_at": null, - "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1", - "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==", - "number": 1, - "pinned": false, - "private": false, - "team_url": "https://api.github.com/teams/2343027", - "title": "Our first team post", - "updated_at": "2018-01-25T18:56:31Z", - "url": "https://api.github.com/teams/2343027/discussions/1", - "reactions": { - "url": "https://api.github.com/teams/2343027/discussions/1/reactions", - "total_count": 5, - "+1": 3, - "-1": 1, - "laugh": 0, - "confused": 0, - "heart": 1, - "hooray": 0, - "eyes": 1, - "rocket": 1 - } - }, - "schema": { - "title": "Team Discussion", - "description": "A team discussion is a persistent record of a free-form conversation within a team.", - "type": "object", - "properties": { - "author": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "format": "int64", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - }, - "user_view_type": { - "type": "string", - "examples": [ - "public" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "body": { - "description": "The main text of the discussion.", - "type": "string", - "examples": [ - "Please suggest improvements to our workflow in comments." - ] - }, - "body_html": { - "type": "string", - "examples": [ - "

    Hi! This is an area for us to collaborate as a team

    " - ] - }, - "body_version": { - "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.", - "type": "string", - "examples": [ - "0307116bbf7ced493b8d8a346c650b71" - ] - }, - "created_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "last_edited_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/orgs/github/teams/justice-league/discussions/1" - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDE0OlRlYW1EaXNjdXNzaW9uMQ==" - ] - }, - "number": { - "description": "The unique sequence number of a team discussion.", - "type": "integer", - "examples": [ - 42 - ] - }, - "pinned": { - "description": "Whether or not this discussion should be pinned for easy retrieval.", - "type": "boolean", - "examples": [ - true - ] - }, - "private": { - "description": "Whether or not this discussion should be restricted to team members and organization owners.", - "type": "boolean", - "examples": [ - true - ] - }, - "team_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027" - ] - }, - "title": { - "description": "The title of the discussion.", - "type": "string", - "examples": [ - "How can we improve our workflow?" - ] - }, - "updated_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027/discussions/1" - ] - }, - "reactions": { - "title": "Reaction Rollup", - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri" - }, - "total_count": { - "type": "integer" - }, - "+1": { - "type": "integer" - }, - "-1": { - "type": "integer" - }, - "laugh": { - "type": "integer" - }, - "confused": { - "type": "integer" - }, - "heart": { - "type": "integer" - }, - "hooray": { - "type": "integer" - }, - "eyes": { - "type": "integer" - }, - "rocket": { - "type": "integer" - } - }, - "required": [ - "url", - "total_count", - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "eyes", - "rocket" - ] - } - }, - "required": [ - "author", - "body", - "body_html", - "body_version", - "created_at", - "last_edited_at", - "html_url", - "pinned", - "private", - "node_id", - "number", - "team_url", - "title", - "updated_at", - "url" - ] - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

    OK

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "read" - } - ] - } - }, - { - "serverUrl": "http(s)://HOSTNAME/api/v3", - "verb": "patch", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", - "title": "Update a discussion", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "org", - "description": "

    The organization name. The name is not case sensitive.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "team_slug", - "description": "

    The slug of the team name.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "discussion_number", - "description": "

    The number that identifies the discussion.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "bodyParameters": [ - { - "type": "string", - "name": "title", - "in": "body", - "description": "

    The discussion post's title.

    " - }, - { - "type": "string", - "name": "body", - "in": "body", - "description": "

    The discussion post's body text.

    " - } - ], - "descriptionHTML": "

    Edits the title and body text of a discussion post. Only the parameters you provide are updated.

    \n

    Note

    \n

    \nYou can also specify a team by org_id and team_id using the route PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}.

    \n
    \n

    OAuth app tokens and personal access tokens (classic) need the write:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "contentType": "application/json", - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "bodyParameters": { - "title": "Welcome to our first team post" - }, - "parameters": { - "org": "ORG", - "team_slug": "TEAM_SLUG", - "discussion_number": "DISCUSSION_NUMBER" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

    Response

    ", - "example": { - "author": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "body": "Hi! This is an area for us to collaborate as a team.", - "body_html": "

    Hi! This is an area for us to collaborate as a team

    ", - "body_version": "0d495416a700fb06133c612575d92bfb", - "created_at": "2018-01-25T18:56:31Z", - "last_edited_at": "2018-01-26T18:22:20Z", - "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1", - "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==", - "number": 1, - "pinned": false, - "private": false, - "team_url": "https://api.github.com/teams/2343027", - "title": "Welcome to our first team post", - "updated_at": "2018-01-26T18:22:20Z", - "url": "https://api.github.com/teams/2343027/discussions/1", - "reactions": { - "url": "https://api.github.com/teams/2343027/discussions/1/reactions", - "total_count": 5, - "+1": 3, - "-1": 1, - "laugh": 0, - "confused": 0, - "heart": 1, - "hooray": 0, - "eyes": 1, - "rocket": 1 - } - }, - "schema": { - "title": "Team Discussion", - "description": "A team discussion is a persistent record of a free-form conversation within a team.", - "type": "object", - "properties": { - "author": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "format": "int64", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - }, - "user_view_type": { - "type": "string", - "examples": [ - "public" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "body": { - "description": "The main text of the discussion.", - "type": "string", - "examples": [ - "Please suggest improvements to our workflow in comments." - ] - }, - "body_html": { - "type": "string", - "examples": [ - "

    Hi! This is an area for us to collaborate as a team

    " - ] - }, - "body_version": { - "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.", - "type": "string", - "examples": [ - "0307116bbf7ced493b8d8a346c650b71" - ] - }, - "created_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "last_edited_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/orgs/github/teams/justice-league/discussions/1" - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDE0OlRlYW1EaXNjdXNzaW9uMQ==" - ] - }, - "number": { - "description": "The unique sequence number of a team discussion.", - "type": "integer", - "examples": [ - 42 - ] - }, - "pinned": { - "description": "Whether or not this discussion should be pinned for easy retrieval.", - "type": "boolean", - "examples": [ - true - ] - }, - "private": { - "description": "Whether or not this discussion should be restricted to team members and organization owners.", - "type": "boolean", - "examples": [ - true - ] - }, - "team_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027" - ] - }, - "title": { - "description": "The title of the discussion.", - "type": "string", - "examples": [ - "How can we improve our workflow?" - ] - }, - "updated_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027/discussions/1" - ] - }, - "reactions": { - "title": "Reaction Rollup", - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri" - }, - "total_count": { - "type": "integer" - }, - "+1": { - "type": "integer" - }, - "-1": { - "type": "integer" - }, - "laugh": { - "type": "integer" - }, - "confused": { - "type": "integer" - }, - "heart": { - "type": "integer" - }, - "hooray": { - "type": "integer" - }, - "eyes": { - "type": "integer" - }, - "rocket": { - "type": "integer" - } - }, - "required": [ - "url", - "total_count", - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "eyes", - "rocket" - ] - } - }, - "required": [ - "author", - "body", - "body_html", - "body_version", - "created_at", - "last_edited_at", - "html_url", - "pinned", - "private", - "node_id", - "number", - "team_url", - "title", - "updated_at", - "url" - ] - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

    OK

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "write" - } - ] - } - }, - { - "serverUrl": "http(s)://HOSTNAME/api/v3", - "verb": "delete", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", - "title": "Delete a discussion", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "org", - "description": "

    The organization name. The name is not case sensitive.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "team_slug", - "description": "

    The slug of the team name.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "discussion_number", - "description": "

    The number that identifies the discussion.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "bodyParameters": [], - "descriptionHTML": "

    Delete a discussion from a team's page.

    \n

    Note

    \n

    \nYou can also specify a team by org_id and team_id using the route DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}.

    \n
    \n

    OAuth app tokens and personal access tokens (classic) need the write:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "parameters": { - "org": "ORG", - "team_slug": "TEAM_SLUG", - "discussion_number": "DISCUSSION_NUMBER" - } - }, - "response": { - "statusCode": "204", - "description": "

    Response

    " - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "204", - "description": "

    No Content

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "write" - } - ] - } - }, - { - "serverUrl": "http(s)://HOSTNAME/api/v3", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions", - "title": "List discussions (Legacy)", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "team_id", - "description": "

    The unique identifier of the team.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "direction", - "description": "

    The direction to sort the results by.

    ", - "in": "query", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "per_page", - "description": "

    The number of results per page (max 100). For more information, see \"Using pagination in the REST API.\"

    ", - "in": "query", - "schema": { - "type": "integer", - "default": 30 - } - }, - { - "name": "page", - "description": "

    The page number of the results to fetch. For more information, see \"Using pagination in the REST API.\"

    ", - "in": "query", - "schema": { - "type": "integer", - "default": 1 - } - } - ], - "bodyParameters": [], - "descriptionHTML": "

    Warning

    \n

    \nEndpoint closing down notice: This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new List discussions endpoint.

    \n
    \n

    List all discussions on a team's page.

    \n

    OAuth app tokens and personal access tokens (classic) need the read:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "parameters": { - "team_id": "TEAM_ID" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

    Response

    ", - "example": [ - { - "author": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "body": "Hi! This is an area for us to collaborate as a team.", - "body_html": "

    Hi! This is an area for us to collaborate as a team

    ", - "body_version": "0d495416a700fb06133c612575d92bfb", - "created_at": "2018-01-25T18:56:31Z", - "last_edited_at": null, - "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1", - "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==", - "number": 1, - "pinned": false, - "private": false, - "team_url": "https://api.github.com/teams/2343027", - "title": "Our first team post", - "updated_at": "2018-01-25T18:56:31Z", - "url": "https://api.github.com/teams/2343027/discussions/1", - "reactions": { - "url": "https://api.github.com/teams/2343027/discussions/1/reactions", - "total_count": 5, - "+1": 3, - "-1": 1, - "laugh": 0, - "confused": 0, - "heart": 1, - "hooray": 0, - "eyes": 1, - "rocket": 1 - } - } - ], - "schema": { - "type": "array", - "items": { - "title": "Team Discussion", - "description": "A team discussion is a persistent record of a free-form conversation within a team.", - "type": "object", - "properties": { - "author": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "format": "int64", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - }, - "user_view_type": { - "type": "string", - "examples": [ - "public" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "body": { - "description": "The main text of the discussion.", - "type": "string", - "examples": [ - "Please suggest improvements to our workflow in comments." - ] - }, - "body_html": { - "type": "string", - "examples": [ - "

    Hi! This is an area for us to collaborate as a team

    " - ] - }, - "body_version": { - "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.", - "type": "string", - "examples": [ - "0307116bbf7ced493b8d8a346c650b71" - ] - }, - "created_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "last_edited_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/orgs/github/teams/justice-league/discussions/1" - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDE0OlRlYW1EaXNjdXNzaW9uMQ==" - ] - }, - "number": { - "description": "The unique sequence number of a team discussion.", - "type": "integer", - "examples": [ - 42 - ] - }, - "pinned": { - "description": "Whether or not this discussion should be pinned for easy retrieval.", - "type": "boolean", - "examples": [ - true - ] - }, - "private": { - "description": "Whether or not this discussion should be restricted to team members and organization owners.", - "type": "boolean", - "examples": [ - true - ] - }, - "team_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027" - ] - }, - "title": { - "description": "The title of the discussion.", - "type": "string", - "examples": [ - "How can we improve our workflow?" - ] - }, - "updated_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027/discussions/1" - ] - }, - "reactions": { - "title": "Reaction Rollup", - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri" - }, - "total_count": { - "type": "integer" - }, - "+1": { - "type": "integer" - }, - "-1": { - "type": "integer" - }, - "laugh": { - "type": "integer" - }, - "confused": { - "type": "integer" - }, - "heart": { - "type": "integer" - }, - "hooray": { - "type": "integer" - }, - "eyes": { - "type": "integer" - }, - "rocket": { - "type": "integer" - } - }, - "required": [ - "url", - "total_count", - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "eyes", - "rocket" - ] - } - }, - "required": [ - "author", - "body", - "body_html", - "body_version", - "created_at", - "last_edited_at", - "html_url", - "pinned", - "private", - "node_id", - "number", - "team_url", - "title", - "updated_at", - "url" - ] - } - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

    OK

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "read" - } - ] - } - }, - { - "serverUrl": "http(s)://HOSTNAME/api/v3", - "verb": "post", - "requestPath": "/teams/{team_id}/discussions", - "title": "Create a discussion (Legacy)", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "team_id", - "description": "

    The unique identifier of the team.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "bodyParameters": [ - { - "type": "string", - "name": "title", - "in": "body", - "description": "

    The discussion post's title.

    ", - "isRequired": true - }, - { - "type": "string", - "name": "body", - "in": "body", - "description": "

    The discussion post's body text.

    ", - "isRequired": true - }, - { - "type": "boolean", - "name": "private", - "in": "body", - "description": "

    Private posts are only visible to team members, organization owners, and team maintainers. Public posts are visible to all members of the organization. Set to true to create a private post.

    ", - "default": false - } - ], - "descriptionHTML": "

    Warning

    \n

    \nEndpoint closing down notice: This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new Create a discussion endpoint.

    \n
    \n

    Creates a new discussion post on a team's page.

    \n

    This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see \"Rate limits for the API\" and \"Best practices for using the REST API.\"

    \n

    OAuth app tokens and personal access tokens (classic) need the write:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "contentType": "application/json", - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "bodyParameters": { - "title": "Our first team post", - "body": "Hi! This is an area for us to collaborate as a team." - }, - "parameters": { - "team_id": "TEAM_ID" - } - }, - "response": { - "statusCode": "201", - "contentType": "application/json", - "description": "

    Response

    ", - "example": { - "author": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "body": "Hi! This is an area for us to collaborate as a team.", - "body_html": "

    Hi! This is an area for us to collaborate as a team

    ", - "body_version": "0d495416a700fb06133c612575d92bfb", - "created_at": "2018-01-25T18:56:31Z", - "last_edited_at": null, - "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1", - "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==", - "number": 1, - "pinned": false, - "private": false, - "team_url": "https://api.github.com/teams/2343027", - "title": "Our first team post", - "updated_at": "2018-01-25T18:56:31Z", - "url": "https://api.github.com/teams/2343027/discussions/1", - "reactions": { - "url": "https://api.github.com/teams/2343027/discussions/1/reactions", - "total_count": 5, - "+1": 3, - "-1": 1, - "laugh": 0, - "confused": 0, - "heart": 1, - "hooray": 0, - "eyes": 1, - "rocket": 1 - } - }, - "schema": { - "title": "Team Discussion", - "description": "A team discussion is a persistent record of a free-form conversation within a team.", - "type": "object", - "properties": { - "author": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "format": "int64", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - }, - "user_view_type": { - "type": "string", - "examples": [ - "public" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "body": { - "description": "The main text of the discussion.", - "type": "string", - "examples": [ - "Please suggest improvements to our workflow in comments." - ] - }, - "body_html": { - "type": "string", - "examples": [ - "

    Hi! This is an area for us to collaborate as a team

    " - ] - }, - "body_version": { - "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.", - "type": "string", - "examples": [ - "0307116bbf7ced493b8d8a346c650b71" - ] - }, - "created_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "last_edited_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/orgs/github/teams/justice-league/discussions/1" - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDE0OlRlYW1EaXNjdXNzaW9uMQ==" - ] - }, - "number": { - "description": "The unique sequence number of a team discussion.", - "type": "integer", - "examples": [ - 42 - ] - }, - "pinned": { - "description": "Whether or not this discussion should be pinned for easy retrieval.", - "type": "boolean", - "examples": [ - true - ] - }, - "private": { - "description": "Whether or not this discussion should be restricted to team members and organization owners.", - "type": "boolean", - "examples": [ - true - ] - }, - "team_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027" - ] - }, - "title": { - "description": "The title of the discussion.", - "type": "string", - "examples": [ - "How can we improve our workflow?" - ] - }, - "updated_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027/discussions/1" - ] - }, - "reactions": { - "title": "Reaction Rollup", - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri" - }, - "total_count": { - "type": "integer" - }, - "+1": { - "type": "integer" - }, - "-1": { - "type": "integer" - }, - "laugh": { - "type": "integer" - }, - "confused": { - "type": "integer" - }, - "heart": { - "type": "integer" - }, - "hooray": { - "type": "integer" - }, - "eyes": { - "type": "integer" - }, - "rocket": { - "type": "integer" - } - }, - "required": [ - "url", - "total_count", - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "eyes", - "rocket" - ] - } - }, - "required": [ - "author", - "body", - "body_html", - "body_version", - "created_at", - "last_edited_at", - "html_url", - "pinned", - "private", - "node_id", - "number", - "team_url", - "title", - "updated_at", - "url" - ] - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "201", - "description": "

    Created

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "write" - } - ] - } - }, - { - "serverUrl": "http(s)://HOSTNAME/api/v3", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}", - "title": "Get a discussion (Legacy)", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "team_id", - "description": "

    The unique identifier of the team.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "discussion_number", - "description": "

    The number that identifies the discussion.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "bodyParameters": [], - "descriptionHTML": "

    Warning

    \n

    \nEndpoint closing down notice: This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new Get a discussion endpoint.

    \n
    \n

    Get a specific discussion on a team's page.

    \n

    OAuth app tokens and personal access tokens (classic) need the read:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "parameters": { - "team_id": "TEAM_ID", - "discussion_number": "DISCUSSION_NUMBER" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

    Response

    ", - "example": { - "author": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "body": "Hi! This is an area for us to collaborate as a team.", - "body_html": "

    Hi! This is an area for us to collaborate as a team

    ", - "body_version": "0d495416a700fb06133c612575d92bfb", - "created_at": "2018-01-25T18:56:31Z", - "last_edited_at": null, - "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1", - "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==", - "number": 1, - "pinned": false, - "private": false, - "team_url": "https://api.github.com/teams/2343027", - "title": "Our first team post", - "updated_at": "2018-01-25T18:56:31Z", - "url": "https://api.github.com/teams/2343027/discussions/1", - "reactions": { - "url": "https://api.github.com/teams/2343027/discussions/1/reactions", - "total_count": 5, - "+1": 3, - "-1": 1, - "laugh": 0, - "confused": 0, - "heart": 1, - "hooray": 0, - "eyes": 1, - "rocket": 1 - } - }, - "schema": { - "title": "Team Discussion", - "description": "A team discussion is a persistent record of a free-form conversation within a team.", - "type": "object", - "properties": { - "author": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "format": "int64", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - }, - "user_view_type": { - "type": "string", - "examples": [ - "public" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "body": { - "description": "The main text of the discussion.", - "type": "string", - "examples": [ - "Please suggest improvements to our workflow in comments." - ] - }, - "body_html": { - "type": "string", - "examples": [ - "

    Hi! This is an area for us to collaborate as a team

    " - ] - }, - "body_version": { - "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.", - "type": "string", - "examples": [ - "0307116bbf7ced493b8d8a346c650b71" - ] - }, - "created_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "last_edited_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/orgs/github/teams/justice-league/discussions/1" - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDE0OlRlYW1EaXNjdXNzaW9uMQ==" - ] - }, - "number": { - "description": "The unique sequence number of a team discussion.", - "type": "integer", - "examples": [ - 42 - ] - }, - "pinned": { - "description": "Whether or not this discussion should be pinned for easy retrieval.", - "type": "boolean", - "examples": [ - true - ] - }, - "private": { - "description": "Whether or not this discussion should be restricted to team members and organization owners.", - "type": "boolean", - "examples": [ - true - ] - }, - "team_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027" - ] - }, - "title": { - "description": "The title of the discussion.", - "type": "string", - "examples": [ - "How can we improve our workflow?" - ] - }, - "updated_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027/discussions/1" - ] - }, - "reactions": { - "title": "Reaction Rollup", - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri" - }, - "total_count": { - "type": "integer" - }, - "+1": { - "type": "integer" - }, - "-1": { - "type": "integer" - }, - "laugh": { - "type": "integer" - }, - "confused": { - "type": "integer" - }, - "heart": { - "type": "integer" - }, - "hooray": { - "type": "integer" - }, - "eyes": { - "type": "integer" - }, - "rocket": { - "type": "integer" - } - }, - "required": [ - "url", - "total_count", - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "eyes", - "rocket" - ] - } - }, - "required": [ - "author", - "body", - "body_html", - "body_version", - "created_at", - "last_edited_at", - "html_url", - "pinned", - "private", - "node_id", - "number", - "team_url", - "title", - "updated_at", - "url" - ] - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

    OK

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "read" - } - ] - } - }, - { - "serverUrl": "http(s)://HOSTNAME/api/v3", - "verb": "patch", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}", - "title": "Update a discussion (Legacy)", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "team_id", - "description": "

    The unique identifier of the team.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "discussion_number", - "description": "

    The number that identifies the discussion.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "bodyParameters": [ - { - "type": "string", - "name": "title", - "in": "body", - "description": "

    The discussion post's title.

    " - }, - { - "type": "string", - "name": "body", - "in": "body", - "description": "

    The discussion post's body text.

    " - } - ], - "descriptionHTML": "

    Warning

    \n

    \nEndpoint closing down notice: This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new Update a discussion endpoint.

    \n
    \n

    Edits the title and body text of a discussion post. Only the parameters you provide are updated.

    \n

    OAuth app tokens and personal access tokens (classic) need the write:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "contentType": "application/json", - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "bodyParameters": { - "title": "Welcome to our first team post" - }, - "parameters": { - "team_id": "TEAM_ID", - "discussion_number": "DISCUSSION_NUMBER" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

    Response

    ", - "example": { - "author": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "body": "Hi! This is an area for us to collaborate as a team.", - "body_html": "

    Hi! This is an area for us to collaborate as a team

    ", - "body_version": "0d495416a700fb06133c612575d92bfb", - "created_at": "2018-01-25T18:56:31Z", - "last_edited_at": "2018-01-26T18:22:20Z", - "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1", - "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==", - "number": 1, - "pinned": false, - "private": false, - "team_url": "https://api.github.com/teams/2343027", - "title": "Welcome to our first team post", - "updated_at": "2018-01-26T18:22:20Z", - "url": "https://api.github.com/teams/2343027/discussions/1", - "reactions": { - "url": "https://api.github.com/teams/2343027/discussions/1/reactions", - "total_count": 5, - "+1": 3, - "-1": 1, - "laugh": 0, - "confused": 0, - "heart": 1, - "hooray": 0, - "eyes": 1, - "rocket": 1 - } - }, - "schema": { - "title": "Team Discussion", - "description": "A team discussion is a persistent record of a free-form conversation within a team.", - "type": "object", - "properties": { - "author": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "format": "int64", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - }, - "user_view_type": { - "type": "string", - "examples": [ - "public" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "body": { - "description": "The main text of the discussion.", - "type": "string", - "examples": [ - "Please suggest improvements to our workflow in comments." - ] - }, - "body_html": { - "type": "string", - "examples": [ - "

    Hi! This is an area for us to collaborate as a team

    " - ] - }, - "body_version": { - "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.", - "type": "string", - "examples": [ - "0307116bbf7ced493b8d8a346c650b71" - ] - }, - "created_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "last_edited_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/orgs/github/teams/justice-league/discussions/1" - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDE0OlRlYW1EaXNjdXNzaW9uMQ==" - ] - }, - "number": { - "description": "The unique sequence number of a team discussion.", - "type": "integer", - "examples": [ - 42 - ] - }, - "pinned": { - "description": "Whether or not this discussion should be pinned for easy retrieval.", - "type": "boolean", - "examples": [ - true - ] - }, - "private": { - "description": "Whether or not this discussion should be restricted to team members and organization owners.", - "type": "boolean", - "examples": [ - true - ] - }, - "team_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027" - ] - }, - "title": { - "description": "The title of the discussion.", - "type": "string", - "examples": [ - "How can we improve our workflow?" - ] - }, - "updated_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027/discussions/1" - ] - }, - "reactions": { - "title": "Reaction Rollup", - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri" - }, - "total_count": { - "type": "integer" - }, - "+1": { - "type": "integer" - }, - "-1": { - "type": "integer" - }, - "laugh": { - "type": "integer" - }, - "confused": { - "type": "integer" - }, - "heart": { - "type": "integer" - }, - "hooray": { - "type": "integer" - }, - "eyes": { - "type": "integer" - }, - "rocket": { - "type": "integer" - } - }, - "required": [ - "url", - "total_count", - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "eyes", - "rocket" - ] - } - }, - "required": [ - "author", - "body", - "body_html", - "body_version", - "created_at", - "last_edited_at", - "html_url", - "pinned", - "private", - "node_id", - "number", - "team_url", - "title", - "updated_at", - "url" - ] - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

    OK

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "write" - } - ] - } - }, - { - "serverUrl": "http(s)://HOSTNAME/api/v3", - "verb": "delete", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}", - "title": "Delete a discussion (Legacy)", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "team_id", - "description": "

    The unique identifier of the team.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "discussion_number", - "description": "

    The number that identifies the discussion.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "bodyParameters": [], - "descriptionHTML": "

    Warning

    \n

    \nEndpoint closing down notice: This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new Delete a discussion endpoint.

    \n
    \n

    Delete a discussion from a team's page.

    \n

    OAuth app tokens and personal access tokens (classic) need the write:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "parameters": { - "team_id": "TEAM_ID", - "discussion_number": "DISCUSSION_NUMBER" - } - }, - "response": { - "statusCode": "204", - "description": "

    Response

    " - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "204", - "description": "

    No Content

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "write" - } - ] - } - } - ], "external-groups": [ { "serverUrl": "http(s)://HOSTNAME/api/v3", diff --git a/src/rest/data/ghes-3.17-2022-11-28/schema.json b/src/rest/data/ghes-3.17-2022-11-28/schema.json index be505e24dc43..75ee187a8c7b 100644 --- a/src/rest/data/ghes-3.17-2022-11-28/schema.json +++ b/src/rest/data/ghes-3.17-2022-11-28/schema.json @@ -705838,3973 +705838,6 @@ } } ], - "discussions": [ - { - "serverUrl": "http(s)://HOSTNAME/api/v3", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions", - "title": "List discussions", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "org", - "description": "

    The organization name. The name is not case sensitive.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "team_slug", - "description": "

    The slug of the team name.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "direction", - "description": "

    The direction to sort the results by.

    ", - "in": "query", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "per_page", - "description": "

    The number of results per page (max 100). For more information, see \"Using pagination in the REST API.\"

    ", - "in": "query", - "schema": { - "type": "integer", - "default": 30 - } - }, - { - "name": "page", - "description": "

    The page number of the results to fetch. For more information, see \"Using pagination in the REST API.\"

    ", - "in": "query", - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "pinned", - "in": "query", - "required": false, - "description": "

    Pinned discussions only filter

    ", - "schema": { - "type": "string" - } - } - ], - "bodyParameters": [], - "descriptionHTML": "

    List all discussions on a team's page.

    \n

    Note

    \n

    \nYou can also specify a team by org_id and team_id using the route GET /organizations/{org_id}/team/{team_id}/discussions.

    \n
    \n

    OAuth app tokens and personal access tokens (classic) need the read:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "parameters": { - "org": "ORG", - "team_slug": "TEAM_SLUG" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

    Response

    ", - "example": [ - { - "author": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "body": "Hi! This is an area for us to collaborate as a team.", - "body_html": "

    Hi! This is an area for us to collaborate as a team

    ", - "body_version": "0d495416a700fb06133c612575d92bfb", - "created_at": "2018-01-25T18:56:31Z", - "last_edited_at": null, - "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1", - "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==", - "number": 1, - "pinned": false, - "private": false, - "team_url": "https://api.github.com/teams/2343027", - "title": "Our first team post", - "updated_at": "2018-01-25T18:56:31Z", - "url": "https://api.github.com/teams/2343027/discussions/1", - "reactions": { - "url": "https://api.github.com/teams/2343027/discussions/1/reactions", - "total_count": 5, - "+1": 3, - "-1": 1, - "laugh": 0, - "confused": 0, - "heart": 1, - "hooray": 0, - "eyes": 1, - "rocket": 1 - } - } - ], - "schema": { - "type": "array", - "items": { - "title": "Team Discussion", - "description": "A team discussion is a persistent record of a free-form conversation within a team.", - "type": "object", - "properties": { - "author": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "format": "int64", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - }, - "user_view_type": { - "type": "string", - "examples": [ - "public" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "body": { - "description": "The main text of the discussion.", - "type": "string", - "examples": [ - "Please suggest improvements to our workflow in comments." - ] - }, - "body_html": { - "type": "string", - "examples": [ - "

    Hi! This is an area for us to collaborate as a team

    " - ] - }, - "body_version": { - "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.", - "type": "string", - "examples": [ - "0307116bbf7ced493b8d8a346c650b71" - ] - }, - "created_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "last_edited_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/orgs/github/teams/justice-league/discussions/1" - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDE0OlRlYW1EaXNjdXNzaW9uMQ==" - ] - }, - "number": { - "description": "The unique sequence number of a team discussion.", - "type": "integer", - "examples": [ - 42 - ] - }, - "pinned": { - "description": "Whether or not this discussion should be pinned for easy retrieval.", - "type": "boolean", - "examples": [ - true - ] - }, - "private": { - "description": "Whether or not this discussion should be restricted to team members and organization owners.", - "type": "boolean", - "examples": [ - true - ] - }, - "team_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027" - ] - }, - "title": { - "description": "The title of the discussion.", - "type": "string", - "examples": [ - "How can we improve our workflow?" - ] - }, - "updated_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027/discussions/1" - ] - }, - "reactions": { - "title": "Reaction Rollup", - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri" - }, - "total_count": { - "type": "integer" - }, - "+1": { - "type": "integer" - }, - "-1": { - "type": "integer" - }, - "laugh": { - "type": "integer" - }, - "confused": { - "type": "integer" - }, - "heart": { - "type": "integer" - }, - "hooray": { - "type": "integer" - }, - "eyes": { - "type": "integer" - }, - "rocket": { - "type": "integer" - } - }, - "required": [ - "url", - "total_count", - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "eyes", - "rocket" - ] - } - }, - "required": [ - "author", - "body", - "body_html", - "body_version", - "created_at", - "last_edited_at", - "html_url", - "pinned", - "private", - "node_id", - "number", - "team_url", - "title", - "updated_at", - "url" - ] - } - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

    OK

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "read" - } - ] - } - }, - { - "serverUrl": "http(s)://HOSTNAME/api/v3", - "verb": "post", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions", - "title": "Create a discussion", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "org", - "description": "

    The organization name. The name is not case sensitive.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "team_slug", - "description": "

    The slug of the team name.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "bodyParameters": [ - { - "type": "string", - "name": "title", - "in": "body", - "description": "

    The discussion post's title.

    ", - "isRequired": true - }, - { - "type": "string", - "name": "body", - "in": "body", - "description": "

    The discussion post's body text.

    ", - "isRequired": true - }, - { - "type": "boolean", - "name": "private", - "in": "body", - "description": "

    Private posts are only visible to team members, organization owners, and team maintainers. Public posts are visible to all members of the organization. Set to true to create a private post.

    ", - "default": false - } - ], - "descriptionHTML": "

    Creates a new discussion post on a team's page.

    \n

    This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see \"Rate limits for the API\" and \"Best practices for using the REST API.\"

    \n

    Note

    \n

    \nYou can also specify a team by org_id and team_id using the route POST /organizations/{org_id}/team/{team_id}/discussions.

    \n
    \n

    OAuth app tokens and personal access tokens (classic) need the write:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "contentType": "application/json", - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "bodyParameters": { - "title": "Our first team post", - "body": "Hi! This is an area for us to collaborate as a team." - }, - "parameters": { - "org": "ORG", - "team_slug": "TEAM_SLUG" - } - }, - "response": { - "statusCode": "201", - "contentType": "application/json", - "description": "

    Response

    ", - "example": { - "author": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "body": "Hi! This is an area for us to collaborate as a team.", - "body_html": "

    Hi! This is an area for us to collaborate as a team

    ", - "body_version": "0d495416a700fb06133c612575d92bfb", - "created_at": "2018-01-25T18:56:31Z", - "last_edited_at": null, - "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1", - "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==", - "number": 1, - "pinned": false, - "private": false, - "team_url": "https://api.github.com/teams/2343027", - "title": "Our first team post", - "updated_at": "2018-01-25T18:56:31Z", - "url": "https://api.github.com/teams/2343027/discussions/1", - "reactions": { - "url": "https://api.github.com/teams/2343027/discussions/1/reactions", - "total_count": 5, - "+1": 3, - "-1": 1, - "laugh": 0, - "confused": 0, - "heart": 1, - "hooray": 0, - "eyes": 1, - "rocket": 1 - } - }, - "schema": { - "title": "Team Discussion", - "description": "A team discussion is a persistent record of a free-form conversation within a team.", - "type": "object", - "properties": { - "author": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "format": "int64", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - }, - "user_view_type": { - "type": "string", - "examples": [ - "public" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "body": { - "description": "The main text of the discussion.", - "type": "string", - "examples": [ - "Please suggest improvements to our workflow in comments." - ] - }, - "body_html": { - "type": "string", - "examples": [ - "

    Hi! This is an area for us to collaborate as a team

    " - ] - }, - "body_version": { - "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.", - "type": "string", - "examples": [ - "0307116bbf7ced493b8d8a346c650b71" - ] - }, - "created_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "last_edited_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/orgs/github/teams/justice-league/discussions/1" - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDE0OlRlYW1EaXNjdXNzaW9uMQ==" - ] - }, - "number": { - "description": "The unique sequence number of a team discussion.", - "type": "integer", - "examples": [ - 42 - ] - }, - "pinned": { - "description": "Whether or not this discussion should be pinned for easy retrieval.", - "type": "boolean", - "examples": [ - true - ] - }, - "private": { - "description": "Whether or not this discussion should be restricted to team members and organization owners.", - "type": "boolean", - "examples": [ - true - ] - }, - "team_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027" - ] - }, - "title": { - "description": "The title of the discussion.", - "type": "string", - "examples": [ - "How can we improve our workflow?" - ] - }, - "updated_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027/discussions/1" - ] - }, - "reactions": { - "title": "Reaction Rollup", - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri" - }, - "total_count": { - "type": "integer" - }, - "+1": { - "type": "integer" - }, - "-1": { - "type": "integer" - }, - "laugh": { - "type": "integer" - }, - "confused": { - "type": "integer" - }, - "heart": { - "type": "integer" - }, - "hooray": { - "type": "integer" - }, - "eyes": { - "type": "integer" - }, - "rocket": { - "type": "integer" - } - }, - "required": [ - "url", - "total_count", - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "eyes", - "rocket" - ] - } - }, - "required": [ - "author", - "body", - "body_html", - "body_version", - "created_at", - "last_edited_at", - "html_url", - "pinned", - "private", - "node_id", - "number", - "team_url", - "title", - "updated_at", - "url" - ] - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "201", - "description": "

    Created

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "write" - } - ] - } - }, - { - "serverUrl": "http(s)://HOSTNAME/api/v3", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", - "title": "Get a discussion", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "org", - "description": "

    The organization name. The name is not case sensitive.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "team_slug", - "description": "

    The slug of the team name.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "discussion_number", - "description": "

    The number that identifies the discussion.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "bodyParameters": [], - "descriptionHTML": "

    Get a specific discussion on a team's page.

    \n

    Note

    \n

    \nYou can also specify a team by org_id and team_id using the route GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}.

    \n
    \n

    OAuth app tokens and personal access tokens (classic) need the read:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "parameters": { - "org": "ORG", - "team_slug": "TEAM_SLUG", - "discussion_number": "DISCUSSION_NUMBER" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

    Response

    ", - "example": { - "author": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "body": "Hi! This is an area for us to collaborate as a team.", - "body_html": "

    Hi! This is an area for us to collaborate as a team

    ", - "body_version": "0d495416a700fb06133c612575d92bfb", - "created_at": "2018-01-25T18:56:31Z", - "last_edited_at": null, - "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1", - "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==", - "number": 1, - "pinned": false, - "private": false, - "team_url": "https://api.github.com/teams/2343027", - "title": "Our first team post", - "updated_at": "2018-01-25T18:56:31Z", - "url": "https://api.github.com/teams/2343027/discussions/1", - "reactions": { - "url": "https://api.github.com/teams/2343027/discussions/1/reactions", - "total_count": 5, - "+1": 3, - "-1": 1, - "laugh": 0, - "confused": 0, - "heart": 1, - "hooray": 0, - "eyes": 1, - "rocket": 1 - } - }, - "schema": { - "title": "Team Discussion", - "description": "A team discussion is a persistent record of a free-form conversation within a team.", - "type": "object", - "properties": { - "author": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "format": "int64", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - }, - "user_view_type": { - "type": "string", - "examples": [ - "public" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "body": { - "description": "The main text of the discussion.", - "type": "string", - "examples": [ - "Please suggest improvements to our workflow in comments." - ] - }, - "body_html": { - "type": "string", - "examples": [ - "

    Hi! This is an area for us to collaborate as a team

    " - ] - }, - "body_version": { - "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.", - "type": "string", - "examples": [ - "0307116bbf7ced493b8d8a346c650b71" - ] - }, - "created_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "last_edited_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/orgs/github/teams/justice-league/discussions/1" - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDE0OlRlYW1EaXNjdXNzaW9uMQ==" - ] - }, - "number": { - "description": "The unique sequence number of a team discussion.", - "type": "integer", - "examples": [ - 42 - ] - }, - "pinned": { - "description": "Whether or not this discussion should be pinned for easy retrieval.", - "type": "boolean", - "examples": [ - true - ] - }, - "private": { - "description": "Whether or not this discussion should be restricted to team members and organization owners.", - "type": "boolean", - "examples": [ - true - ] - }, - "team_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027" - ] - }, - "title": { - "description": "The title of the discussion.", - "type": "string", - "examples": [ - "How can we improve our workflow?" - ] - }, - "updated_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027/discussions/1" - ] - }, - "reactions": { - "title": "Reaction Rollup", - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri" - }, - "total_count": { - "type": "integer" - }, - "+1": { - "type": "integer" - }, - "-1": { - "type": "integer" - }, - "laugh": { - "type": "integer" - }, - "confused": { - "type": "integer" - }, - "heart": { - "type": "integer" - }, - "hooray": { - "type": "integer" - }, - "eyes": { - "type": "integer" - }, - "rocket": { - "type": "integer" - } - }, - "required": [ - "url", - "total_count", - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "eyes", - "rocket" - ] - } - }, - "required": [ - "author", - "body", - "body_html", - "body_version", - "created_at", - "last_edited_at", - "html_url", - "pinned", - "private", - "node_id", - "number", - "team_url", - "title", - "updated_at", - "url" - ] - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

    OK

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "read" - } - ] - } - }, - { - "serverUrl": "http(s)://HOSTNAME/api/v3", - "verb": "patch", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", - "title": "Update a discussion", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "org", - "description": "

    The organization name. The name is not case sensitive.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "team_slug", - "description": "

    The slug of the team name.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "discussion_number", - "description": "

    The number that identifies the discussion.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "bodyParameters": [ - { - "type": "string", - "name": "title", - "in": "body", - "description": "

    The discussion post's title.

    " - }, - { - "type": "string", - "name": "body", - "in": "body", - "description": "

    The discussion post's body text.

    " - } - ], - "descriptionHTML": "

    Edits the title and body text of a discussion post. Only the parameters you provide are updated.

    \n

    Note

    \n

    \nYou can also specify a team by org_id and team_id using the route PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}.

    \n
    \n

    OAuth app tokens and personal access tokens (classic) need the write:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "contentType": "application/json", - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "bodyParameters": { - "title": "Welcome to our first team post" - }, - "parameters": { - "org": "ORG", - "team_slug": "TEAM_SLUG", - "discussion_number": "DISCUSSION_NUMBER" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

    Response

    ", - "example": { - "author": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "body": "Hi! This is an area for us to collaborate as a team.", - "body_html": "

    Hi! This is an area for us to collaborate as a team

    ", - "body_version": "0d495416a700fb06133c612575d92bfb", - "created_at": "2018-01-25T18:56:31Z", - "last_edited_at": "2018-01-26T18:22:20Z", - "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1", - "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==", - "number": 1, - "pinned": false, - "private": false, - "team_url": "https://api.github.com/teams/2343027", - "title": "Welcome to our first team post", - "updated_at": "2018-01-26T18:22:20Z", - "url": "https://api.github.com/teams/2343027/discussions/1", - "reactions": { - "url": "https://api.github.com/teams/2343027/discussions/1/reactions", - "total_count": 5, - "+1": 3, - "-1": 1, - "laugh": 0, - "confused": 0, - "heart": 1, - "hooray": 0, - "eyes": 1, - "rocket": 1 - } - }, - "schema": { - "title": "Team Discussion", - "description": "A team discussion is a persistent record of a free-form conversation within a team.", - "type": "object", - "properties": { - "author": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "format": "int64", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - }, - "user_view_type": { - "type": "string", - "examples": [ - "public" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "body": { - "description": "The main text of the discussion.", - "type": "string", - "examples": [ - "Please suggest improvements to our workflow in comments." - ] - }, - "body_html": { - "type": "string", - "examples": [ - "

    Hi! This is an area for us to collaborate as a team

    " - ] - }, - "body_version": { - "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.", - "type": "string", - "examples": [ - "0307116bbf7ced493b8d8a346c650b71" - ] - }, - "created_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "last_edited_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/orgs/github/teams/justice-league/discussions/1" - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDE0OlRlYW1EaXNjdXNzaW9uMQ==" - ] - }, - "number": { - "description": "The unique sequence number of a team discussion.", - "type": "integer", - "examples": [ - 42 - ] - }, - "pinned": { - "description": "Whether or not this discussion should be pinned for easy retrieval.", - "type": "boolean", - "examples": [ - true - ] - }, - "private": { - "description": "Whether or not this discussion should be restricted to team members and organization owners.", - "type": "boolean", - "examples": [ - true - ] - }, - "team_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027" - ] - }, - "title": { - "description": "The title of the discussion.", - "type": "string", - "examples": [ - "How can we improve our workflow?" - ] - }, - "updated_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027/discussions/1" - ] - }, - "reactions": { - "title": "Reaction Rollup", - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri" - }, - "total_count": { - "type": "integer" - }, - "+1": { - "type": "integer" - }, - "-1": { - "type": "integer" - }, - "laugh": { - "type": "integer" - }, - "confused": { - "type": "integer" - }, - "heart": { - "type": "integer" - }, - "hooray": { - "type": "integer" - }, - "eyes": { - "type": "integer" - }, - "rocket": { - "type": "integer" - } - }, - "required": [ - "url", - "total_count", - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "eyes", - "rocket" - ] - } - }, - "required": [ - "author", - "body", - "body_html", - "body_version", - "created_at", - "last_edited_at", - "html_url", - "pinned", - "private", - "node_id", - "number", - "team_url", - "title", - "updated_at", - "url" - ] - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

    OK

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "write" - } - ] - } - }, - { - "serverUrl": "http(s)://HOSTNAME/api/v3", - "verb": "delete", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", - "title": "Delete a discussion", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "org", - "description": "

    The organization name. The name is not case sensitive.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "team_slug", - "description": "

    The slug of the team name.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "discussion_number", - "description": "

    The number that identifies the discussion.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "bodyParameters": [], - "descriptionHTML": "

    Delete a discussion from a team's page.

    \n

    Note

    \n

    \nYou can also specify a team by org_id and team_id using the route DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}.

    \n
    \n

    OAuth app tokens and personal access tokens (classic) need the write:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "parameters": { - "org": "ORG", - "team_slug": "TEAM_SLUG", - "discussion_number": "DISCUSSION_NUMBER" - } - }, - "response": { - "statusCode": "204", - "description": "

    Response

    " - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "204", - "description": "

    No Content

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "write" - } - ] - } - }, - { - "serverUrl": "http(s)://HOSTNAME/api/v3", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions", - "title": "List discussions (Legacy)", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "team_id", - "description": "

    The unique identifier of the team.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "direction", - "description": "

    The direction to sort the results by.

    ", - "in": "query", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "per_page", - "description": "

    The number of results per page (max 100). For more information, see \"Using pagination in the REST API.\"

    ", - "in": "query", - "schema": { - "type": "integer", - "default": 30 - } - }, - { - "name": "page", - "description": "

    The page number of the results to fetch. For more information, see \"Using pagination in the REST API.\"

    ", - "in": "query", - "schema": { - "type": "integer", - "default": 1 - } - } - ], - "bodyParameters": [], - "descriptionHTML": "

    Warning

    \n

    \nEndpoint closing down notice: This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new List discussions endpoint.

    \n
    \n

    List all discussions on a team's page.

    \n

    OAuth app tokens and personal access tokens (classic) need the read:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "parameters": { - "team_id": "TEAM_ID" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

    Response

    ", - "example": [ - { - "author": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "body": "Hi! This is an area for us to collaborate as a team.", - "body_html": "

    Hi! This is an area for us to collaborate as a team

    ", - "body_version": "0d495416a700fb06133c612575d92bfb", - "created_at": "2018-01-25T18:56:31Z", - "last_edited_at": null, - "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1", - "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==", - "number": 1, - "pinned": false, - "private": false, - "team_url": "https://api.github.com/teams/2343027", - "title": "Our first team post", - "updated_at": "2018-01-25T18:56:31Z", - "url": "https://api.github.com/teams/2343027/discussions/1", - "reactions": { - "url": "https://api.github.com/teams/2343027/discussions/1/reactions", - "total_count": 5, - "+1": 3, - "-1": 1, - "laugh": 0, - "confused": 0, - "heart": 1, - "hooray": 0, - "eyes": 1, - "rocket": 1 - } - } - ], - "schema": { - "type": "array", - "items": { - "title": "Team Discussion", - "description": "A team discussion is a persistent record of a free-form conversation within a team.", - "type": "object", - "properties": { - "author": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "format": "int64", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - }, - "user_view_type": { - "type": "string", - "examples": [ - "public" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "body": { - "description": "The main text of the discussion.", - "type": "string", - "examples": [ - "Please suggest improvements to our workflow in comments." - ] - }, - "body_html": { - "type": "string", - "examples": [ - "

    Hi! This is an area for us to collaborate as a team

    " - ] - }, - "body_version": { - "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.", - "type": "string", - "examples": [ - "0307116bbf7ced493b8d8a346c650b71" - ] - }, - "created_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "last_edited_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/orgs/github/teams/justice-league/discussions/1" - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDE0OlRlYW1EaXNjdXNzaW9uMQ==" - ] - }, - "number": { - "description": "The unique sequence number of a team discussion.", - "type": "integer", - "examples": [ - 42 - ] - }, - "pinned": { - "description": "Whether or not this discussion should be pinned for easy retrieval.", - "type": "boolean", - "examples": [ - true - ] - }, - "private": { - "description": "Whether or not this discussion should be restricted to team members and organization owners.", - "type": "boolean", - "examples": [ - true - ] - }, - "team_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027" - ] - }, - "title": { - "description": "The title of the discussion.", - "type": "string", - "examples": [ - "How can we improve our workflow?" - ] - }, - "updated_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027/discussions/1" - ] - }, - "reactions": { - "title": "Reaction Rollup", - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri" - }, - "total_count": { - "type": "integer" - }, - "+1": { - "type": "integer" - }, - "-1": { - "type": "integer" - }, - "laugh": { - "type": "integer" - }, - "confused": { - "type": "integer" - }, - "heart": { - "type": "integer" - }, - "hooray": { - "type": "integer" - }, - "eyes": { - "type": "integer" - }, - "rocket": { - "type": "integer" - } - }, - "required": [ - "url", - "total_count", - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "eyes", - "rocket" - ] - } - }, - "required": [ - "author", - "body", - "body_html", - "body_version", - "created_at", - "last_edited_at", - "html_url", - "pinned", - "private", - "node_id", - "number", - "team_url", - "title", - "updated_at", - "url" - ] - } - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

    OK

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "read" - } - ] - } - }, - { - "serverUrl": "http(s)://HOSTNAME/api/v3", - "verb": "post", - "requestPath": "/teams/{team_id}/discussions", - "title": "Create a discussion (Legacy)", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "team_id", - "description": "

    The unique identifier of the team.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "bodyParameters": [ - { - "type": "string", - "name": "title", - "in": "body", - "description": "

    The discussion post's title.

    ", - "isRequired": true - }, - { - "type": "string", - "name": "body", - "in": "body", - "description": "

    The discussion post's body text.

    ", - "isRequired": true - }, - { - "type": "boolean", - "name": "private", - "in": "body", - "description": "

    Private posts are only visible to team members, organization owners, and team maintainers. Public posts are visible to all members of the organization. Set to true to create a private post.

    ", - "default": false - } - ], - "descriptionHTML": "

    Warning

    \n

    \nEndpoint closing down notice: This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new Create a discussion endpoint.

    \n
    \n

    Creates a new discussion post on a team's page.

    \n

    This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see \"Rate limits for the API\" and \"Best practices for using the REST API.\"

    \n

    OAuth app tokens and personal access tokens (classic) need the write:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "contentType": "application/json", - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "bodyParameters": { - "title": "Our first team post", - "body": "Hi! This is an area for us to collaborate as a team." - }, - "parameters": { - "team_id": "TEAM_ID" - } - }, - "response": { - "statusCode": "201", - "contentType": "application/json", - "description": "

    Response

    ", - "example": { - "author": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "body": "Hi! This is an area for us to collaborate as a team.", - "body_html": "

    Hi! This is an area for us to collaborate as a team

    ", - "body_version": "0d495416a700fb06133c612575d92bfb", - "created_at": "2018-01-25T18:56:31Z", - "last_edited_at": null, - "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1", - "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==", - "number": 1, - "pinned": false, - "private": false, - "team_url": "https://api.github.com/teams/2343027", - "title": "Our first team post", - "updated_at": "2018-01-25T18:56:31Z", - "url": "https://api.github.com/teams/2343027/discussions/1", - "reactions": { - "url": "https://api.github.com/teams/2343027/discussions/1/reactions", - "total_count": 5, - "+1": 3, - "-1": 1, - "laugh": 0, - "confused": 0, - "heart": 1, - "hooray": 0, - "eyes": 1, - "rocket": 1 - } - }, - "schema": { - "title": "Team Discussion", - "description": "A team discussion is a persistent record of a free-form conversation within a team.", - "type": "object", - "properties": { - "author": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "format": "int64", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - }, - "user_view_type": { - "type": "string", - "examples": [ - "public" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "body": { - "description": "The main text of the discussion.", - "type": "string", - "examples": [ - "Please suggest improvements to our workflow in comments." - ] - }, - "body_html": { - "type": "string", - "examples": [ - "

    Hi! This is an area for us to collaborate as a team

    " - ] - }, - "body_version": { - "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.", - "type": "string", - "examples": [ - "0307116bbf7ced493b8d8a346c650b71" - ] - }, - "created_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "last_edited_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/orgs/github/teams/justice-league/discussions/1" - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDE0OlRlYW1EaXNjdXNzaW9uMQ==" - ] - }, - "number": { - "description": "The unique sequence number of a team discussion.", - "type": "integer", - "examples": [ - 42 - ] - }, - "pinned": { - "description": "Whether or not this discussion should be pinned for easy retrieval.", - "type": "boolean", - "examples": [ - true - ] - }, - "private": { - "description": "Whether or not this discussion should be restricted to team members and organization owners.", - "type": "boolean", - "examples": [ - true - ] - }, - "team_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027" - ] - }, - "title": { - "description": "The title of the discussion.", - "type": "string", - "examples": [ - "How can we improve our workflow?" - ] - }, - "updated_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027/discussions/1" - ] - }, - "reactions": { - "title": "Reaction Rollup", - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri" - }, - "total_count": { - "type": "integer" - }, - "+1": { - "type": "integer" - }, - "-1": { - "type": "integer" - }, - "laugh": { - "type": "integer" - }, - "confused": { - "type": "integer" - }, - "heart": { - "type": "integer" - }, - "hooray": { - "type": "integer" - }, - "eyes": { - "type": "integer" - }, - "rocket": { - "type": "integer" - } - }, - "required": [ - "url", - "total_count", - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "eyes", - "rocket" - ] - } - }, - "required": [ - "author", - "body", - "body_html", - "body_version", - "created_at", - "last_edited_at", - "html_url", - "pinned", - "private", - "node_id", - "number", - "team_url", - "title", - "updated_at", - "url" - ] - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "201", - "description": "

    Created

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "write" - } - ] - } - }, - { - "serverUrl": "http(s)://HOSTNAME/api/v3", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}", - "title": "Get a discussion (Legacy)", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "team_id", - "description": "

    The unique identifier of the team.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "discussion_number", - "description": "

    The number that identifies the discussion.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "bodyParameters": [], - "descriptionHTML": "

    Warning

    \n

    \nEndpoint closing down notice: This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new Get a discussion endpoint.

    \n
    \n

    Get a specific discussion on a team's page.

    \n

    OAuth app tokens and personal access tokens (classic) need the read:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "parameters": { - "team_id": "TEAM_ID", - "discussion_number": "DISCUSSION_NUMBER" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

    Response

    ", - "example": { - "author": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "body": "Hi! This is an area for us to collaborate as a team.", - "body_html": "

    Hi! This is an area for us to collaborate as a team

    ", - "body_version": "0d495416a700fb06133c612575d92bfb", - "created_at": "2018-01-25T18:56:31Z", - "last_edited_at": null, - "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1", - "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==", - "number": 1, - "pinned": false, - "private": false, - "team_url": "https://api.github.com/teams/2343027", - "title": "Our first team post", - "updated_at": "2018-01-25T18:56:31Z", - "url": "https://api.github.com/teams/2343027/discussions/1", - "reactions": { - "url": "https://api.github.com/teams/2343027/discussions/1/reactions", - "total_count": 5, - "+1": 3, - "-1": 1, - "laugh": 0, - "confused": 0, - "heart": 1, - "hooray": 0, - "eyes": 1, - "rocket": 1 - } - }, - "schema": { - "title": "Team Discussion", - "description": "A team discussion is a persistent record of a free-form conversation within a team.", - "type": "object", - "properties": { - "author": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "format": "int64", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - }, - "user_view_type": { - "type": "string", - "examples": [ - "public" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "body": { - "description": "The main text of the discussion.", - "type": "string", - "examples": [ - "Please suggest improvements to our workflow in comments." - ] - }, - "body_html": { - "type": "string", - "examples": [ - "

    Hi! This is an area for us to collaborate as a team

    " - ] - }, - "body_version": { - "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.", - "type": "string", - "examples": [ - "0307116bbf7ced493b8d8a346c650b71" - ] - }, - "created_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "last_edited_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/orgs/github/teams/justice-league/discussions/1" - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDE0OlRlYW1EaXNjdXNzaW9uMQ==" - ] - }, - "number": { - "description": "The unique sequence number of a team discussion.", - "type": "integer", - "examples": [ - 42 - ] - }, - "pinned": { - "description": "Whether or not this discussion should be pinned for easy retrieval.", - "type": "boolean", - "examples": [ - true - ] - }, - "private": { - "description": "Whether or not this discussion should be restricted to team members and organization owners.", - "type": "boolean", - "examples": [ - true - ] - }, - "team_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027" - ] - }, - "title": { - "description": "The title of the discussion.", - "type": "string", - "examples": [ - "How can we improve our workflow?" - ] - }, - "updated_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027/discussions/1" - ] - }, - "reactions": { - "title": "Reaction Rollup", - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri" - }, - "total_count": { - "type": "integer" - }, - "+1": { - "type": "integer" - }, - "-1": { - "type": "integer" - }, - "laugh": { - "type": "integer" - }, - "confused": { - "type": "integer" - }, - "heart": { - "type": "integer" - }, - "hooray": { - "type": "integer" - }, - "eyes": { - "type": "integer" - }, - "rocket": { - "type": "integer" - } - }, - "required": [ - "url", - "total_count", - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "eyes", - "rocket" - ] - } - }, - "required": [ - "author", - "body", - "body_html", - "body_version", - "created_at", - "last_edited_at", - "html_url", - "pinned", - "private", - "node_id", - "number", - "team_url", - "title", - "updated_at", - "url" - ] - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

    OK

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "read" - } - ] - } - }, - { - "serverUrl": "http(s)://HOSTNAME/api/v3", - "verb": "patch", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}", - "title": "Update a discussion (Legacy)", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "team_id", - "description": "

    The unique identifier of the team.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "discussion_number", - "description": "

    The number that identifies the discussion.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "bodyParameters": [ - { - "type": "string", - "name": "title", - "in": "body", - "description": "

    The discussion post's title.

    " - }, - { - "type": "string", - "name": "body", - "in": "body", - "description": "

    The discussion post's body text.

    " - } - ], - "descriptionHTML": "

    Warning

    \n

    \nEndpoint closing down notice: This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new Update a discussion endpoint.

    \n
    \n

    Edits the title and body text of a discussion post. Only the parameters you provide are updated.

    \n

    OAuth app tokens and personal access tokens (classic) need the write:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "contentType": "application/json", - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "bodyParameters": { - "title": "Welcome to our first team post" - }, - "parameters": { - "team_id": "TEAM_ID", - "discussion_number": "DISCUSSION_NUMBER" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

    Response

    ", - "example": { - "author": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "body": "Hi! This is an area for us to collaborate as a team.", - "body_html": "

    Hi! This is an area for us to collaborate as a team

    ", - "body_version": "0d495416a700fb06133c612575d92bfb", - "created_at": "2018-01-25T18:56:31Z", - "last_edited_at": "2018-01-26T18:22:20Z", - "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1", - "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==", - "number": 1, - "pinned": false, - "private": false, - "team_url": "https://api.github.com/teams/2343027", - "title": "Welcome to our first team post", - "updated_at": "2018-01-26T18:22:20Z", - "url": "https://api.github.com/teams/2343027/discussions/1", - "reactions": { - "url": "https://api.github.com/teams/2343027/discussions/1/reactions", - "total_count": 5, - "+1": 3, - "-1": 1, - "laugh": 0, - "confused": 0, - "heart": 1, - "hooray": 0, - "eyes": 1, - "rocket": 1 - } - }, - "schema": { - "title": "Team Discussion", - "description": "A team discussion is a persistent record of a free-form conversation within a team.", - "type": "object", - "properties": { - "author": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "format": "int64", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - }, - "user_view_type": { - "type": "string", - "examples": [ - "public" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "body": { - "description": "The main text of the discussion.", - "type": "string", - "examples": [ - "Please suggest improvements to our workflow in comments." - ] - }, - "body_html": { - "type": "string", - "examples": [ - "

    Hi! This is an area for us to collaborate as a team

    " - ] - }, - "body_version": { - "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.", - "type": "string", - "examples": [ - "0307116bbf7ced493b8d8a346c650b71" - ] - }, - "created_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "last_edited_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/orgs/github/teams/justice-league/discussions/1" - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDE0OlRlYW1EaXNjdXNzaW9uMQ==" - ] - }, - "number": { - "description": "The unique sequence number of a team discussion.", - "type": "integer", - "examples": [ - 42 - ] - }, - "pinned": { - "description": "Whether or not this discussion should be pinned for easy retrieval.", - "type": "boolean", - "examples": [ - true - ] - }, - "private": { - "description": "Whether or not this discussion should be restricted to team members and organization owners.", - "type": "boolean", - "examples": [ - true - ] - }, - "team_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027" - ] - }, - "title": { - "description": "The title of the discussion.", - "type": "string", - "examples": [ - "How can we improve our workflow?" - ] - }, - "updated_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027/discussions/1" - ] - }, - "reactions": { - "title": "Reaction Rollup", - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri" - }, - "total_count": { - "type": "integer" - }, - "+1": { - "type": "integer" - }, - "-1": { - "type": "integer" - }, - "laugh": { - "type": "integer" - }, - "confused": { - "type": "integer" - }, - "heart": { - "type": "integer" - }, - "hooray": { - "type": "integer" - }, - "eyes": { - "type": "integer" - }, - "rocket": { - "type": "integer" - } - }, - "required": [ - "url", - "total_count", - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "eyes", - "rocket" - ] - } - }, - "required": [ - "author", - "body", - "body_html", - "body_version", - "created_at", - "last_edited_at", - "html_url", - "pinned", - "private", - "node_id", - "number", - "team_url", - "title", - "updated_at", - "url" - ] - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

    OK

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "write" - } - ] - } - }, - { - "serverUrl": "http(s)://HOSTNAME/api/v3", - "verb": "delete", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}", - "title": "Delete a discussion (Legacy)", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "team_id", - "description": "

    The unique identifier of the team.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "discussion_number", - "description": "

    The number that identifies the discussion.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "bodyParameters": [], - "descriptionHTML": "

    Warning

    \n

    \nEndpoint closing down notice: This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new Delete a discussion endpoint.

    \n
    \n

    Delete a discussion from a team's page.

    \n

    OAuth app tokens and personal access tokens (classic) need the write:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "parameters": { - "team_id": "TEAM_ID", - "discussion_number": "DISCUSSION_NUMBER" - } - }, - "response": { - "statusCode": "204", - "description": "

    Response

    " - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "204", - "description": "

    No Content

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "write" - } - ] - } - } - ], "external-groups": [ { "serverUrl": "http(s)://HOSTNAME/api/v3", diff --git a/src/rest/data/ghes-3.18-2022-11-28/schema.json b/src/rest/data/ghes-3.18-2022-11-28/schema.json index dc1a95d188d2..e767cae49523 100644 --- a/src/rest/data/ghes-3.18-2022-11-28/schema.json +++ b/src/rest/data/ghes-3.18-2022-11-28/schema.json @@ -709848,3973 +709848,6 @@ } } ], - "discussions": [ - { - "serverUrl": "http(s)://HOSTNAME/api/v3", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions", - "title": "List discussions", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "org", - "description": "

    The organization name. The name is not case sensitive.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "team_slug", - "description": "

    The slug of the team name.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "direction", - "description": "

    The direction to sort the results by.

    ", - "in": "query", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "per_page", - "description": "

    The number of results per page (max 100). For more information, see \"Using pagination in the REST API.\"

    ", - "in": "query", - "schema": { - "type": "integer", - "default": 30 - } - }, - { - "name": "page", - "description": "

    The page number of the results to fetch. For more information, see \"Using pagination in the REST API.\"

    ", - "in": "query", - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "pinned", - "in": "query", - "required": false, - "description": "

    Pinned discussions only filter

    ", - "schema": { - "type": "string" - } - } - ], - "bodyParameters": [], - "descriptionHTML": "

    List all discussions on a team's page.

    \n

    Note

    \n

    \nYou can also specify a team by org_id and team_id using the route GET /organizations/{org_id}/team/{team_id}/discussions.

    \n
    \n

    OAuth app tokens and personal access tokens (classic) need the read:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "parameters": { - "org": "ORG", - "team_slug": "TEAM_SLUG" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

    Response

    ", - "example": [ - { - "author": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "body": "Hi! This is an area for us to collaborate as a team.", - "body_html": "

    Hi! This is an area for us to collaborate as a team

    ", - "body_version": "0d495416a700fb06133c612575d92bfb", - "created_at": "2018-01-25T18:56:31Z", - "last_edited_at": null, - "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1", - "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==", - "number": 1, - "pinned": false, - "private": false, - "team_url": "https://api.github.com/teams/2343027", - "title": "Our first team post", - "updated_at": "2018-01-25T18:56:31Z", - "url": "https://api.github.com/teams/2343027/discussions/1", - "reactions": { - "url": "https://api.github.com/teams/2343027/discussions/1/reactions", - "total_count": 5, - "+1": 3, - "-1": 1, - "laugh": 0, - "confused": 0, - "heart": 1, - "hooray": 0, - "eyes": 1, - "rocket": 1 - } - } - ], - "schema": { - "type": "array", - "items": { - "title": "Team Discussion", - "description": "A team discussion is a persistent record of a free-form conversation within a team.", - "type": "object", - "properties": { - "author": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "format": "int64", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - }, - "user_view_type": { - "type": "string", - "examples": [ - "public" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "body": { - "description": "The main text of the discussion.", - "type": "string", - "examples": [ - "Please suggest improvements to our workflow in comments." - ] - }, - "body_html": { - "type": "string", - "examples": [ - "

    Hi! This is an area for us to collaborate as a team

    " - ] - }, - "body_version": { - "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.", - "type": "string", - "examples": [ - "0307116bbf7ced493b8d8a346c650b71" - ] - }, - "created_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "last_edited_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/orgs/github/teams/justice-league/discussions/1" - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDE0OlRlYW1EaXNjdXNzaW9uMQ==" - ] - }, - "number": { - "description": "The unique sequence number of a team discussion.", - "type": "integer", - "examples": [ - 42 - ] - }, - "pinned": { - "description": "Whether or not this discussion should be pinned for easy retrieval.", - "type": "boolean", - "examples": [ - true - ] - }, - "private": { - "description": "Whether or not this discussion should be restricted to team members and organization owners.", - "type": "boolean", - "examples": [ - true - ] - }, - "team_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027" - ] - }, - "title": { - "description": "The title of the discussion.", - "type": "string", - "examples": [ - "How can we improve our workflow?" - ] - }, - "updated_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027/discussions/1" - ] - }, - "reactions": { - "title": "Reaction Rollup", - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri" - }, - "total_count": { - "type": "integer" - }, - "+1": { - "type": "integer" - }, - "-1": { - "type": "integer" - }, - "laugh": { - "type": "integer" - }, - "confused": { - "type": "integer" - }, - "heart": { - "type": "integer" - }, - "hooray": { - "type": "integer" - }, - "eyes": { - "type": "integer" - }, - "rocket": { - "type": "integer" - } - }, - "required": [ - "url", - "total_count", - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "eyes", - "rocket" - ] - } - }, - "required": [ - "author", - "body", - "body_html", - "body_version", - "created_at", - "last_edited_at", - "html_url", - "pinned", - "private", - "node_id", - "number", - "team_url", - "title", - "updated_at", - "url" - ] - } - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

    OK

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "read" - } - ] - } - }, - { - "serverUrl": "http(s)://HOSTNAME/api/v3", - "verb": "post", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions", - "title": "Create a discussion", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "org", - "description": "

    The organization name. The name is not case sensitive.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "team_slug", - "description": "

    The slug of the team name.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "bodyParameters": [ - { - "type": "string", - "name": "title", - "in": "body", - "description": "

    The discussion post's title.

    ", - "isRequired": true - }, - { - "type": "string", - "name": "body", - "in": "body", - "description": "

    The discussion post's body text.

    ", - "isRequired": true - }, - { - "type": "boolean", - "name": "private", - "in": "body", - "description": "

    Private posts are only visible to team members, organization owners, and team maintainers. Public posts are visible to all members of the organization. Set to true to create a private post.

    ", - "default": false - } - ], - "descriptionHTML": "

    Creates a new discussion post on a team's page.

    \n

    This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see \"Rate limits for the API\" and \"Best practices for using the REST API.\"

    \n

    Note

    \n

    \nYou can also specify a team by org_id and team_id using the route POST /organizations/{org_id}/team/{team_id}/discussions.

    \n
    \n

    OAuth app tokens and personal access tokens (classic) need the write:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "contentType": "application/json", - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "bodyParameters": { - "title": "Our first team post", - "body": "Hi! This is an area for us to collaborate as a team." - }, - "parameters": { - "org": "ORG", - "team_slug": "TEAM_SLUG" - } - }, - "response": { - "statusCode": "201", - "contentType": "application/json", - "description": "

    Response

    ", - "example": { - "author": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "body": "Hi! This is an area for us to collaborate as a team.", - "body_html": "

    Hi! This is an area for us to collaborate as a team

    ", - "body_version": "0d495416a700fb06133c612575d92bfb", - "created_at": "2018-01-25T18:56:31Z", - "last_edited_at": null, - "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1", - "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==", - "number": 1, - "pinned": false, - "private": false, - "team_url": "https://api.github.com/teams/2343027", - "title": "Our first team post", - "updated_at": "2018-01-25T18:56:31Z", - "url": "https://api.github.com/teams/2343027/discussions/1", - "reactions": { - "url": "https://api.github.com/teams/2343027/discussions/1/reactions", - "total_count": 5, - "+1": 3, - "-1": 1, - "laugh": 0, - "confused": 0, - "heart": 1, - "hooray": 0, - "eyes": 1, - "rocket": 1 - } - }, - "schema": { - "title": "Team Discussion", - "description": "A team discussion is a persistent record of a free-form conversation within a team.", - "type": "object", - "properties": { - "author": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "format": "int64", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - }, - "user_view_type": { - "type": "string", - "examples": [ - "public" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "body": { - "description": "The main text of the discussion.", - "type": "string", - "examples": [ - "Please suggest improvements to our workflow in comments." - ] - }, - "body_html": { - "type": "string", - "examples": [ - "

    Hi! This is an area for us to collaborate as a team

    " - ] - }, - "body_version": { - "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.", - "type": "string", - "examples": [ - "0307116bbf7ced493b8d8a346c650b71" - ] - }, - "created_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "last_edited_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/orgs/github/teams/justice-league/discussions/1" - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDE0OlRlYW1EaXNjdXNzaW9uMQ==" - ] - }, - "number": { - "description": "The unique sequence number of a team discussion.", - "type": "integer", - "examples": [ - 42 - ] - }, - "pinned": { - "description": "Whether or not this discussion should be pinned for easy retrieval.", - "type": "boolean", - "examples": [ - true - ] - }, - "private": { - "description": "Whether or not this discussion should be restricted to team members and organization owners.", - "type": "boolean", - "examples": [ - true - ] - }, - "team_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027" - ] - }, - "title": { - "description": "The title of the discussion.", - "type": "string", - "examples": [ - "How can we improve our workflow?" - ] - }, - "updated_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027/discussions/1" - ] - }, - "reactions": { - "title": "Reaction Rollup", - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri" - }, - "total_count": { - "type": "integer" - }, - "+1": { - "type": "integer" - }, - "-1": { - "type": "integer" - }, - "laugh": { - "type": "integer" - }, - "confused": { - "type": "integer" - }, - "heart": { - "type": "integer" - }, - "hooray": { - "type": "integer" - }, - "eyes": { - "type": "integer" - }, - "rocket": { - "type": "integer" - } - }, - "required": [ - "url", - "total_count", - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "eyes", - "rocket" - ] - } - }, - "required": [ - "author", - "body", - "body_html", - "body_version", - "created_at", - "last_edited_at", - "html_url", - "pinned", - "private", - "node_id", - "number", - "team_url", - "title", - "updated_at", - "url" - ] - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "201", - "description": "

    Created

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "write" - } - ] - } - }, - { - "serverUrl": "http(s)://HOSTNAME/api/v3", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", - "title": "Get a discussion", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "org", - "description": "

    The organization name. The name is not case sensitive.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "team_slug", - "description": "

    The slug of the team name.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "discussion_number", - "description": "

    The number that identifies the discussion.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "bodyParameters": [], - "descriptionHTML": "

    Get a specific discussion on a team's page.

    \n

    Note

    \n

    \nYou can also specify a team by org_id and team_id using the route GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}.

    \n
    \n

    OAuth app tokens and personal access tokens (classic) need the read:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "parameters": { - "org": "ORG", - "team_slug": "TEAM_SLUG", - "discussion_number": "DISCUSSION_NUMBER" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

    Response

    ", - "example": { - "author": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "body": "Hi! This is an area for us to collaborate as a team.", - "body_html": "

    Hi! This is an area for us to collaborate as a team

    ", - "body_version": "0d495416a700fb06133c612575d92bfb", - "created_at": "2018-01-25T18:56:31Z", - "last_edited_at": null, - "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1", - "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==", - "number": 1, - "pinned": false, - "private": false, - "team_url": "https://api.github.com/teams/2343027", - "title": "Our first team post", - "updated_at": "2018-01-25T18:56:31Z", - "url": "https://api.github.com/teams/2343027/discussions/1", - "reactions": { - "url": "https://api.github.com/teams/2343027/discussions/1/reactions", - "total_count": 5, - "+1": 3, - "-1": 1, - "laugh": 0, - "confused": 0, - "heart": 1, - "hooray": 0, - "eyes": 1, - "rocket": 1 - } - }, - "schema": { - "title": "Team Discussion", - "description": "A team discussion is a persistent record of a free-form conversation within a team.", - "type": "object", - "properties": { - "author": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "format": "int64", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - }, - "user_view_type": { - "type": "string", - "examples": [ - "public" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "body": { - "description": "The main text of the discussion.", - "type": "string", - "examples": [ - "Please suggest improvements to our workflow in comments." - ] - }, - "body_html": { - "type": "string", - "examples": [ - "

    Hi! This is an area for us to collaborate as a team

    " - ] - }, - "body_version": { - "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.", - "type": "string", - "examples": [ - "0307116bbf7ced493b8d8a346c650b71" - ] - }, - "created_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "last_edited_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/orgs/github/teams/justice-league/discussions/1" - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDE0OlRlYW1EaXNjdXNzaW9uMQ==" - ] - }, - "number": { - "description": "The unique sequence number of a team discussion.", - "type": "integer", - "examples": [ - 42 - ] - }, - "pinned": { - "description": "Whether or not this discussion should be pinned for easy retrieval.", - "type": "boolean", - "examples": [ - true - ] - }, - "private": { - "description": "Whether or not this discussion should be restricted to team members and organization owners.", - "type": "boolean", - "examples": [ - true - ] - }, - "team_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027" - ] - }, - "title": { - "description": "The title of the discussion.", - "type": "string", - "examples": [ - "How can we improve our workflow?" - ] - }, - "updated_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027/discussions/1" - ] - }, - "reactions": { - "title": "Reaction Rollup", - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri" - }, - "total_count": { - "type": "integer" - }, - "+1": { - "type": "integer" - }, - "-1": { - "type": "integer" - }, - "laugh": { - "type": "integer" - }, - "confused": { - "type": "integer" - }, - "heart": { - "type": "integer" - }, - "hooray": { - "type": "integer" - }, - "eyes": { - "type": "integer" - }, - "rocket": { - "type": "integer" - } - }, - "required": [ - "url", - "total_count", - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "eyes", - "rocket" - ] - } - }, - "required": [ - "author", - "body", - "body_html", - "body_version", - "created_at", - "last_edited_at", - "html_url", - "pinned", - "private", - "node_id", - "number", - "team_url", - "title", - "updated_at", - "url" - ] - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

    OK

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "read" - } - ] - } - }, - { - "serverUrl": "http(s)://HOSTNAME/api/v3", - "verb": "patch", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", - "title": "Update a discussion", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "org", - "description": "

    The organization name. The name is not case sensitive.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "team_slug", - "description": "

    The slug of the team name.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "discussion_number", - "description": "

    The number that identifies the discussion.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "bodyParameters": [ - { - "type": "string", - "name": "title", - "in": "body", - "description": "

    The discussion post's title.

    " - }, - { - "type": "string", - "name": "body", - "in": "body", - "description": "

    The discussion post's body text.

    " - } - ], - "descriptionHTML": "

    Edits the title and body text of a discussion post. Only the parameters you provide are updated.

    \n

    Note

    \n

    \nYou can also specify a team by org_id and team_id using the route PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}.

    \n
    \n

    OAuth app tokens and personal access tokens (classic) need the write:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "contentType": "application/json", - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "bodyParameters": { - "title": "Welcome to our first team post" - }, - "parameters": { - "org": "ORG", - "team_slug": "TEAM_SLUG", - "discussion_number": "DISCUSSION_NUMBER" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

    Response

    ", - "example": { - "author": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "body": "Hi! This is an area for us to collaborate as a team.", - "body_html": "

    Hi! This is an area for us to collaborate as a team

    ", - "body_version": "0d495416a700fb06133c612575d92bfb", - "created_at": "2018-01-25T18:56:31Z", - "last_edited_at": "2018-01-26T18:22:20Z", - "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1", - "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==", - "number": 1, - "pinned": false, - "private": false, - "team_url": "https://api.github.com/teams/2343027", - "title": "Welcome to our first team post", - "updated_at": "2018-01-26T18:22:20Z", - "url": "https://api.github.com/teams/2343027/discussions/1", - "reactions": { - "url": "https://api.github.com/teams/2343027/discussions/1/reactions", - "total_count": 5, - "+1": 3, - "-1": 1, - "laugh": 0, - "confused": 0, - "heart": 1, - "hooray": 0, - "eyes": 1, - "rocket": 1 - } - }, - "schema": { - "title": "Team Discussion", - "description": "A team discussion is a persistent record of a free-form conversation within a team.", - "type": "object", - "properties": { - "author": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "format": "int64", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - }, - "user_view_type": { - "type": "string", - "examples": [ - "public" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "body": { - "description": "The main text of the discussion.", - "type": "string", - "examples": [ - "Please suggest improvements to our workflow in comments." - ] - }, - "body_html": { - "type": "string", - "examples": [ - "

    Hi! This is an area for us to collaborate as a team

    " - ] - }, - "body_version": { - "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.", - "type": "string", - "examples": [ - "0307116bbf7ced493b8d8a346c650b71" - ] - }, - "created_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "last_edited_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/orgs/github/teams/justice-league/discussions/1" - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDE0OlRlYW1EaXNjdXNzaW9uMQ==" - ] - }, - "number": { - "description": "The unique sequence number of a team discussion.", - "type": "integer", - "examples": [ - 42 - ] - }, - "pinned": { - "description": "Whether or not this discussion should be pinned for easy retrieval.", - "type": "boolean", - "examples": [ - true - ] - }, - "private": { - "description": "Whether or not this discussion should be restricted to team members and organization owners.", - "type": "boolean", - "examples": [ - true - ] - }, - "team_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027" - ] - }, - "title": { - "description": "The title of the discussion.", - "type": "string", - "examples": [ - "How can we improve our workflow?" - ] - }, - "updated_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027/discussions/1" - ] - }, - "reactions": { - "title": "Reaction Rollup", - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri" - }, - "total_count": { - "type": "integer" - }, - "+1": { - "type": "integer" - }, - "-1": { - "type": "integer" - }, - "laugh": { - "type": "integer" - }, - "confused": { - "type": "integer" - }, - "heart": { - "type": "integer" - }, - "hooray": { - "type": "integer" - }, - "eyes": { - "type": "integer" - }, - "rocket": { - "type": "integer" - } - }, - "required": [ - "url", - "total_count", - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "eyes", - "rocket" - ] - } - }, - "required": [ - "author", - "body", - "body_html", - "body_version", - "created_at", - "last_edited_at", - "html_url", - "pinned", - "private", - "node_id", - "number", - "team_url", - "title", - "updated_at", - "url" - ] - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

    OK

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "write" - } - ] - } - }, - { - "serverUrl": "http(s)://HOSTNAME/api/v3", - "verb": "delete", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", - "title": "Delete a discussion", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "org", - "description": "

    The organization name. The name is not case sensitive.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "team_slug", - "description": "

    The slug of the team name.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "discussion_number", - "description": "

    The number that identifies the discussion.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "bodyParameters": [], - "descriptionHTML": "

    Delete a discussion from a team's page.

    \n

    Note

    \n

    \nYou can also specify a team by org_id and team_id using the route DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}.

    \n
    \n

    OAuth app tokens and personal access tokens (classic) need the write:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "parameters": { - "org": "ORG", - "team_slug": "TEAM_SLUG", - "discussion_number": "DISCUSSION_NUMBER" - } - }, - "response": { - "statusCode": "204", - "description": "

    Response

    " - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "204", - "description": "

    No Content

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "write" - } - ] - } - }, - { - "serverUrl": "http(s)://HOSTNAME/api/v3", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions", - "title": "List discussions (Legacy)", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "team_id", - "description": "

    The unique identifier of the team.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "direction", - "description": "

    The direction to sort the results by.

    ", - "in": "query", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "per_page", - "description": "

    The number of results per page (max 100). For more information, see \"Using pagination in the REST API.\"

    ", - "in": "query", - "schema": { - "type": "integer", - "default": 30 - } - }, - { - "name": "page", - "description": "

    The page number of the results to fetch. For more information, see \"Using pagination in the REST API.\"

    ", - "in": "query", - "schema": { - "type": "integer", - "default": 1 - } - } - ], - "bodyParameters": [], - "descriptionHTML": "

    Warning

    \n

    \nEndpoint closing down notice: This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new List discussions endpoint.

    \n
    \n

    List all discussions on a team's page.

    \n

    OAuth app tokens and personal access tokens (classic) need the read:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "parameters": { - "team_id": "TEAM_ID" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

    Response

    ", - "example": [ - { - "author": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "body": "Hi! This is an area for us to collaborate as a team.", - "body_html": "

    Hi! This is an area for us to collaborate as a team

    ", - "body_version": "0d495416a700fb06133c612575d92bfb", - "created_at": "2018-01-25T18:56:31Z", - "last_edited_at": null, - "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1", - "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==", - "number": 1, - "pinned": false, - "private": false, - "team_url": "https://api.github.com/teams/2343027", - "title": "Our first team post", - "updated_at": "2018-01-25T18:56:31Z", - "url": "https://api.github.com/teams/2343027/discussions/1", - "reactions": { - "url": "https://api.github.com/teams/2343027/discussions/1/reactions", - "total_count": 5, - "+1": 3, - "-1": 1, - "laugh": 0, - "confused": 0, - "heart": 1, - "hooray": 0, - "eyes": 1, - "rocket": 1 - } - } - ], - "schema": { - "type": "array", - "items": { - "title": "Team Discussion", - "description": "A team discussion is a persistent record of a free-form conversation within a team.", - "type": "object", - "properties": { - "author": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "format": "int64", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - }, - "user_view_type": { - "type": "string", - "examples": [ - "public" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "body": { - "description": "The main text of the discussion.", - "type": "string", - "examples": [ - "Please suggest improvements to our workflow in comments." - ] - }, - "body_html": { - "type": "string", - "examples": [ - "

    Hi! This is an area for us to collaborate as a team

    " - ] - }, - "body_version": { - "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.", - "type": "string", - "examples": [ - "0307116bbf7ced493b8d8a346c650b71" - ] - }, - "created_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "last_edited_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/orgs/github/teams/justice-league/discussions/1" - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDE0OlRlYW1EaXNjdXNzaW9uMQ==" - ] - }, - "number": { - "description": "The unique sequence number of a team discussion.", - "type": "integer", - "examples": [ - 42 - ] - }, - "pinned": { - "description": "Whether or not this discussion should be pinned for easy retrieval.", - "type": "boolean", - "examples": [ - true - ] - }, - "private": { - "description": "Whether or not this discussion should be restricted to team members and organization owners.", - "type": "boolean", - "examples": [ - true - ] - }, - "team_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027" - ] - }, - "title": { - "description": "The title of the discussion.", - "type": "string", - "examples": [ - "How can we improve our workflow?" - ] - }, - "updated_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027/discussions/1" - ] - }, - "reactions": { - "title": "Reaction Rollup", - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri" - }, - "total_count": { - "type": "integer" - }, - "+1": { - "type": "integer" - }, - "-1": { - "type": "integer" - }, - "laugh": { - "type": "integer" - }, - "confused": { - "type": "integer" - }, - "heart": { - "type": "integer" - }, - "hooray": { - "type": "integer" - }, - "eyes": { - "type": "integer" - }, - "rocket": { - "type": "integer" - } - }, - "required": [ - "url", - "total_count", - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "eyes", - "rocket" - ] - } - }, - "required": [ - "author", - "body", - "body_html", - "body_version", - "created_at", - "last_edited_at", - "html_url", - "pinned", - "private", - "node_id", - "number", - "team_url", - "title", - "updated_at", - "url" - ] - } - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

    OK

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "read" - } - ] - } - }, - { - "serverUrl": "http(s)://HOSTNAME/api/v3", - "verb": "post", - "requestPath": "/teams/{team_id}/discussions", - "title": "Create a discussion (Legacy)", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "team_id", - "description": "

    The unique identifier of the team.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "bodyParameters": [ - { - "type": "string", - "name": "title", - "in": "body", - "description": "

    The discussion post's title.

    ", - "isRequired": true - }, - { - "type": "string", - "name": "body", - "in": "body", - "description": "

    The discussion post's body text.

    ", - "isRequired": true - }, - { - "type": "boolean", - "name": "private", - "in": "body", - "description": "

    Private posts are only visible to team members, organization owners, and team maintainers. Public posts are visible to all members of the organization. Set to true to create a private post.

    ", - "default": false - } - ], - "descriptionHTML": "

    Warning

    \n

    \nEndpoint closing down notice: This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new Create a discussion endpoint.

    \n
    \n

    Creates a new discussion post on a team's page.

    \n

    This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see \"Rate limits for the API\" and \"Best practices for using the REST API.\"

    \n

    OAuth app tokens and personal access tokens (classic) need the write:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "contentType": "application/json", - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "bodyParameters": { - "title": "Our first team post", - "body": "Hi! This is an area for us to collaborate as a team." - }, - "parameters": { - "team_id": "TEAM_ID" - } - }, - "response": { - "statusCode": "201", - "contentType": "application/json", - "description": "

    Response

    ", - "example": { - "author": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "body": "Hi! This is an area for us to collaborate as a team.", - "body_html": "

    Hi! This is an area for us to collaborate as a team

    ", - "body_version": "0d495416a700fb06133c612575d92bfb", - "created_at": "2018-01-25T18:56:31Z", - "last_edited_at": null, - "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1", - "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==", - "number": 1, - "pinned": false, - "private": false, - "team_url": "https://api.github.com/teams/2343027", - "title": "Our first team post", - "updated_at": "2018-01-25T18:56:31Z", - "url": "https://api.github.com/teams/2343027/discussions/1", - "reactions": { - "url": "https://api.github.com/teams/2343027/discussions/1/reactions", - "total_count": 5, - "+1": 3, - "-1": 1, - "laugh": 0, - "confused": 0, - "heart": 1, - "hooray": 0, - "eyes": 1, - "rocket": 1 - } - }, - "schema": { - "title": "Team Discussion", - "description": "A team discussion is a persistent record of a free-form conversation within a team.", - "type": "object", - "properties": { - "author": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "format": "int64", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - }, - "user_view_type": { - "type": "string", - "examples": [ - "public" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "body": { - "description": "The main text of the discussion.", - "type": "string", - "examples": [ - "Please suggest improvements to our workflow in comments." - ] - }, - "body_html": { - "type": "string", - "examples": [ - "

    Hi! This is an area for us to collaborate as a team

    " - ] - }, - "body_version": { - "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.", - "type": "string", - "examples": [ - "0307116bbf7ced493b8d8a346c650b71" - ] - }, - "created_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "last_edited_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/orgs/github/teams/justice-league/discussions/1" - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDE0OlRlYW1EaXNjdXNzaW9uMQ==" - ] - }, - "number": { - "description": "The unique sequence number of a team discussion.", - "type": "integer", - "examples": [ - 42 - ] - }, - "pinned": { - "description": "Whether or not this discussion should be pinned for easy retrieval.", - "type": "boolean", - "examples": [ - true - ] - }, - "private": { - "description": "Whether or not this discussion should be restricted to team members and organization owners.", - "type": "boolean", - "examples": [ - true - ] - }, - "team_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027" - ] - }, - "title": { - "description": "The title of the discussion.", - "type": "string", - "examples": [ - "How can we improve our workflow?" - ] - }, - "updated_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027/discussions/1" - ] - }, - "reactions": { - "title": "Reaction Rollup", - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri" - }, - "total_count": { - "type": "integer" - }, - "+1": { - "type": "integer" - }, - "-1": { - "type": "integer" - }, - "laugh": { - "type": "integer" - }, - "confused": { - "type": "integer" - }, - "heart": { - "type": "integer" - }, - "hooray": { - "type": "integer" - }, - "eyes": { - "type": "integer" - }, - "rocket": { - "type": "integer" - } - }, - "required": [ - "url", - "total_count", - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "eyes", - "rocket" - ] - } - }, - "required": [ - "author", - "body", - "body_html", - "body_version", - "created_at", - "last_edited_at", - "html_url", - "pinned", - "private", - "node_id", - "number", - "team_url", - "title", - "updated_at", - "url" - ] - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "201", - "description": "

    Created

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "write" - } - ] - } - }, - { - "serverUrl": "http(s)://HOSTNAME/api/v3", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}", - "title": "Get a discussion (Legacy)", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "team_id", - "description": "

    The unique identifier of the team.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "discussion_number", - "description": "

    The number that identifies the discussion.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "bodyParameters": [], - "descriptionHTML": "

    Warning

    \n

    \nEndpoint closing down notice: This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new Get a discussion endpoint.

    \n
    \n

    Get a specific discussion on a team's page.

    \n

    OAuth app tokens and personal access tokens (classic) need the read:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "parameters": { - "team_id": "TEAM_ID", - "discussion_number": "DISCUSSION_NUMBER" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

    Response

    ", - "example": { - "author": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "body": "Hi! This is an area for us to collaborate as a team.", - "body_html": "

    Hi! This is an area for us to collaborate as a team

    ", - "body_version": "0d495416a700fb06133c612575d92bfb", - "created_at": "2018-01-25T18:56:31Z", - "last_edited_at": null, - "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1", - "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==", - "number": 1, - "pinned": false, - "private": false, - "team_url": "https://api.github.com/teams/2343027", - "title": "Our first team post", - "updated_at": "2018-01-25T18:56:31Z", - "url": "https://api.github.com/teams/2343027/discussions/1", - "reactions": { - "url": "https://api.github.com/teams/2343027/discussions/1/reactions", - "total_count": 5, - "+1": 3, - "-1": 1, - "laugh": 0, - "confused": 0, - "heart": 1, - "hooray": 0, - "eyes": 1, - "rocket": 1 - } - }, - "schema": { - "title": "Team Discussion", - "description": "A team discussion is a persistent record of a free-form conversation within a team.", - "type": "object", - "properties": { - "author": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "format": "int64", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - }, - "user_view_type": { - "type": "string", - "examples": [ - "public" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "body": { - "description": "The main text of the discussion.", - "type": "string", - "examples": [ - "Please suggest improvements to our workflow in comments." - ] - }, - "body_html": { - "type": "string", - "examples": [ - "

    Hi! This is an area for us to collaborate as a team

    " - ] - }, - "body_version": { - "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.", - "type": "string", - "examples": [ - "0307116bbf7ced493b8d8a346c650b71" - ] - }, - "created_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "last_edited_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/orgs/github/teams/justice-league/discussions/1" - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDE0OlRlYW1EaXNjdXNzaW9uMQ==" - ] - }, - "number": { - "description": "The unique sequence number of a team discussion.", - "type": "integer", - "examples": [ - 42 - ] - }, - "pinned": { - "description": "Whether or not this discussion should be pinned for easy retrieval.", - "type": "boolean", - "examples": [ - true - ] - }, - "private": { - "description": "Whether or not this discussion should be restricted to team members and organization owners.", - "type": "boolean", - "examples": [ - true - ] - }, - "team_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027" - ] - }, - "title": { - "description": "The title of the discussion.", - "type": "string", - "examples": [ - "How can we improve our workflow?" - ] - }, - "updated_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027/discussions/1" - ] - }, - "reactions": { - "title": "Reaction Rollup", - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri" - }, - "total_count": { - "type": "integer" - }, - "+1": { - "type": "integer" - }, - "-1": { - "type": "integer" - }, - "laugh": { - "type": "integer" - }, - "confused": { - "type": "integer" - }, - "heart": { - "type": "integer" - }, - "hooray": { - "type": "integer" - }, - "eyes": { - "type": "integer" - }, - "rocket": { - "type": "integer" - } - }, - "required": [ - "url", - "total_count", - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "eyes", - "rocket" - ] - } - }, - "required": [ - "author", - "body", - "body_html", - "body_version", - "created_at", - "last_edited_at", - "html_url", - "pinned", - "private", - "node_id", - "number", - "team_url", - "title", - "updated_at", - "url" - ] - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

    OK

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "read" - } - ] - } - }, - { - "serverUrl": "http(s)://HOSTNAME/api/v3", - "verb": "patch", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}", - "title": "Update a discussion (Legacy)", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "team_id", - "description": "

    The unique identifier of the team.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "discussion_number", - "description": "

    The number that identifies the discussion.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "bodyParameters": [ - { - "type": "string", - "name": "title", - "in": "body", - "description": "

    The discussion post's title.

    " - }, - { - "type": "string", - "name": "body", - "in": "body", - "description": "

    The discussion post's body text.

    " - } - ], - "descriptionHTML": "

    Warning

    \n

    \nEndpoint closing down notice: This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new Update a discussion endpoint.

    \n
    \n

    Edits the title and body text of a discussion post. Only the parameters you provide are updated.

    \n

    OAuth app tokens and personal access tokens (classic) need the write:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "contentType": "application/json", - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "bodyParameters": { - "title": "Welcome to our first team post" - }, - "parameters": { - "team_id": "TEAM_ID", - "discussion_number": "DISCUSSION_NUMBER" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

    Response

    ", - "example": { - "author": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "body": "Hi! This is an area for us to collaborate as a team.", - "body_html": "

    Hi! This is an area for us to collaborate as a team

    ", - "body_version": "0d495416a700fb06133c612575d92bfb", - "created_at": "2018-01-25T18:56:31Z", - "last_edited_at": "2018-01-26T18:22:20Z", - "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1", - "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==", - "number": 1, - "pinned": false, - "private": false, - "team_url": "https://api.github.com/teams/2343027", - "title": "Welcome to our first team post", - "updated_at": "2018-01-26T18:22:20Z", - "url": "https://api.github.com/teams/2343027/discussions/1", - "reactions": { - "url": "https://api.github.com/teams/2343027/discussions/1/reactions", - "total_count": 5, - "+1": 3, - "-1": 1, - "laugh": 0, - "confused": 0, - "heart": 1, - "hooray": 0, - "eyes": 1, - "rocket": 1 - } - }, - "schema": { - "title": "Team Discussion", - "description": "A team discussion is a persistent record of a free-form conversation within a team.", - "type": "object", - "properties": { - "author": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "format": "int64", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - }, - "user_view_type": { - "type": "string", - "examples": [ - "public" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "body": { - "description": "The main text of the discussion.", - "type": "string", - "examples": [ - "Please suggest improvements to our workflow in comments." - ] - }, - "body_html": { - "type": "string", - "examples": [ - "

    Hi! This is an area for us to collaborate as a team

    " - ] - }, - "body_version": { - "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.", - "type": "string", - "examples": [ - "0307116bbf7ced493b8d8a346c650b71" - ] - }, - "created_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "last_edited_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/orgs/github/teams/justice-league/discussions/1" - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDE0OlRlYW1EaXNjdXNzaW9uMQ==" - ] - }, - "number": { - "description": "The unique sequence number of a team discussion.", - "type": "integer", - "examples": [ - 42 - ] - }, - "pinned": { - "description": "Whether or not this discussion should be pinned for easy retrieval.", - "type": "boolean", - "examples": [ - true - ] - }, - "private": { - "description": "Whether or not this discussion should be restricted to team members and organization owners.", - "type": "boolean", - "examples": [ - true - ] - }, - "team_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027" - ] - }, - "title": { - "description": "The title of the discussion.", - "type": "string", - "examples": [ - "How can we improve our workflow?" - ] - }, - "updated_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027/discussions/1" - ] - }, - "reactions": { - "title": "Reaction Rollup", - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri" - }, - "total_count": { - "type": "integer" - }, - "+1": { - "type": "integer" - }, - "-1": { - "type": "integer" - }, - "laugh": { - "type": "integer" - }, - "confused": { - "type": "integer" - }, - "heart": { - "type": "integer" - }, - "hooray": { - "type": "integer" - }, - "eyes": { - "type": "integer" - }, - "rocket": { - "type": "integer" - } - }, - "required": [ - "url", - "total_count", - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "eyes", - "rocket" - ] - } - }, - "required": [ - "author", - "body", - "body_html", - "body_version", - "created_at", - "last_edited_at", - "html_url", - "pinned", - "private", - "node_id", - "number", - "team_url", - "title", - "updated_at", - "url" - ] - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

    OK

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "write" - } - ] - } - }, - { - "serverUrl": "http(s)://HOSTNAME/api/v3", - "verb": "delete", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}", - "title": "Delete a discussion (Legacy)", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "team_id", - "description": "

    The unique identifier of the team.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "discussion_number", - "description": "

    The number that identifies the discussion.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "bodyParameters": [], - "descriptionHTML": "

    Warning

    \n

    \nEndpoint closing down notice: This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new Delete a discussion endpoint.

    \n
    \n

    Delete a discussion from a team's page.

    \n

    OAuth app tokens and personal access tokens (classic) need the write:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "parameters": { - "team_id": "TEAM_ID", - "discussion_number": "DISCUSSION_NUMBER" - } - }, - "response": { - "statusCode": "204", - "description": "

    Response

    " - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "204", - "description": "

    No Content

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "write" - } - ] - } - } - ], "external-groups": [ { "serverUrl": "http(s)://HOSTNAME/api/v3", diff --git a/src/rest/data/ghes-3.19-2022-11-28/schema.json b/src/rest/data/ghes-3.19-2022-11-28/schema.json index b3696db13787..5eb60c5c02c2 100644 --- a/src/rest/data/ghes-3.19-2022-11-28/schema.json +++ b/src/rest/data/ghes-3.19-2022-11-28/schema.json @@ -738389,3973 +738389,6 @@ } } ], - "discussions": [ - { - "serverUrl": "http(s)://HOSTNAME/api/v3", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions", - "title": "List discussions", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "org", - "description": "

    The organization name. The name is not case sensitive.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "team_slug", - "description": "

    The slug of the team name.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "direction", - "description": "

    The direction to sort the results by.

    ", - "in": "query", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "per_page", - "description": "

    The number of results per page (max 100). For more information, see \"Using pagination in the REST API.\"

    ", - "in": "query", - "schema": { - "type": "integer", - "default": 30 - } - }, - { - "name": "page", - "description": "

    The page number of the results to fetch. For more information, see \"Using pagination in the REST API.\"

    ", - "in": "query", - "schema": { - "type": "integer", - "default": 1 - } - }, - { - "name": "pinned", - "in": "query", - "required": false, - "description": "

    Pinned discussions only filter

    ", - "schema": { - "type": "string" - } - } - ], - "bodyParameters": [], - "descriptionHTML": "

    List all discussions on a team's page.

    \n

    Note

    \n

    \nYou can also specify a team by org_id and team_id using the route GET /organizations/{org_id}/team/{team_id}/discussions.

    \n
    \n

    OAuth app tokens and personal access tokens (classic) need the read:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "parameters": { - "org": "ORG", - "team_slug": "TEAM_SLUG" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

    Response

    ", - "example": [ - { - "author": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "body": "Hi! This is an area for us to collaborate as a team.", - "body_html": "

    Hi! This is an area for us to collaborate as a team

    ", - "body_version": "0d495416a700fb06133c612575d92bfb", - "created_at": "2018-01-25T18:56:31Z", - "last_edited_at": null, - "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1", - "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==", - "number": 1, - "pinned": false, - "private": false, - "team_url": "https://api.github.com/teams/2343027", - "title": "Our first team post", - "updated_at": "2018-01-25T18:56:31Z", - "url": "https://api.github.com/teams/2343027/discussions/1", - "reactions": { - "url": "https://api.github.com/teams/2343027/discussions/1/reactions", - "total_count": 5, - "+1": 3, - "-1": 1, - "laugh": 0, - "confused": 0, - "heart": 1, - "hooray": 0, - "eyes": 1, - "rocket": 1 - } - } - ], - "schema": { - "type": "array", - "items": { - "title": "Team Discussion", - "description": "A team discussion is a persistent record of a free-form conversation within a team.", - "type": "object", - "properties": { - "author": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "format": "int64", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - }, - "user_view_type": { - "type": "string", - "examples": [ - "public" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "body": { - "description": "The main text of the discussion.", - "type": "string", - "examples": [ - "Please suggest improvements to our workflow in comments." - ] - }, - "body_html": { - "type": "string", - "examples": [ - "

    Hi! This is an area for us to collaborate as a team

    " - ] - }, - "body_version": { - "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.", - "type": "string", - "examples": [ - "0307116bbf7ced493b8d8a346c650b71" - ] - }, - "created_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "last_edited_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/orgs/github/teams/justice-league/discussions/1" - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDE0OlRlYW1EaXNjdXNzaW9uMQ==" - ] - }, - "number": { - "description": "The unique sequence number of a team discussion.", - "type": "integer", - "examples": [ - 42 - ] - }, - "pinned": { - "description": "Whether or not this discussion should be pinned for easy retrieval.", - "type": "boolean", - "examples": [ - true - ] - }, - "private": { - "description": "Whether or not this discussion should be restricted to team members and organization owners.", - "type": "boolean", - "examples": [ - true - ] - }, - "team_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027" - ] - }, - "title": { - "description": "The title of the discussion.", - "type": "string", - "examples": [ - "How can we improve our workflow?" - ] - }, - "updated_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027/discussions/1" - ] - }, - "reactions": { - "title": "Reaction Rollup", - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri" - }, - "total_count": { - "type": "integer" - }, - "+1": { - "type": "integer" - }, - "-1": { - "type": "integer" - }, - "laugh": { - "type": "integer" - }, - "confused": { - "type": "integer" - }, - "heart": { - "type": "integer" - }, - "hooray": { - "type": "integer" - }, - "eyes": { - "type": "integer" - }, - "rocket": { - "type": "integer" - } - }, - "required": [ - "url", - "total_count", - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "eyes", - "rocket" - ] - } - }, - "required": [ - "author", - "body", - "body_html", - "body_version", - "created_at", - "last_edited_at", - "html_url", - "pinned", - "private", - "node_id", - "number", - "team_url", - "title", - "updated_at", - "url" - ] - } - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

    OK

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "read" - } - ] - } - }, - { - "serverUrl": "http(s)://HOSTNAME/api/v3", - "verb": "post", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions", - "title": "Create a discussion", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "org", - "description": "

    The organization name. The name is not case sensitive.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "team_slug", - "description": "

    The slug of the team name.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - } - ], - "bodyParameters": [ - { - "type": "string", - "name": "title", - "in": "body", - "description": "

    The discussion post's title.

    ", - "isRequired": true - }, - { - "type": "string", - "name": "body", - "in": "body", - "description": "

    The discussion post's body text.

    ", - "isRequired": true - }, - { - "type": "boolean", - "name": "private", - "in": "body", - "description": "

    Private posts are only visible to team members, organization owners, and team maintainers. Public posts are visible to all members of the organization. Set to true to create a private post.

    ", - "default": false - } - ], - "descriptionHTML": "

    Creates a new discussion post on a team's page.

    \n

    This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see \"Rate limits for the API\" and \"Best practices for using the REST API.\"

    \n

    Note

    \n

    \nYou can also specify a team by org_id and team_id using the route POST /organizations/{org_id}/team/{team_id}/discussions.

    \n
    \n

    OAuth app tokens and personal access tokens (classic) need the write:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "contentType": "application/json", - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "bodyParameters": { - "title": "Our first team post", - "body": "Hi! This is an area for us to collaborate as a team." - }, - "parameters": { - "org": "ORG", - "team_slug": "TEAM_SLUG" - } - }, - "response": { - "statusCode": "201", - "contentType": "application/json", - "description": "

    Response

    ", - "example": { - "author": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "body": "Hi! This is an area for us to collaborate as a team.", - "body_html": "

    Hi! This is an area for us to collaborate as a team

    ", - "body_version": "0d495416a700fb06133c612575d92bfb", - "created_at": "2018-01-25T18:56:31Z", - "last_edited_at": null, - "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1", - "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==", - "number": 1, - "pinned": false, - "private": false, - "team_url": "https://api.github.com/teams/2343027", - "title": "Our first team post", - "updated_at": "2018-01-25T18:56:31Z", - "url": "https://api.github.com/teams/2343027/discussions/1", - "reactions": { - "url": "https://api.github.com/teams/2343027/discussions/1/reactions", - "total_count": 5, - "+1": 3, - "-1": 1, - "laugh": 0, - "confused": 0, - "heart": 1, - "hooray": 0, - "eyes": 1, - "rocket": 1 - } - }, - "schema": { - "title": "Team Discussion", - "description": "A team discussion is a persistent record of a free-form conversation within a team.", - "type": "object", - "properties": { - "author": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "format": "int64", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - }, - "user_view_type": { - "type": "string", - "examples": [ - "public" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "body": { - "description": "The main text of the discussion.", - "type": "string", - "examples": [ - "Please suggest improvements to our workflow in comments." - ] - }, - "body_html": { - "type": "string", - "examples": [ - "

    Hi! This is an area for us to collaborate as a team

    " - ] - }, - "body_version": { - "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.", - "type": "string", - "examples": [ - "0307116bbf7ced493b8d8a346c650b71" - ] - }, - "created_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "last_edited_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/orgs/github/teams/justice-league/discussions/1" - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDE0OlRlYW1EaXNjdXNzaW9uMQ==" - ] - }, - "number": { - "description": "The unique sequence number of a team discussion.", - "type": "integer", - "examples": [ - 42 - ] - }, - "pinned": { - "description": "Whether or not this discussion should be pinned for easy retrieval.", - "type": "boolean", - "examples": [ - true - ] - }, - "private": { - "description": "Whether or not this discussion should be restricted to team members and organization owners.", - "type": "boolean", - "examples": [ - true - ] - }, - "team_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027" - ] - }, - "title": { - "description": "The title of the discussion.", - "type": "string", - "examples": [ - "How can we improve our workflow?" - ] - }, - "updated_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027/discussions/1" - ] - }, - "reactions": { - "title": "Reaction Rollup", - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri" - }, - "total_count": { - "type": "integer" - }, - "+1": { - "type": "integer" - }, - "-1": { - "type": "integer" - }, - "laugh": { - "type": "integer" - }, - "confused": { - "type": "integer" - }, - "heart": { - "type": "integer" - }, - "hooray": { - "type": "integer" - }, - "eyes": { - "type": "integer" - }, - "rocket": { - "type": "integer" - } - }, - "required": [ - "url", - "total_count", - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "eyes", - "rocket" - ] - } - }, - "required": [ - "author", - "body", - "body_html", - "body_version", - "created_at", - "last_edited_at", - "html_url", - "pinned", - "private", - "node_id", - "number", - "team_url", - "title", - "updated_at", - "url" - ] - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "201", - "description": "

    Created

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "write" - } - ] - } - }, - { - "serverUrl": "http(s)://HOSTNAME/api/v3", - "verb": "get", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", - "title": "Get a discussion", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "org", - "description": "

    The organization name. The name is not case sensitive.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "team_slug", - "description": "

    The slug of the team name.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "discussion_number", - "description": "

    The number that identifies the discussion.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "bodyParameters": [], - "descriptionHTML": "

    Get a specific discussion on a team's page.

    \n

    Note

    \n

    \nYou can also specify a team by org_id and team_id using the route GET /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}.

    \n
    \n

    OAuth app tokens and personal access tokens (classic) need the read:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "parameters": { - "org": "ORG", - "team_slug": "TEAM_SLUG", - "discussion_number": "DISCUSSION_NUMBER" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

    Response

    ", - "example": { - "author": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "body": "Hi! This is an area for us to collaborate as a team.", - "body_html": "

    Hi! This is an area for us to collaborate as a team

    ", - "body_version": "0d495416a700fb06133c612575d92bfb", - "created_at": "2018-01-25T18:56:31Z", - "last_edited_at": null, - "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1", - "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==", - "number": 1, - "pinned": false, - "private": false, - "team_url": "https://api.github.com/teams/2343027", - "title": "Our first team post", - "updated_at": "2018-01-25T18:56:31Z", - "url": "https://api.github.com/teams/2343027/discussions/1", - "reactions": { - "url": "https://api.github.com/teams/2343027/discussions/1/reactions", - "total_count": 5, - "+1": 3, - "-1": 1, - "laugh": 0, - "confused": 0, - "heart": 1, - "hooray": 0, - "eyes": 1, - "rocket": 1 - } - }, - "schema": { - "title": "Team Discussion", - "description": "A team discussion is a persistent record of a free-form conversation within a team.", - "type": "object", - "properties": { - "author": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "format": "int64", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - }, - "user_view_type": { - "type": "string", - "examples": [ - "public" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "body": { - "description": "The main text of the discussion.", - "type": "string", - "examples": [ - "Please suggest improvements to our workflow in comments." - ] - }, - "body_html": { - "type": "string", - "examples": [ - "

    Hi! This is an area for us to collaborate as a team

    " - ] - }, - "body_version": { - "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.", - "type": "string", - "examples": [ - "0307116bbf7ced493b8d8a346c650b71" - ] - }, - "created_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "last_edited_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/orgs/github/teams/justice-league/discussions/1" - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDE0OlRlYW1EaXNjdXNzaW9uMQ==" - ] - }, - "number": { - "description": "The unique sequence number of a team discussion.", - "type": "integer", - "examples": [ - 42 - ] - }, - "pinned": { - "description": "Whether or not this discussion should be pinned for easy retrieval.", - "type": "boolean", - "examples": [ - true - ] - }, - "private": { - "description": "Whether or not this discussion should be restricted to team members and organization owners.", - "type": "boolean", - "examples": [ - true - ] - }, - "team_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027" - ] - }, - "title": { - "description": "The title of the discussion.", - "type": "string", - "examples": [ - "How can we improve our workflow?" - ] - }, - "updated_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027/discussions/1" - ] - }, - "reactions": { - "title": "Reaction Rollup", - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri" - }, - "total_count": { - "type": "integer" - }, - "+1": { - "type": "integer" - }, - "-1": { - "type": "integer" - }, - "laugh": { - "type": "integer" - }, - "confused": { - "type": "integer" - }, - "heart": { - "type": "integer" - }, - "hooray": { - "type": "integer" - }, - "eyes": { - "type": "integer" - }, - "rocket": { - "type": "integer" - } - }, - "required": [ - "url", - "total_count", - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "eyes", - "rocket" - ] - } - }, - "required": [ - "author", - "body", - "body_html", - "body_version", - "created_at", - "last_edited_at", - "html_url", - "pinned", - "private", - "node_id", - "number", - "team_url", - "title", - "updated_at", - "url" - ] - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

    OK

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "read" - } - ] - } - }, - { - "serverUrl": "http(s)://HOSTNAME/api/v3", - "verb": "patch", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", - "title": "Update a discussion", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "org", - "description": "

    The organization name. The name is not case sensitive.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "team_slug", - "description": "

    The slug of the team name.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "discussion_number", - "description": "

    The number that identifies the discussion.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "bodyParameters": [ - { - "type": "string", - "name": "title", - "in": "body", - "description": "

    The discussion post's title.

    " - }, - { - "type": "string", - "name": "body", - "in": "body", - "description": "

    The discussion post's body text.

    " - } - ], - "descriptionHTML": "

    Edits the title and body text of a discussion post. Only the parameters you provide are updated.

    \n

    Note

    \n

    \nYou can also specify a team by org_id and team_id using the route PATCH /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}.

    \n
    \n

    OAuth app tokens and personal access tokens (classic) need the write:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "contentType": "application/json", - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "bodyParameters": { - "title": "Welcome to our first team post" - }, - "parameters": { - "org": "ORG", - "team_slug": "TEAM_SLUG", - "discussion_number": "DISCUSSION_NUMBER" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

    Response

    ", - "example": { - "author": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "body": "Hi! This is an area for us to collaborate as a team.", - "body_html": "

    Hi! This is an area for us to collaborate as a team

    ", - "body_version": "0d495416a700fb06133c612575d92bfb", - "created_at": "2018-01-25T18:56:31Z", - "last_edited_at": "2018-01-26T18:22:20Z", - "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1", - "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==", - "number": 1, - "pinned": false, - "private": false, - "team_url": "https://api.github.com/teams/2343027", - "title": "Welcome to our first team post", - "updated_at": "2018-01-26T18:22:20Z", - "url": "https://api.github.com/teams/2343027/discussions/1", - "reactions": { - "url": "https://api.github.com/teams/2343027/discussions/1/reactions", - "total_count": 5, - "+1": 3, - "-1": 1, - "laugh": 0, - "confused": 0, - "heart": 1, - "hooray": 0, - "eyes": 1, - "rocket": 1 - } - }, - "schema": { - "title": "Team Discussion", - "description": "A team discussion is a persistent record of a free-form conversation within a team.", - "type": "object", - "properties": { - "author": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "format": "int64", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - }, - "user_view_type": { - "type": "string", - "examples": [ - "public" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "body": { - "description": "The main text of the discussion.", - "type": "string", - "examples": [ - "Please suggest improvements to our workflow in comments." - ] - }, - "body_html": { - "type": "string", - "examples": [ - "

    Hi! This is an area for us to collaborate as a team

    " - ] - }, - "body_version": { - "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.", - "type": "string", - "examples": [ - "0307116bbf7ced493b8d8a346c650b71" - ] - }, - "created_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "last_edited_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/orgs/github/teams/justice-league/discussions/1" - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDE0OlRlYW1EaXNjdXNzaW9uMQ==" - ] - }, - "number": { - "description": "The unique sequence number of a team discussion.", - "type": "integer", - "examples": [ - 42 - ] - }, - "pinned": { - "description": "Whether or not this discussion should be pinned for easy retrieval.", - "type": "boolean", - "examples": [ - true - ] - }, - "private": { - "description": "Whether or not this discussion should be restricted to team members and organization owners.", - "type": "boolean", - "examples": [ - true - ] - }, - "team_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027" - ] - }, - "title": { - "description": "The title of the discussion.", - "type": "string", - "examples": [ - "How can we improve our workflow?" - ] - }, - "updated_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027/discussions/1" - ] - }, - "reactions": { - "title": "Reaction Rollup", - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri" - }, - "total_count": { - "type": "integer" - }, - "+1": { - "type": "integer" - }, - "-1": { - "type": "integer" - }, - "laugh": { - "type": "integer" - }, - "confused": { - "type": "integer" - }, - "heart": { - "type": "integer" - }, - "hooray": { - "type": "integer" - }, - "eyes": { - "type": "integer" - }, - "rocket": { - "type": "integer" - } - }, - "required": [ - "url", - "total_count", - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "eyes", - "rocket" - ] - } - }, - "required": [ - "author", - "body", - "body_html", - "body_version", - "created_at", - "last_edited_at", - "html_url", - "pinned", - "private", - "node_id", - "number", - "team_url", - "title", - "updated_at", - "url" - ] - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

    OK

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "write" - } - ] - } - }, - { - "serverUrl": "http(s)://HOSTNAME/api/v3", - "verb": "delete", - "requestPath": "/orgs/{org}/teams/{team_slug}/discussions/{discussion_number}", - "title": "Delete a discussion", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "org", - "description": "

    The organization name. The name is not case sensitive.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "team_slug", - "description": "

    The slug of the team name.

    ", - "in": "path", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "discussion_number", - "description": "

    The number that identifies the discussion.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "bodyParameters": [], - "descriptionHTML": "

    Delete a discussion from a team's page.

    \n

    Note

    \n

    \nYou can also specify a team by org_id and team_id using the route DELETE /organizations/{org_id}/team/{team_id}/discussions/{discussion_number}.

    \n
    \n

    OAuth app tokens and personal access tokens (classic) need the write:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "parameters": { - "org": "ORG", - "team_slug": "TEAM_SLUG", - "discussion_number": "DISCUSSION_NUMBER" - } - }, - "response": { - "statusCode": "204", - "description": "

    Response

    " - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "204", - "description": "

    No Content

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "write" - } - ] - } - }, - { - "serverUrl": "http(s)://HOSTNAME/api/v3", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions", - "title": "List discussions (Legacy)", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "team_id", - "description": "

    The unique identifier of the team.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "direction", - "description": "

    The direction to sort the results by.

    ", - "in": "query", - "required": false, - "schema": { - "type": "string", - "enum": [ - "asc", - "desc" - ], - "default": "desc" - } - }, - { - "name": "per_page", - "description": "

    The number of results per page (max 100). For more information, see \"Using pagination in the REST API.\"

    ", - "in": "query", - "schema": { - "type": "integer", - "default": 30 - } - }, - { - "name": "page", - "description": "

    The page number of the results to fetch. For more information, see \"Using pagination in the REST API.\"

    ", - "in": "query", - "schema": { - "type": "integer", - "default": 1 - } - } - ], - "bodyParameters": [], - "descriptionHTML": "

    Warning

    \n

    \nEndpoint closing down notice: This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new List discussions endpoint.

    \n
    \n

    List all discussions on a team's page.

    \n

    OAuth app tokens and personal access tokens (classic) need the read:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "parameters": { - "team_id": "TEAM_ID" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

    Response

    ", - "example": [ - { - "author": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "body": "Hi! This is an area for us to collaborate as a team.", - "body_html": "

    Hi! This is an area for us to collaborate as a team

    ", - "body_version": "0d495416a700fb06133c612575d92bfb", - "created_at": "2018-01-25T18:56:31Z", - "last_edited_at": null, - "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1", - "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==", - "number": 1, - "pinned": false, - "private": false, - "team_url": "https://api.github.com/teams/2343027", - "title": "Our first team post", - "updated_at": "2018-01-25T18:56:31Z", - "url": "https://api.github.com/teams/2343027/discussions/1", - "reactions": { - "url": "https://api.github.com/teams/2343027/discussions/1/reactions", - "total_count": 5, - "+1": 3, - "-1": 1, - "laugh": 0, - "confused": 0, - "heart": 1, - "hooray": 0, - "eyes": 1, - "rocket": 1 - } - } - ], - "schema": { - "type": "array", - "items": { - "title": "Team Discussion", - "description": "A team discussion is a persistent record of a free-form conversation within a team.", - "type": "object", - "properties": { - "author": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "format": "int64", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - }, - "user_view_type": { - "type": "string", - "examples": [ - "public" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "body": { - "description": "The main text of the discussion.", - "type": "string", - "examples": [ - "Please suggest improvements to our workflow in comments." - ] - }, - "body_html": { - "type": "string", - "examples": [ - "

    Hi! This is an area for us to collaborate as a team

    " - ] - }, - "body_version": { - "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.", - "type": "string", - "examples": [ - "0307116bbf7ced493b8d8a346c650b71" - ] - }, - "created_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "last_edited_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/orgs/github/teams/justice-league/discussions/1" - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDE0OlRlYW1EaXNjdXNzaW9uMQ==" - ] - }, - "number": { - "description": "The unique sequence number of a team discussion.", - "type": "integer", - "examples": [ - 42 - ] - }, - "pinned": { - "description": "Whether or not this discussion should be pinned for easy retrieval.", - "type": "boolean", - "examples": [ - true - ] - }, - "private": { - "description": "Whether or not this discussion should be restricted to team members and organization owners.", - "type": "boolean", - "examples": [ - true - ] - }, - "team_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027" - ] - }, - "title": { - "description": "The title of the discussion.", - "type": "string", - "examples": [ - "How can we improve our workflow?" - ] - }, - "updated_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027/discussions/1" - ] - }, - "reactions": { - "title": "Reaction Rollup", - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri" - }, - "total_count": { - "type": "integer" - }, - "+1": { - "type": "integer" - }, - "-1": { - "type": "integer" - }, - "laugh": { - "type": "integer" - }, - "confused": { - "type": "integer" - }, - "heart": { - "type": "integer" - }, - "hooray": { - "type": "integer" - }, - "eyes": { - "type": "integer" - }, - "rocket": { - "type": "integer" - } - }, - "required": [ - "url", - "total_count", - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "eyes", - "rocket" - ] - } - }, - "required": [ - "author", - "body", - "body_html", - "body_version", - "created_at", - "last_edited_at", - "html_url", - "pinned", - "private", - "node_id", - "number", - "team_url", - "title", - "updated_at", - "url" - ] - } - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

    OK

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "read" - } - ] - } - }, - { - "serverUrl": "http(s)://HOSTNAME/api/v3", - "verb": "post", - "requestPath": "/teams/{team_id}/discussions", - "title": "Create a discussion (Legacy)", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "team_id", - "description": "

    The unique identifier of the team.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "bodyParameters": [ - { - "type": "string", - "name": "title", - "in": "body", - "description": "

    The discussion post's title.

    ", - "isRequired": true - }, - { - "type": "string", - "name": "body", - "in": "body", - "description": "

    The discussion post's body text.

    ", - "isRequired": true - }, - { - "type": "boolean", - "name": "private", - "in": "body", - "description": "

    Private posts are only visible to team members, organization owners, and team maintainers. Public posts are visible to all members of the organization. Set to true to create a private post.

    ", - "default": false - } - ], - "descriptionHTML": "

    Warning

    \n

    \nEndpoint closing down notice: This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new Create a discussion endpoint.

    \n
    \n

    Creates a new discussion post on a team's page.

    \n

    This endpoint triggers notifications. Creating content too quickly using this endpoint may result in secondary rate limiting. For more information, see \"Rate limits for the API\" and \"Best practices for using the REST API.\"

    \n

    OAuth app tokens and personal access tokens (classic) need the write:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "contentType": "application/json", - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "bodyParameters": { - "title": "Our first team post", - "body": "Hi! This is an area for us to collaborate as a team." - }, - "parameters": { - "team_id": "TEAM_ID" - } - }, - "response": { - "statusCode": "201", - "contentType": "application/json", - "description": "

    Response

    ", - "example": { - "author": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "body": "Hi! This is an area for us to collaborate as a team.", - "body_html": "

    Hi! This is an area for us to collaborate as a team

    ", - "body_version": "0d495416a700fb06133c612575d92bfb", - "created_at": "2018-01-25T18:56:31Z", - "last_edited_at": null, - "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1", - "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==", - "number": 1, - "pinned": false, - "private": false, - "team_url": "https://api.github.com/teams/2343027", - "title": "Our first team post", - "updated_at": "2018-01-25T18:56:31Z", - "url": "https://api.github.com/teams/2343027/discussions/1", - "reactions": { - "url": "https://api.github.com/teams/2343027/discussions/1/reactions", - "total_count": 5, - "+1": 3, - "-1": 1, - "laugh": 0, - "confused": 0, - "heart": 1, - "hooray": 0, - "eyes": 1, - "rocket": 1 - } - }, - "schema": { - "title": "Team Discussion", - "description": "A team discussion is a persistent record of a free-form conversation within a team.", - "type": "object", - "properties": { - "author": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "format": "int64", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - }, - "user_view_type": { - "type": "string", - "examples": [ - "public" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "body": { - "description": "The main text of the discussion.", - "type": "string", - "examples": [ - "Please suggest improvements to our workflow in comments." - ] - }, - "body_html": { - "type": "string", - "examples": [ - "

    Hi! This is an area for us to collaborate as a team

    " - ] - }, - "body_version": { - "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.", - "type": "string", - "examples": [ - "0307116bbf7ced493b8d8a346c650b71" - ] - }, - "created_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "last_edited_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/orgs/github/teams/justice-league/discussions/1" - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDE0OlRlYW1EaXNjdXNzaW9uMQ==" - ] - }, - "number": { - "description": "The unique sequence number of a team discussion.", - "type": "integer", - "examples": [ - 42 - ] - }, - "pinned": { - "description": "Whether or not this discussion should be pinned for easy retrieval.", - "type": "boolean", - "examples": [ - true - ] - }, - "private": { - "description": "Whether or not this discussion should be restricted to team members and organization owners.", - "type": "boolean", - "examples": [ - true - ] - }, - "team_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027" - ] - }, - "title": { - "description": "The title of the discussion.", - "type": "string", - "examples": [ - "How can we improve our workflow?" - ] - }, - "updated_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027/discussions/1" - ] - }, - "reactions": { - "title": "Reaction Rollup", - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri" - }, - "total_count": { - "type": "integer" - }, - "+1": { - "type": "integer" - }, - "-1": { - "type": "integer" - }, - "laugh": { - "type": "integer" - }, - "confused": { - "type": "integer" - }, - "heart": { - "type": "integer" - }, - "hooray": { - "type": "integer" - }, - "eyes": { - "type": "integer" - }, - "rocket": { - "type": "integer" - } - }, - "required": [ - "url", - "total_count", - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "eyes", - "rocket" - ] - } - }, - "required": [ - "author", - "body", - "body_html", - "body_version", - "created_at", - "last_edited_at", - "html_url", - "pinned", - "private", - "node_id", - "number", - "team_url", - "title", - "updated_at", - "url" - ] - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "201", - "description": "

    Created

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "write" - } - ] - } - }, - { - "serverUrl": "http(s)://HOSTNAME/api/v3", - "verb": "get", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}", - "title": "Get a discussion (Legacy)", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "team_id", - "description": "

    The unique identifier of the team.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "discussion_number", - "description": "

    The number that identifies the discussion.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "bodyParameters": [], - "descriptionHTML": "

    Warning

    \n

    \nEndpoint closing down notice: This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new Get a discussion endpoint.

    \n
    \n

    Get a specific discussion on a team's page.

    \n

    OAuth app tokens and personal access tokens (classic) need the read:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "parameters": { - "team_id": "TEAM_ID", - "discussion_number": "DISCUSSION_NUMBER" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

    Response

    ", - "example": { - "author": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "body": "Hi! This is an area for us to collaborate as a team.", - "body_html": "

    Hi! This is an area for us to collaborate as a team

    ", - "body_version": "0d495416a700fb06133c612575d92bfb", - "created_at": "2018-01-25T18:56:31Z", - "last_edited_at": null, - "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1", - "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==", - "number": 1, - "pinned": false, - "private": false, - "team_url": "https://api.github.com/teams/2343027", - "title": "Our first team post", - "updated_at": "2018-01-25T18:56:31Z", - "url": "https://api.github.com/teams/2343027/discussions/1", - "reactions": { - "url": "https://api.github.com/teams/2343027/discussions/1/reactions", - "total_count": 5, - "+1": 3, - "-1": 1, - "laugh": 0, - "confused": 0, - "heart": 1, - "hooray": 0, - "eyes": 1, - "rocket": 1 - } - }, - "schema": { - "title": "Team Discussion", - "description": "A team discussion is a persistent record of a free-form conversation within a team.", - "type": "object", - "properties": { - "author": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "format": "int64", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - }, - "user_view_type": { - "type": "string", - "examples": [ - "public" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "body": { - "description": "The main text of the discussion.", - "type": "string", - "examples": [ - "Please suggest improvements to our workflow in comments." - ] - }, - "body_html": { - "type": "string", - "examples": [ - "

    Hi! This is an area for us to collaborate as a team

    " - ] - }, - "body_version": { - "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.", - "type": "string", - "examples": [ - "0307116bbf7ced493b8d8a346c650b71" - ] - }, - "created_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "last_edited_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/orgs/github/teams/justice-league/discussions/1" - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDE0OlRlYW1EaXNjdXNzaW9uMQ==" - ] - }, - "number": { - "description": "The unique sequence number of a team discussion.", - "type": "integer", - "examples": [ - 42 - ] - }, - "pinned": { - "description": "Whether or not this discussion should be pinned for easy retrieval.", - "type": "boolean", - "examples": [ - true - ] - }, - "private": { - "description": "Whether or not this discussion should be restricted to team members and organization owners.", - "type": "boolean", - "examples": [ - true - ] - }, - "team_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027" - ] - }, - "title": { - "description": "The title of the discussion.", - "type": "string", - "examples": [ - "How can we improve our workflow?" - ] - }, - "updated_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027/discussions/1" - ] - }, - "reactions": { - "title": "Reaction Rollup", - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri" - }, - "total_count": { - "type": "integer" - }, - "+1": { - "type": "integer" - }, - "-1": { - "type": "integer" - }, - "laugh": { - "type": "integer" - }, - "confused": { - "type": "integer" - }, - "heart": { - "type": "integer" - }, - "hooray": { - "type": "integer" - }, - "eyes": { - "type": "integer" - }, - "rocket": { - "type": "integer" - } - }, - "required": [ - "url", - "total_count", - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "eyes", - "rocket" - ] - } - }, - "required": [ - "author", - "body", - "body_html", - "body_version", - "created_at", - "last_edited_at", - "html_url", - "pinned", - "private", - "node_id", - "number", - "team_url", - "title", - "updated_at", - "url" - ] - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

    OK

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "read" - } - ] - } - }, - { - "serverUrl": "http(s)://HOSTNAME/api/v3", - "verb": "patch", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}", - "title": "Update a discussion (Legacy)", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "team_id", - "description": "

    The unique identifier of the team.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "discussion_number", - "description": "

    The number that identifies the discussion.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "bodyParameters": [ - { - "type": "string", - "name": "title", - "in": "body", - "description": "

    The discussion post's title.

    " - }, - { - "type": "string", - "name": "body", - "in": "body", - "description": "

    The discussion post's body text.

    " - } - ], - "descriptionHTML": "

    Warning

    \n

    \nEndpoint closing down notice: This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new Update a discussion endpoint.

    \n
    \n

    Edits the title and body text of a discussion post. Only the parameters you provide are updated.

    \n

    OAuth app tokens and personal access tokens (classic) need the write:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "contentType": "application/json", - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "bodyParameters": { - "title": "Welcome to our first team post" - }, - "parameters": { - "team_id": "TEAM_ID", - "discussion_number": "DISCUSSION_NUMBER" - } - }, - "response": { - "statusCode": "200", - "contentType": "application/json", - "description": "

    Response

    ", - "example": { - "author": { - "login": "octocat", - "id": 1, - "node_id": "MDQ6VXNlcjE=", - "avatar_url": "https://github.com/images/error/octocat_happy.gif", - "gravatar_id": "", - "url": "https://api.github.com/users/octocat", - "html_url": "https://github.com/octocat", - "followers_url": "https://api.github.com/users/octocat/followers", - "following_url": "https://api.github.com/users/octocat/following{/other_user}", - "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}", - "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}", - "subscriptions_url": "https://api.github.com/users/octocat/subscriptions", - "organizations_url": "https://api.github.com/users/octocat/orgs", - "repos_url": "https://api.github.com/users/octocat/repos", - "events_url": "https://api.github.com/users/octocat/events{/privacy}", - "received_events_url": "https://api.github.com/users/octocat/received_events", - "type": "User", - "site_admin": false - }, - "body": "Hi! This is an area for us to collaborate as a team.", - "body_html": "

    Hi! This is an area for us to collaborate as a team

    ", - "body_version": "0d495416a700fb06133c612575d92bfb", - "created_at": "2018-01-25T18:56:31Z", - "last_edited_at": "2018-01-26T18:22:20Z", - "html_url": "https://github.com/orgs/github/teams/justice-league/discussions/1", - "node_id": "MDE0OlRlYW1EaXNjdXNzaW9uMQ==", - "number": 1, - "pinned": false, - "private": false, - "team_url": "https://api.github.com/teams/2343027", - "title": "Welcome to our first team post", - "updated_at": "2018-01-26T18:22:20Z", - "url": "https://api.github.com/teams/2343027/discussions/1", - "reactions": { - "url": "https://api.github.com/teams/2343027/discussions/1/reactions", - "total_count": 5, - "+1": 3, - "-1": 1, - "laugh": 0, - "confused": 0, - "heart": 1, - "hooray": 0, - "eyes": 1, - "rocket": 1 - } - }, - "schema": { - "title": "Team Discussion", - "description": "A team discussion is a persistent record of a free-form conversation within a team.", - "type": "object", - "properties": { - "author": { - "anyOf": [ - { - "type": "null" - }, - { - "title": "Simple User", - "description": "A GitHub user.", - "type": "object", - "properties": { - "name": { - "type": [ - "string", - "null" - ] - }, - "email": { - "type": [ - "string", - "null" - ] - }, - "login": { - "type": "string", - "examples": [ - "octocat" - ] - }, - "id": { - "type": "integer", - "format": "int64", - "examples": [ - 1 - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDQ6VXNlcjE=" - ] - }, - "avatar_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/images/error/octocat_happy.gif" - ] - }, - "gravatar_id": { - "type": [ - "string", - "null" - ], - "examples": [ - "41d064eb2195891e12d0413f63227ea7" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat" - ] - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/octocat" - ] - }, - "followers_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/followers" - ] - }, - "following_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/following{/other_user}" - ] - }, - "gists_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/gists{/gist_id}" - ] - }, - "starred_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/starred{/owner}{/repo}" - ] - }, - "subscriptions_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/subscriptions" - ] - }, - "organizations_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/orgs" - ] - }, - "repos_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/repos" - ] - }, - "events_url": { - "type": "string", - "examples": [ - "https://api.github.com/users/octocat/events{/privacy}" - ] - }, - "received_events_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/users/octocat/received_events" - ] - }, - "type": { - "type": "string", - "examples": [ - "User" - ] - }, - "site_admin": { - "type": "boolean" - }, - "starred_at": { - "type": "string", - "examples": [ - "\"2020-07-09T00:17:55Z\"" - ] - }, - "user_view_type": { - "type": "string", - "examples": [ - "public" - ] - } - }, - "required": [ - "avatar_url", - "events_url", - "followers_url", - "following_url", - "gists_url", - "gravatar_id", - "html_url", - "id", - "node_id", - "login", - "organizations_url", - "received_events_url", - "repos_url", - "site_admin", - "starred_url", - "subscriptions_url", - "type", - "url" - ] - } - ] - }, - "body": { - "description": "The main text of the discussion.", - "type": "string", - "examples": [ - "Please suggest improvements to our workflow in comments." - ] - }, - "body_html": { - "type": "string", - "examples": [ - "

    Hi! This is an area for us to collaborate as a team

    " - ] - }, - "body_version": { - "description": "The current version of the body content. If provided, this update operation will be rejected if the given version does not match the latest version on the server.", - "type": "string", - "examples": [ - "0307116bbf7ced493b8d8a346c650b71" - ] - }, - "created_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "last_edited_at": { - "type": [ - "string", - "null" - ], - "format": "date-time" - }, - "html_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://github.com/orgs/github/teams/justice-league/discussions/1" - ] - }, - "node_id": { - "type": "string", - "examples": [ - "MDE0OlRlYW1EaXNjdXNzaW9uMQ==" - ] - }, - "number": { - "description": "The unique sequence number of a team discussion.", - "type": "integer", - "examples": [ - 42 - ] - }, - "pinned": { - "description": "Whether or not this discussion should be pinned for easy retrieval.", - "type": "boolean", - "examples": [ - true - ] - }, - "private": { - "description": "Whether or not this discussion should be restricted to team members and organization owners.", - "type": "boolean", - "examples": [ - true - ] - }, - "team_url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027" - ] - }, - "title": { - "description": "The title of the discussion.", - "type": "string", - "examples": [ - "How can we improve our workflow?" - ] - }, - "updated_at": { - "type": "string", - "format": "date-time", - "examples": [ - "2018-01-25T18:56:31Z" - ] - }, - "url": { - "type": "string", - "format": "uri", - "examples": [ - "https://api.github.com/organizations/1/team/2343027/discussions/1" - ] - }, - "reactions": { - "title": "Reaction Rollup", - "type": "object", - "properties": { - "url": { - "type": "string", - "format": "uri" - }, - "total_count": { - "type": "integer" - }, - "+1": { - "type": "integer" - }, - "-1": { - "type": "integer" - }, - "laugh": { - "type": "integer" - }, - "confused": { - "type": "integer" - }, - "heart": { - "type": "integer" - }, - "hooray": { - "type": "integer" - }, - "eyes": { - "type": "integer" - }, - "rocket": { - "type": "integer" - } - }, - "required": [ - "url", - "total_count", - "+1", - "-1", - "laugh", - "confused", - "heart", - "hooray", - "eyes", - "rocket" - ] - } - }, - "required": [ - "author", - "body", - "body_html", - "body_version", - "created_at", - "last_edited_at", - "html_url", - "pinned", - "private", - "node_id", - "number", - "team_url", - "title", - "updated_at", - "url" - ] - } - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "200", - "description": "

    OK

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "write" - } - ] - } - }, - { - "serverUrl": "http(s)://HOSTNAME/api/v3", - "verb": "delete", - "requestPath": "/teams/{team_id}/discussions/{discussion_number}", - "title": "Delete a discussion (Legacy)", - "category": "teams", - "subcategory": "discussions", - "parameters": [ - { - "name": "team_id", - "description": "

    The unique identifier of the team.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - }, - { - "name": "discussion_number", - "description": "

    The number that identifies the discussion.

    ", - "in": "path", - "required": true, - "schema": { - "type": "integer" - } - } - ], - "bodyParameters": [], - "descriptionHTML": "

    Warning

    \n

    \nEndpoint closing down notice: This endpoint route is closing down and will be removed from the Teams API. We recommend migrating your existing code to use the new Delete a discussion endpoint.

    \n
    \n

    Delete a discussion from a team's page.

    \n

    OAuth app tokens and personal access tokens (classic) need the write:discussion scope to use this endpoint.

    ", - "codeExamples": [ - { - "key": "default", - "request": { - "description": "Example", - "acceptHeader": "application/vnd.github.v3+json", - "parameters": { - "team_id": "TEAM_ID", - "discussion_number": "DISCUSSION_NUMBER" - } - }, - "response": { - "statusCode": "204", - "description": "

    Response

    " - } - } - ], - "statusCodes": [ - { - "httpStatusCode": "204", - "description": "

    No Content

    " - } - ], - "previews": [], - "progAccess": { - "userToServerRest": true, - "serverToServer": true, - "fineGrainedPat": true, - "permissions": [ - { - "\"Team discussions\" organization permissions": "write" - } - ] - } - } - ], "external-groups": [ { "serverUrl": "http(s)://HOSTNAME/api/v3", diff --git a/src/rest/lib/config.json b/src/rest/lib/config.json index 3f95e72e6be7..eb6525f4fcd9 100644 --- a/src/rest/lib/config.json +++ b/src/rest/lib/config.json @@ -50,5 +50,5 @@ ] } }, - "sha": "733113fd6171aa4ab4ef9ecb71e23005b9b0b7a6" + "sha": "7c030db5ffcf2d5ba3a1b61eacaed65c27bad7c0" } \ No newline at end of file diff --git a/src/search/README.md b/src/search/README.md index e80c5861fbb3..5d8a68793991 100644 --- a/src/search/README.md +++ b/src/search/README.md @@ -80,3 +80,87 @@ The preferred way to build and sync the search indices is to do so via the [GitH - Our search querying has lots of controls for customizing each index, so we can add weights to certain attributes and create rules like "title is more important than body", etc. But it works pretty well as-is without any configuration. - Our search querying has support for "advanced query syntax" for exact matching of quoted expressions and exclusion of words preceded by a `-` sign. This is off by default, but it is enabled in our browser client. The settings in the web interface can be overridden by the search endpoint. See [middleware/search.ts](middleware/search.ts). - When needed, the Docs Engineering team can commit updates to the search index, as long as the label `skip-index-check` is applied to the PR. + +## Ownership & On-call + +### Ownership +- **Team**: Docs Engineering +- **Primary contacts**: @docs-engineering (GitHub team) +- **Search infrastructure**: Internal Elasticsearch cluster for autocomplete and general search results, and an external RAG app ([cse-copilot](https://github.com/github/cse-copilot)) owned by @github/customer-success-engineering for LLM-generated responses +- **Slack**: #docs-engineering + +### On-call procedures +If search is not working: +1. **Check search health** + - Test search on docs.github.com + - Check Elasticsearch cluster status (internal) + - Review recent deploys and index updates + +2. **Index issues** + - Check `.github/workflows/index-general-search.yml` logs + - Verify last successful index run + - Test manual index update for single version/language + +3. **API issues** + - Check `/api/search/v1` endpoint + - Review middleware logs for errors + - Test search queries directly against API + +## Roadmap Items + +### High priority improvements +- **Real-time indexing** - Reduce lag between content changes and search index +- **Relevance tuning** - Improve search result ranking and quality +- **Performance optimization** - Faster search queries and results +- **Version handling** - Better support for version-specific search +- **Language support** - Improve multilingual search quality + +### Medium priority enhancements +- **Faceted search** - Filter by product, version, content type +- **Search analytics** - Track what users are searching for +- **Did you mean** - Suggest corrections for misspellings +- **Related searches** - Show similar or related queries +- **Result previews** - Better snippets and highlighting + +### AI search improvements +- **Query understanding** - Better interpret user intent +- **Answer generation** - Provide direct answers, not just links +- **Contextual results** - Consider user's current page/version +- **Personalization** - Learn from search patterns + +### Technical improvements +- **Index efficiency** - Reduce index size and update time +- **Cache optimization** - Improve query caching +- **API versioning** - Stable search API with version control +- **Testing coverage** - More comprehensive search tests +- **Error handling** - Better error messages and recovery + +### Infrastructure enhancements +- **Elasticsearch upgrade** - Keep cluster up to date +- **Redundancy** - Improve search availability +- **Monitoring** - Better observability of search health +- **Cost optimization** - Reduce Elasticsearch costs + +### Content quality +- **Index validation** - Ensure all pages are indexed correctly +- **Freshness indicators** - Show when content was last updated +- **Broken link detection** - Identify 404s in search results +- **Duplicate detection** - Prevent duplicate results + +Search is largely KTLO (keep the lights on). We will continue to ensure the search is working as expected and support updates to both Elasticsearch and Copilot models underlying our search. + +## Known Limitations + +### Current constraints +- **Index lag** - 24-hour delay between content changes and search updates +- **Manual triggers** - Urgent updates require manual workflow run +- **Full reindex** - Can't update individual pages incrementally +- **Version complexity** - Hard to search across all versions simultaneously + +### Performance considerations +- Full index rebuild takes ~40 minutes for all versions/languages +- Single version/language takes ~5-10 minutes +- Search queries cached but cache can become stale +- High search volume can impact Elasticsearch cluster + + diff --git a/src/search/pages/search-results.tsx b/src/search/pages/search-results.tsx index 70fa8350021a..024cd1f50ce6 100644 --- a/src/search/pages/search-results.tsx +++ b/src/search/pages/search-results.tsx @@ -1,4 +1,6 @@ import type { GetServerSideProps } from 'next' +import type { Response } from 'express' +import type { ExtendedRequest } from '@/types' import { MainContextT, @@ -30,18 +32,18 @@ export default function Page({ mainContext, searchContext }: Props) { } export const getServerSideProps: GetServerSideProps = async (context) => { - const req = context.req as any - const res = context.res as any + const req = context.req as unknown as ExtendedRequest + const res = context.res as unknown as Response const mainContext = await getMainContext(req, res) addUINamespaces(req, mainContext.data.ui, ['search_results']) - if (!req.context.search) { + if (!req.context?.search) { // This should have been done by the middleware. throw new Error('Expected req.context to be populated with .search') } - const searchObject = req.context.search as SearchOnReqObject<'generalSearch'> + const searchObject = (req.context?.search ?? {}) as SearchOnReqObject<'generalSearch'> // The `req.context.search` is similar to what's needed to React // render the search result page. diff --git a/src/shielding/tests/shielding.ts b/src/shielding/tests/shielding.ts index 7e5f01f03988..3b3aee6ffc14 100644 --- a/src/shielding/tests/shielding.ts +++ b/src/shielding/tests/shielding.ts @@ -71,7 +71,6 @@ describe('index.md and .md suffixes', () => { } }) - // TODO-ARTICLEAPI: unskip tests or replace when ready to ship article API test('any URL that ends with /.md redirects', async () => { // With language prefix { diff --git a/src/webhooks/lib/config.json b/src/webhooks/lib/config.json index 7bbebc38f385..e6e3954e658e 100644 --- a/src/webhooks/lib/config.json +++ b/src/webhooks/lib/config.json @@ -1,3 +1,3 @@ { - "sha": "733113fd6171aa4ab4ef9ecb71e23005b9b0b7a6" + "sha": "7c030db5ffcf2d5ba3a1b61eacaed65c27bad7c0" } \ No newline at end of file