Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

On this page

Table of Contents

Use this API method to delete an existing document or folderYou can search and retrieve documents by their title by sending a GET HTTP request to the Jira instance running this version of Documents app. A set of attributes of the matching documents is returned in JSON format.

Request URL

...

Parameter

...

Description

...

{documentID}

...

The request URL takes the following form:
DELETE <ROOT>/rest/stonikbyte-documents-api/1.0/document/{documentID}

Parameters

https:/ /MY_JIRA_BASE_URL/plugins/servlet/stonikbyte/projectdocs/search-doc-titles?query=QUERY&projectKey=PROJECT_KEY
Replace "https:/ /MY_JIRA_BASE_URL" with the base URL of your Jira server.

Parameters

You have to specify the following parameters:

Parameter

Description

query

Represents the search criteria. All documents containing this value will be retrieved. Search is not key sensitive. Leave it blank to retrieve all documents. The parameter has to be URL encoded.

projectKey

The key of the project you want to search into.

matchingCriteria

Optional. Represents the matching criteria and can be used for more precise searches. The possible values are "is" and "contains". If the parameter is not specified, its value is considered "contains".

Info

The search is not case sensitive.

An example of the request URL with parameters is as follows:

https:/ /myjiraserver:2990/jira/plugins/servlet/stonikbyte/projectdocs/search-doc-titles?query=plan&projectKey=DEMO&matchingCriteria=contains
In this example, all the documents from project DEMO containing “plan” in their title are returned.

https:/ /myjiraserver:2990/jira/plugins/servlet/stonikbyte/projectdocs/search-doc-titles?query=plan&projectKey=DEMO&matchingCriteria=contains
In this example, all the documents from project DEMO with title “plan” or “Plan” are returned. The search is not case sensitive.

A successful response

An HTTP 200 status response indicates a successful request. The following data about the matching documents is returned:

Data

Description

Example

key

The Key (unique identifier) of the document

11

title

The Title of the document

Project Plan

type

The type of the document.
Possible values are: 1 - Folder; 2 - File; 3 - URL; 4 - Wiki

1

icon

The filename representing the document's icon.
You can retrieve the icon by appending the file name to the following URL
https:/ /MY_JIRA_BASE_URL/download/resources/com.stonikbyte.jira.plugins.project-docs-plugin/images/mime-types/
Example:
https:/ /myjiraserver:2990/jira/download/resources/com.stonikbyte.jira.plugins.project-docs-plugin/images/mime-types/pdf24.png

pdf24.png

Error Response

If the REST call fails, the service returns one of the following HTTP statuses:

HTTP Status Code

Description

01 401 Unauthorized

Returned for unauthenticated requests or in case of invalid Documents app license

403 Forbidden

If the user does not have Delete permissions

404 Not found

If the document no longer existsmissing View permissions.

412 Precondition failed

Returned if one or more of the mandatory parameters are missing or if the license of the Documents app is expired.