Programmers only
This documentation is only designed for programmers. It is provided as is, and programmers are expected to be good enough to solve problems.
REST API in Confluence
Experimental API
Our API is subject to changes.
- When we annotate @Public, we attempt with "best effort" to keep the API backwards-compatible for as long as possible.
- If we want to deprecate, we will annotate with @Deprecated for a few versions, then remove it in the major version (in "platform.major.micro" versioning scheme, for example in 2.2.0).
- We may add parameters, not remove them.
- When we annotate @Internal, we don't even try to keep it stable, it usually changes from 1 micro version to another. Those APIs are tightly couples with the Javascript.
- When we don't annotate, please consider it as @Internal.
How to build the URL?
The "base URL" is the address of Confluence. It could be:
https://confluence.example.com
if there is no port, no context path and it's https.http://confluence.example.com:8090/confluence
if there is a port, a context path and http.
Try with {baseUrl}/admin/viewgeneralconfig.action
to ensure you have the right one. In the following documentation, we will omit the base URL.
Good tip
Install and use Atlassian's REST API Browser and explore URLs inside of your Confluence / Jira application:
REST Resources
Verb and URL | Comments and query string arguments |
---|---|
GET /rest/reqs/1/requirement2/{spaceKey} | Search for requirements.
|
POST /rest/reqs/1/requirement2/{spaceKey} | Do not use. |
PUT /rest/reqs/1/requirement2/{spaceKey} | Do not use. |
GET /rest/reqs/1/requirement2/{spaceKey}/{key} | Get a requirement.
|
POST /rest/reqs/1/requirement2/{spaceKey}/{key} | Do not use. |
PUT /rest/reqs/1/requirement2/{spaceKey}/{key} | Do not use. |
DELETE /rest/reqs/1/requirement2/{spaceKey}/{key} | Do not use. |
GET /rest/reqs/1/baseline/{spaceKey} | Get the list of baselines in this space.
|
All other information is available in the REST API Browser.
REST API in Jira
There is no specific REST API in Jira for Requirement Yogi, but links can be added in the "Remote Issue Links" (RIL) using the REST API of Jira:
- The Jira documentation is available at this address: https://developer.atlassian.com/server/jira/platform/jira-rest-api-for-remote-issue-links/
- To create a Requirement Yogi RIL, one must use the type "com.playsql.requirementyogi.type" and a specific GlobalID.
One easy way to see how Requirement Yogi creates a link is to use the "Network" panel in the developer tools of Confluence:
Example of payload:
{ "globalId":"applink=d17e62d1-4e84-3467-891d-2e097fc86c52&spaceKey=EX&key=REQ-001&issue=SAM-8&relationship=implements", "application":{ "name":"Confluence in space EX", "type":"com.playsql.requirementyogi.type" }, "relationship":"implements", "object":{ "url":"http://confluence.local:1990/confluence/requirements/EX/REQ-001", "title":"REQ-001", "summary":"- Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.", "icon":{ "url16x16":"http://confluence.local:1990/confluence/download/resources/com.playsql.requirementyogi/img/requirementyogi-icon-2-x16.png", "title":"Requirement Yogi" } } }
- Fields are self-explanatory,
- The type must be "com.playsql.requirementyogi.type",
- The globalId must retain the same format, in the same order:
- applink: The ID of the application link in Jira,
- spaceKey and key: The references to the requirement,
- issue: The Jira issue key
- relationship: The relationship
- This means that any change to the relationship, issue number or space must be reflected in the form of a deletion of the old link and recreation with the correct GlobalId.
- Upon creation, Requirement Yogi indexes the new links and notifies Confluence of the creation of a link.
- The Summary will be kept up-to-date by manual and auto synchronization.
To confirm the link was created and recognized by Requirement Yogi, please go to the requirement in Confluence and check that the link to Jira appears.