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://integrate.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. Allowed values are jira, azuredevops

  • 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": "229951",
                "project": {
                    "external_key": "project",
                    "value": {
                        "id": "10111",
                        "label": "Website"
                    }
                },
                "ticket_type": {
                    "external_key": "issuetype",
                    "value": {
                        "id": "10112",
                        "label": "Ticket"
                    }
                },
                "summary": {
                    "external_key": "summary",
                    "value": "test summary"
                },
                "description": {
                    "external_key": "description",
                    "value": "Ticket Description"
                },
                "creator": {
                    "external_key": "reporter",
                    "value": {
                        "id": "60asda32y23bnsa838b00",
                        "label": "demouser",
                        "email": "demouser@exampleemail.com",
                        "icon": {
                            "48x48": "https://secure.gravatar.com/avatar/b47f229b83fa5f8ec8be9f9ab14a6606?d=https%3A%2F%2Favatar-management--avatars.us-west.prod.public.atl-paas.net%%2FSO-3.png",
                            "24x24": "https://secure.gravatar.com/avatar/b47f229b83fa5f8ec8be9f9ab14a6606?d=https%3A%2F%2Favatar-management--avatars.us-west.prod.public.atl-paas.net%%2FSO-3.png",
                            "16x16": "https://secure.gravatar.com/avatar/b47f229b83fa5f8ec8be9f9ab14a6606?d=https%3A%2F%2Favatar-management--avatars.us-west.prod.public.atl-paas.net%%2FSO-3.png",
                            "32x32": "https://secure.gravatar.com/avatar/b47f229b83fa5f8ec8be9f9ab14a6606?d=https%3A%2F%2Favatar-management--avatars.us-west.prod.public.atl-paas.net%%2FSO-3.png"
                        }
                    }
                },
                "assignee": {
                    "external_key": "assignee",
                    "value": {
                        "id": "5d4808ceba09fa0c50c5e328",
                        "label": "Demo user 2",
                        "email": "demouser2@exampleemail.com",
                        "icon": {
                            "48x48": "https://secure.gravatar.com/avatar/2f2d994cb766a9e15c789a3a1a5349e2?d=https%3A%2F%2Favatar-management--avatars.us-west.prod.public.atl-paas.net%%2FNS-1.png",
                            "24x24": "https://secure.gravatar.com/avatar/2f2d994cb766a9e15c789a3a1a5349e2?d=https%3A%2F%2Favatar-management--avatars.us-west.prod.public.atl-paas.net%%2FNS-1.png",
                            "16x16": "https://secure.gravatar.com/avatar/2f2d994cb766a9e15c789a3a1a5349e2?d=https%3A%2F%2Favatar-management--avatars.us-west.prod.public.atl-paas.net%%2FNS-1.png",
                            "32x32": "https://secure.gravatar.com/avatar/2f2d994cb766a9e15c789a3a1a5349e2?d=https%3A%2F%2Favatar-management--avatars.us-west.prod.public.atl-paas.net%%2FNS-1.png"
                        }
                    }
                },
                "tags": {
                    "external_key": "labels",
                    "value": []
                },
                "status": {
                    "external_key": "status",
                    "value": {
                        "id": "10022",
                        "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
                    }
                }
            }
        ]
    }
}       
  • success Boolean

    Operation was a success or failure.

  • data Object

    List of tickets

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://integrate.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. Allowed values are jira, azuredevops

Response attributes 200 application/json

Response

{
    "success": true,
    "data" : {
        "ticket_id": "10000",
        "message": "Ticket created successfully"
    }
}
  • success Boolean

    Operation was a success or failure.

  • 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://integrate.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. Allowed values are jira, azuredevops

  • 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=10000",
                "search_path": "/api/pm-tools/v1/users?integration_key=jira&format=single-value-select&project_id=10000&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=10000",
                "search_path": "/api/pm-tools/v1/tickets?integration_key=jira&format=single-value-select&include_subtasks=false&project_id=10000&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_12345",
                "schema": {
                    "field": "text",
                    "data_format": {
                        "$type": "string"
                    }
                }
            },
            {
                "required": false,
                "label": "Promised ETA",
                "key": "customfield_12345",
                "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"
                    }
                }
            }
        ]
    }
}
  • success Boolean

    Operation was a success or failure.

  • data Object

    Fields to be passed for ticket creation

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