Open Context Protocol is live! 🚀 Read the launch post
getCreateIssueMeta

getCreateIssueMeta

Get create issue metadata

Details

  • Method: GET
  • Path: /rest/api/3/issue/createmeta
  • Operation ID: getCreateIssueMeta

Parameters

{
  "projectIds": {
    "description": "List of project IDs. This parameter accepts a comma-separated list. Multiple project IDs can also be provided using an ampersand-separated list. For example, `projectIds=10000,10001&projectIds=10020,10021`. This parameter may be provided with `projectKeys`.",
    "required": false,
    "location": "query",
    "type": "array"
  },
  "projectKeys": {
    "description": "List of project keys. This parameter accepts a comma-separated list. Multiple project keys can also be provided using an ampersand-separated list. For example, `projectKeys=proj1,proj2&projectKeys=proj3`. This parameter may be provided with `projectIds`.",
    "required": false,
    "location": "query",
    "type": "array"
  },
  "issuetypeIds": {
    "description": "List of issue type IDs. This parameter accepts a comma-separated list. Multiple issue type IDs can also be provided using an ampersand-separated list. For example, `issuetypeIds=10000,10001&issuetypeIds=10020,10021`. This parameter may be provided with `issuetypeNames`.",
    "required": false,
    "location": "query",
    "type": "array"
  },
  "issuetypeNames": {
    "description": "List of issue type names. This parameter accepts a comma-separated list. Multiple issue type names can also be provided using an ampersand-separated list. For example, `issuetypeNames=name1,name2&issuetypeNames=name3`. This parameter may be provided with `issuetypeIds`.",
    "required": false,
    "location": "query",
    "type": "array"
  },
  "expand": {
    "description": "Use [expand](#expansion) to include additional information about issue metadata in the response. This parameter accepts `projects.issuetypes.fields`, which returns information about the fields in the issue creation screen for each issue type. Fields hidden from the screen are not returned. Use the information to populate the `fields` and `update` fields in [Create issue](#api-rest-api-3-issue-post) and [Create issues](#api-rest-api-3-issue-bulk-post).",
    "required": false,
    "location": "query",
    "type": "string"
  }
}

Response Schema

{
  "additionalProperties": false,
  "description": "The wrapper for the issue creation metadata for a list of projects.",
  "properties": {
    "expand": {
      "description": "Expand options that include additional project details in the response.",
      "readOnly": true,
      "type": "string",
      "xml": {
        "attribute": true
      }
    },
    "projects": {
      "description": "List of projects and their issue creation metadata.",
      "items": {
        "additionalProperties": false,
        "description": "Details of the issue creation metadata for a project.",
        "properties": {
          "avatarUrls": {
            "allOf": [
              {
                "$ref": "#/components/schemas/AvatarUrlsBean"
              }
            ],
            "description": "List of the project's avatars, returning the avatar size and associated URL.",
            "readOnly": true
          },
          "expand": {
            "description": "Expand options that include additional project issue create metadata details in the response.",
            "readOnly": true,
            "type": "string",
            "xml": {
              "attribute": true
            }
          },
          "id": {
            "description": "The ID of the project.",
            "readOnly": true,
            "type": "string"
          },
          "issuetypes": {
            "description": "List of the issue types supported by the project.",
            "items": {
              "additionalProperties": false,
              "description": "Details of the issue creation metadata for an issue type.",
              "properties": {
                "avatarId": {
                  "description": "The ID of the issue type's avatar.",
                  "format": "int64",
                  "readOnly": true,
                  "type": "integer"
                },
                "description": {
                  "description": "The description of the issue type.",
                  "readOnly": true,
                  "type": "string"
                },
                "entityId": {
                  "description": "Unique ID for next-gen projects.",
                  "format": "uuid",
                  "readOnly": true,
                  "type": "string"
                },
                "expand": {
                  "description": "Expand options that include additional issue type metadata details in the response.",
                  "readOnly": true,
                  "type": "string",
                  "xml": {
                    "attribute": true
                  }
                },
                "fields": {
                  "additionalProperties": {
                    "additionalProperties": false,
                    "description": "The metadata describing an issue field.",
                    "properties": {
                      "allowedValues": {
                        "description": "The list of values allowed in the field.",
                        "items": {
                          "readOnly": true
                        },
                        "readOnly": true,
                        "type": "array"
                      },
                      "autoCompleteUrl": {
                        "description": "The URL that can be used to automatically complete the field.",
                        "readOnly": true,
                        "type": "string"
                      },
                      "configuration": {
                        "additionalProperties": {
                          "readOnly": true
                        },
                        "description": "The configuration properties.",
                        "readOnly": true,
                        "type": "object"
                      },
                      "defaultValue": {
                        "description": "The default value of the field.",
                        "readOnly": true
                      },
                      "hasDefaultValue": {
                        "description": "Whether the field has a default value.",
                        "readOnly": true,
                        "type": "boolean"
                      },
                      "key": {
                        "description": "The key of the field.",
                        "readOnly": true,
                        "type": "string"
                      },
                      "name": {
                        "description": "The name of the field.",
                        "readOnly": true,
                        "type": "string"
                      },
                      "operations": {
                        "description": "The list of operations that can be performed on the field.",
                        "items": {
                          "readOnly": true,
                          "type": "string"
                        },
                        "readOnly": true,
                        "type": "array"
                      },
                      "required": {
                        "description": "Whether the field is required.",
                        "readOnly": true,
                        "type": "boolean"
                      },
                      "schema": {
                        "allOf": [
                          {
                            "$ref": "#/components/schemas/JsonTypeBean"
                          }
                        ],
                        "description": "The data type of the field.",
                        "readOnly": true
                      }
                    },
                    "required": [
                      "key",
                      "name",
                      "operations",
                      "required",
                      "schema"
                    ],
                    "type": "object",
                    "xml": {
                      "name": "availableField"
                    }
                  },
                  "description": "List of the fields available when creating an issue for the issue type.",
                  "readOnly": true,
                  "type": "object"
                },
                "hierarchyLevel": {
                  "description": "Hierarchy level of the issue type.",
                  "format": "int32",
                  "readOnly": true,
                  "type": "integer"
                },
                "iconUrl": {
                  "description": "The URL of the issue type's avatar.",
                  "readOnly": true,
                  "type": "string"
                },
                "id": {
                  "description": "The ID of the issue type.",
                  "readOnly": true,
                  "type": "string"
                },
                "name": {
                  "description": "The name of the issue type.",
                  "readOnly": true,
                  "type": "string"
                },
                "scope": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/Scope"
                    }
                  ],
                  "description": "Details of the next-gen projects the issue type is available in.",
                  "readOnly": true
                },
                "self": {
                  "description": "The URL of these issue type details.",
                  "readOnly": true,
                  "type": "string"
                },
                "subtask": {
                  "description": "Whether this issue type is used to create subtasks.",
                  "readOnly": true,
                  "type": "boolean"
                }
              },
              "type": "object"
            },
            "readOnly": true,
            "type": "array"
          },
          "key": {
            "description": "The key of the project.",
            "readOnly": true,
            "type": "string"
          },
          "name": {
            "description": "The name of the project.",
            "readOnly": true,
            "type": "string"
          },
          "self": {
            "description": "The URL of the project.",
            "readOnly": true,
            "type": "string"
          }
        },
        "type": "object"
      },
      "readOnly": true,
      "type": "array"
    }
  },
  "type": "object"
}

Usage

from ocp_agent import OCPAgent

agent = OCPAgent()
await agent.register_api('jira')

# Call this tool
result = await agent.call_tool('getCreateIssueMeta', {
    # Add required parameters here
})