openapi: 3.0.1
info:
title: Coscine Web Admin ProjectQuota API
description: Coscine (short for COllaborative SCientific INtegration Environment) is the research data management platform for your research project.
termsOfService: https://about.coscine.de/en/termsofuse/
contact:
name: Coscine Team
email: servicedesk@rwth-aachen.de
version: '2.0'
servers:
- url: https://coscine.rwth-aachen.de/coscine
security:
- Bearer: []
tags:
- name: ProjectQuota
description: Endpoints for the project quotas.
paths:
/api/v2/projects/{projectId}/quotas/{resourceTypeId}:
get:
tags:
- ProjectQuota
summary: Retrieves a project quota for a specified project and resource type.
operationId: GetProjectQuota
parameters:
- name: projectId
in: path
description: The Id or slug of the project.
required: true
schema:
type: string
- name: resourceTypeId
in: path
description: The ID of the resource type.
required: true
schema:
type: string
format: uuid
responses:
'200':
description: Returns the project quota.
content:
application/json:
schema:
$ref: '#/components/schemas/ProjectQuotaDtoResponse'
text/json:
schema:
$ref: '#/components/schemas/ProjectQuotaDtoResponse'
'404':
description: Project quota does not exist.
put:
tags:
- ProjectQuota
summary: Updates a project quota for a specified project and resource type.
operationId: UpdateProjectQuota
parameters:
- name: projectId
in: path
description: The Id or slug of the project.
required: true
schema:
type: string
- name: resourceTypeId
in: path
description: The ID of the resource type.
required: true
schema:
type: string
format: uuid
requestBody:
description: The updated project quota data.
content:
application/json:
schema:
$ref: '#/components/schemas/ProjectQuotaForUpdateDto'
text/json:
schema:
$ref: '#/components/schemas/ProjectQuotaForUpdateDto'
application/*+json:
schema:
$ref: '#/components/schemas/ProjectQuotaForUpdateDto'
responses:
'204':
description: Project quota updated.
'403':
description: User is missing authorization requirements.
'400':
description: Provided input has a bad format.
'404':
description: Provided input refers to entries that do not exist or have been deleted.
/api/v2/projects/{projectId}/quotas:
get:
tags:
- ProjectQuota
summary: Retrieves all project quotas for a specified project.
operationId: GetProjectQuotas
parameters:
- name: projectId
in: path
description: The Id or slug of the project.
required: true
schema:
type: string
- name: PageNumber
in: query
description: Gets or sets the desired page number. Should be greater than or equal to 1. Default is 1.
schema:
type: integer
format: int32
- name: PageSize
in: query
description: Gets or sets the desired page size. Should be between 1 and the maximum allowed page size (50). Default is 10.
schema:
type: integer
format: int32
- name: OrderBy
in: query
description: "Gets or sets the field name used for ordering the results.\r\nThe order is constructed by an order string.\r\nUse the property followed by \"asc\" or \"desc\" and separate properties by commas. Default is asc.\r\nCan be used like this: \"propertyA asc, propertyB desc\"."
schema:
type: string
responses:
'200':
description: Returns the project quotas.
content:
application/json:
schema:
$ref: '#/components/schemas/ProjectQuotaDtoPagedResponse'
text/json:
schema:
$ref: '#/components/schemas/ProjectQuotaDtoPagedResponse'
options:
tags:
- ProjectQuota
summary: Responds with the HTTP methods allowed for the endpoint.
parameters:
- name: projectId
in: path
required: true
schema:
type: string
responses:
'200':
description: OK
components:
schemas:
ResourceTypeMinimalDto:
required:
- id
- specificType
type: object
properties:
id:
type: string
description: The unique identifier of the resource type.
format: uuid
specificType:
type: string
description: The specific type of the resource.
additionalProperties: false
description: Represents a minimal Data Transfer Object (DTO) for a resource type.
ProjectQuotaDto:
type: object
properties:
projectId:
type: string
description: Identifier of the project.
format: uuid
totalUsed:
$ref: '#/components/schemas/QuotaDto'
totalReserved:
$ref: '#/components/schemas/QuotaDto'
allocated:
$ref: '#/components/schemas/QuotaDto'
maximum:
$ref: '#/components/schemas/QuotaDto'
resourceType:
$ref: '#/components/schemas/ResourceTypeMinimalDto'
resourceQuotas:
type: array
items:
$ref: '#/components/schemas/ResourceQuotaDto'
description: Quota information for individual resources of the selected project's resource type.
nullable: true
additionalProperties: false
description: Represents a data transfer object (DTO) containing quota information for a project.
QuotaDto:
required:
- unit
- value
type: object
properties:
value:
type: number
description: The value of the quota.
format: float
unit:
$ref: '#/components/schemas/QuotaUnit'
additionalProperties: false
description: Represents a Data Transfer Object (DTO) for quota values.
QuotaUnit:
enum:
- https://qudt.org/vocab/unit/BYTE
- https://qudt.org/vocab/unit/KibiBYTE
- https://qudt.org/vocab/unit/MebiBYTE
- https://qudt.org/vocab/unit/GibiBYTE
- https://qudt.org/vocab/unit/TebiBYTE
- https://qudt.org/vocab/unit/PebiBYTE
type: string
description: Specifies the unit of quota.
ProjectQuotaDtoPagedResponse:
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/ProjectQuotaDto'
nullable: true
isSuccess:
type: boolean
readOnly: true
statusCode:
type: integer
format: int32
nullable: true
traceId:
type: string
nullable: true
pagination:
$ref: '#/components/schemas/Pagination'
additionalProperties: false
Pagination:
type: object
properties:
currentPage:
type: integer
description: Gets or sets the current page number.
format: int32
totalPages:
type: integer
description: Gets or sets the total number of pages.
format: int32
pageSize:
type: integer
description: Gets or sets the number of items per page.
format: int32
totalCount:
type: integer
description: Gets or sets the total count of items across all pages.
format: int64
hasPrevious:
type: boolean
description: Gets a value indicating whether there is a previous page.
readOnly: true
hasNext:
type: boolean
description: Gets a value indicating whether there is a next page.
readOnly: true
additionalProperties: false
description: Represents pagination information for a collection of items.
ProjectQuotaForUpdateDto:
required:
- allocated
type: object
properties:
allocated:
$ref: '#/components/schemas/QuotaForManipulationDto'
maximum:
$ref: '#/components/schemas/QuotaForManipulationDto'
additionalProperties: false
description: Data transfer object (DTO) representing the update of project quotas.
ProjectQuotaDtoResponse:
type: object
properties:
data:
$ref: '#/components/schemas/ProjectQuotaDto'
isSuccess:
type: boolean
readOnly: true
statusCode:
type: integer
format: int32
nullable: true
traceId:
type: string
nullable: true
additionalProperties: false
ResourceMinimalDto:
required:
- id
type: object
properties:
id:
type: string
description: Unique identifier for the resource.
format: uuid
additionalProperties: false
description: Represents a minimal Data Transfer Object (DTO) for a resource, containing essential identifiers.
ResourceQuotaDto:
required:
- resource
type: object
properties:
resource:
$ref: '#/components/schemas/ResourceMinimalDto'
usedPercentage:
type: number
description: The percentage of quota used by the resource.
format: float
nullable: true
used:
$ref: '#/components/schemas/QuotaDto'
versions:
$ref: '#/components/schemas/QuotaDto'
reserved:
$ref: '#/components/schemas/QuotaDto'
additionalProperties: false
description: Represents a Data Transfer Object (DTO) containing quota information for a resource.
QuotaForManipulationDto:
required:
- unit
- value
type: object
properties:
value:
minimum: 0
type: integer
description: The numerical value of the quota. Must be a positive System.Int64.
format: int64
unit:
$ref: '#/components/schemas/QuotaUnit'
additionalProperties: false
description: Represents a data transfer object (DTO) used for manipulating quota values.
securitySchemes:
Bearer:
type: apiKey
description: JWT Authorization header using the Bearer scheme.
name: Authorization
in: header