Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info
titleProgrammers 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


Info
titleExperimental API

This API is not stable. It is subject to changes with every RY version. 

...

In the following documentation, we will omit the base URL.

REST Resources

Resource                                                                        Comments and query string arguments
GET /rest/reqs/1/requirement2/{spaceKey}

Search for requirements.

  • q = The query, using the Search Syntax.
  • spaceKey = The scope of the search. This is different from the spaceKey in the GET path. If the spaceKey in the query string isn't provided, and if the "Isolate Spaces" option is ticked in the Requirement Yogi administration, then the search will be restricted by default to the spaceKey provided in the GET path; Otherwise the spaceKey provided in the GET path has no effect.
  • offset = The pagination offset
  • limit = The pagination limit
  • order = The SQL ORDER BY clause (by default: "REQKEY ASC, BASELINE DESC")
  • includeArchived = true / false whether the archived requirements should be included. Otherwise, only current (ACTIVE) requirements are displayed.
  • baselineCondition = Do not use.
  • suggest = Do not use.
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.

  • v = {integer} – Return the version of the requirement in baseline 'v'
  • expand = Use "references" if references to pages need to be expanded.
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.

  • expand: Use "details" if you need to get the link to the baseline page and the number of requirements.

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: 

...

One easy way to see how Requirement Yogi creates a link is to use the "Network" panel in the developer tools of Confluence:
Image Added

Example of payload:

Code Block
titlePOST http://jira.local:2990/jira/rest/api/latest/issue/SAM-8/remotelink
{  
    "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.