Skip to main content
Table of Contents

Ticket

Get tickets

Returns a list of Ticket objects.

GET /api/pm-tools/v1/tickets

Request parameters

Request

curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X GET "https://integrations.browserstack.com/api/pm-tools/v1/tickets"
  • unique_user_id* String

    Unique identifier for user e.g. email ID

  • integration_key* String

    Name of the tool e.g. jira

  • project_id* String

    Project ID

  • ticket_id* String

    Comma Separated List of Issue IDs

Response attributes 200 application/json

Response

{
    "success": true,
    "data": {
        "total": 50,
        "tickets": [
            {
                "ticket_id": "293500",
                "project": {
                    "external_key": "project",
                    "value": {
                        "id": "10172",
                        "label": "Website"
                    }
                },
                "ticket_type": {
                    "external_key": "issuetype",
                    "value": {
                        "id": "10107",
                        "label": "Ticket"
                    }
                },
                "summary": {
                    "external_key": "summary",
                    "value": "banner shows speedboats including accessibility testing present inside products menu expected cc"
                },
                "description": {
                    "external_key": "description",
                    "value": "Ticket Description"
                },
                "creator": {
                    "external_key": "reporter",
                    "value": {
                        "id": "6059bfb70a9b690071938b00",
                        "label": "sales ophelp",
                        "email": "salesophelp@browserstack.com",
                        "icon": {
                            "48x48": "https://secure.gravatar.com/avatar/b47f229b83fa5f8ec8be9f9ab14a6606?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FSO-3.png",
                            "24x24": "https://secure.gravatar.com/avatar/b47f229b83fa5f8ec8be9f9ab14a6606?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FSO-3.png",
                            "16x16": "https://secure.gravatar.com/avatar/b47f229b83fa5f8ec8be9f9ab14a6606?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FSO-3.png",
                            "32x32": "https://secure.gravatar.com/avatar/b47f229b83fa5f8ec8be9f9ab14a6606?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FSO-3.png"
                        }
                    }
                },
                "assignee": {
                    "external_key": "assignee",
                    "value": {
                        "id": "5d4808ceba09fa0c50c5e328",
                        "label": "Nitesh Sethi",
                        "email": "nitesh@browserstack.com",
                        "icon": {
                            "48x48": "https://secure.gravatar.com/avatar/2f2d994cb766a9e15c789a3a1a5349e2?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FNS-1.png",
                            "24x24": "https://secure.gravatar.com/avatar/2f2d994cb766a9e15c789a3a1a5349e2?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FNS-1.png",
                            "16x16": "https://secure.gravatar.com/avatar/2f2d994cb766a9e15c789a3a1a5349e2?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FNS-1.png",
                            "32x32": "https://secure.gravatar.com/avatar/2f2d994cb766a9e15c789a3a1a5349e2?d=https%3A%2F%2Favatar-management--avatars.us-west-2.prod.public.atl-paas.net%2Finitials%2FNS-1.png"
                        }
                    }
                },
                "tags": {
                    "external_key": "labels",
                    "value": []
                },
                "status": {
                    "external_key": "status",
                    "value": {
                        "id": "10029",
                        "label": "New Item",
                        "closed": false
                    }
                },
                "created_at": {
                    "external_key": "created",
                    "value": "2023-05-12T16:15:03.522+0530"
                },
                "updated_at": {
                    "external_key": "updated",
                    "value": "2023-05-12T16:30:07.790+0530"
                },
                "custom_fields": {
                    "customfield_10190": null,
                    "progress": {
                        "progress": 0,
                        "total": 0
                    }
                }
            }
        ]
    }
}       
  • data Object

    List of tickets

    SHOW VALUES

Create ticket

Create a Ticket with the given values.

To get the details of the create /tickets API itself, refer to the create-meta endpoint. It allows you to understand how to interact with the create endpoint and use its resources e.g. which fields to pass for ticket creation.

GET /api/pm-tools/v1/tickets

Request parameters

Request

curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X POST "https://integrations.browserstack.com/api/pm-tools/v1/tickets"
  • unique_user_id* String

    Unique identifier for user e.g. email ID

  • integration_key* String

    Name of the tool e.g. jira

Response attributes 200 application/json

Response

{
    "success": true,
    "data" : {
        "ticket_id": "10021",
        "message": "Ticket created successfully"
    }
}
  • data Object

    List of intgerations

    SHOW VALUES

Meta for create ticket

Get the meta-data of the /create ticket endpoint. It typically returns information about the supported JIRA fields and their schema details(for custom JIRA fields).

GET /api/pm-tools/v1/tickets

Request parameters

Request

curl -u "YOUR_USERNAME:YOUR_ACCESS_KEY" \
-X POST "https://integrations.browserstack.com/api/pm-tools/v1/tickets/meta-create?integration_key=jira&ticket_type_id=10002&unique_user_id=steve@acme.com"
  • unique_user_id* String

    Unique identifier for user e.g. email ID

  • integration_key* String

    Name of the tool e.g. jira

  • ticket_type_id* String

    ID of the Jira Issue type(e.g. 10002 for Task, 10004 for Bug)

Response attributes 200 application/json

Response

{
    "success": true,
    "data": {
        "fields": [
            {
                "required": true,
                "label": "Assignee",
                "key": "assignee",
                "placeholder": "Select user",
                "options_path": "/api/pm-tools/v1/users?integration_key=jira&format=single-value-select&project_id=10225",
                "search_path": "/api/pm-tools/v1/users?integration_key=jira&format=single-value-select&project_id=10225&query=",
                "schema": {
                    "field": "single-value-select",
                    "system_field": true,
                    "data_format": {
                        "$type": "string"
                    }
                }
            },
            {
                "required": true,
                "placeholder": "Tell your team what went wrong",
                "label": "Summary",
                "key": "summary",
                "schema": {
                    "field": "text",
                    "system_field": true,
                    "data_format": {
                        "$type": "string"
                    }
                }
            },
            {
                "required": false,
                "placeholder": "Enter additional details",
                "label": "Description",
                "key": "description",
                "schema": {
                    "field": "paragraph",
                    "system_field": true,
                    "data_format": {
                        "$type": "string"
                    }
                }
            },
            {
                "required": true,
                "label": "Parent",
                "key": "parent",
                "placeholder": "Select parent issue",
                "options_path": "/api/pm-tools/v1/tickets?integration_key=jira&format=single-value-select&include_subtasks=false&project_id=10225",
                "search_path": "/api/pm-tools/v1/tickets?integration_key=jira&format=single-value-select&include_subtasks=false&project_id=10225&query=",
                "schema": {
                    "field": "single-value-select",
                    "data_format": {
                        "$type": "object",
                        "$properties": {
                            "id": {
                                "$type": "string"
                            }
                        }
                    }
                }
            },
            {
                "required": false,
                "label": "Attachment",
                "key": "attachment",
                "schema": {
                    "field": "file",
                    "upload_path": "/api/pm-tools/v1/attachments?integration_key=jira&ticket_id=",
                    "system_field": true
                }
            },
            {
                "required": false,
                "label": "Blocker Status",
                "key": "customfield_10493",
                "schema": {
                    "field": "text",
                    "data_format": {
                        "$type": "string"
                    }
                }
            },
            {
                "required": false,
                "label": "Promised ETA",
                "key": "customfield_10110",
                "placeholder": "Select date",
                "validations": [
                    {
                        "regex": "^\\d{4}\\-(0[1-9]|1[012])\\-(0[1-9]|[12][0-9]|3[01])$",
                        "error-message": "Date should be in the YYYY-MM-DD format."
                    }
                ],
                "schema": {
                    "field": "date",
                    "data_format": {
                        "$type": "string"
                    }
                }
            }
        ]
    }
}
  • data Object

    Fields to be passed for ticket creation

    SHOW VALUES

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked






Thank you for your valuable feedback