-
Notifications
You must be signed in to change notification settings - Fork 1
Issues CRUD
This application allows you to create, read, modify and delete previously created issues.
Each of the available actions is described here.
If you want to add a new issue, you have to send a request with HTTP PUT method. The endpoint of this action is "api/issue".
In the request body you have to insert a body in JSON format, like shown below.
There are four string field (Alias, Name, Description and AssignUserId) witch are required, three integers (projectId, boardId, statusId) witch projectId and statusId is required and boardId can be nullable by default and datetime (CreatedOn) witch default is set to now.
{
"data": {
"alias": "string",
"name": "string",
"description": "string",
"projectId": 0,
"boardId": 0,
"statusId": 0,
"assignUserId": "string",
"createdOn": "2022-03-18T10:16:56.577Z"
}
}
If all goes fine, you will receive the following response (view in Swagger):
If you want to get a list of a issues, you have to send a request with HTTP GET method. The endpoint of this action is "api/issue".
It is possible to filter a results by phrase and boardId. You can specify an expression that must be contained in the name, alias or description (any of the following may contain the specified phrase). If you don't specify any expresion, then you will receive all projects. You must add PageSize and PageNumer. In the next release, I will add the default values.
If you want to get a single issue, you have to send a request with HTTP GET method. The endpoint of this action is "api/issue/{id}", where {id} is a identifier of a searched issue.
If you want to update a issue, you have to send a request with HTTP PUT method. The endpoint of this action is "api/issue/{id}". In the request body you have to insert a body in JSON format, like shown below. It is required to enter all properties.
{
"alias": "Issue's alias",
"name": "Name of issue",
"description": "Issue's description",
"projectId": 1,
"boardId": 1,
"statusId": 1,
"assignUserId": "679381f2-06a1-4e22-beda-179e8e9e3236"
}
It is possible to update only selected properties of issue. In this case you have to send a request with HTTP PATCH methodto the "api/issue/{id}" endpoint. In the request body you have to insert a body in JSON format, like shown below. If you want to not update some property, you can enter a "null" (like in "assignUserId") or do not enter anything (like in "name"). If a field is nullable and you want to insert a "null" value into in, you can do it like shown in the example below for "description" property. If you want to specify a new not null value, you can do it like for "isActive" property in the example.
{
"alias": {
"data": "Update issue alias"
},
"description": {
"data": "Update issue description"
},
"boardId": {
"data": 1
},
"assignUserId": null
}
If you want to delete a issue, you have to send a request with HTTP DELETE method. The endpoint of this action is "api/issue/{id}". The specified project actually will not be deleted, but it's flag "isActive" will be changed to "false".