RMsis provides GraphQL API's on all major entities and relationships. You can use these API's to develop integrations between RMsis and other applications. This guide will help you to understand how to access and utilise these API's.
Availability
RMsis 1.8.9.4
...
API's to develop integrations between RMsis and other applications. This guide will help you to understand how to access and utilise these API's.
Prerequisites
This section covers primary information needed to access RMsis API's
...
There are two main kind of resources available in RMsis, entities and relationships.
Entity
- All distinct and independent resources in RMsis are called entity.
- As RMsis imports some of them from JIRA, we can classify entities as internal and external.
- Internal Entities
- Requirement
- Planned
- Unplanned
- Release
- Test Case (Test Steps as its part)
- Test Run
- External Entity
- User
- Project
- In API's,
- For internal entities, all CRUD operations are provided, whereas,
- For external entities, only retrieve operation is provided (to get RMsis internal ID) and we encourage you to use JIRA Rest API's for other operations.
Relationship
- Links between entities is called relationship
- In API's, CRUD operations are provided for relationships
...
- For entities
create<Entity_Name>
update<Entity_Name>
delete<Entity_Name>
- For relationships
createRelationship
deleteRelationship
More information about Structure of API's can be obtained from GraphQL Schema file.
...
RMsis provides GraphiQL Playground (https://github.com/graphql/graphiql) build along side RMsis plugin for API documentation and testing API calls against your system. It can be accessed from your JIRA Menu Bar >> RMsis >> API Playground (<Jira_base_url>/secure/ApiPlayground.jspa
). A view of the GraphiQL user interface is presented below:
Samples
Few samples based on RMsis GraphQL,
...
This section contains request and response samples based on current RMsis GraphQL implementation.
Information | Request Query | Response Code | Response JSON |
---|
Fetch list of Priority in system |
Code Block |
---|
language | json |
---|
theme | Emacs |
---|
collapse | true |
---|
| {
getPriorities {
id
name
}
} |
| 200 |
Code Block |
---|
language | json |
---|
theme | Emacs |
---|
collapse | true |
---|
| {
"data": {
"getPriorities": [
{
"id": 1,
"name": "Blocker"
},
{
"id": 2,
"name": "Critical"
},
{
"id": 3,
"name": "Major"
},
{
"id": 4,
"name": "Minor"
},
{
"id": 5,
"name": "Trivial"
}
]
}
} |
|
Fetch list of Users available in RMsis |
Code Block |
---|
language | json |
---|
theme | Emacs |
---|
collapse | true |
---|
| {
getUsers {
id
externalId
}
} |
| 200 |
Code Block |
---|
language | json |
---|
theme | Emacs |
---|
collapse | true |
---|
| {
"data": {
"getUsers": [
{
"id": 703,
"externalId": "admin"
},
{
"id": 699,
"externalId": "userone"
},
{
"id": 701,
"externalId": "test"
},
{
"id": 705,
"externalId": "usertwo"
}
]
}
} |
|
Fetch single requirement by ID |
Code Block |
---|
language | json |
---|
theme | Emacs |
---|
collapse | true |
---|
| {
getRequirementById(id: 1) {
id
summary
description
externalId
createdAt
categories {
id
name
}
reporter {
id
}
priority {
name
}
}
} |
| 200 |
Code Block |
---|
language | json |
---|
theme | Emacs |
---|
collapse | true |
---|
| {
"data": {
"getRequirementById": {
"id": 1,
"summary": "Requirement 1",
"description": "Requirement <p>description</p>",
"externalId": null,
"createdAt": "22 Oct 1988 05:30 AM",
"categories": [
{
"id": 1001,
"name": "Category 1"
},
{
"id": 1002,
"name": "Category 2"
}
],
"reporter": {
"id": 24
},
"priority": {
"name": "Major"
}
}
}
} |
|
Fetch requirement by ID |
Code Block |
---|
language | json |
---|
theme | Emacs |
---|
collapse | true |
---|
| {
getRequirementById(id: 222) {
id
summary
}
}
|
| 404 |
Code Block |
---|
language | json |
---|
theme | Emacs |
---|
collapse | true |
---|
| {
"data": {
"getRequirementById": null
},
"errors": [
{
"message": "Requirement with ID: 2 not found",
"locations": [
{
"line": 2,
"column": 3
}
],
"path": [
"getRequirementById"
]
}
]
} |
|
Create planned requirement |
Code Block |
---|
language | json |
---|
theme | Emacs |
---|
collapse | true |
---|
| mutation {
createPlannedRequirement(projectId: 709, summary: "New Requirement Summary") {
id
summary
createdAt
}
} |
| 200 |
Code Block |
---|
language | json |
---|
theme | Emacs |
---|
collapse | true |
---|
| {
"data": {
"createPlannedRequirement": {
"id": 2,
"summary": "New Requirement Summary",
"createdAt": "16 Apr 2018 12:55 PM"
}
}
} |
|
Delete Test Case |
Code Block |
---|
language | json |
---|
theme | Emacs |
---|
collapse | true |
---|
| mutation {
deleteTestCase(id: 5)
}
|
| 200 |
Code Block |
---|
language | json |
---|
theme | Eclipse |
---|
collapse | true |
---|
| {
"data": {
"deleteTestCase": true
}
} |
|
Fetch linked artifacts of a requirement |
Code Block |
---|
language | json |
---|
theme | Emacs |
---|
collapse | true |
---|
| {
getTargetRelationshipEntities(name: REQUIREMENT_ARTIFACT, sourceId: 1074)
} |
| 200 |
Code Block |
---|
language | json |
---|
theme | Emacs |
---|
collapse | true |
---|
| {
"data": {
"getTargetRelationshipEntities": [
839
]
}
} |
|
Fetch artifact externalID using RMsis ID |
Code Block |
---|
language | json |
---|
theme | Emacs |
---|
collapse | true |
---|
| {
getArtifactById(id: 839) {
id
externalId
}
} |
| 200 |
Code Block |
---|
language | json |
---|
theme | Emacs |
---|
collapse | true |
---|
| {
"data": {
"getArtifactById": {
"id": 839,
"externalId": "10023"
}
}
} |
|
Known Limitations
This section covers known limitations of current implementation.
- For external entities (i.e. JIRA entities), only internal and external ID is return
- we encourage you to use JIRA Rest API's for more information.
- Meta API's for custom fields are currently not available.
- API's for priviledged privileged operations like version, commit, etc. are currently not available.
- Some operations requiring a UI context (like move etc.) are not yet provided.
- API's for configuration and administration are currently not available.