Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
1177 lines (1176 sloc) 27.4 KB
---
swagger: "2.0"
info:
description: "RIHA-Browser API documentation"
version: "1.0"
title: "RIHA-Browser API"
license:
name: "MIT"
basePath: "/"
tags:
- name: "Environment configuration"
- name: "File resources"
- name: "Information system relations"
- name: "Information systems"
- name: "Issue events"
- name: "Issue timeline"
- name: "Issues"
- name: "Users"
schemes:
- "http"
paths:
/api/v1/dashboard/issues/my:
get:
summary: "List issues related to current user"
description: ""
operationId: "listUserRelatedIssues"
parameters:
- name: "page"
in: "query"
description: "page number"
required: false
type: "integer"
- name: "size"
in: "query"
description: "page size"
required: false
type: "integer"
- name: "filter"
in: "query"
description: "filter options"
required: false
type: "string"
- name: "sort"
in: "query"
description: "sorting options"
required: false
type: "string"
responses:
200:
description: "successful operation"
schema:
$ref: "#/definitions/PagedResponseDashboardIssue"
/api/v1/dashboard/issues/org:
get:
summary: "List issues related to current user organization"
description: ""
operationId: "listUserActiveOrganizationRelatedIssues"
parameters:
- name: "page"
in: "query"
description: "page number"
required: false
type: "integer"
- name: "size"
in: "query"
description: "page size"
required: false
type: "integer"
- name: "filter"
in: "query"
description: "filter options"
required: false
type: "string"
- name: "sort"
in: "query"
description: "sorting options"
required: false
type: "string"
responses:
200:
description: "successful operation"
schema:
$ref: "#/definitions/PagedResponseDashboardIssue"
/api/v1/environment:
get:
tags:
- "Environment configuration"
summary: "Retrieve environment"
description: ""
operationId: "environment"
parameters: []
responses:
default:
description: "successful operation"
/api/v1/environment/organization:
put:
tags:
- "Environment configuration"
summary: "Change active organization of the current user"
description: ""
operationId: "changeActiveOrganization"
parameters:
- in: "body"
name: "body"
required: false
schema:
type: "string"
responses:
default:
description: "successful operation"
deprecated: true
/api/v1/issues:
get:
tags:
- "Issues"
summary: "List all RIHA issues"
description: ""
operationId: "listIssues"
parameters:
- name: "page"
in: "query"
description: "page number"
required: false
type: "integer"
- name: "size"
in: "query"
description: "page size"
required: false
type: "integer"
- name: "filter"
in: "query"
description: "filter options"
required: false
type: "string"
- name: "sort"
in: "query"
description: "sorting options"
required: false
type: "string"
- name: "fields"
in: "query"
description: "field list"
required: false
type: "string"
responses:
200:
description: "successful operation"
schema:
$ref: "#/definitions/PagedResponseRihaIssueSummary"
/api/v1/issues/{issueId}:
get:
tags:
- "Issues"
summary: "Get single information system issue"
description: ""
operationId: "getInfoSystemIssue"
parameters:
- name: "issueId"
in: "path"
required: true
type: "integer"
format: "int64"
responses:
200:
description: "successful operation"
schema:
$ref: "#/definitions/Issue"
put:
tags:
- "Issues"
summary: "Update issue"
description: ""
operationId: "updateStatus"
parameters:
- name: "issueId"
in: "path"
required: true
type: "integer"
format: "int64"
- in: "body"
name: "body"
required: false
schema:
$ref: "#/definitions/IssueStatusUpdateModel"
responses:
200:
description: "successful operation"
schema:
$ref: "#/definitions/Issue"
/api/v1/issues/{issueId}/comments:
get:
tags:
- "Issue events"
summary: "List all issue comments"
description: ""
operationId: "listIssueComments"
parameters:
- name: "issueId"
in: "path"
required: true
type: "integer"
format: "int64"
- name: "page"
in: "query"
description: "page number"
required: false
type: "integer"
- name: "size"
in: "query"
description: "page size"
required: false
type: "integer"
- name: "filter"
in: "query"
description: "filter options"
required: false
type: "string"
- name: "sort"
in: "query"
description: "sorting options"
required: false
type: "string"
- name: "fields"
in: "query"
description: "field list"
required: false
type: "string"
responses:
200:
description: "successful operation"
schema:
$ref: "#/definitions/PagedResponseIssueComment"
post:
tags:
- "Issue events"
summary: "Create new issue comment"
description: ""
operationId: "createIssueComment"
parameters:
- name: "issueId"
in: "path"
required: true
type: "integer"
format: "int64"
- in: "body"
name: "body"
required: false
schema:
$ref: "#/definitions/IssueCommentModel"
responses:
200:
description: "successful operation"
schema:
$ref: "#/definitions/IssueComment"
/api/v1/issues/{issueId}/comments/{commentId}:
get:
tags:
- "Issue events"
summary: "Get single issue comment"
description: ""
operationId: "getIssueComment"
parameters:
- name: "issueId"
in: "path"
required: true
type: "integer"
format: "int64"
- name: "commentId"
in: "path"
required: true
type: "integer"
format: "int64"
responses:
200:
description: "successful operation"
schema:
$ref: "#/definitions/IssueComment"
/api/v1/issues/{issueId}/decisions:
post:
tags:
- "Issues"
summary: "Leave decision"
description: ""
operationId: "makeApprovalDecision"
parameters:
- name: "issueId"
in: "path"
required: true
type: "integer"
format: "int64"
- in: "body"
name: "body"
required: false
schema:
$ref: "#/definitions/IssueApprovalDecisionModel"
responses:
default:
description: "successful operation"
/api/v1/issues/{issueId}/timeline:
get:
tags:
- "Issue timeline"
summary: "Get issue timeline"
description: ""
operationId: "getTimeline"
parameters:
- name: "issueId"
in: "path"
required: true
type: "integer"
format: "int64"
- name: "page"
in: "query"
description: "page number"
required: false
type: "integer"
- name: "size"
in: "query"
description: "page size"
required: false
type: "integer"
responses:
200:
description: "successful operation"
schema:
$ref: "#/definitions/PagedResponseIssueEntity"
/api/v1/organizations/{organizationCode}/systems/issues:
get:
tags:
- "Issues"
summary: "List issues that belong to specific organization"
description: ""
operationId: "listOrganizationSystemsIssues"
parameters:
- name: "organizationCode"
in: "path"
required: true
type: "string"
- name: "page"
in: "query"
description: "page number"
required: false
type: "integer"
- name: "size"
in: "query"
description: "page size"
required: false
type: "integer"
- name: "filter"
in: "query"
description: "filter options"
required: false
type: "string"
- name: "sort"
in: "query"
description: "sorting options"
required: false
type: "string"
responses:
200:
description: "successful operation"
schema:
$ref: "#/definitions/PagedResponseDashboardIssue"
/api/v1/systems:
get:
tags:
- "Information systems"
summary: "List all existing information systems"
description: ""
operationId: "list"
parameters:
- name: "page"
in: "query"
description: "page number"
required: false
type: "integer"
- name: "size"
in: "query"
description: "page size"
required: false
type: "integer"
- name: "filter"
in: "query"
description: "filter options"
required: false
type: "string"
- name: "sort"
in: "query"
description: "sorting options"
required: false
type: "string"
- name: "fields"
in: "query"
description: "field list"
required: false
type: "string"
responses:
default:
description: "successful operation"
post:
tags:
- "Information systems"
summary: "Create new information system"
description: ""
operationId: "create"
parameters:
- in: "body"
name: "body"
required: false
schema:
$ref: "#/definitions/InfoSystemModel"
responses:
200:
description: "successful operation"
schema:
$ref: "#/definitions/InfoSystemModel"
/api/v1/systems/files:
get:
tags:
- "File resources"
summary: "List file resources"
description: ""
operationId: "list"
parameters:
- name: "page"
in: "query"
description: "page number"
required: false
type: "integer"
- name: "size"
in: "query"
description: "page size"
required: false
type: "integer"
- name: "filter"
in: "query"
description: "filter options"
required: false
type: "string"
- name: "sort"
in: "query"
description: "sorting options"
required: false
type: "string"
responses:
200:
description: "successful operation"
schema:
$ref: "#/definitions/PagedResponseFileResource"
/api/v1/systems/{reference}:
get:
tags:
- "Information systems"
summary: "Get existing information system"
description: ""
operationId: "get"
parameters:
- name: "reference"
in: "path"
required: true
type: "string"
responses:
200:
description: "successful operation"
schema:
$ref: "#/definitions/InfoSystemModel"
put:
tags:
- "Information systems"
summary: "Update existing information system"
description: ""
operationId: "update"
parameters:
- name: "reference"
in: "path"
required: true
type: "string"
- in: "body"
name: "body"
required: false
schema:
$ref: "#/definitions/InfoSystemModel"
responses:
200:
description: "successful operation"
schema:
$ref: "#/definitions/InfoSystemModel"
/api/v1/systems/{reference}/files:
post:
tags:
- "File resources"
summary: "Upload file"
description: ""
operationId: "upload"
parameters:
- name: "reference"
in: "path"
required: true
type: "string"
- name: "file"
in: "query"
required: true
type: "ref"
responses:
default:
description: "successful operation"
/api/v1/systems/{reference}/files/{uuid}:
get:
tags:
- "File resources"
summary: "Download file"
description: ""
operationId: "download"
parameters:
- name: "reference"
in: "path"
required: true
type: "string"
- name: "uuid"
in: "path"
required: true
type: "string"
format: "uuid"
responses:
default:
description: "successful operation"
/api/v1/systems/{reference}/issues:
get:
tags:
- "Issues"
summary: "List all issues of information system"
description: ""
operationId: "listInfoSystemIssues"
parameters:
- name: "reference"
in: "path"
required: true
type: "string"
- name: "page"
in: "query"
description: "page number"
required: false
type: "integer"
- name: "size"
in: "query"
description: "page size"
required: false
type: "integer"
- name: "filter"
in: "query"
description: "filter options"
required: false
type: "string"
- name: "sort"
in: "query"
description: "sorting options"
required: false
type: "string"
- name: "fields"
in: "query"
description: "field list"
required: false
type: "string"
responses:
200:
description: "successful operation"
schema:
$ref: "#/definitions/PagedResponseIssueSummaryModel"
post:
tags:
- "Issues"
summary: "Create new issue for information system"
description: ""
operationId: "createInfoSystemIssue"
parameters:
- name: "reference"
in: "path"
required: true
type: "string"
- in: "body"
name: "body"
required: false
schema:
$ref: "#/definitions/Issue"
responses:
200:
description: "successful operation"
schema:
$ref: "#/definitions/Issue"
/api/v1/systems/{reference}/relations:
get:
tags:
- "Information system relations"
summary: "List all info system relations"
description: ""
operationId: "list"
parameters:
- name: "reference"
in: "path"
required: true
type: "string"
responses:
200:
description: "successful operation"
schema:
type: "array"
items:
$ref: "#/definitions/RelationSummaryModel"
post:
tags:
- "Information system relations"
summary: "Create new relation for information system"
description: ""
operationId: "add"
parameters:
- name: "reference"
in: "path"
required: true
type: "string"
- in: "body"
name: "body"
required: false
schema:
$ref: "#/definitions/RelationModel"
responses:
200:
description: "successful operation"
schema:
$ref: "#/definitions/RelationSummaryModel"
/api/v1/systems/{reference}/relations/{relationId}:
delete:
tags:
- "Information system relations"
summary: "Deletes single relation of information system"
description: ""
operationId: "delete"
parameters:
- name: "reference"
in: "path"
required: true
type: "string"
- name: "relationId"
in: "path"
required: true
type: "integer"
format: "int64"
responses:
default:
description: "successful operation"
/api/v1/user:
get:
tags:
- "Users"
summary: "Retrieves user details"
description: ""
operationId: "getUserDetails"
parameters: []
responses:
200:
description: "successful operation"
schema:
$ref: "#/definitions/UserDetailsModel"
/api/v1/user/organization:
put:
tags:
- "Users"
summary: "Change active organization of the current user"
description: ""
operationId: "changeActiveOrganization"
parameters:
- in: "body"
name: "body"
required: false
schema:
type: "string"
responses:
default:
description: "successful operation"
definitions:
DashboardIssue:
type: "object"
properties:
id:
type: "integer"
format: "int64"
dateCreated:
type: "string"
format: "date-time"
type:
type: "string"
enum:
- "ESTABLISHMENT_REQUEST"
- "TAKE_INTO_USE_REQUEST"
- "MODIFICATION_REQUEST"
- "FINALIZATION_REQUEST"
title:
type: "string"
infoSystemFullName:
type: "string"
infoSystemShortName:
type: "string"
lastComment:
$ref: "#/definitions/DashboardIssueComment"
DashboardIssueComment:
type: "object"
properties:
id:
type: "integer"
format: "int64"
dateCreated:
type: "string"
format: "date-time"
authorName:
type: "string"
organizationName:
type: "string"
organizationCode:
type: "string"
FileResource:
type: "object"
properties:
fileResourceUuid:
type: "string"
format: "uuid"
infoSystemShortName:
type: "string"
infoSystemOwnerCode:
type: "string"
infoSystemOwnerName:
type: "string"
infoSystemUuid:
type: "string"
format: "uuid"
fileResourceName:
type: "string"
infoSystemName:
type: "string"
InfoSystemModel:
type: "object"
properties:
id:
type: "integer"
format: "int64"
lastPositiveApprovalRequestType:
type: "string"
enum:
- "ESTABLISHMENT_REQUEST"
- "TAKE_INTO_USE_REQUEST"
- "MODIFICATION_REQUEST"
- "FINALIZATION_REQUEST"
lastPositiveApprovalRequestDate:
type: "string"
format: "date-time"
lastPositiveEstablishmentRequestDate:
type: "string"
format: "date-time"
lastPositiveTakeIntoUseRequestDate:
type: "string"
format: "date-time"
lastPositiveFinalizationRequestDate:
type: "string"
format: "date-time"
details:
type: "object"
Issue:
type: "object"
properties:
id:
type: "integer"
format: "int64"
infoSystemUuid:
type: "string"
format: "uuid"
dateCreated:
type: "string"
format: "date-time"
title:
type: "string"
comment:
type: "string"
authorName:
type: "string"
authorPersonalCode:
type: "string"
organizationName:
type: "string"
organizationCode:
type: "string"
status:
type: "string"
enum:
- "OPEN"
- "CLOSED"
type:
type: "string"
enum:
- "ESTABLISHMENT_REQUEST"
- "TAKE_INTO_USE_REQUEST"
- "MODIFICATION_REQUEST"
- "FINALIZATION_REQUEST"
resolutionType:
type: "string"
enum:
- "POSITIVE"
- "NEGATIVE"
- "DISMISSED"
entityType:
type: "string"
enum:
- "ISSUE"
- "ISSUE_COMMENT"
- "ISSUE_EVENT"
IssueApprovalDecisionModel:
type: "object"
properties:
comment:
type: "string"
decisionType:
type: "string"
enum:
- "POSITIVE"
- "NEGATIVE"
- "DISMISSED"
IssueComment:
type: "object"
properties:
id:
type: "integer"
format: "int64"
issueId:
type: "integer"
format: "int64"
comment:
type: "string"
dateCreated:
type: "string"
format: "date-time"
authorName:
type: "string"
authorPersonalCode:
type: "string"
organizationName:
type: "string"
organizationCode:
type: "string"
entityType:
type: "string"
enum:
- "ISSUE"
- "ISSUE_COMMENT"
- "ISSUE_EVENT"
IssueCommentModel:
type: "object"
properties:
comment:
type: "string"
IssueEntity:
type: "object"
properties:
entityType:
type: "string"
enum:
- "ISSUE"
- "ISSUE_COMMENT"
- "ISSUE_EVENT"
IssueEventSummaryModel:
type: "object"
properties:
id:
type: "integer"
format: "int64"
type:
type: "string"
enum:
- "CLOSED"
- "DECISION"
organizationName:
type: "string"
organizationCode:
type: "string"
resolutionType:
type: "string"
enum:
- "POSITIVE"
- "NEGATIVE"
- "DISMISSED"
dateCreated:
type: "string"
format: "date-time"
IssueStatusUpdateModel:
type: "object"
properties:
comment:
type: "string"
status:
type: "string"
enum:
- "OPEN"
- "CLOSED"
resolutionType:
type: "string"
enum:
- "POSITIVE"
- "NEGATIVE"
- "DISMISSED"
IssueSummaryModel:
type: "object"
properties:
id:
type: "integer"
format: "int64"
infoSystemUuid:
type: "string"
format: "uuid"
dateCreated:
type: "string"
format: "date-time"
title:
type: "string"
organizationName:
type: "string"
organizationCode:
type: "string"
status:
type: "string"
enum:
- "OPEN"
- "CLOSED"
type:
type: "string"
enum:
- "ESTABLISHMENT_REQUEST"
- "TAKE_INTO_USE_REQUEST"
- "MODIFICATION_REQUEST"
- "FINALIZATION_REQUEST"
resolutionType:
type: "string"
enum:
- "POSITIVE"
- "NEGATIVE"
- "DISMISSED"
OrganizationModel:
type: "object"
properties:
code:
type: "string"
name:
type: "string"
PagedResponse:
type: "object"
properties:
totalElements:
type: "integer"
format: "int64"
content:
type: "array"
items:
type: "object"
size:
type: "integer"
format: "int32"
page:
type: "integer"
format: "int32"
totalPages:
type: "integer"
format: "int32"
PagedResponseDashboardIssue:
type: "object"
properties:
totalElements:
type: "integer"
format: "int64"
content:
type: "array"
items:
$ref: "#/definitions/DashboardIssue"
size:
type: "integer"
format: "int32"
page:
type: "integer"
format: "int32"
totalPages:
type: "integer"
format: "int32"
PagedResponseFileResource:
type: "object"
properties:
totalElements:
type: "integer"
format: "int64"
content:
type: "array"
items:
$ref: "#/definitions/FileResource"
size:
type: "integer"
format: "int32"
page:
type: "integer"
format: "int32"
totalPages:
type: "integer"
format: "int32"
PagedResponseIssueComment:
type: "object"
properties:
totalElements:
type: "integer"
format: "int64"
content:
type: "array"
items:
$ref: "#/definitions/IssueComment"
size:
type: "integer"
format: "int32"
page:
type: "integer"
format: "int32"
totalPages:
type: "integer"
format: "int32"
PagedResponseIssueEntity:
type: "object"
properties:
totalElements:
type: "integer"
format: "int64"
content:
type: "array"
items:
$ref: "#/definitions/IssueEntity"
size:
type: "integer"
format: "int32"
page:
type: "integer"
format: "int32"
totalPages:
type: "integer"
format: "int32"
PagedResponseIssueSummaryModel:
type: "object"
properties:
totalElements:
type: "integer"
format: "int64"
content:
type: "array"
items:
$ref: "#/definitions/IssueSummaryModel"
size:
type: "integer"
format: "int32"
page:
type: "integer"
format: "int32"
totalPages:
type: "integer"
format: "int32"
PagedResponseRihaIssueSummary:
type: "object"
properties:
totalElements:
type: "integer"
format: "int64"
content:
type: "array"
items:
$ref: "#/definitions/RihaIssueSummary"
size:
type: "integer"
format: "int32"
page:
type: "integer"
format: "int32"
totalPages:
type: "integer"
format: "int32"
RelationModel:
type: "object"
properties:
id:
type: "integer"
format: "int64"
infoSystemShortName:
type: "string"
type:
type: "string"
enum:
- "SUB_SYSTEM"
- "SUPER_SYSTEM"
- "USED_SYSTEM"
- "USER_SYSTEM"
RelationSummaryModel:
type: "object"
properties:
id:
type: "integer"
format: "int64"
infoSystemUuid:
type: "string"
format: "uuid"
infoSystemName:
type: "string"
infoSystemShortName:
type: "string"
type:
type: "string"
enum:
- "SUB_SYSTEM"
- "SUPER_SYSTEM"
- "USED_SYSTEM"
- "USER_SYSTEM"
RihaIssueSummary:
type: "object"
properties:
id:
type: "integer"
format: "int64"
infoSystemShortName:
type: "string"
dateCreated:
type: "string"
format: "date-time"
title:
type: "string"
issueType:
type: "string"
enum:
- "ESTABLISHMENT_REQUEST"
- "TAKE_INTO_USE_REQUEST"
- "MODIFICATION_REQUEST"
- "FINALIZATION_REQUEST"
organizationName:
type: "string"
organizationCode:
type: "string"
status:
type: "string"
enum:
- "OPEN"
- "CLOSED"
infoSystemFullName:
type: "string"
resolutionType:
type: "string"
enum:
- "POSITIVE"
- "NEGATIVE"
- "DISMISSED"
events:
type: "array"
items:
$ref: "#/definitions/IssueEventSummaryModel"
UserDetailsModel:
type: "object"
properties:
personalCode:
type: "string"
firstName:
type: "string"
lastName:
type: "string"
organizations:
type: "array"
items:
$ref: "#/definitions/OrganizationModel"
activeOrganization:
$ref: "#/definitions/OrganizationModel"
roles:
type: "array"
items:
type: "string"