Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,4 @@ systemProp.sonar.tests=src/test/groovy
systemProp.sonar.junit.reportPaths=build/test-results/test
systemProp.sonar.coverage.jacoco.xmlReportPath=build/reports/jacoco/test/jacocoTestReport.xml
systemProp.sonar.java.binaries=build/classes/java/main
systemProp.sonar.java.test.binaries=build/classes/groovy/test

systemProp.sonar.java.test.binaries=build/classes/groovy/test
276 changes: 273 additions & 3 deletions src/main/resources/z4j.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -575,7 +575,7 @@ paths:
$ref: '#/components/schemas/Category'
responses:
"201":
description: OK Response
description: Created response
headers:
Location:
description: The URL of the new created category
Expand Down Expand Up @@ -782,12 +782,205 @@ paths:
responses:
"204":
description: <p>No content</p>
/api/v2/search:
get:
operationId: List
tags:
- Search
summary: List Search Results
description: |-
<p>Returns the search results. See <a href='https://developer.zendesk.com/api-reference/ticketing/ticket-management/search/#query-syntax'>Query syntax</a> for details on the {@code query} parameter.</p>
<p>Use the ampersand character (&amp;) to append the {@code sort_by} or {@code sort_order} parameters to the URL.</p>
<p>For examples, see <a href='https://developer.zendesk.com/documentation/ticketing/using-the-zendesk-api/searching-with-the-zendesk-api'>Searching with Zendesk API</a>.</p>
<p>This endpoint has its own rate limit. The rate limit counts towards the global API rate limit. See <a href='https://developer.zendesk.com/api-reference/ticketing/introduction/#limits'>Limits</a>.</p>
<h4 id='allowed-for'>Allowed For</h4>
<ul>
<li>Agents</li>
</ul>
<h4>Pagination</h4>
<ul>
<li>Offset pagination only</li>
</ul>
<p>Offset pagination may result in duplicate results when paging. You can also use the
<a href='https://developer.zendesk.com/api-reference/ticketing/ticket-management/search/#export-search-results'>Export Search Results</a> endpoint, which
uses cursor-based pagination and doesn't return duplicate results. See
<a href='https://developer.zendesk.com/api-reference/introduction/pagination/#using-cursor-pagination'>Using cursor pagination</a> for more information.</p>
parameters:
- name: query
in: query
description: Returns the search results. See <a href='https://developer.zendesk.com/api-reference/ticketing/ticket-management/search/#query-syntax'>Query syntax</a> for details on the {@code query} parameter. For details on the query syntax, see the <a href="https://support.zendesk.com/hc/en-us/articles/203663226">Zendesk Support search reference</a>.
required: true
schema:
type: string
- name: sort_by
in: query
description: One of {@code updated_at}, {@code created_at}, {@code priority}, {@code status}, or {@code ticket_type}. Defaults to sorting by relevance
schema:
$ref: '#/components/schemas/SearchSortBy'
- name: sort_order
in: query
description: Defaults to descending
schema:
$ref: '#/components/schemas/SearchSortOrder'
- $ref: '#/components/parameters/SearchInclude'
responses:
"200":
description: Success response
content:
application/json:
schema:
$ref: '#/components/schemas/SearchResponse'
"400":
description: Error response
content:
application/json:
schema:
$ref: '#/components/schemas/BadRequestErrorResponse'
/api/v2/search/count:
get:
operationId: Count
tags:
- Search
summary: Show Search Results Count
description: |
Returns the number of items matching the query rather than returning the items. The search string works the same as a regular search.

