You can use API from

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

/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

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


If the request is not correct
If the user is not authenticated
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

/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

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


If the request is not correct
If the user is not authenticated
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/project/AAA/object?start=0&limit=10' \
  --user admin:admin \
  --header 'Accept: application/json'

Link Alfresco document to Jira Issues

URL

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

Request

PATH PARAMETERS
  • objectId

    • Alfresco Document Id

QUERY PARAMETERS
  • None

BODY PARAMETERS
{
  "issueKeys": [
    "AAA-1"
  ],
  "objects": [
    {
      "objectId": "7bb7bfa8-997e-4c55-8bd9-2e5029653bc8"
    }
  ]
}

Response

{
  "links": {
    "7bb7bfa8-997e-4c55-8bd9-2e5029653bc8": [
      {
        "projectId": 10000,
        "issueId": 10000,
        "objectId": "7bb7bfa8-997e-4c55-8bd9-2e5029653bc8",
        "authorKey": "JIRAUSER10000",
        "username": "admin",
        "created": 1597597897073,
        "enableUnlink": true
      }
    ]
  }
}


If the request is not correct
If the user is not authenticated
If the user does not have a link permission
If the issue does not exit or it the user does not have permission to browse issue

Example

curl --request POST \
  --url 'http://localhost:2990/jira/rest/alfresco/latest/link/object/7bb7bfa8-997e-4c55-8bd9-2e5029653bc8' \
  --user admin:admin \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"issueKeys":["AAA-1"],"objects":[{"objectId":"7bb7bfa8-997e-4c55-8bd9-2e5029653bc8"}]}'

Note

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

Unlink Alfresco document to Jira Issues

URL

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

Request

PATH PARAMETERS
  • objectId

    • Alfresco Document Id

QUERY PARAMETERS
  • なし

BODY PARAMETERS
{
  "issueKeys": [
    "AAA-1"
  ],
  "objects": [
    {
      "objectId": "7bb7bfa8-997e-4c55-8bd9-2e5029653bc8"
    }
  ]
}

Response

{
  "links": {}
}


If the request is not correct
If the user is not authenticated
If the user does not have a link permission
If the issue does not exit or it the user does not have permission to browse issue

Example

curl --request DELETE \
  --url 'http://localhost:2990/jira/rest/alfresco/latest/link/object/7bb7bfa8-997e-4c55-8bd9-2e5029653bc8' \
  --user admin:admin \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{"issueKeys":["AAA-1"],"objects":[{"objectId":"7bb7bfa8-997e-4c55-8bd9-2e5029653bc8"}]}'

Note

"objectId" is Document Id of Alfresco.