Skip to content

Instantly share code, notes, and snippets.

@trknhr
Created December 20, 2023 05:37
Show Gist options
  • Save trknhr/4ecc2569a2533ca8b50d6aee578f59de to your computer and use it in GitHub Desktop.
Save trknhr/4ecc2569a2533ca8b50d6aee578f59de to your computer and use it in GitHub Desktop.
backlogOpenAPI.yaml for ChatGPTs
openapi: 3.0.0
info:
title: Backlog API
version: 1.0.0
servers:
- url: https://xxxx
paths:
/api/v2/issues:
post:
operationId: createIssue
summary: Adds new issue
description: Creates a new issue with the provided details.
requestBody:
required: true
content:
application/x-www-form-urlencoded:
schema:
type: object
properties:
projectId:
type: number
description: Project ID
summary:
type: string
description: Summary of the issue
parentIssueId:
type: number
description: Parent Issue ID
description:
type: string
description: Detailed description of the issue
startDate:
type: string
format: date
description: Start Date (yyyy-MM-dd)
dueDate:
type: string
format: date
description: Due Date (yyyy-MM-dd)
estimatedHours:
type: number
description: Estimated Hours
actualHours:
type: number
description: Actual Hours
issueTypeId:
type: number
description: Issue Type ID
categoryId[]:
type: array
items:
type: number
description: Category ID
# Repeat for other array-type parameters
priorityId:
type: number
description: Priority ID
assigneeId:
type: number
description: Assignee ID
notifiedUserId[]:
type: array
items:
type: number
description: Notified User ID
attachmentId[]:
type: array
items:
type: number
description: Attachment file ID
# Add custom fields as needed
required:
- projectId
- summary
- issueTypeId
- priorityId
responses:
'201':
description: Issue successfully created
'400':
description: Invalid input
'401':
description: Unauthorized
'500':
description: Server Error
get:
operationId: issuelist
summary: Returns list of issues
description: Retrieve a list of issues based on various filter criteria.
parameters:
- in: query
name: projectId[]
required: false
schema:
type: array
items:
type: number
description: Project ID
- in: query
name: issueTypeId[]
required: false
schema:
type: array
items:
type: number
description: Issue Type ID
- in: query
name: categoryId[]
required: false
schema:
type: array
items:
type: number
description: Category ID
- in: query
name: versionId[]
required: false
schema:
type: array
items:
type: number
description: Version ID
- in: query
name: milestoneId[]
required: false
schema:
type: array
items:
type: number
description: Milestone ID
- in: query
name: statusId[]
required: false
schema:
type: array
items:
type: number
description: Status ID
- in: query
name: priorityId[]
required: false
schema:
type: array
items:
type: number
description: Priority ID
- in: query
name: assigneeId[]
required: false
schema:
type: array
items:
type: number
description: Assignee ID
- in: query
name: createdUserId[]
required: false
schema:
type: array
items:
type: number
description: Created User ID
# Continue for other array-type parameters
- in: query
name: keyword
required: false
schema:
type: string
description: Keyword for searching
# Continue for other non-array parameters
responses:
"200":
description: A list of issues
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/Issue"
/api/v2/projects/{projectIdOrKey}:
get:
summary: Get Project
operationId: Get Project
description: Returns information about a project.
parameters:
- name: projectIdOrKey
in: path
required: true
description: Project ID or Project Key
schema:
type: string
responses:
"200":
description: Information about the project
content:
application/json:
schema:
$ref: "#/components/schemas/Project"
/api/v2/wikis:
get:
operationId: get wiki list in the project
summary: Retrieve a list of wiki pages based on project ID/key and keyword
parameters:
- in: query
name: projectIdOrKey
schema:
type: string
description: Project ID or Project Key
- in: query
name: keyword
schema:
type: string
description: Keyword
responses:
'200':
description: Successful response
content:
application/json;charset=utf-8:
schema:
type: array
items:
type: object
properties:
id:
type: integer
projectId:
type: integer
name:
type: string
tags:
type: array
items:
type: object
properties:
id:
type: integer
name:
type: string
createdUser:
$ref: '#/components/schemas/User'
created:
type: string
format: date-time
updatedUser:
$ref: '#/components/schemas/User'
updated:
type: string
format: date-time
/api/v2/wikis/{wikiId}:
get:
operationId: get wiki
summary: Retrieve a specific wiki page by its ID
parameters:
- in: path
name: wikiId
required: true
schema:
type: number
description: Wiki page ID
responses:
"200":
description: Successful response
content:
application/json;charset=utf-8:
schema:
type: object
properties:
id:
type: integer
projectId:
type: integer
name:
type: string
content:
type: string
tags:
type: array
items:
type: object
properties:
id:
type: integer
name:
type: string
attachments:
type: array
items:
$ref: "#/components/schemas/Attachment"
sharedFiles:
type: array
items:
$ref: "#/components/schemas/SharedFile"
stars:
type: array
items:
type: object
createdUser:
$ref: "#/components/schemas/User"
created:
type: string
format: date-time
updatedUser:
$ref: "#/components/schemas/User"
updated:
type: string
format: date-time
components:
schemas:
User:
type: object
properties:
id:
type: integer
userId:
type: string
name:
type: string
roleType:
type: integer
lang:
type: string
mailAddress:
type: string
lastLoginTime:
type: string
format: date-time
Attachment:
type: object
properties:
id:
type: integer
name:
type: string
size:
type: integer
createdUser:
$ref: "#/components/schemas/User"
created:
type: string
format: date-time
SharedFile:
type: object
properties:
id:
type: integer
projectId:
type: integer
type:
type: string
dir:
type: string
name:
type: string
size:
type: integer
createdUser:
$ref: "#/components/schemas/User"
created:
type: string
format: date-time
updatedUser:
$ref: "#/components/schemas/User"
updated:
type: string
format: date-time
Issue:
type: object
properties:
id:
type: integer
projectId:
type: integer
issueKey:
type: string
keyId:
type: integer
summary:
type: string
description:
type: string
resolution:
type: string
Project:
type: object
properties:
id:
type: integer
projectKey:
type: string
name:
type: string
chartEnabled:
type: boolean
useResolvedForChart:
type: boolean
subtaskingEnabled:
type: boolean
projectLeaderCanEditProjectLeader:
type: boolean
useWiki:
type: boolean
useFileSharing:
type: boolean
useWikiTreeView:
type: boolean
useOriginalImageSizeAtWiki:
type: boolean
useSubversion:
type: boolean
useGit:
type: boolean
textFormattingRule:
type: string
archived:
type: boolean
displayOrder:
type: integer
useDevAttributes:
type: boolean
User:
type: object
properties:
id:
type: integer
userId:
type: string
name:
type: string
roleType:
type: integer
lang:
type: string
mailAddress:
type: string
lastLoginTime:
type: string
format: date-time
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment