Bibliotheca Gateway API API Reference
Bibliotheca Gateway service is responsible for communication between all application microservices. Also it's main API endpoint for Bibliotheca clients such as Bibliotheca.Client (Angular SPA) or custom scripts.
Terms of Service: None
Version: v1
Authentication
apiKey
As a authorization header you can send one of the following token:
- Bearer
- SecureToken
- UserToken
- ProjectToken
Branches
Get all branches for specific project.
Endpoint returns all branches for specific project.
Project id.
Branches returned successfully.
Request cannot be proceeded..
Project not exists.
Internal server error.
Response Example (200 OK)
[
{
"siteName": "string",
"docsDir": "string",
"name": "string",
"mkDocsYaml": "string"
}
]
Create a new branch.
Endpoint for creating a new branch in project. Information about branch should be send as a JSON in body request.
Information about branch.
Project id.
Request Example
{
"name": "string",
"mkDocsYaml": "string"
}
Success
Get information about specific branch in project.
Endpoint returns information about one specific project.
Project id.
Branch name.
Success
Response Example (200 OK)
{
"siteName": "string",
"docsDir": "string",
"name": "string",
"mkDocsYaml": "string"
}
Update information about branch.
Endpoint for updating information about branch. Information about branch should be send as a JSON in body request.
Information about branch.
Project id.
Branch name.
Request Example
{
"name": "string",
"mkDocsYaml": "string"
}
Success
Delete specific branch.
Endpoint for deleting specific branch. Besides branch information endpoint deletes also documentation file stored in branch and index from search service.
Project id.
Branch name.
Success
Documents
Get list of documents from branch in project.
Endpoint which returns list of documents from specifuc branch in project. Each object contains base information about document.
Project id.
Branch name.
Success
Response Example (200 OK)
[
{
"uri": "string",
"name": "string",
"conentType": "string"
}
]
Update all documentation file (form).
Endpoint which is used to send all documentation to specific branch. Current documentation files are deleted and new files are stored instead of them. Compressed file should have one root folder which name is the name of the branch. Compressed file should be send as a part of HTML form in field: "file".
After updating documentation files reindex is executed automatically (if you have search service enabled).
Project id.
Branch name.
(no description)
(no description)
(no description)
(no description)
(no description)
(no description)
Success
Create new document information.
Endpoint which is used to add a new documentation file to branch in project. Documentation files can be send one by one using this endpoint. However after sending all of the documentation files reindex have to be run manually (if search service is enabled).
Document data.
Project id.
Branch name.
Request Example
{
"content": "string (byte)",
"uri": "string",
"name": "string",
"conentType": "string"
}
Success
Get information about specific document.
Endpoint returns detailed information about document. Contains also document body as a JSON property.
Project id.
Branch name.
File uri. As a path separator to file is used ":". For example path "docs/folder/index.md" should be converted to "docs:folder:index.md".
Success
Response Example (200 OK)
{
"content": "string (byte)",
"uri": "string",
"name": "string",
"conentType": "string"
}
Update documentation information.
Endpoint which is used to update documentation file in branch in project. After updating documentation data reindex have to be run manually (if search service is enabled).
Document data.
Project id.
Branch name.
File uri. As a path separator to file is used ":". For example path "docs/folder/index.md" should be converted to "docs:folder:index.md".
Request Example
{
"content": "string (byte)",
"uri": "string",
"name": "string",
"conentType": "string"
}
Success
Delete documentation file.
Endpoint which is used to delete specific documentation file. After deleting documentation file reindex have to be run manually (if search service is enabled).
Project id.
Branch name.
File uri. As a path separator to file is used ":". For example path "docs/folder/index.md" should be converted to "docs:folder:index.md".
Success
Get document content.
Endpoint returns document content. Markdown files are converted to HTML and returned as a HTML files. Response returns specific file and proper content type based on requested file.
Project id.
Branch name.
File uri. As a path separator to file is used ":". For example path "docs/folder/index.md" should be converted to "docs:folder:index.md".
Success
Response Example (200 OK)
{
"fileContents": "string (byte)",
"contentType": "string",
"fileDownloadName": "string"
}
Update all documentation file (body).
Endpoint which is used to send all documentation to specific branch. Current documentation files are deleted and new files are stored instead of them. Compressed file should have one root folder which name is the name of the branch. Compressed file should be send as request body.
After updating documentation files reindex is executed automatically (if you have search service enabled).
Project id.
Branch name.
Success
Groups
Get all groups.
Endpoint returns all groups which are defined in all documentation projects.
Success
Response Example (200 OK)
[
"string"
]
Health
Get information about health.
Endpoint returns simple message when service is alive and reachable. It's used by service discovery to preapare information about service health.
Success
Response Example (200 OK)
"string"
Projects
Get list of projects.
Endpoint returns projects stored in the system.
(no description)
Groups=aaa&Groups=bbb
)(no description)
Tags=aaa&Tags=bbb
)(no description)
(no description)
(no description)
Success
Response Example (200 OK)
{
"results": [
{
"id": "string",
"name": "string",
"description": "string",
"defaultBranch": "string",
"visibleBranches": [
"string"
],
"tags": [
"string"
],
"group": "string",
"projectSite": "string",
"contactPeople": [
{
"name": "string",
"email": "string"
}
],
"editLinks": [
{
"branchName": "string",
"link": "string"
}
],
"accessToken": "string",
"isAccessLimited": "boolean"
}
],
"allResults": "integer (int32)"
}
Create a new project.
Endpoint for creating a new project. Project is automatically assigned to the user (if authorization service is enabled).
Project information.
Request Example
{
"id": "string",
"name": "string",
"description": "string",
"defaultBranch": "string",
"visibleBranches": [
"string"
],
"tags": [
"string"
],
"group": "string",
"projectSite": "string",
"contactPeople": [
{
"name": "string",
"email": "string"
}
],
"editLinks": [
{
"branchName": "string",
"link": "string"
}
],
"accessToken": "string",
"isAccessLimited": "boolean"
}
Success
Get specific project.
Endpoint returns detailed information about specific project.
Project id.
Success
Response Example (200 OK)
{
"id": "string",
"name": "string",
"description": "string",
"defaultBranch": "string",
"visibleBranches": [
"string"
],
"tags": [
"string"
],
"group": "string",
"projectSite": "string",
"contactPeople": [
{
"name": "string",
"email": "string"
}
],
"editLinks": [
{
"branchName": "string",
"link": "string"
}
],
"accessToken": "string",
"isAccessLimited": "boolean"
}
Update information about project.
Endpoint for updating information about project.
Project information.
Project id.
Request Example
{
"id": "string",
"name": "string",
"description": "string",
"defaultBranch": "string",
"visibleBranches": [
"string"
],
"tags": [
"string"
],
"group": "string",
"projectSite": "string",
"contactPeople": [
{
"name": "string",
"email": "string"
}
],
"editLinks": [
{
"branchName": "string",
"link": "string"
}
],
"accessToken": "string",
"isAccessLimited": "boolean"
}
Success
Delete specific project.
Endpoint for deleting specific project. Besides project information all branches and documentation files are deleting. Also documentation is deleted from search index (if search service is enabled).
Project id.
Success
Get project access token.
Endpoint for getting project token assigned to the project. That project token can be used to sending documentation files to all branches in project. Project token can be downloaded only by users assigned to specific project (if authorization service is enabled).
Project id.
Success
Response Example (200 OK)
{
"accessToken": "string"
}
Search
Search by specific query (filter).
Searching is done by connected search service (for example Azure search).
(no description)
(no description)
(no description)
Success
Response Example (200 OK)
{
"numberOfResults": "integer (int32)",
"elapsedMilliseconds": "integer (int64)",
"results": [
{
"document": {
"id": "string",
"url": "string",
"fileUri": "string",
"title": "string",
"projectId": "string",
"projectName": "string",
"branchName": "string",
"content": "string",
"tags": [
"string"
]
},
"highlights": "object",
"score": "number (double)"
}
]
}
Search by specific query (filter) in specific project's branch.
Searching is done by connected search service (for example Azure search). Serach is executed only in contect of specific project and branch.
(no description)
(no description)
(no description)
Project id.
Branch name.
Success
Response Example (200 OK)
{
"numberOfResults": "integer (int32)",
"elapsedMilliseconds": "integer (int64)",
"results": [
{
"document": {
"id": "string",
"url": "string",
"fileUri": "string",
"title": "string",
"projectId": "string",
"projectName": "string",
"branchName": "string",
"content": "string",
"tags": [
"string"
]
},
"highlights": "object",
"score": "number (double)"
}
]
}
Add a new documentation information to search index.
Endpoint is used to adding new documentation files to search index. It's batch operation so you can send multiple files at once.
List of documentations which should be added to search index.
Projetc id.
Branch name.
Request Example
[
{
"id": "string",
"url": "string",
"fileUri": "string",
"title": "string",
"projectId": "string",
"projectName": "string",
"branchName": "string",
"content": "string",
"tags": [
"string"
]
}
]
Success
Delete search index created for branch in specific project.
Endpoint removes from search index information about branch and project. Searching shouldn't return any documents from that branch and project.
Project id.
Branch name.
Success
Refresh search index.
Endpoint sending information to crawler service (it crawler service is enabled). Crawler is resposible for reindex all documentation in specific project and branch.
Project id.
Branch name.
Success
Get status about refreshing index.
Endpoint returns information from crawler about refreshing status (if crawler service is enabled).
Project id.
Branch name.
Success
Response Example (200 OK)
{
"indexStatus": "integer (int32)",
"projectId": "string",
"branchName": "string",
"startTime": "string (date-time)",
"numberOfIndexedDocuments": "integer (int32)",
"numberOfAllDocuments": "integer (int32)"
}
TableOfContents
Get table of contents for specific branch in project.
Endpoint is resposible for returning table of contents contained in specific branch in project.
Project id.
Branch name.
Success
Tags
Users
Get list of users.
Endpoint returns all users defined in ths authorization service.
Success
Response Example (200 OK)
[
{
"id": "string",
"name": "string",
"role": "integer (int32)",
"accessToken": "string",
"projects": [
"string"
]
}
]
Create a new user.
Endpoint for creating new user information.
User information.
Request Example
{
"id": "string",
"name": "string",
"role": "integer (int32)",
"accessToken": "string",
"projects": [
"string"
]
}
Success
Get specific user.
Endpoint returns information about specific user.
User id.
Success
Update user information.
Endpoint for updating user information.
User information.
User id.
Request Example
{
"id": "string",
"name": "string",
"role": "integer (int32)",
"accessToken": "string",
"projects": [
"string"
]
}
Success
Delete user.
Endpoint for deleting user.
User id.
Success
Refresh access token.
Endpoint is resposible for saving new access token for user.
New access token.
User id.
Request Example
{
"accessToken": "string"
}
Success
Schema Definitions
ExtendedBranchDto: object
- siteName: string
- docsDir: string
- name: string
- mkDocsYaml: string
Example
{
"siteName": "string",
"docsDir": "string",
"name": "string",
"mkDocsYaml": "string"
}
BranchDto: object
- name: string
- mkDocsYaml: string
Example
{
"name": "string",
"mkDocsYaml": "string"
}
BaseDocumentDto: object
- uri: string
- name: string
- conentType: string
Example
{
"uri": "string",
"name": "string",
"conentType": "string"
}
DocumentDto: object
- content: string (byte)
- uri: string
- name: string
- conentType: string
Example
{
"content": "string (byte)",
"uri": "string",
"name": "string",
"conentType": "string"
}
FileContentResult: object
- fileContents: string (byte)
- contentType: string
- fileDownloadName: string
Example
{
"fileContents": "string (byte)",
"contentType": "string",
"fileDownloadName": "string"
}
FilteredResutsDto[ProjectDto]: object
- results: object[]
- allResults: integer (int32)
Example
{
"results": [
{
"id": "string",
"name": "string",
"description": "string",
"defaultBranch": "string",
"visibleBranches": [
"string"
],
"tags": [
"string"
],
"group": "string",
"projectSite": "string",
"contactPeople": [
{
"name": "string",
"email": "string"
}
],
"editLinks": [
{
"branchName": "string",
"link": "string"
}
],
"accessToken": "string",
"isAccessLimited": "boolean"
}
],
"allResults": "integer (int32)"
}
ProjectDto: object
- id: string
- name: string
- description: string
- defaultBranch: string
- visibleBranches: string[]
- tags: string[]
- group: string
- projectSite: string
- contactPeople: object[]
- editLinks: object[]
- accessToken: string
- isAccessLimited: boolean
Example
{
"id": "string",
"name": "string",
"description": "string",
"defaultBranch": "string",
"visibleBranches": [
"string"
],
"tags": [
"string"
],
"group": "string",
"projectSite": "string",
"contactPeople": [
{
"name": "string",
"email": "string"
}
],
"editLinks": [
{
"branchName": "string",
"link": "string"
}
],
"accessToken": "string",
"isAccessLimited": "boolean"
}
EditLinkDto: object
- branchName: string
- link: string
Example
{
"branchName": "string",
"link": "string"
}
DocumentSearchResultDto[DocumentIndexDto]: object
- numberOfResults: integer (int32)
- elapsedMilliseconds: integer (int64)
- results: object[]
Example
{
"numberOfResults": "integer (int32)",
"elapsedMilliseconds": "integer (int64)",
"results": [
{
"document": {
"id": "string",
"url": "string",
"fileUri": "string",
"title": "string",
"projectId": "string",
"projectName": "string",
"branchName": "string",
"content": "string",
"tags": [
"string"
]
},
"highlights": "object",
"score": "number (double)"
}
]
}
SearchResultDto[DocumentIndexDto]: object
- document: DocumentIndexDto
- highlights: object
- score: number (double)
Example
{
"document": {
"id": "string",
"url": "string",
"fileUri": "string",
"title": "string",
"projectId": "string",
"projectName": "string",
"branchName": "string",
"content": "string",
"tags": [
"string"
]
},
"highlights": "object",
"score": "number (double)"
}
DocumentIndexDto: object
- id: string
- url: string
- fileUri: string
- title: string
- projectId: string
- projectName: string
- branchName: string
- content: string
- tags: string[]
Example
{
"id": "string",
"url": "string",
"fileUri": "string",
"title": "string",
"projectId": "string",
"projectName": "string",
"branchName": "string",
"content": "string",
"tags": [
"string"
]
}
IndexStatusDto: object
- indexStatus: integer (int32) , x ∈ { 0 , 1 }
- projectId: string
- branchName: string
- startTime: string (date-time)
- numberOfIndexedDocuments: integer (int32)
- numberOfAllDocuments: integer (int32)
Example
{
"indexStatus": "integer (int32)",
"projectId": "string",
"branchName": "string",
"startTime": "string (date-time)",
"numberOfIndexedDocuments": "integer (int32)",
"numberOfAllDocuments": "integer (int32)"
}