Note |
---|
Early access: So, if you use our REST APIs, be ready to update your integrations! |
At Requirement Yogi, we’re committed to continuously enhancing our products to meet the evolving needs of our customers. However, we understand that there are instances where you may require additional functionalities beyond what our products currently offer. For example, you may need to generate intricate reports by consolidating data coming from multiple systems, automate tasks based on the properties of your requirements, etc. If that's the case, our REST APIs empower you to extend the capabilities of our products to better fulfill your needs.
Explore our REST APIs
Each product has its own REST API:
Requirement Yogi for Confluence:
Base URL: https://confluence.requirementyogi.com
Documentation: https://confluence.requirementyogi.com/swagger-ui/index.html
OpenAPI specifications: https://confluence.requirementyogi.com/v3/api-docs
Requirement Yogi for Jira:
Base URL: https://jira.requirementyogi.com
Documentation: https://jira.requirementyogi.com/swagger-ui/index.html
OpenAPI specifications: https://jira.requirementyogi.com/v3/api-docs
Prerequisites
In order to access the REST APIs, you need to:
Create a Requirement Yogi account.
Link an Atlassian account to your Requirement Yogi account.
Generate a personal access token.
Create an account
To create a Requirement Yogi account:
In the top navigation bar, click the sign in button.
Click the
Register
button.Fill the registration form.
Submit the form.
Once registered, you will receive a verification email.
Click the provided link to verify your email address.
Link an Atlassian account
To link an Atlassian account to your Requirement Yogi account:
Log in to your Requirement Yogi account.
In the top navigation bar, click the profile button.
Navigate to
Settings
.In the left sidebar, navigate to
Linked accounts
.Click the
Link
button.You will be redirected to the Atlassian authorization prompt.
You will be asked to log in to your Atlassian account if you haven’t already.
Choose the Atlassian site for which you want to use our REST APIs.
Make sure you agree with the requested permissions.
Make sure you’ve read our Privacy Policy and our Terms of Use.
Click the
Accept
button.You can repeat the link process to authorize access to our REST APIs for multiple Atlassian sites.
Please note that permissions are checked against the permissions of your linked Atlassian account.
Make sure the linked Atlassian account has the appropriate permissions for your use casecases.
Unlink the Atlassian account
To unlink the Atlassian account from your Requirement Yogi account:
Log in to your Requirement Yogi account.
In the top navigation bar, click the profile button.
Navigate to
Settings
.In the left sidebar, navigate to “Linked accounts”.
Click the
Unlink
button.
...
To completely unlink the Atlassian account, you also need to revoke the
Requirement Yogi integration
from your Atlassian account settings.
Revoke the Requirement Yogi integration
We retrieve the accessible Atlassian sites from the Atlassian REST API.
If you need to revoke the Requirement Yogi integration
or reset the accessible Atlassian sites:
Go to https://id.atlassian.com.
Log in to your Atlassian account.
In the top navigation bar, click the profile button.
Navigate to
Account settings
.In the top navigation bar, navigate to
Connected apps
.Locate the
Requirement Yogi integration
app.Click the
Remove access
button.
...
Generate a personal access token
...
To generate a personal access token:
...
Go to https://authapp.requirementyogi.com/realms/ry-cloud/protocol/openid-connect/token with the following information:
Headers:
Content-Type
:application/x-www-form-urlencoded
client_id
:backend-client
grant_type
:password
Log in to your Requirement Yogi account
password
: the password of your Requirement Yogi account
Data:
username
: the email address of .
Code Block | ||
---|---|---|
| ||
curl -L 'https://auth.requirementyogi.com/realms/ry-cloud/protocol/openid-connect/token' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'client_id=backend-client' \
-d 'grant_type=password' \
-d 'username=YOUR_EMAIL' \
-d 'password=YOUR_PASSWORD' |
If the request is successful, you will receive an access token and a refresh token:
Code Block | ||
---|---|---|
| ||
{
"access_token": "YOUR_ACCESS_TOKEN",
"expires_in": 300,
"refresh_expires_in": 1800,
"refresh_token": "YOUR_REFRESH_TOKEN",
"token_type": "Bearer",
"not-before-policy": 0,
"session_state": "f4c9edf6-855c-4493-9da8-d0939269d0f5",
"scope": "email profile"
} |
Refresh the tokens
Send a
POST
request to https://auth.requirementyogi.com/realms/ry-cloud/protocol/openid-connect/token with the following information:Headers:
Content-Type
:application/x-www-form-urlencoded
Data:
client_id
:backend-client
grant_type
:refresh_token
refresh_token
: the refresh token you received when your retrieved an access token
Code Block |
---|
curl -L 'https://auth.requirementyogi.com/realms/ry-cloud/protocol/openid-connect/token' \
-H 'Content-Type: application/x-www-form-urlencoded' \
-d 'client_id=backend-client' \
-d 'grant_type=refresh_token' \
-d 'refresh_token=YOUR_REFRESH_TOKEN' |
If the request is successful, you will receive a new access token and a new refresh token:
Code Block |
---|
{
"access_token": "YOUR_NEW_ACCESS_TOKEN",
"expires_in": 300,
"refresh_expires_in": 1800,
"refresh_token": "YOUR_NEW_REFRESH_TOKEN",
"token_type": "Bearer",
"not-before-policy": 0,
"session_state": "3b2a9f95-1521-4cf8-a3ac-36e1aa01c36c",
"scope": "email profile"
} |
.
In the top navigation bar, click the profile button.
Navigate to
Settings
.In the left sidebar, navigate to
Personal access tokens
.Click the
Generate new token
button.Choose a descriptive to name to identify the personal access token.
Choose the expiration of the personal access token.
Click the
Generate
button.Make sure to copy the personal access token.
For security reasons, it will never be shown again.
Make calls to the REST APIs
Choose the endpoint you want to use.
Add a
X-Base-URLUrl
header to your requests request containing the base URL of your Atlassian site (e.g.https://example.atlassian.net/wiki
for a Confluence instance,https://example.atlassian.net
for a Jira instance).Add an
Authorization
aX-Api-Key
header to your requests request containing the your personal access token prefixed withBearer
(e.g.Bearer YOUR_ACCESS_TOKEN
).Send the request:
Code Block | ||
---|---|---|
| ||
curl -L 'https://confluence.requirementyogi.com/rest/search?query=&limit=200&offset=0&spaceKey=SPACE' \ -H 'X-Base-URLUrl: https://example.atlassian.net/wiki' \ -H 'AuthorizationX-Api-Key: Bearer YOUR_ACCESS_TOKEN' |