REST API Specification

You can use API from VERSION 1.14.0+

Authentication

Support only Basic auth but any authentication that will works against JIRA will work against the REST API.

Content Type

Use "Content-Type: application/json" in http header when sending data to the REST-API's.

Get Alfresco document Id linked to a Jira issue

URL

GET /rest/alfresco/latest/link/issue/{issueKey}/object

Request

PATH PARAMETERS
  • issueKey

    • Issue key

QUERY PARAMETERS
  • start

    • Start position of the result to be obtained. Default 0

  • limit

    • Maximum number of items to be acquired. Default 10

BODY PARAMETERS
  • None

Response

STATUS 200

{ "start": 0, "limit": 10, "size": 3, "results": [ "72948f84-4bf1-4ec5-8378-1bed0951600a", "1a0b110f-1e09-4ca2-b367-fe25e4964a4e", "05dedd34-9d9d-48d9-9af6-c81b555541c9" ] }


STATUS 400 If the request is not correct
STATUS 401 If the user is not authenticated
STATUS 404 If the issue does not exit or it the user does not have permission to browse issue.

Example

curl --request GET \ --url 'http://localhost:2990/jira/rest/alfresco/latest/link/issue/AAA-1/object?start=0&limit=10' \ --user admin:admin \ --header 'Accept: application/json'

Get Alfresco document Id linked to a Jira project

URL

GET /rest/alfresco/latest/link/project/{projectKey}/object

Request

PATH PARAMETERS
  • projectKey

    • Project key

QUERY PARAMETERS
  • start

    • Start position of the result to be obtained. Default 0

  • limit

    • Maximum number of items to be acquired. Default 10

BODY PARAMETERS
  • None

Response

STATUS 200

{ "start": 0, "limit": 10, "size": 3, "results": [ "72948f84-4bf1-4ec5-8378-1bed0951600a", "1a0b110f-1e09-4ca2-b367-fe25e4964a4e", "05dedd34-9d9d-48d9-9af6-c81b555541c9" ] }


STATUS 400 If the request is not correct
STATUS 401 If the user is not authenticated
STATUS 404 If the issue does not exit or it the user does not have permission to browse issue.

Example

Link Alfresco document to Jira Issues

URL

POST /rest/alfresco/latest/link/object/{objectId}

Request

PATH PARAMETERS
  • objectId

    • Alfresco Document Id

QUERY PARAMETERS
  • None

BODY PARAMETERS

Response

STATUS 200


STATUS 400 If the request is not correct
STATUS 401 If the user is not authenticated
STATUS 403 If the user does not have a link permission
STATUS 404 If the issue does not exit or it the user does not have permission to browse issue

Example

Note

Request parameter of "objectId" is Document Id of Alfresco.

Unlink Alfresco document to Jira Issues

URL

DELETE /rest/alfresco/latest/link/object/{objectId}

Request

PATH PARAMETERS
  • objectId

    • Alfresco Document Id

QUERY PARAMETERS
  • なし

BODY PARAMETERS

Response

STATUS 200


STATUS 400 If the request is not correct
STATUS 401 If the user is not authenticated
STATUS 403 If the user does not have a link permission
STATUS 404 If the issue does not exit or it the user does not have permission to browse issue

Example

Note

"objectId" is Document Id of Alfresco.