Skip to content

Instantly share code, notes, and snippets.

@thagler
Created May 6, 2025 13:34
Show Gist options
  • Save thagler/90023fa432556188b57906191b62ea3e to your computer and use it in GitHub Desktop.
Save thagler/90023fa432556188b57906191b62ea3e to your computer and use it in GitHub Desktop.
GPT Assistant Action: Fetch Jira Data
{
"openapi": "3.1.0",
"x-meta": {
"projectId": "PROJECT_KEY_HERE",
"projectName": "AD Jira Data Export",
"projectSlug": "AD",
"jiraBaseUrl": "https://phase2tech.atlassian.net"
},
"info": {
"title": "Jira Data Export",
"version": "1.3.0",
"description": "Fetches Jira issues and project metadata, including sprint details, with pagination and trimmed fields."
},
"servers": [
{
"url": "https://phase2tech.atlassian.net/rest/api/3"
}
],
"paths": {
"/search": {
"get": {
"operationId": "fetchJiraIssues",
"summary": "Fetch issues from the Jira project sprint info",
"parameters": [
{
"name": "jql",
"in": "query",
"required": true,
"description": "JQL query string (e.g. 'project=ADBUILD')",
"schema": {
"type": "string",
"default": "project=PROJECT_KEY_HERE AND statusCategory != Done ORDER BY updated DESC"
}
},
{
"name": "fields",
"in": "query",
"required": false,
"description": "Comma-separated list of fields to return",
"schema": {
"type": "string",
"default": "summary,status,assignee,issuetype,customfield_10020"
}
},
{
"name": "startAt",
"in": "query",
"required": false,
"description": "Pagination offset",
"schema": {
"type": "integer",
"default": 0
}
},
{
"name": "maxResults",
"in": "query",
"required": false,
"description": "Number of results per page",
"schema": {
"type": "integer",
"default": 50
}
}
],
"responses": {
"200": {
"description": "Jira issues matching the query",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"issues": {
"type": "array",
"items": {
"type": "object",
"properties": {
"key": { "type": "string" },
"fields": {
"type": "object",
"properties": {
"summary": { "type": "string" },
"status": {
"type": "object",
"properties": {
"name": { "type": "string" }
}
},
"assignee": {
"type": "object",
"nullable": true,
"properties": {
"displayName": { "type": "string" }
}
},
"issuetype": {
"type": "object",
"properties": {
"name": { "type": "string" }
}
},
"customfield_10020": {
"type": "array",
"nullable": true,
"description": "Sprint metadata including name, id, startDate, endDate",
"items": {
"type": "object",
"properties": {
"id": { "type": "integer" },
"name": { "type": "string" },
"state": { "type": "string" },
"startDate": { "type": "string", "format": "date-time" },
"endDate": { "type": "string", "format": "date-time" },
"completeDate": { "type": "string", "format": "date-time" },
"originBoardId": { "type": "integer" }
},
"additionalProperties": true
}
}
}
}
}
}
},
"startAt": { "type": "integer" },
"maxResults": { "type": "integer" },
"total": { "type": "integer" }
}
}
}
}
}
}
}
},
"/project/{projectKey}": {
"get": {
"operationId": "fetchProjectMetadata",
"summary": "Fetch metadata for a Jira project",
"parameters": [
{
"name": "projectKey",
"in": "path",
"required": true,
"description": "The Jira project key (e.g. 'ADBUILD')",
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"description": "Project metadata",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"id": { "type": "string" },
"key": { "type": "string" },
"name": { "type": "string" },
"projectTypeKey": { "type": "string" }
},
"additionalProperties": true
}
}
}
}
}
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment