All checks were successful
Build and Release / release (push) Successful in 1m30s
3373 lines
88 KiB
YAML
3373 lines
88 KiB
YAML
basePath: /
|
|
definitions:
|
|
history-api_internal_dtos_request.AddProjectMemberDto:
|
|
properties:
|
|
role:
|
|
enum:
|
|
- EDITOR
|
|
- VIEWER
|
|
type: string
|
|
user_id:
|
|
type: string
|
|
required:
|
|
- role
|
|
- user_id
|
|
type: object
|
|
history-api_internal_dtos_request.BBox:
|
|
properties:
|
|
max_lat:
|
|
type: number
|
|
max_lng:
|
|
type: number
|
|
min_lat:
|
|
type: number
|
|
min_lng:
|
|
type: number
|
|
required:
|
|
- max_lat
|
|
- max_lng
|
|
- min_lat
|
|
- min_lng
|
|
type: object
|
|
history-api_internal_dtos_request.ChangeOwnerDto:
|
|
properties:
|
|
new_owner_id:
|
|
type: string
|
|
required:
|
|
- new_owner_id
|
|
type: object
|
|
history-api_internal_dtos_request.ChangePasswordDto:
|
|
properties:
|
|
new_password:
|
|
maxLength: 64
|
|
minLength: 8
|
|
type: string
|
|
old_password:
|
|
maxLength: 64
|
|
minLength: 8
|
|
type: string
|
|
required:
|
|
- new_password
|
|
type: object
|
|
history-api_internal_dtos_request.ChangeRoleDto:
|
|
properties:
|
|
role_ids:
|
|
items:
|
|
type: string
|
|
minItems: 1
|
|
type: array
|
|
required:
|
|
- role_ids
|
|
type: object
|
|
history-api_internal_dtos_request.ChatbotDto:
|
|
properties:
|
|
project_id:
|
|
type: string
|
|
question:
|
|
type: string
|
|
required:
|
|
- question
|
|
type: object
|
|
history-api_internal_dtos_request.CommitSnapshot:
|
|
properties:
|
|
editor_feature_collection:
|
|
$ref: '#/definitions/history-api_internal_dtos_request.FeatureCollection'
|
|
entities:
|
|
items:
|
|
$ref: '#/definitions/history-api_internal_dtos_request.EntitySnapshot'
|
|
type: array
|
|
entity_wiki:
|
|
items:
|
|
$ref: '#/definitions/history-api_internal_dtos_request.EntityWikiLinkSnapshot'
|
|
type: array
|
|
geometries:
|
|
items:
|
|
$ref: '#/definitions/history-api_internal_dtos_request.GeometrySnapshot'
|
|
type: array
|
|
geometry_entity:
|
|
items:
|
|
$ref: '#/definitions/history-api_internal_dtos_request.GeometryEntitySnapshot'
|
|
type: array
|
|
wikis:
|
|
items:
|
|
$ref: '#/definitions/history-api_internal_dtos_request.WikiSnapshot'
|
|
type: array
|
|
type: object
|
|
history-api_internal_dtos_request.CreateCommitDto:
|
|
properties:
|
|
edit_summary:
|
|
maxLength: 500
|
|
type: string
|
|
snapshot_json:
|
|
$ref: '#/definitions/history-api_internal_dtos_request.CommitSnapshot'
|
|
required:
|
|
- edit_summary
|
|
- snapshot_json
|
|
type: object
|
|
history-api_internal_dtos_request.CreateProjectDto:
|
|
properties:
|
|
description:
|
|
type: string
|
|
status:
|
|
enum:
|
|
- PRIVATE
|
|
- PUBLIC
|
|
- ARCHIVE
|
|
type: string
|
|
title:
|
|
maxLength: 255
|
|
type: string
|
|
required:
|
|
- title
|
|
type: object
|
|
history-api_internal_dtos_request.CreateSubmissionDto:
|
|
properties:
|
|
commit_id:
|
|
type: string
|
|
content:
|
|
type: string
|
|
project_id:
|
|
type: string
|
|
required:
|
|
- commit_id
|
|
- project_id
|
|
type: object
|
|
history-api_internal_dtos_request.CreateTokenDto:
|
|
properties:
|
|
email:
|
|
type: string
|
|
token_type:
|
|
allOf:
|
|
- $ref: '#/definitions/history-api_pkg_constants.TokenType'
|
|
enum:
|
|
- 1
|
|
- 2
|
|
- 3
|
|
- 4
|
|
required:
|
|
- email
|
|
- token_type
|
|
type: object
|
|
history-api_internal_dtos_request.CreateUserDto:
|
|
properties:
|
|
display_name:
|
|
maxLength: 50
|
|
minLength: 2
|
|
type: string
|
|
email:
|
|
type: string
|
|
password:
|
|
maxLength: 64
|
|
minLength: 8
|
|
type: string
|
|
role_ids:
|
|
items:
|
|
type: string
|
|
minItems: 1
|
|
type: array
|
|
required:
|
|
- display_name
|
|
- email
|
|
- password
|
|
- role_ids
|
|
type: object
|
|
history-api_internal_dtos_request.CreateUserVerificationDto:
|
|
properties:
|
|
content:
|
|
minLength: 10
|
|
type: string
|
|
media_ids:
|
|
items:
|
|
type: string
|
|
type: array
|
|
verify_type:
|
|
enum:
|
|
- ID_CARD
|
|
- EDUCATION
|
|
- EXPERT
|
|
- OTHER
|
|
type: string
|
|
required:
|
|
- content
|
|
- verify_type
|
|
type: object
|
|
history-api_internal_dtos_request.EntitySnapshot:
|
|
properties:
|
|
base_hash:
|
|
type: string
|
|
base_updated_at:
|
|
type: string
|
|
description:
|
|
type: string
|
|
id:
|
|
type: string
|
|
name:
|
|
type: string
|
|
operation:
|
|
enum:
|
|
- create
|
|
- update
|
|
- delete
|
|
- reference
|
|
type: string
|
|
slug:
|
|
type: string
|
|
source:
|
|
enum:
|
|
- inline
|
|
- ref
|
|
type: string
|
|
status:
|
|
enum:
|
|
- 0
|
|
- 1
|
|
type: integer
|
|
time_end:
|
|
type: number
|
|
time_start:
|
|
type: number
|
|
required:
|
|
- id
|
|
type: object
|
|
history-api_internal_dtos_request.EntityWikiLinkSnapshot:
|
|
properties:
|
|
entity_id:
|
|
type: string
|
|
is_deleted:
|
|
enum:
|
|
- 0
|
|
- 1
|
|
type: integer
|
|
operation:
|
|
enum:
|
|
- reference
|
|
- delete
|
|
- binding
|
|
type: string
|
|
wiki_id:
|
|
type: string
|
|
required:
|
|
- entity_id
|
|
- wiki_id
|
|
type: object
|
|
history-api_internal_dtos_request.Feature:
|
|
properties:
|
|
geometry:
|
|
items:
|
|
type: integer
|
|
type: array
|
|
properties:
|
|
$ref: '#/definitions/history-api_internal_dtos_request.FeatureProperties'
|
|
type:
|
|
type: string
|
|
required:
|
|
- geometry
|
|
- properties
|
|
- type
|
|
type: object
|
|
history-api_internal_dtos_request.FeatureCollection:
|
|
properties:
|
|
features:
|
|
items:
|
|
$ref: '#/definitions/history-api_internal_dtos_request.Feature'
|
|
type: array
|
|
type:
|
|
type: string
|
|
required:
|
|
- features
|
|
- type
|
|
type: object
|
|
history-api_internal_dtos_request.FeatureProperties:
|
|
properties:
|
|
binding:
|
|
items:
|
|
type: string
|
|
type: array
|
|
entity_id:
|
|
type: string
|
|
entity_ids:
|
|
items:
|
|
type: string
|
|
type: array
|
|
entity_name:
|
|
type: string
|
|
entity_names:
|
|
items:
|
|
type: string
|
|
type: array
|
|
entity_type_id:
|
|
type: string
|
|
geometry_preset:
|
|
type: string
|
|
id: {}
|
|
time_end:
|
|
type: number
|
|
time_start:
|
|
type: number
|
|
type:
|
|
type: string
|
|
required:
|
|
- id
|
|
type: object
|
|
history-api_internal_dtos_request.ForgotPasswordDto:
|
|
properties:
|
|
email:
|
|
maxLength: 255
|
|
minLength: 5
|
|
type: string
|
|
new_password:
|
|
maxLength: 64
|
|
minLength: 8
|
|
type: string
|
|
token_id:
|
|
type: string
|
|
required:
|
|
- email
|
|
- new_password
|
|
- token_id
|
|
type: object
|
|
history-api_internal_dtos_request.GeometryEntitySnapshot:
|
|
properties:
|
|
base_links_hash:
|
|
type: string
|
|
entity_id:
|
|
type: string
|
|
geometry_id:
|
|
type: string
|
|
operation:
|
|
enum:
|
|
- reference
|
|
- delete
|
|
- binding
|
|
type: string
|
|
required:
|
|
- entity_id
|
|
- geometry_id
|
|
type: object
|
|
history-api_internal_dtos_request.GeometrySnapshot:
|
|
properties:
|
|
base_hash:
|
|
type: string
|
|
base_updated_at:
|
|
type: string
|
|
bbox:
|
|
$ref: '#/definitions/history-api_internal_dtos_request.BBox'
|
|
binding:
|
|
items:
|
|
type: string
|
|
type: array
|
|
draw_geometry:
|
|
items:
|
|
type: integer
|
|
type: array
|
|
id:
|
|
type: string
|
|
operation:
|
|
enum:
|
|
- create
|
|
- update
|
|
- delete
|
|
- reference
|
|
type: string
|
|
source:
|
|
enum:
|
|
- inline
|
|
- ref
|
|
type: string
|
|
time_end:
|
|
type: number
|
|
time_start:
|
|
type: number
|
|
type:
|
|
type: string
|
|
required:
|
|
- id
|
|
type: object
|
|
history-api_internal_dtos_request.MediaBulkDeleteDto:
|
|
properties:
|
|
media_ids:
|
|
items:
|
|
type: string
|
|
type: array
|
|
required:
|
|
- media_ids
|
|
type: object
|
|
history-api_internal_dtos_request.PreSignedCompleteDto:
|
|
properties:
|
|
token_id:
|
|
type: string
|
|
required:
|
|
- token_id
|
|
type: object
|
|
history-api_internal_dtos_request.ResetPasswordDto:
|
|
properties:
|
|
is_send_email:
|
|
type: boolean
|
|
new_password:
|
|
maxLength: 64
|
|
minLength: 8
|
|
type: string
|
|
required:
|
|
- new_password
|
|
type: object
|
|
history-api_internal_dtos_request.RestoreCommitDto:
|
|
properties:
|
|
commit_id:
|
|
type: string
|
|
required:
|
|
- commit_id
|
|
type: object
|
|
history-api_internal_dtos_request.SignInDto:
|
|
properties:
|
|
email:
|
|
maxLength: 255
|
|
minLength: 5
|
|
type: string
|
|
password:
|
|
maxLength: 64
|
|
minLength: 8
|
|
type: string
|
|
required:
|
|
- email
|
|
- password
|
|
type: object
|
|
history-api_internal_dtos_request.SignUpDto:
|
|
properties:
|
|
display_name:
|
|
maxLength: 50
|
|
minLength: 2
|
|
type: string
|
|
email:
|
|
maxLength: 255
|
|
minLength: 5
|
|
type: string
|
|
password:
|
|
maxLength: 64
|
|
minLength: 8
|
|
type: string
|
|
token_id:
|
|
type: string
|
|
required:
|
|
- display_name
|
|
- email
|
|
- password
|
|
- token_id
|
|
type: object
|
|
history-api_internal_dtos_request.UpdateProfileDto:
|
|
properties:
|
|
avatar_url:
|
|
type: string
|
|
bio:
|
|
maxLength: 255
|
|
type: string
|
|
country_code:
|
|
type: string
|
|
display_name:
|
|
maxLength: 50
|
|
minLength: 2
|
|
type: string
|
|
full_name:
|
|
maxLength: 100
|
|
minLength: 2
|
|
type: string
|
|
location:
|
|
maxLength: 100
|
|
type: string
|
|
phone:
|
|
maxLength: 20
|
|
minLength: 8
|
|
type: string
|
|
website:
|
|
type: string
|
|
type: object
|
|
history-api_internal_dtos_request.UpdateProjectDto:
|
|
properties:
|
|
description:
|
|
type: string
|
|
status:
|
|
enum:
|
|
- PRIVATE
|
|
- PUBLIC
|
|
- ARCHIVE
|
|
type: string
|
|
title:
|
|
maxLength: 255
|
|
type: string
|
|
type: object
|
|
history-api_internal_dtos_request.UpdateProjectMemberDto:
|
|
properties:
|
|
role:
|
|
enum:
|
|
- EDITOR
|
|
- VIEWER
|
|
type: string
|
|
required:
|
|
- role
|
|
type: object
|
|
history-api_internal_dtos_request.UpdateSubmissionStatusDto:
|
|
properties:
|
|
review_note:
|
|
minLength: 10
|
|
type: string
|
|
status:
|
|
type: string
|
|
required:
|
|
- review_note
|
|
- status
|
|
type: object
|
|
history-api_internal_dtos_request.UpdateVerificationStatusDto:
|
|
properties:
|
|
review_note:
|
|
maxLength: 3000
|
|
minLength: 5
|
|
type: string
|
|
status:
|
|
enum:
|
|
- PENDING
|
|
- APPROVED
|
|
- REJECTED
|
|
type: string
|
|
required:
|
|
- review_note
|
|
- status
|
|
type: object
|
|
history-api_internal_dtos_request.VerifyTokenDto:
|
|
properties:
|
|
email:
|
|
type: string
|
|
token:
|
|
type: string
|
|
token_type:
|
|
allOf:
|
|
- $ref: '#/definitions/history-api_pkg_constants.TokenType'
|
|
enum:
|
|
- 1
|
|
- 2
|
|
- 3
|
|
- 4
|
|
required:
|
|
- email
|
|
- token
|
|
- token_type
|
|
type: object
|
|
history-api_internal_dtos_request.WikiSnapshot:
|
|
properties:
|
|
doc:
|
|
type: string
|
|
id:
|
|
type: string
|
|
operation:
|
|
enum:
|
|
- create
|
|
- update
|
|
- delete
|
|
- reference
|
|
type: string
|
|
slug:
|
|
type: string
|
|
source:
|
|
enum:
|
|
- inline
|
|
- ref
|
|
type: string
|
|
title:
|
|
type: string
|
|
updated_at:
|
|
type: string
|
|
required:
|
|
- id
|
|
- title
|
|
type: object
|
|
history-api_internal_dtos_response.ChatbotHistoryDto:
|
|
properties:
|
|
answer:
|
|
type: string
|
|
created_at:
|
|
type: string
|
|
id:
|
|
type: string
|
|
question:
|
|
type: string
|
|
user_id:
|
|
type: string
|
|
type: object
|
|
history-api_internal_dtos_response.CommonResponse:
|
|
properties:
|
|
data: {}
|
|
errors: {}
|
|
message:
|
|
type: string
|
|
status:
|
|
type: boolean
|
|
type: object
|
|
history-api_internal_dtos_response.GetChatbotHistoryResponse:
|
|
properties:
|
|
items:
|
|
items:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.ChatbotHistoryDto'
|
|
type: array
|
|
pre_cursor:
|
|
type: string
|
|
type: object
|
|
history-api_internal_dtos_response.PaginatedResponse:
|
|
properties:
|
|
data: {}
|
|
errors: {}
|
|
message:
|
|
type: string
|
|
pagination:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.PaginationMeta'
|
|
status:
|
|
type: boolean
|
|
type: object
|
|
history-api_internal_dtos_response.PaginationMeta:
|
|
properties:
|
|
current_page:
|
|
type: integer
|
|
page_size:
|
|
type: integer
|
|
total_pages:
|
|
type: integer
|
|
total_records:
|
|
type: integer
|
|
type: object
|
|
history-api_internal_dtos_response.StatisticResponse:
|
|
properties:
|
|
created_at:
|
|
type: string
|
|
date:
|
|
type: string
|
|
id:
|
|
type: string
|
|
new_commits:
|
|
type: integer
|
|
new_entities:
|
|
type: integer
|
|
new_geometries:
|
|
type: integer
|
|
new_medias:
|
|
type: integer
|
|
new_projects:
|
|
type: integer
|
|
new_storage_bytes:
|
|
type: integer
|
|
new_submissions:
|
|
type: integer
|
|
new_users:
|
|
type: integer
|
|
new_wikis:
|
|
type: integer
|
|
total_commits:
|
|
type: integer
|
|
total_entities:
|
|
type: integer
|
|
total_geometries:
|
|
type: integer
|
|
total_medias:
|
|
type: integer
|
|
total_projects:
|
|
type: integer
|
|
total_storage_bytes:
|
|
type: integer
|
|
total_submissions:
|
|
type: integer
|
|
total_users:
|
|
type: integer
|
|
total_wikis:
|
|
type: integer
|
|
type: object
|
|
history-api_pkg_constants.TokenType:
|
|
enum:
|
|
- 1
|
|
- 2
|
|
- 3
|
|
- 4
|
|
format: int32
|
|
type: integer
|
|
x-enum-varnames:
|
|
- TokenTypePasswordReset
|
|
- TokenTypeEmailVerify
|
|
- TokenTypeMagicLink
|
|
- TokenTypeUpload
|
|
info:
|
|
contact:
|
|
email: support@swagger.io
|
|
name: API Support
|
|
url: http://www.swagger.io/support
|
|
description: This is a sample server for History API.
|
|
license:
|
|
name: Apache 2.0
|
|
url: http://www.apache.org/licenses/LICENSE-2.0.html
|
|
termsOfService: http://swagger.io/terms/
|
|
title: History API
|
|
version: "1.0"
|
|
paths:
|
|
/auth/forgot-password:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Initiate password recovery process for a user
|
|
parameters:
|
|
- description: Forgot Password request
|
|
in: body
|
|
name: request
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_request.ForgotPasswordDto'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
summary: Handle forgotten password
|
|
tags:
|
|
- Auth
|
|
/auth/google/callback:
|
|
get:
|
|
description: Receives the auth code from Google, exchanges it for tokens, creates/logs
|
|
in the user, and redirects back to the frontend with application tokens.
|
|
parameters:
|
|
- description: Security state string
|
|
in: query
|
|
name: state
|
|
required: true
|
|
type: string
|
|
- description: Authorization code from Google
|
|
in: query
|
|
name: code
|
|
required: true
|
|
type: string
|
|
responses:
|
|
"302":
|
|
description: Redirect to Frontend with JWTs
|
|
schema:
|
|
type: string
|
|
"401":
|
|
description: Invalid state
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
summary: Handle Google OAuth2 callback
|
|
tags:
|
|
- Auth
|
|
/auth/google/login:
|
|
get:
|
|
description: Generates a state string, sets it in a cookie, and redirects the
|
|
user to Google's consent page.
|
|
responses:
|
|
"302":
|
|
description: Redirect to Google
|
|
schema:
|
|
type: string
|
|
summary: Initiate Google OAuth2 login
|
|
tags:
|
|
- Auth
|
|
/auth/logout:
|
|
post:
|
|
description: Logout current user and revoke tokens
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"401":
|
|
description: Unauthorized
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Logout user
|
|
tags:
|
|
- Auth
|
|
/auth/refresh:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Generate a new access token using a valid refresh token from context
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"401":
|
|
description: Unauthorized or expired refresh token
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Refresh session tokens
|
|
tags:
|
|
- Auth
|
|
/auth/signin:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Authenticate user credentials and return access/refresh tokens
|
|
parameters:
|
|
- description: Sign In credentials
|
|
in: body
|
|
name: request
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_request.SignInDto'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"401":
|
|
description: Invalid credentials
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
summary: Sign in a user
|
|
tags:
|
|
- Auth
|
|
/auth/signup:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Create a new user account in the system
|
|
parameters:
|
|
- description: Sign Up details
|
|
in: body
|
|
name: request
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_request.SignUpDto'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
summary: Register a new user
|
|
tags:
|
|
- Auth
|
|
/auth/token/create:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Request a new token for specific actions like email confirmation
|
|
parameters:
|
|
- description: Token creation request
|
|
in: body
|
|
name: request
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_request.CreateTokenDto'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
summary: Generate a new verification token
|
|
tags:
|
|
- Auth
|
|
/auth/token/verify:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Validate an OTP or email verification token
|
|
parameters:
|
|
- description: Token verification data
|
|
in: body
|
|
name: request
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_request.VerifyTokenDto'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
summary: Verify a security token
|
|
tags:
|
|
- Auth
|
|
/chatbot/chat:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Ask a history question based on project context or global knowledge
|
|
using RAG
|
|
parameters:
|
|
- description: Chatbot query
|
|
in: body
|
|
name: request
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_request.ChatbotDto'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Successful response with AI answer
|
|
schema:
|
|
allOf:
|
|
- $ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
- properties:
|
|
data:
|
|
type: string
|
|
type: object
|
|
"400":
|
|
description: Invalid request
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Ask the AI chatbot
|
|
tags:
|
|
- Chatbot
|
|
/chatbot/history:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Get chatbot history for the current user
|
|
parameters:
|
|
- description: Cursor ID for pagination
|
|
in: query
|
|
name: cursor
|
|
type: string
|
|
- description: Limit number of items returned, default 10
|
|
in: query
|
|
name: limit
|
|
type: integer
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: Successful response
|
|
schema:
|
|
allOf:
|
|
- $ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
- properties:
|
|
data:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.GetChatbotHistoryResponse'
|
|
type: object
|
|
"400":
|
|
description: Invalid request
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"500":
|
|
description: Internal server error
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Get chatbot history
|
|
tags:
|
|
- Chatbot
|
|
/entities:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Search entities with cursor pagination
|
|
parameters:
|
|
- in: query
|
|
name: cursor
|
|
type: string
|
|
- in: query
|
|
maximum: 100
|
|
minimum: 1
|
|
name: limit
|
|
type: integer
|
|
- in: query
|
|
maxLength: 255
|
|
name: name
|
|
type: string
|
|
- in: query
|
|
name: project_id
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
summary: Search entities
|
|
tags:
|
|
- Entities
|
|
/entities/{id}:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Get detailed information about a specific entity
|
|
parameters:
|
|
- description: Entity ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
summary: Get entity by ID
|
|
tags:
|
|
- Entities
|
|
/entities/slug/{slug}:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Get detailed information about a specific entity by its unique
|
|
slug
|
|
parameters:
|
|
- description: Entity Slug
|
|
in: path
|
|
name: slug
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"404":
|
|
description: Not Found
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
summary: Get entity by slug
|
|
tags:
|
|
- Entities
|
|
/entities/slug/exists:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Check if a given slug already exists for entities
|
|
parameters:
|
|
- description: Slug to check
|
|
in: query
|
|
name: slug
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
summary: Check entity slug existence
|
|
tags:
|
|
- Entities
|
|
/geometries:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Search geometries with cursor pagination and spatial filtering
|
|
parameters:
|
|
- in: query
|
|
name: entity_id
|
|
type: string
|
|
- in: query
|
|
maximum: 90
|
|
minimum: -90
|
|
name: max_lat
|
|
required: true
|
|
type: number
|
|
- in: query
|
|
maximum: 180
|
|
minimum: -180
|
|
name: max_lng
|
|
required: true
|
|
type: number
|
|
- in: query
|
|
maximum: 90
|
|
minimum: -90
|
|
name: min_lat
|
|
required: true
|
|
type: number
|
|
- in: query
|
|
maximum: 180
|
|
minimum: -180
|
|
name: min_lng
|
|
required: true
|
|
type: number
|
|
- in: query
|
|
name: project_id
|
|
type: string
|
|
- in: query
|
|
name: time
|
|
type: integer
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
summary: Search geometries
|
|
tags:
|
|
- Geometries
|
|
/geometries/{id}:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Get detailed information about a specific geometry
|
|
parameters:
|
|
- description: Geometry ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
summary: Get geometry by ID
|
|
tags:
|
|
- Geometries
|
|
/geometries/entity:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Search entities by name (cursor pagination) and return their linked
|
|
geometries
|
|
parameters:
|
|
- in: query
|
|
name: cursor
|
|
type: string
|
|
- in: query
|
|
maximum: 100
|
|
minimum: 1
|
|
name: limit
|
|
type: integer
|
|
- in: query
|
|
maxLength: 255
|
|
name: name
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
summary: Search geometries by entity name
|
|
tags:
|
|
- Geometries
|
|
/historian/application:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Get list of historian applications with filters
|
|
parameters:
|
|
- in: query
|
|
name: created_from
|
|
type: string
|
|
- in: query
|
|
name: created_to
|
|
type: string
|
|
- in: query
|
|
maximum: 100
|
|
minimum: 1
|
|
name: limit
|
|
type: integer
|
|
- enum:
|
|
- asc
|
|
- desc
|
|
in: query
|
|
name: order
|
|
type: string
|
|
- in: query
|
|
minimum: 1
|
|
name: page
|
|
type: integer
|
|
- in: query
|
|
name: reviewed_by
|
|
type: string
|
|
- in: query
|
|
maxLength: 200
|
|
minLength: 2
|
|
name: search
|
|
type: string
|
|
- enum:
|
|
- id
|
|
- created_at
|
|
- reviewed_at
|
|
- status
|
|
in: query
|
|
name: sort
|
|
type: string
|
|
- collectionFormat: csv
|
|
in: query
|
|
items:
|
|
type: string
|
|
name: statuses
|
|
type: array
|
|
- collectionFormat: csv
|
|
in: query
|
|
items:
|
|
type: string
|
|
name: user_ids
|
|
type: array
|
|
- collectionFormat: csv
|
|
in: query
|
|
items:
|
|
type: string
|
|
name: verify_types
|
|
type: array
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Search historian applications
|
|
tags:
|
|
- Historian Application
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Submit application to become historian
|
|
parameters:
|
|
- description: Application data
|
|
in: body
|
|
name: body
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_request.CreateUserVerificationDto'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Create historian application
|
|
tags:
|
|
- Historian Application
|
|
/historian/application/{id}:
|
|
delete:
|
|
description: Delete historian application
|
|
parameters:
|
|
- description: Verification ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Delete application
|
|
tags:
|
|
- Historian Application
|
|
get:
|
|
description: Get historian application detail
|
|
parameters:
|
|
- description: Verification ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Get application by ID
|
|
tags:
|
|
- Historian Application
|
|
/historian/application/{id}/status:
|
|
put:
|
|
consumes:
|
|
- application/json
|
|
description: Approve or reject historian application
|
|
parameters:
|
|
- description: Verification ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: Status update
|
|
in: body
|
|
name: body
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_request.UpdateVerificationStatusDto'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Update application status
|
|
tags:
|
|
- Historian Application
|
|
/media:
|
|
delete:
|
|
consumes:
|
|
- application/json
|
|
description: Delete multiple media files by IDs
|
|
parameters:
|
|
- description: Media IDs to delete
|
|
in: body
|
|
name: body
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_request.MediaBulkDeleteDto'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Delete media
|
|
tags:
|
|
- Media
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Search media with filters, pagination
|
|
parameters:
|
|
- in: query
|
|
maximum: 100
|
|
minimum: 1
|
|
name: limit
|
|
type: integer
|
|
- in: query
|
|
minimum: 0
|
|
name: max_size
|
|
type: integer
|
|
- in: query
|
|
maxLength: 100
|
|
name: mime_type
|
|
type: string
|
|
- in: query
|
|
minimum: 0
|
|
name: min_size
|
|
type: integer
|
|
- enum:
|
|
- asc
|
|
- desc
|
|
in: query
|
|
name: order
|
|
type: string
|
|
- in: query
|
|
minimum: 1
|
|
name: page
|
|
type: integer
|
|
- in: query
|
|
maxLength: 200
|
|
minLength: 2
|
|
name: search
|
|
type: string
|
|
- enum:
|
|
- id
|
|
- created_at
|
|
- updated_at
|
|
- size
|
|
- original_name
|
|
- storage_key
|
|
- mime_type
|
|
in: query
|
|
name: sort
|
|
type: string
|
|
- collectionFormat: csv
|
|
in: query
|
|
items:
|
|
type: string
|
|
name: user_ids
|
|
type: array
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.PaginatedResponse'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Search media
|
|
tags:
|
|
- Media
|
|
/media/{id}:
|
|
delete:
|
|
consumes:
|
|
- application/json
|
|
description: Delete a media file by ID
|
|
parameters:
|
|
- description: Media ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Delete media
|
|
tags:
|
|
- Media
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Retrieve a media file by its ID
|
|
parameters:
|
|
- description: Media ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Get media by ID
|
|
tags:
|
|
- Media
|
|
/media/presigned:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Generate a presigned URL for direct upload to storage
|
|
parameters:
|
|
- in: query
|
|
name: content_type
|
|
required: true
|
|
type: string
|
|
- in: query
|
|
name: fileName
|
|
required: true
|
|
type: string
|
|
- in: query
|
|
name: size
|
|
required: true
|
|
type: integer
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Generate presigned URL
|
|
tags:
|
|
- Media
|
|
/media/presigned/complete:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Confirm that upload via presigned URL is completed
|
|
parameters:
|
|
- description: Request body
|
|
in: body
|
|
name: data
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_request.PreSignedCompleteDto'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Confirm presigned upload
|
|
tags:
|
|
- Media
|
|
/media/upload:
|
|
post:
|
|
consumes:
|
|
- multipart/form-data
|
|
description: Upload media file through server
|
|
parameters:
|
|
- description: Upload file
|
|
in: formData
|
|
name: file
|
|
required: true
|
|
type: file
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Upload media (server-side)
|
|
tags:
|
|
- Media
|
|
/projects:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Search and filter projects with pagination
|
|
parameters:
|
|
- in: query
|
|
name: created_from
|
|
type: string
|
|
- in: query
|
|
name: created_to
|
|
type: string
|
|
- in: query
|
|
maximum: 100
|
|
minimum: 1
|
|
name: limit
|
|
type: integer
|
|
- enum:
|
|
- asc
|
|
- desc
|
|
in: query
|
|
name: order
|
|
type: string
|
|
- in: query
|
|
minimum: 1
|
|
name: page
|
|
type: integer
|
|
- in: query
|
|
maxLength: 200
|
|
name: search
|
|
type: string
|
|
- enum:
|
|
- created_at
|
|
- updated_at
|
|
- title
|
|
in: query
|
|
name: sort
|
|
type: string
|
|
- collectionFormat: csv
|
|
in: query
|
|
items:
|
|
type: string
|
|
name: statuses
|
|
type: array
|
|
- collectionFormat: csv
|
|
in: query
|
|
items:
|
|
type: string
|
|
name: user_ids
|
|
type: array
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.PaginatedResponse'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Search projects
|
|
tags:
|
|
- Projects
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Create a project for the current authenticated user
|
|
parameters:
|
|
- description: Project Data
|
|
in: body
|
|
name: request
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_request.CreateProjectDto'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"201":
|
|
description: Created
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Create a new project
|
|
tags:
|
|
- Projects
|
|
/projects/{id}:
|
|
delete:
|
|
consumes:
|
|
- application/json
|
|
description: Delete project by ID
|
|
parameters:
|
|
- description: Project ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"404":
|
|
description: Not Found
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Delete a project
|
|
tags:
|
|
- Projects
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Retrieve project details by specific ID
|
|
parameters:
|
|
- description: Project ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"404":
|
|
description: Not Found
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Get project by ID
|
|
tags:
|
|
- Projects
|
|
put:
|
|
consumes:
|
|
- application/json
|
|
description: Update project properties (Title, Description, Status)
|
|
parameters:
|
|
- description: Project ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: Project Data
|
|
in: body
|
|
name: request
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_request.UpdateProjectDto'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"404":
|
|
description: Not Found
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Update a project
|
|
tags:
|
|
- Projects
|
|
/projects/{id}/change-owner:
|
|
put:
|
|
consumes:
|
|
- application/json
|
|
description: Transfer project ownership to an existing member. Only the current
|
|
owner can do this.
|
|
parameters:
|
|
- description: Project ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: New Owner Data
|
|
in: body
|
|
name: request
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_request.ChangeOwnerDto'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"403":
|
|
description: Forbidden
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Transfer project ownership
|
|
tags:
|
|
- Projects
|
|
/projects/{id}/commits:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Retrieve all commits for a specific project
|
|
parameters:
|
|
- description: Project ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Get project commits
|
|
tags:
|
|
- Commits
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Create a new commit and update project's latest commit ID. Only
|
|
owner/editor allowed.
|
|
parameters:
|
|
- description: Project ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: Commit Data
|
|
in: body
|
|
name: request
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_request.CreateCommitDto'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"201":
|
|
description: Created
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"403":
|
|
description: Forbidden
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Create a new commit
|
|
tags:
|
|
- Commits
|
|
/projects/{id}/commits/restore:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Update project's latest commit ID to an older commit. Only owner/editor
|
|
allowed.
|
|
parameters:
|
|
- description: Project ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: Restore Data
|
|
in: body
|
|
name: request
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_request.RestoreCommitDto'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"403":
|
|
description: Forbidden
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"404":
|
|
description: Not Found
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Restore project to a commit
|
|
tags:
|
|
- Commits
|
|
/projects/{id}/members:
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Invite a user to the project with a specific role (EDITOR or VIEWER).
|
|
Only project owner can do this.
|
|
parameters:
|
|
- description: Project ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: Member Data
|
|
in: body
|
|
name: request
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_request.AddProjectMemberDto'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"201":
|
|
description: Created
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"403":
|
|
description: Forbidden
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"409":
|
|
description: Conflict
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Add a member to project
|
|
tags:
|
|
- Projects
|
|
/projects/{id}/members/{userId}:
|
|
delete:
|
|
consumes:
|
|
- application/json
|
|
description: Remove a user from the project. Only project owner can do this.
|
|
parameters:
|
|
- description: Project ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: Member User ID
|
|
in: path
|
|
name: userId
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"403":
|
|
description: Forbidden
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"404":
|
|
description: Not Found
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Remove a member from project
|
|
tags:
|
|
- Projects
|
|
put:
|
|
consumes:
|
|
- application/json
|
|
description: Change a member's role in the project. Only project owner can do
|
|
this.
|
|
parameters:
|
|
- description: Project ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: Member User ID
|
|
in: path
|
|
name: userId
|
|
required: true
|
|
type: string
|
|
- description: Role Data
|
|
in: body
|
|
name: request
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_request.UpdateProjectMemberDto'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"403":
|
|
description: Forbidden
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"404":
|
|
description: Not Found
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Update member role
|
|
tags:
|
|
- Projects
|
|
/projects/commits/{commitId}:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Retrieve a specific commit by its ID
|
|
parameters:
|
|
- description: Commit ID
|
|
in: path
|
|
name: commitId
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"404":
|
|
description: Not Found
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Get commit by ID
|
|
tags:
|
|
- Commits
|
|
/raster-tiles/{z}/{x}/{y}:
|
|
get:
|
|
description: Fetch vector or raster map tile data by Z, X, Y coordinates
|
|
parameters:
|
|
- description: Zoom level (0-22)
|
|
in: path
|
|
name: z
|
|
required: true
|
|
type: integer
|
|
- description: X coordinate
|
|
in: path
|
|
name: x
|
|
required: true
|
|
type: integer
|
|
- description: Y coordinate
|
|
in: path
|
|
name: "y"
|
|
required: true
|
|
type: integer
|
|
produces:
|
|
- application/octet-stream
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
type: file
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
summary: Get a map raster tile
|
|
tags:
|
|
- Tile
|
|
/raster-tiles/metadata:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Retrieve map metadata
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
summary: Get raster tile metadata
|
|
tags:
|
|
- Tile
|
|
/roles:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Get a list of all roles in the system
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
security:
|
|
- ApiKeyAuth: []
|
|
summary: Get all roles
|
|
tags:
|
|
- Roles
|
|
/roles/{id}:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Get detailed information about a specific role
|
|
parameters:
|
|
- description: Role ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
security:
|
|
- ApiKeyAuth: []
|
|
summary: Get role by ID
|
|
tags:
|
|
- Roles
|
|
/statistics:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Fetch daily system statistics with optional date range filtering
|
|
parameters:
|
|
- description: Start date in YYYY-MM-DD format
|
|
in: query
|
|
name: start_date
|
|
type: string
|
|
- description: End date in YYYY-MM-DD format
|
|
in: query
|
|
name: end_date
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
allOf:
|
|
- $ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
- properties:
|
|
data:
|
|
items:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.StatisticResponse'
|
|
type: array
|
|
type: object
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"401":
|
|
description: Unauthorized
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"403":
|
|
description: Forbidden
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Search system statistics
|
|
tags:
|
|
- Statistics
|
|
/statistics/{date}:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Fetch system statistics for a specific date
|
|
parameters:
|
|
- description: Date in YYYY-MM-DD format
|
|
in: path
|
|
name: date
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
allOf:
|
|
- $ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
- properties:
|
|
data:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.StatisticResponse'
|
|
type: object
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"401":
|
|
description: Unauthorized
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"403":
|
|
description: Forbidden
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"404":
|
|
description: Not Found
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Get system statistics by date
|
|
tags:
|
|
- Statistics
|
|
/submissions:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Get a list of submissions with filters
|
|
parameters:
|
|
- in: query
|
|
name: created_from
|
|
type: string
|
|
- in: query
|
|
name: created_to
|
|
type: string
|
|
- in: query
|
|
maximum: 100
|
|
minimum: 1
|
|
name: limit
|
|
type: integer
|
|
- enum:
|
|
- asc
|
|
- desc
|
|
in: query
|
|
name: order
|
|
type: string
|
|
- in: query
|
|
minimum: 1
|
|
name: page
|
|
type: integer
|
|
- in: query
|
|
name: project_id
|
|
type: string
|
|
- in: query
|
|
name: reviewed_by
|
|
type: string
|
|
- in: query
|
|
maxLength: 200
|
|
minLength: 2
|
|
name: search
|
|
type: string
|
|
- enum:
|
|
- id
|
|
- created_at
|
|
- reviewed_at
|
|
- status
|
|
in: query
|
|
name: sort
|
|
type: string
|
|
- collectionFormat: csv
|
|
in: query
|
|
items:
|
|
type: string
|
|
name: statuses
|
|
type: array
|
|
- collectionFormat: csv
|
|
in: query
|
|
items:
|
|
type: string
|
|
name: user_ids
|
|
type: array
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Search submissions
|
|
tags:
|
|
- Submission
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Submit a new submission for a project commit
|
|
parameters:
|
|
- description: Submission data
|
|
in: body
|
|
name: body
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_request.CreateSubmissionDto'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Create submission
|
|
tags:
|
|
- Submission
|
|
/submissions/{id}:
|
|
delete:
|
|
description: Delete a submission by ID
|
|
parameters:
|
|
- description: Submission ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"401":
|
|
description: Unauthorized
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Delete submission
|
|
tags:
|
|
- Submission
|
|
get:
|
|
description: Get detailed information of a submission
|
|
parameters:
|
|
- description: Submission ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Get submission by ID
|
|
tags:
|
|
- Submission
|
|
/submissions/{id}/status:
|
|
patch:
|
|
consumes:
|
|
- application/json
|
|
description: Approve or reject a submission
|
|
parameters:
|
|
- description: Submission ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: Status update data
|
|
in: body
|
|
name: body
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_request.UpdateSubmissionStatusDto'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Update submission status
|
|
tags:
|
|
- Submission
|
|
/tiles/{z}/{x}/{y}:
|
|
get:
|
|
description: Fetch vector or raster map tile data by Z, X, Y coordinates
|
|
parameters:
|
|
- description: Zoom level (0-22)
|
|
in: path
|
|
name: z
|
|
required: true
|
|
type: integer
|
|
- description: X coordinate
|
|
in: path
|
|
name: x
|
|
required: true
|
|
type: integer
|
|
- description: Y coordinate
|
|
in: path
|
|
name: "y"
|
|
required: true
|
|
type: integer
|
|
produces:
|
|
- application/octet-stream
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
type: file
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
summary: Get a map tile
|
|
tags:
|
|
- Tile
|
|
/tiles/metadata:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Retrieve map metadata
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
summary: Get tile metadata
|
|
tags:
|
|
- Tile
|
|
/users:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Search and filter users with pagination (Admin/Mod only)
|
|
parameters:
|
|
- enum:
|
|
- local
|
|
- google
|
|
- facebook
|
|
- github
|
|
in: query
|
|
name: auth_provider
|
|
type: string
|
|
- in: query
|
|
name: created_from
|
|
type: string
|
|
- in: query
|
|
name: created_to
|
|
type: string
|
|
- in: query
|
|
name: is_deleted
|
|
type: boolean
|
|
- in: query
|
|
maximum: 100
|
|
minimum: 1
|
|
name: limit
|
|
type: integer
|
|
- enum:
|
|
- asc
|
|
- desc
|
|
in: query
|
|
name: order
|
|
type: string
|
|
- in: query
|
|
minimum: 1
|
|
name: page
|
|
type: integer
|
|
- collectionFormat: csv
|
|
in: query
|
|
items:
|
|
type: string
|
|
name: role_ids
|
|
type: array
|
|
- in: query
|
|
maxLength: 200
|
|
minLength: 2
|
|
name: search
|
|
type: string
|
|
- enum:
|
|
- id
|
|
- created_at
|
|
- updated_at
|
|
- email
|
|
- is_deleted
|
|
- auth_provider
|
|
in: query
|
|
name: sort
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.PaginatedResponse'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Search users
|
|
tags:
|
|
- Users
|
|
post:
|
|
consumes:
|
|
- application/json
|
|
description: Create a new user account with specified roles
|
|
parameters:
|
|
- description: Create User request
|
|
in: body
|
|
name: request
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_request.CreateUserDto'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Create a new user (Admin only)
|
|
tags:
|
|
- Users
|
|
/users/{id}:
|
|
delete:
|
|
consumes:
|
|
- application/json
|
|
description: Soft delete a user account (Admin/Mod only)
|
|
parameters:
|
|
- description: User ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Delete a user
|
|
tags:
|
|
- Users
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Retrieve details of a specific user (Admin/Mod only)
|
|
parameters:
|
|
- description: User ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Get user by ID
|
|
tags:
|
|
- Users
|
|
put:
|
|
consumes:
|
|
- application/json
|
|
description: Update the profile details of any user
|
|
parameters:
|
|
- description: User ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: Update Profile request
|
|
in: body
|
|
name: request
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_request.UpdateProfileDto'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Update user profile (Admin/Mod only)
|
|
tags:
|
|
- Users
|
|
/users/{id}/application:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Retrieve application list by specific user ID
|
|
parameters:
|
|
- description: User ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
summary: Get user's application by user ID
|
|
tags:
|
|
- Users
|
|
/users/{id}/media:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Retrieve media list by specific user ID
|
|
parameters:
|
|
- description: User ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
summary: Get user's media by user ID
|
|
tags:
|
|
- Users
|
|
/users/{id}/password:
|
|
patch:
|
|
consumes:
|
|
- application/json
|
|
description: Reset the password for any user without requiring the old password
|
|
parameters:
|
|
- description: User ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: Reset Password request
|
|
in: body
|
|
name: request
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_request.ResetPasswordDto'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Reset user password (Admin/Mod only)
|
|
tags:
|
|
- Users
|
|
/users/{id}/project:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Retrieve project list by specific user ID
|
|
parameters:
|
|
- description: User ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- in: query
|
|
name: cursor_id
|
|
type: string
|
|
- in: query
|
|
maximum: 100
|
|
minimum: 1
|
|
name: limit
|
|
type: integer
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
summary: Get user's projects by user ID
|
|
tags:
|
|
- Users
|
|
/users/{id}/restore:
|
|
patch:
|
|
consumes:
|
|
- application/json
|
|
description: Restore a soft-deleted user account (Admin/Mod only)
|
|
parameters:
|
|
- description: User ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Restore a deleted user
|
|
tags:
|
|
- Users
|
|
/users/{id}/role:
|
|
patch:
|
|
consumes:
|
|
- application/json
|
|
description: Update the role of a user (Admin only)
|
|
parameters:
|
|
- description: User ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
- description: Change Role request
|
|
in: body
|
|
name: request
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_request.ChangeRoleDto'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Change user role
|
|
tags:
|
|
- Users
|
|
/users/current:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Retrieve the profile information of the currently authenticated
|
|
user
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Get current user profile
|
|
tags:
|
|
- Users
|
|
put:
|
|
consumes:
|
|
- application/json
|
|
description: Update the profile details of the currently authenticated user
|
|
parameters:
|
|
- description: Update Profile request
|
|
in: body
|
|
name: request
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_request.UpdateProfileDto'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Update user profile
|
|
tags:
|
|
- Users
|
|
/users/current/application:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Retrieve application list of the currently authenticated user
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Get current user's application
|
|
tags:
|
|
- Users
|
|
/users/current/media:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Retrieve media list of the currently authenticated user
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Get current user's media
|
|
tags:
|
|
- Users
|
|
/users/current/password:
|
|
patch:
|
|
consumes:
|
|
- application/json
|
|
description: Update the password for the currently authenticated user
|
|
parameters:
|
|
- description: Change Password request
|
|
in: body
|
|
name: request
|
|
required: true
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_request.ChangePasswordDto'
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Change user password
|
|
tags:
|
|
- Users
|
|
/users/current/project:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Retrieve project list of the currently authenticated user
|
|
parameters:
|
|
- in: query
|
|
name: cursor_id
|
|
type: string
|
|
- in: query
|
|
maximum: 100
|
|
minimum: 1
|
|
name: limit
|
|
type: integer
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
security:
|
|
- BearerAuth: []
|
|
summary: Get current user's projects
|
|
tags:
|
|
- Users
|
|
/wikis:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Search wikis with cursor pagination
|
|
parameters:
|
|
- in: query
|
|
name: cursor
|
|
type: string
|
|
- in: query
|
|
name: entity_id
|
|
type: string
|
|
- in: query
|
|
maximum: 100
|
|
minimum: 1
|
|
name: limit
|
|
type: integer
|
|
- in: query
|
|
name: project_id
|
|
type: string
|
|
- in: query
|
|
maxLength: 1000
|
|
name: title
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
summary: Search wikis
|
|
tags:
|
|
- Wikis
|
|
/wikis/{id}:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Get detailed information about a specific wiki
|
|
parameters:
|
|
- description: Wiki ID
|
|
in: path
|
|
name: id
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"500":
|
|
description: Internal Server Error
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
summary: Get wiki by ID
|
|
tags:
|
|
- Wikis
|
|
/wikis/slug/{slug}:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Get detailed information about a specific wiki by its unique slug
|
|
parameters:
|
|
- description: Wiki Slug
|
|
in: path
|
|
name: slug
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"404":
|
|
description: Not Found
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
summary: Get wiki by slug
|
|
tags:
|
|
- Wikis
|
|
/wikis/slug/exists:
|
|
get:
|
|
consumes:
|
|
- application/json
|
|
description: Check if a given slug already exists for wikis
|
|
parameters:
|
|
- description: Slug to check
|
|
in: query
|
|
name: slug
|
|
required: true
|
|
type: string
|
|
produces:
|
|
- application/json
|
|
responses:
|
|
"200":
|
|
description: OK
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
"400":
|
|
description: Bad Request
|
|
schema:
|
|
$ref: '#/definitions/history-api_internal_dtos_response.CommonResponse'
|
|
summary: Check wiki slug existence
|
|
tags:
|
|
- Wikis
|
|
securityDefinitions:
|
|
BearerAuth:
|
|
description: Type "Bearer " followed by a space and JWT token.
|
|
in: header
|
|
name: Authorization
|
|
type: apiKey
|
|
swagger: "2.0"
|