On this page
Use this API method to obtain the list of all documents from a Jira project. The result is in JSON format and contains the list of documents along with some attributes like ID.
Request URL
The request URL takes the following form:
GET <ROOT>/rest/stonikbyte-documents-api/1.0/document?projectId={projectId}
Parameters
|
Parameter |
Description |
|---|---|
|
projectId |
The Id of the Jira project. For obtaining the project ID, see Obtaining the list of Jira projects |
|
query |
Optional. Allows entering a JQL-style query for filtering the documents by date updated or date created. The date value of these fields in the query is in the form of epoch time - the number of milliseconds elapsed since the epoch (midnight at the beginning of January 1, 1970, UTC). Example of a call with a valid query param: https:/ /MY_JIRA_BASE_URL/rest/stonikbyte-documents-api/1.0/document?projectId=10000&query=created<1669833059907 AND updated>=1669832998232 In this example, the query will return the documents from project with id 10000 that were created before 2022-11-30T18:30:59.907Z AND were updated after 2022-11-30T18:29:58.232Z.
|
A successful response
An HTTP 200 status response indicates a successful request. Here is an example of data returned in JSON format:
[
{
"id": "2",
"title": "DEMO"
},
{
"id": "3",
"title": "Market Requirements Document"
}
]
|
Data |
Description |
Example |
|---|---|---|
|
id |
The ID the document |
3 |
|
title |
The Title of the document |
"Market Requirements Document" |
Error Response
If the REST call fails, the service returns one of the following HTTP statuses:
|
HTTP Status Code |
Description |
|---|---|
|
401 Unauthorized |
Returned for unauthenticated requests or in case of invalid Documents app license |
|
403 Forbidden |
If the user does not have View permissions in the Documents app |