<h4 id='allowed-for'>Allowed For</h4>
<ul>
<li>Agents</li>
</ul>
parameters:
- name: query
in: query
description: Returns the search results. See <a href="https://developer.zendesk.com/api-reference/ticketing/ticket-management/search/#query-syntax">Query syntax</a> for details on the {@code query} parameter. For details on the query syntax, see the <a href="https://support.zendesk.com/hc/en-us/articles/203663226">Zendesk Support search reference</a>.
required: true
schema:
type: string
responses:
"200":
description: Success response
content:
application/json:
schema:
$ref: '#/components/schemas/SearchResponse'
"400":
description: Error response
content:
application/json:
schema:
$ref: '#/components/schemas/BadRequestErrorResponse'
/api/v2/search/export:
get:
operationId: Export
tags:
- Search
summary: Export Search Results
description: |-
<p>Exports a set of results. See <a href='https://developer.zendesk.com/api-reference/ticketing/ticket-management/search/#query-syntax'>Query syntax</a> for the syntax of the {@code query} parameter.</p>
<p>Use this endpoint for search queries that will return more than 1000 results. The result set is ordered only by the {@code created_at} attribute.</p>
<p>The search only returns results of a single object type. The following object types are supported: ticket, organization, user, or group.</p>
<p>You must specify the type in the {@code filter[type]} parameter. Searches with type in the query string will result in an error.</p>
<h4>Allowed For</h4>
<ul>
<li>Agents</li>
</ul>
<h4>Pagination</h4>
<ul>
<li>Cursor pagination</li>
</ul>
<p>See <a href='https://developer.zendesk.com/api-reference/introduction/pagination/'>Pagination</a>.</p>
<p>Returns a maximum of 1000 records per page. The number of results shown in a page is determined by the {@code page[size]} parameter.</p>
<p><strong>Note</strong>: You may experience a speed reduction or a timeout if you request 1000 results per page and you have many archived tickets in the results. Try reducing the number of results per page. We recommend 100 results per page.</p>
<p>The cursor specified by the {@code after_cursor} property in a response expires after one hour.</p>
<p>For more information on cursor-based pagination, see the following articles:</p>
<ul>
<li><a href='https://developer.zendesk.com/documentation/developer-tools/pagination/comparing-cursor-pagination-and-offset-pagination'>Comparing cursor pagination and offset pagination</a></li>
<li><a href='https://developer.zendesk.com/documentation/developer-tools/pagination/paginating-through-lists-using-cursor-pagination'>Paginating through lists using cursor pagination</a></li>
</ul>
<h4>Export Search Results Limits</h4>
<p>This API endpoint is rate-limited to 100 requests per minute per account. The limit also counts towards the global API rate limit.</p>
parameters:
- name: query
in: query
description: Returns the search results. See <a href='https://developer.zendesk.com/api-reference/ticketing/ticket-management/search/#query-syntax'>Query syntax</a> for details on the {@code query} parameter. For details on the query syntax, see the <a href="https://support.zendesk.com/hc/en-us/articles/203663226">Zendesk Support search reference</a>.
required: true
schema:
type: string
- name: page[size]
in: query
description: The number of results shown in a page.
required: true
schema:
type: integer
- name: page[after]
in: query
description: The cursor token for fetching the next page of results.
required: true
schema:
type: string
- name: filter[type]
in: query
description: The object type returned by the export query. Can be `ticket`, `organization`, `user`, or `group`.
required: true
schema:
$ref: '#/components/schemas/SearchExportType'
- $ref: '#/components/parameters/SearchInclude'
responses:
"200":
description: Success response
content:
application/json:
schema:
$ref: '#/components/schemas/SearchResponse'
"400":
description: Error response
content:
application/json:
schema:
$ref: '#/components/schemas/BadRequestErrorResponse'
components:
schemas:
SearchSortBy:
type: string
enum:
- updated_at
- created_at
- priority
- status
- ticket_type
x-enum-name: SearchSortBy
x-enum-varnames:
- UPDATED_AT
- CREATED_AT
- PRIORITY
- STATUS
- TICKET_TYPE
SearchSortOrder:
type: string
enum:
- asc
- desc
x-enum-name: SearchSortOrder
x-enum-varnames:
- ASCENDING
- DESCENDING
SearchExportType:
type: string
enum:
- ticket
- organization
- user
- group
x-enum-name: SearchExportType
x-enum-varnames:
- TICKET
- ORGANIZATION
- USER
- GROUP
Attachment:
type: object
description: |
<p>A file represented as an <a href="developer.zendesk.com/api-reference/ticketing/tickets/ticket-attachments/">Attachment</a> object</p>
A file represented as an <a href="developer.zendesk.com/api-reference/ticketing/tickets/ticket-attachments/">Attachment</a> object
allOf:
- $ref: '#/components/schemas/AttachmentBase'
- $ref: '#/components/schemas/AttachmentThumbnails'
Expand All @@ -801,7 +994,7 @@ components:
content_url:
type: string
description: |
<p>A full URL where the attachment image file can be downloaded. The file may be hosted externally so take care not to inadvertently send Zendesk authentication credentials. See <a href="/documentation/ticketing/managing-tickets/working-with-url-properties">Working with url properties</a></p>
A full URL where the attachment image file can be downloaded. The file may be hosted externally so take care not to inadvertently send Zendesk authentication credentials. See <a href="/documentation/ticketing/managing-tickets/working-with-url-properties">Working with url properties</a>
readOnly: true
deleted:
type: boolean
Expand Down Expand Up @@ -832,6 +1025,17 @@ components:
malware_scan_result:
type: string
description: 'The result of the malware scan. There is a delay between the time the attachment is uploaded and when the malware scan is completed. Usually the scan is done within a few seconds, but high load conditions can delay the scan results. Possible values: "malware_found", "malware_not_found", "failed_to_scan", "not_scanned"'
enum:
- malware_found
- malware_not_found
- failed_to_scan
- not_scanned
x-enum-name: MalwareScanResult
x-enum-varnames:
- MALWARE_FOUND
- MALWARE_NOT_FOUND
- FAILED_TO_SCAN
- NOT_SCANNED
readOnly: true
mapped_content_url:
type: string
Expand Down Expand Up @@ -3259,6 +3463,64 @@ components:
type: array
items:
$ref: '#/components/schemas/Vote'
SearchResult:
type: object
properties:
created_at:
type: string
description: When the resource was created
default:
type: boolean
description: Flag to indicate whether this is the default resource
deleted:
type: boolean
description: Flag to indicate whether or not resource has been deleted
description:
type: string
description: The description of the resource
id:
type: integer
description: The ID of the resource
name:
type: string
description: The name of the resource
result_type:
type: string
description: The type of the resource
updated_at:
type: string
description: When the resource was last updated
url:
type: string
description: The url of the resource
SearchResponse:
type: object
properties:
count:
type: integer
description: The number of resources returned by the query corresponding to this page of results in the paginated response
readOnly: true
facets:
type: string
description: The facets corresponding to the search query
nullable: true
readOnly: true
next_page:
type: string
description: URL to the next page of results
nullable: true
readOnly: true
previous_page:
type: string
description: URL to the previous page of results
nullable: true
readOnly: true
results:
type: array
description: May consist of tickets, users, groups, or organizations, as specified by the `result_type` property in each result object
items:
$ref: '#/components/schemas/SearchResult'
readOnly: true
parameters:
ArticleAttachmentId:
name: article_attachment_id
Expand Down Expand Up @@ -3352,6 +3614,14 @@ components:
type: string
example: en-us
example: en-us
SearchInclude:
name: include
in: query
description: |
Sideloads to include in the response. Accepts a comma-separated list of values.
The available sideloads depend on the search result types.
schema:
type: string
SectionId:
name: section_id
in: path
Expand Down
Loading
Loading