Last active
August 30, 2022 08:24
-
-
Save jctophefabre/d91cf03f8547cc2806e68a07c47d6ed0 to your computer and use it in GitHub Desktop.
openfluid-fluidhub.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openapi: "3.0.2" | |
info: | |
title: OpenFLUID FluidHub API | |
description: | | |
API for FluidHub services. | |
As the API is still under development, some methods and/or paths may be unimplemented | |
⭐ = item recently added or updated, 🚧 = items under construction, ❗ = items to review and validate | |
version: "1.0" | |
contact: | |
name: the OpenFLUID team | |
url: https://www.openfluid-project.org/who/ | |
email: contact@openfluid-project.org | |
servers: | |
- url: https://hub.openfluid-project.org/api/ | |
############################################################################# | |
############################################################################# | |
tags: | |
- name: general | |
description: General infomation about the FluidHub instance | |
- name: users | |
description: Users management | |
- name: groups | |
description: Groups management | |
- name: registration | |
description: Users registration | |
- name: authentication | |
description: Authentication operations for the users | |
- name: account | |
description: Account operations for logged user | |
- name: jobs | |
description: Jobs management | |
- name: news | |
description: News and activity | |
- name: reference wares | |
description: Reference wares repositories (formerly known as WaresHub) | |
- name: reference datasets | |
description: Reference datasets repositories | |
- name: workspaces | |
description: Workspaces informations | |
- name: workspaces/projects | |
description: Projects management in workspaces | |
- name: workspaces/wares-dev | |
description: Wares sources management in workspaces | |
- name: workspaces/builtwares | |
description: Built wares management in workspaces | |
############################################################################# | |
############################################################################# | |
paths: | |
/: | |
get: | |
summary: Get informations about the FluidHub | |
description: Returns general information about the FluidHub service | |
tags: | |
- general | |
responses: | |
200: | |
description: a set of informations | |
content: | |
application/json: | |
schema: | |
type: object | |
properties: | |
nature: | |
type: string | |
example: 'OpenFLUID FLUIDhub' | |
capabilities: | |
type: array | |
items: | |
type: string | |
example: ['news','wares','simulations'] | |
mode: | |
type: string | |
enum: ['development', 'production'] | |
example: 'production' | |
status: | |
type: string | |
enum: ['online', 'maintenance'] | |
example: 'online' | |
name: | |
type: string | |
example: 'This is my hub...' | |
version: | |
type: string | |
example: '1.5.3' | |
api-version: | |
type: string | |
example: '1.0' | |
openfluid-versions: | |
type: object | |
properties: | |
current: | |
type: string | |
example: '2.1.10' | |
available: | |
type: array | |
items: | |
type: string | |
example: ['2.1.10','2.1.9','2.0.2'] | |
############################################################################# | |
/users: | |
parameters: | |
- in: query | |
name: group | |
schema: | |
type: string | |
enum: ['Scientific user', 'Scientific modeler', 'Simulators developper', 'Superuser', 'admin'] | |
example: 'Scientific user' | |
get: | |
summary: Get registered users list | |
description: > | |
Get registered users, optionaly sorted/filtered by group | |
tags: | |
- users | |
responses: | |
200: | |
description: 'OK' | |
content: | |
application/json: | |
schema: | |
type : array | |
items: | |
$ref: '#/components/schemas/UserItem' | |
/users/{unixname}: | |
parameters: | |
- in: path | |
name: unixname | |
required: true | |
schema: | |
type: string | |
get: | |
summary: Get details about a user | |
tags: | |
- users | |
responses: | |
200: | |
description: 'OK' | |
content: | |
application/json: | |
schema: | |
allOf: | |
- $ref: '#/components/schemas/UserBase' | |
- $ref: '#/components/schemas/UserDetailsWithActive' | |
- $ref: '#/components/schemas/UserGroups' | |
404: | |
$ref: '#/components/responses/NotFound' | |
############################################################################# | |
/groups: | |
get: | |
summary: Get registered groups list | |
tags: | |
- groups | |
responses: | |
200: | |
description: 'OK' | |
content: | |
application/json: | |
schema: | |
type : array | |
items: | |
$ref: '#/components/schemas/GroupItem' | |
/groups/{unixname}: | |
parameters: | |
- in: path | |
name: unixname | |
required: true | |
schema: | |
type: string | |
get: | |
summary: Get details about a group | |
tags: | |
- groups | |
responses: | |
200: | |
description: 'OK' | |
content: | |
application/json: | |
schema: | |
allOf: | |
- $ref: '#/components/schemas/GroupBase' | |
- $ref: '#/components/schemas/GroupDetails' | |
404: | |
$ref: '#/components/responses/NotFound' | |
############################################################################# | |
/registration: | |
post: | |
summary: Ask for an account | |
description: > | |
This is posted by people who are requesting a user account | |
tags: | |
- registration | |
requestBody: | |
required: true | |
content: | |
application/json: | |
schema: | |
allOf: | |
- $ref: '#/components/schemas/UserBase' | |
- $ref: '#/components/schemas/UserDetails' | |
- type: object | |
properties: | |
message: | |
type: string | |
responses: | |
'204': | |
description: "OK" | |
'501': | |
description: "not implemented" | |
############################################################################# | |
/auth/token: | |
post: | |
summary : Authenticate user and get a JWT token | |
tags: | |
- authentication | |
requestBody: | |
required: true | |
content: | |
application/json: | |
schema: | |
type: object | |
properties: | |
email: | |
type: string | |
password: | |
type: string | |
responses: | |
200: | |
description: 'OK' | |
content: | |
application/json: | |
schema: | |
type: object | |
properties: | |
access: | |
type: string | |
example: "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNTg2NTAyODYyLCJqdGkiOiI5MzEzMjdmNTQ3N2U0MTM3YmJmOGZkZjQxYmY4NTU0OSIsInVzZXJfaWQiOjV9.biNs7M6FfPldLkawUjnV7irLk5L677U55NlzB85Ts" | |
refresh: | |
type: string | |
example: "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbl90eXBlIjoicmVmcmVzaCIsImV4cCI6MTU4NjUwMjg2MiwianRpIjoiZGNhYTkyYjlmYmMxNGRlMzgyNjhmMjIxZGNkNjNhZmQiLCJ1c2VyX2lkIjo1fQ.aaLx2y3MDTf9dEbPrqIogr8g1PRoDwXCbdjMmzz0lHo" | |
401: | |
description: 'Unauthorized' | |
/auth/token/refresh: | |
post: | |
summary : Refresh a JWT token | |
tags: | |
- authentication | |
requestBody: | |
required: true | |
content: | |
application/json: | |
schema: | |
type: object | |
properties: | |
refresh: | |
type: string | |
example: "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbl90eXBlIjoicmVmcmVzaCIsImV4cCI6MTU4NjUwMjg2MiwianRpIjoiZGNhYTkyYjlmYmMxNGRlMzgyNjhmMjIxZGNkNjNhZmQiLCJ1c2VyX2lkIjo1fQ.aaLx2y3MDTf9dEbPrqIogr8g1PRoDwXCbdjMmzz0lHo" | |
responses: | |
200: | |
description: 'OK' | |
content: | |
application/json: | |
schema: | |
type: object | |
properties: | |
access: | |
type: string | |
example: "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbl90eXBlIjoiYWNjZXNzIiwiZXhwIjoxNTg2NTIxMjgyLCJqdGkiOiJiYTYxMTUyYTYyMWE0NjE0YWEyNWI4YzkxNTQ3MjNkMCIsInVzZXJfaWQiOjV9.0IkvkfRYKZJNsvTTiVA6UgRvaLuvjI7mB8pEjfllzUU" | |
401: | |
$ref: '#/components/responses/Unauthenticated' | |
############################################################################# | |
/account: | |
get: | |
tags: | |
- account | |
security: | |
- JWTAuth: [] | |
summary: Get details on account | |
responses: | |
200: | |
description: 'OK' | |
content: | |
application/json: | |
schema: | |
allOf: | |
- $ref: '#/components/schemas/UserBase' | |
- $ref: '#/components/schemas/UserDetailsWithActive' | |
- type: object | |
properties: | |
last_login: | |
type: string | |
- $ref: '#/components/schemas/UserGroups' | |
401: | |
$ref: '#/components/responses/Unauthenticated' | |
patch: | |
tags: | |
- account | |
security: | |
- JWTAuth: [] | |
summary: Update account 🚧 | |
description: > | |
Only editable fields can be modified | |
requestBody: | |
required: true | |
content: | |
application/json: | |
schema: | |
allOf: | |
- $ref: '#/components/schemas/UserBase' | |
responses: | |
200: | |
description: 'OK' | |
401: | |
$ref: '#/components/responses/Unauthenticated' | |
delete: | |
tags: | |
- account | |
security: | |
- JWTAuth: [] | |
summary: Disable account | |
description: > | |
Once disabled, the user is logged out and cannot log again. Its user workspace is not deleted | |
and its accound can be re-enabled by the admin | |
responses: | |
200: | |
description: 'OK' | |
/account/requests/access: | |
post: | |
tags: | |
- account | |
security: | |
- JWTAuth: [] | |
summary: Request access rights to ware or dataset in referentials 🚧 | |
description: > | |
Request access rights to reference wares and datasets | |
requestBody: | |
required: true | |
content: | |
application/json: | |
schema: | |
allOf: | |
- type: object | |
properties: | |
wares: | |
type: array | |
items: | |
type : object | |
properties : | |
type: | |
type: string | |
example : "observer" | |
id: | |
type: string | |
example: "my.obs.42" | |
is_rw: | |
type: boolean | |
example: true | |
- type: object | |
properties: | |
datasets: | |
type: array | |
items: | |
type : object | |
properties : | |
name: | |
type: string | |
example: "DataK" | |
is_rw: | |
type: boolean | |
example: false | |
responses: | |
'201': | |
description: the request was send | |
401: | |
$ref: '#/components/responses/Unauthenticated' | |
/account/requests/creation: | |
post: | |
tags: | |
- account | |
security: | |
- JWTAuth: [] | |
summary: Request creation of a new ware or dataset in referentials 🚧 | |
description: > | |
Request creation of a new ware or dataset in dedicated referential. | |
The account automatically gets RW access on created items. | |
requestBody: | |
required: true | |
content: | |
application/json: | |
schema: | |
allOf: | |
- type: object | |
properties: | |
wares: | |
type: array | |
items: | |
type : object | |
properties : | |
type: | |
type: string | |
example : "observer" | |
id: | |
type: string | |
example: "my.obs.43" | |
shortdesc: | |
type: string | |
example: "the observer 43" | |
- type: object | |
properties: | |
datasets: | |
type: array | |
items: | |
type : object | |
properties : | |
name: | |
type: string | |
example: "DataX" | |
shortdesc: | |
type: string | |
example: "a great dataset" | |
responses: | |
201: | |
description: the request was send | |
401: | |
$ref: '#/components/responses/Unauthenticated' | |
/account/password_change: | |
patch: | |
tags: | |
- account | |
security: | |
- JWTAuth: [] | |
summary: Change password ❗ | |
requestBody: | |
required: true | |
content: | |
application/json: | |
schema: | |
type: object | |
properties: | |
new_password: | |
description: "user input" | |
type: string | |
example: "my_secret_password" | |
new_password_confirm: | |
description: "user input" | |
type: string | |
example: "my_secret_password" | |
required: | |
- new_password | |
- new_password_confirm | |
responses: | |
200: | |
description: 'OK' | |
401: | |
$ref: '#/components/responses/Unauthenticated' | |
/account/password_reset: | |
post: | |
tags: | |
- account | |
security: | |
- JWTAuth: [] | |
summary: Request a password change ❗ | |
description: As a security mecanism if the provided email is invalid, a 200 response is returned but no email is sent | |
requestBody: | |
required: true | |
content: | |
application/json: | |
schema: | |
type: object | |
properties: | |
email: | |
description: email is an user input | |
type: string | |
example: 'pierre.martin@organization.org' | |
required: | |
- name | |
responses: | |
200: | |
description: 'successful operation' | |
content: | |
application/json: | |
schema: | |
type: object | |
properties: | |
status: | |
type: string | |
example: OK | |
401: | |
$ref: '#/components/responses/Unauthenticated' | |
/account/password_reset/confirm: | |
post: | |
tags: | |
- account | |
security: | |
- JWTAuth: [] | |
summary: Confirm password change ❗ | |
description: > | |
with token received by mail | |
requestBody: | |
required: true | |
content: | |
application/json: | |
schema: | |
type: object | |
properties: | |
password: | |
description: new password | |
type: string | |
example: "my_secret_password" | |
token: | |
description: "token received by mail" | |
type: string | |
example: "c0b7e35493724a719b1a6" | |
responses: | |
200: | |
description: 'successful operation' | |
content: | |
application/json: | |
schema: | |
type: object | |
properties: | |
status: | |
type: string | |
example: OK | |
401: | |
$ref: '#/components/responses/Unauthenticated' | |
404: # FIXME not sure | |
description: 'invalid token' | |
content: | |
application/json: | |
schema: | |
type: object | |
properties: | |
status: | |
type: string | |
example: "not found" | |
/account/password_reset/validate_token: | |
post: | |
tags: | |
- account | |
security: | |
- JWTAuth: [] | |
summary: Validate token for a password change | |
responses: | |
200: | |
description: 'successful operation' | |
401: | |
$ref: '#/components/responses/Unauthenticated' | |
############################################################################# | |
/jobs: | |
# selon le type de profil (header JWT) accès à l'ensemble des jobs ou aux jobs propres. | |
# question JC: au sujet du kill/stop d'un ensemble de jobs (queue) | |
get: | |
summary: Get list of submitted jobs | |
description: > | |
The list can be sorted by optional parameters (queuename, status, submit-user) | |
security: | |
- JWTAuth: [] | |
tags: | |
- jobs | |
parameters: | |
- in: query | |
name: action_type | |
description: jobs are filtered / sorted by type, if the parameter exists (optional) | |
schema: | |
type: string | |
enum: ['run','build','configure'] | |
- in: query | |
name: status | |
description: jobs are filtered / sorted by status, if the parameter exists (optional) | |
schema: | |
$ref: '#/components/schemas/JobStatus' | |
responses: | |
200: | |
description: 'OK' | |
content: | |
application/json: | |
schema: | |
type: array | |
items: | |
allOf: | |
- $ref: '#/components/schemas/JobBase' | |
- type : object | |
properties: | |
job_url : | |
type: string | |
401: | |
$ref: '#/components/responses/Unauthenticated' | |
403: | |
$ref: '#/components/responses/Unauthorized' | |
/jobs/{jobid}: | |
parameters: | |
- in: path | |
name: jobid | |
required: true | |
schema: | |
type: integer | |
example: 75 | |
get: | |
summary: Get details about a submitted job | |
security: | |
- JWTAuth: [] | |
tags: | |
- jobs | |
responses: | |
200: | |
description: 'OK' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Job' | |
401: | |
$ref: '#/components/responses/Unauthenticated' | |
403: | |
$ref: '#/components/responses/Unauthorized' | |
404: | |
$ref: '#/components/responses/NotFound' | |
delete: | |
summary: Delete an existing job ❗ | |
description: A running job cannot be deleted, it must be stopped before deletion | |
security: | |
- JWTAuth: [] | |
tags: | |
- jobs | |
responses: | |
200: | |
description: 'Job is removed' | |
401: | |
$ref: '#/components/responses/Unauthenticated' | |
403: | |
$ref: '#/components/responses/Unauthorized' | |
404: | |
$ref: '#/components/responses/NotFound' | |
/jobs/{jobid}/stop: | |
parameters: | |
- in: path | |
name: jobid | |
required: true | |
schema: | |
type: integer | |
example: 75 | |
post: | |
summary: Stop a job ❗ | |
description : This action stops a running job or cancels a pending job, and changes respectively the status to "stopped" or "cancelled" | |
security: | |
- JWTAuth: [] | |
tags: | |
- jobs | |
responses: | |
200: | |
description: 'the job was correctly stopped' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Job' | |
401: | |
$ref: '#/components/responses/Unauthenticated' | |
403: | |
$ref: '#/components/responses/Unauthorized' | |
404: | |
$ref: '#/components/responses/NotFound' | |
################################################################################ | |
# Gérer l'ecriture de News en flux RSS à définir : | |
# Sources interessantes : RSS Reader https://utan.io/lessons/lets-make-an-rss-reader.html#h.ljqrnw68jl2d | |
# Doc Django pour génération de flux RSS : https://docs.djangoproject.com/fr/2.2/ref/contrib/syndication/ | |
# comment est aujourd'hui générer ce flux RSS , est ce qu'on le laisse tel quel ou est-ce qu'on intégrer l'écriture des News | |
# deans l'API | |
/news: | |
get: | |
summary: Get the news and/or activity | |
description: > | |
Get the news and/or activity for the current FluidHub instance as a RSS feed | |
tags: | |
- news | |
responses: | |
200: | |
description: the news | |
content: | |
application/xml: | |
schema: | |
type: string | |
########################################################################## | |
# exemple sur l'API github https://developer.github.com/v3/ | |
/wares: | |
parameters: | |
- in: query | |
name: pattern | |
description: pattern to filter listed wares, applied to wares ids. The parameter is optional. | |
schema: | |
type: string | |
example: "water*" | |
- in: query | |
name: authorized_only | |
schema: | |
type: boolean | |
required: false | |
description: if true when the user is authenticated, the endpoint returns only the list of items that the user is authorized to use | |
get: | |
summary: Get list of wares | |
tags: | |
- reference wares | |
responses: | |
200: | |
description: 'OK' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/WareList' | |
/wares/{waretype}: | |
parameters: | |
- in: path | |
required: true | |
name: waretype | |
description: type of wares | |
schema: | |
type: string | |
enum: ['simulators','observers','builderexts'] | |
- in: query | |
name: authorized_only | |
schema: | |
type: boolean | |
required: false | |
description: if true when the user is authenticated, the endpoint returns only the list of wares that the user is authorized to use | |
- in: query | |
name: pattern | |
description: pattern to filter listed wares, applied to wares ids. The parameter is optional. | |
schema: | |
type: string | |
example: "water" | |
get: | |
summary: Get list of wares for type ⭐ | |
tags: | |
- reference wares | |
responses: | |
200: | |
description: 'OK' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/WareListByType' | |
404: | |
$ref: '#/components/responses/NotFound' | |
/wares/{waretype}/{wareid}: | |
parameters: | |
- in: path | |
required: true | |
name: waretype | |
description: type of wares | |
schema: | |
type: string | |
enum: ['simulators','observers','builderexts'] | |
example: simulators | |
- in: path | |
name: wareid | |
required: true | |
schema: | |
type: string | |
example: "my.simulator" | |
get: | |
summary: Get details on ware ⭐ | |
description: > | |
Details on ware includes git informations, issues informations, access informations | |
tags: | |
- reference wares | |
responses: | |
200: | |
description: 'OK' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Ware' | |
404: | |
$ref: '#/components/responses/NotFound' | |
patch: | |
summary: Update a ware | |
tags: | |
- reference wares | |
security: | |
- JWTAuth: [] | |
requestBody: | |
content: | |
application/json: | |
schema: | |
type: object | |
properties: | |
shortdesc: | |
type: string | |
example: "a new description ..." | |
responses: | |
200: | |
description: 'OK' | |
401: | |
$ref: '#/components/responses/Unauthenticated' | |
403: | |
$ref: '#/components/responses/Unauthorized' | |
404: | |
$ref: '#/components/responses/NotFound' | |
########################################################################## | |
/datasets: | |
get: | |
parameters: | |
- in: query | |
name: authorized_only | |
schema: | |
type: boolean | |
required: false | |
description: if true when the user is authenticated, the endpoint returns only the list of items that the user is authorized to use | |
summary : Get list of datasets | |
tags: | |
- reference datasets | |
responses: | |
200: | |
description: 'OK' | |
content: | |
application/json: | |
schema: | |
type : array | |
items : | |
allOf: | |
- $ref: '#/components/schemas/DatasetBase' | |
- $ref: '#/components/schemas/DatasetInfo' | |
- type: object | |
properties: | |
git-branches : | |
$ref: '#/components/schemas/GitBranches' | |
/datasets/{dataname}: | |
parameters: | |
- in: path | |
name: dataname | |
required: true | |
schema: | |
type: string | |
example: 'NameOfDataset' | |
get: | |
tags: | |
- reference datasets | |
summary: Get details about a dataset | |
responses: | |
200: | |
description: 'OK' | |
content: | |
application/json: | |
schema: | |
allOf: | |
- $ref: '#/components/schemas/DatasetBase' | |
- $ref: '#/components/schemas/DatasetInfo' | |
- $ref: '#/components/schemas/DatasetDetails' | |
404: | |
$ref: '#/components/responses/NotFound' | |
patch: | |
tags: | |
- reference datasets | |
summary : Update a dataset | |
security: | |
- JWTAuth: [] | |
requestBody: | |
content: | |
application/json: | |
schema: | |
type: object | |
properties: | |
shortdesc: | |
type: string | |
example: "a new description ..." | |
responses: | |
201: | |
description: 'OK' | |
401: | |
$ref: '#/components/responses/Unauthenticated' | |
403: | |
$ref: '#/components/responses/Unauthorized' | |
404: | |
$ref: '#/components/responses/NotFound' | |
############################################################################# | |
/workspaces/{spacetype}: | |
parameters: | |
- in: path | |
required: true | |
name: spacetype | |
description: type of space | |
schema: | |
type: string | |
enum: ["users", "groups"] | |
example: "groups" | |
get: | |
summary: Get list of spaces for type | |
security: | |
- JWTAuth: [] | |
tags: | |
- workspaces | |
responses: | |
200: | |
description: 'OK' | |
content: | |
application/json: | |
schema: | |
example: [ | |
{ | |
"space_type": "groups", | |
"name": "My Modelling Company", | |
"unixname": "mymodellingcompany", | |
"workspace_url": "http://127.0.0.1:8001/api/workspaces/groups/mymodellingcompany/" | |
}, | |
{ | |
"space_type": "groups", | |
"name": "MyLandscapeScientificGroup", | |
"unixname": "mylandscapescientificgroup", | |
"workspace_url": "http://127.0.0.1:8001/api/workspaces/groups/mymodellingcompany2/" | |
} | |
] | |
401: | |
$ref: '#/components/responses/Unauthenticated' | |
403: | |
$ref: '#/components/responses/Unauthorized' | |
404: | |
$ref: '#/components/responses/NotFound' | |
/workspaces/{spacetype}/{spacename}: | |
parameters: | |
- in: path | |
required: true | |
name: spacetype | |
description: type of space | |
schema: | |
type: string | |
enum: ["users", "groups"] | |
example: "groups" | |
- in: path | |
name: spacename | |
required: true | |
schema: | |
type: string | |
example: "my_workspace" | |
get: | |
# TODO add activity in response | |
summary: Get details on space 🚧 ❗ | |
description: Return details and activity (optional). | |
parameters: | |
- in: query | |
name: activity | |
schema: | |
type: boolean | |
required: false | |
description: if true, the endpoint returns also the activity of the workspace (jobs, files i/o, ...) | |
security: | |
- JWTAuth: [] | |
tags: | |
- workspaces | |
responses: | |
200: | |
description: 'OK' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Workspace' | |
401: | |
$ref: '#/components/responses/Unauthenticated' | |
403: | |
$ref: '#/components/responses/Unauthorized' | |
404: | |
$ref: '#/components/responses/NotFound' | |
########################################################################## | |
/workspaces/{spacetype}/{spacename}/projects: | |
parameters: | |
- in: path | |
required: true | |
name: spacetype | |
description: type of space | |
schema: | |
type: string | |
enum: ["users", "groups"] | |
example: "groups" | |
- in: path | |
name: spacename | |
required: true | |
schema: | |
type: string | |
example: "my_workspace" | |
get: | |
summary: Get list of projects in space | |
security: | |
- JWTAuth: [] | |
tags: | |
- workspaces/projects | |
responses: | |
200: | |
description: 'OK' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/ProjectsList' | |
401: | |
$ref: '#/components/responses/Unauthenticated' | |
403: | |
$ref: '#/components/responses/Unauthorized' | |
404: | |
$ref: '#/components/responses/NotFound' | |
post: | |
summary: Create a new project | |
description: > | |
Create an empty project or from an existing dataset.<br/> | |
<br/> | |
In case of import from an existing dataset, there are 3 parameters (mutually exclusive) | |
* from a reference dataset : use the `from_ref` parameter and provide the name of the dataset which will be used to create IN part of the new project | |
* from an existing project in the space of the current user : use the `from_user` parameter and provide the name of the existing project which will be used to create the new project. | |
The name of the created project can be different from the original project. It must be different if the new project is created in the same workspace. | |
* from an existing project in a group space : use the `from_group` parameter and provide the name of the group and the name of the existing project (separated by a comma `,`) which will be used to create the new project | |
parameters: | |
- in: query | |
required: false | |
name: from_ref | |
description: name of the reference dataset to import from | |
schema: | |
type: string | |
- in: query | |
required: false | |
name: from_user | |
description: name of the origin project to import from the logged user space | |
schema: | |
type: string | |
- in: query | |
required: false | |
name: from_group | |
description: name of the origin project to import from a group space | |
schema: | |
type: string | |
security: | |
- JWTAuth: [] | |
tags: | |
- workspaces/projects | |
requestBody: | |
required: true | |
content: | |
application/json: | |
schema: | |
type: object | |
properties: | |
name: | |
description: name of the project to create | |
type: string | |
example: 'my_project' | |
required: | |
- name | |
responses: | |
201: | |
description: 'OK' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Project' | |
401: | |
$ref: '#/components/responses/Unauthenticated' | |
403: | |
$ref: '#/components/responses/Unauthorized' | |
404: | |
$ref: '#/components/responses/NotFound' | |
/workspaces/{spacetype}/{spacename}/projects/{projectname}: | |
parameters: | |
- in: path | |
required: true | |
name: spacetype | |
description: filter by category | |
schema: | |
type: string | |
enum: ["users", "groups"] | |
example: "groups" | |
- in: path | |
name: spacename | |
required: true | |
schema: | |
type: string | |
example: "my_workspace" | |
- in: path | |
name: projectname | |
required: true | |
schema: | |
type: string | |
example: "prj-testA" | |
get: | |
summary: Get details on project | |
security: | |
- JWTAuth: [] | |
tags: | |
- workspaces/projects | |
responses: | |
200: | |
description: 'OK' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Project' | |
401: | |
$ref: '#/components/responses/Unauthenticated' | |
403: | |
$ref: '#/components/responses/Unauthorized' | |
404: | |
$ref: '#/components/responses/NotFound' | |
patch: | |
summary: Update project | |
description: Update only project name not content of files | |
security: | |
- JWTAuth: [] | |
tags: | |
- workspaces/projects | |
requestBody: | |
content: | |
application/json: | |
schema: | |
readOnly: true | |
type: object | |
properties: | |
name: | |
type: string | |
example: 'my_project' | |
responses: | |
200: | |
description: 'the project is updated' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/Project' | |
401: | |
$ref: '#/components/responses/Unauthenticated' | |
403: | |
$ref: '#/components/responses/Unauthorized' | |
404: | |
$ref: '#/components/responses/NotFound' | |
delete: | |
summary: Delete project | |
description: This action deletes the project and its content | |
security: | |
- JWTAuth: [] | |
tags: | |
- workspaces/projects | |
responses: | |
200: | |
description: 'Project is deleted' | |
401: | |
$ref: '#/components/responses/Unauthenticated' | |
403: | |
$ref: '#/components/responses/Unauthorized' | |
404: | |
$ref: '#/components/responses/NotFound' | |
/workspaces/{spacetype}/{spacename}/projects/{projectname}/files: | |
parameters: | |
- in: path | |
required: true | |
name: spacetype | |
description: filter by category | |
schema: | |
type: string | |
enum: ["users", "groups"] | |
example: "groups" | |
- in: path | |
name: spacename | |
required: true | |
schema: | |
type: string | |
example: "my_workspace" | |
- in: path | |
name: projectname | |
required: true | |
schema: | |
type: string | |
example: "prj-testA" | |
get: | |
summary: Get list of files in the project️ | |
security: | |
- JWTAuth: [] | |
tags: | |
- workspaces/projects | |
responses: | |
200: | |
description: 'OK' | |
content: | |
application/json: | |
schema: | |
type : object | |
properties: | |
files: | |
type: array | |
items: | |
type: string | |
example: ["openfluid-project.conf","IN/model.fluidx","IN/domain.fluidx","IN/run.fluidx","IN/monitoring.fluidx","OUT/openfluid-messages.log"] | |
403: | |
description: 'Not authorized' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/ErrorMessage' | |
404: | |
description: 'Not found' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/ErrorMessage' | |
501: | |
description: 'Not implemented' | |
post: | |
summary: Create a file in the project | |
security: | |
- JWTAuth: [] | |
tags: | |
- workspaces/projects | |
requestBody: | |
required: true | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/NewFile' | |
example: { "path" : "model.fluidx", "content" : "<base64 encoded content>" } | |
responses: | |
201: | |
description: 'the file is created' | |
401: | |
$ref: '#/components/responses/Unauthenticated' | |
403: | |
$ref: '#/components/responses/Unauthorized' | |
404: | |
$ref: '#/components/responses/NotFound' | |
/workspaces/{spacetype}/{spacename}/projects/{projectname}/files/{filepath}: | |
parameters: | |
- in: path | |
required: true | |
name: spacetype | |
description: filter by category | |
schema: | |
type: string | |
enum: ["users", "groups"] | |
example: "groups" | |
- in: path | |
name: spacename | |
required: true | |
schema: | |
type: string | |
example: "my_workspace" | |
- in: path | |
name: projectname | |
required: true | |
schema: | |
type: string | |
example: "prj-testA" | |
- in: path | |
name: filepath | |
description: path to file, using colon character (`:`) instead of path separators for subdirectories | |
required: true | |
schema: | |
type: string | |
example: "model.fluidx" | |
get: | |
summary: Get content of file ❗️ | |
description: Get content of file, path is relative to the project directory | |
security: | |
- JWTAuth: [] | |
tags: | |
- workspaces/projects | |
responses: | |
200: | |
description: 'OK, returns the content of the requested file' | |
content: | |
application/octet-stream: | |
schema: | |
format: binary | |
401: | |
$ref: '#/components/responses/Unauthenticated' | |
403: | |
$ref: '#/components/responses/Unauthorized' | |
404: | |
$ref: '#/components/responses/NotFound' | |
put: | |
summary: Set content of file ❗️ | |
description: Set content of file, path is relative to the project directory | |
security: | |
- JWTAuth: [] | |
tags: | |
- workspaces/projects | |
requestBody: | |
content: | |
application/octet-stream: | |
schema: | |
format: binary | |
responses: | |
200: | |
description: 'the file content is updated' | |
401: | |
$ref: '#/components/responses/Unauthenticated' | |
403: | |
$ref: '#/components/responses/Unauthorized' | |
404: | |
$ref: '#/components/responses/NotFound' | |
patch: | |
summary: Rename or move a file | |
description: Rename or move a file in the project, path is relative to the project root directory | |
security: | |
- JWTAuth: [] | |
tags: | |
- workspaces/projects | |
requestBody: | |
content: | |
application/json: | |
schema: | |
type: object | |
properties: | |
path: | |
type: string | |
responses: | |
200: | |
description: 'File is renamed/moved' | |
401: | |
$ref: '#/components/responses/Unauthenticated' | |
403: | |
$ref: '#/components/responses/Unauthorized' | |
404: | |
$ref: '#/components/responses/NotFound' | |
delete: | |
summary: Delete file | |
description: Delete file, path is relative to the project directory | |
security: | |
- JWTAuth: [] | |
tags: | |
- workspaces/projects | |
responses: | |
200: | |
description: 'File is deleted' | |
401: | |
$ref: '#/components/responses/Unauthenticated' | |
403: | |
$ref: '#/components/responses/Unauthorized' | |
404: | |
$ref: '#/components/responses/NotFound' | |
/workspaces/{spacetype}/{spacename}/projects/{projectname}/run: | |
parameters: | |
- in: path | |
required: true | |
name: spacetype | |
description: filter by category | |
schema: | |
type: string | |
enum: ["users", "groups"] | |
example: "groups" | |
- in: path | |
name: spacename | |
required: true | |
schema: | |
type: string | |
example: "theteam" | |
- in: path | |
name: projectname | |
required: true | |
schema: | |
type: string | |
example: "prj-testA" | |
post: | |
summary: Run simulation | |
description: Run simulation using the project. This action creates a new job | |
security: | |
- JWTAuth: [] | |
tags: | |
- workspaces/projects | |
responses: | |
201: | |
description: 'The job was launched' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/JobLaunch' | |
401: | |
$ref: '#/components/responses/Unauthenticated' | |
403: | |
$ref: '#/components/responses/Unauthorized' | |
404: | |
$ref: '#/components/responses/NotFound' | |
/workspaces/{spacetype}/{spacename}/projects/{projectname}/download: | |
parameters: | |
- in: path | |
required: true | |
name: spacetype | |
description: filter by category | |
schema: | |
type: string | |
enum: ["users", "groups"] | |
example: "groups" | |
- in: path | |
name: spacename | |
required: true | |
schema: | |
type: string | |
example: "my_workspace" | |
- in: path | |
name: projectname | |
required: true | |
schema: | |
type: string | |
example: "prj-testA" | |
get: | |
summary: Download project | |
description: Download project as a zip archive | |
security: | |
- JWTAuth: [] | |
tags: | |
- workspaces/projects | |
responses: | |
200: | |
description: 'OK' | |
content: | |
application/zip: | |
schema: | |
format: binary | |
401: | |
$ref: '#/components/responses/Unauthenticated' | |
403: | |
$ref: '#/components/responses/Unauthorized' | |
404: | |
$ref: '#/components/responses/NotFound' | |
# /workspaces/{spacetype}/{spacename}/projects/{projectname}/results: | |
# parameters: | |
# - in: path | |
# required: true | |
# name: spacetype | |
# description: filter by category | |
# schema: | |
# type: string | |
# enum: ["users", "groups"] | |
# example: "groups" | |
# - in: path | |
# name: spacename | |
# required: true | |
# schema: | |
# type: string | |
# example: "my_workspace" | |
# - in: path | |
# name: projectname | |
# required: true | |
# schema: | |
# type: string | |
# example: "prj-testA" | |
# get: | |
# summary: Access to results files of the latest simulation 🚧 | |
# description: files contained in the OUT directory | |
# security: | |
# - JWTAuth: [] | |
# tags: | |
# - workspaces/projects | |
# responses: | |
# 200: | |
# description: 'OK' | |
# 404: | |
# description: 'Not found' | |
# 501: | |
# description: 'Not implemented' | |
####################################################################################### | |
/workspaces/{spacetype}/{spacename}/wares-dev: | |
parameters: | |
- in: path | |
required: true | |
name: spacetype | |
description: type of space | |
schema: | |
type: string | |
enum: ["users", "groups"] | |
example: "groups" | |
- in: path | |
name: spacename | |
required: true | |
schema: | |
type: string | |
example: "my_workspace" | |
get: | |
summary: Get list of wares sources ❗️ | |
security: | |
- JWTAuth: [] | |
tags: | |
- workspaces/wares-dev | |
responses: | |
200: | |
description: 'OK' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/WaresDevList' | |
401: | |
$ref: '#/components/responses/Unauthenticated' | |
403: | |
$ref: '#/components/responses/Unauthorized' | |
404: | |
$ref: '#/components/responses/NotFound' | |
/workspaces/{spacetype}/{spacename}/wares-dev/{waretype}: | |
parameters: | |
- in: path | |
required: true | |
name: spacetype | |
description: filter by category | |
schema: | |
type: string | |
enum: ["users", "groups"] | |
example: "groups" | |
- in: path | |
name: spacename | |
required: true | |
schema: | |
type: string | |
example: "my_workspace" | |
- in: path | |
name: waretype | |
required: true | |
description: type of ware | |
schema: | |
type: string | |
enum: ['simulators','observers'] | |
example: simulators | |
get: | |
summary: Get list of wares sources for type | |
security: | |
- JWTAuth: [] | |
tags: | |
- workspaces/wares-dev | |
responses: | |
200: | |
description: 'OK' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/WaresDevTypeList' | |
401: | |
$ref: '#/components/responses/Unauthenticated' | |
403: | |
$ref: '#/components/responses/Unauthorized' | |
404: | |
$ref: '#/components/responses/NotFound' | |
post: | |
summary: Create new ware sources | |
description: > | |
Create an empty ware sources or from existing ware sources.<br/> | |
<br/> | |
In case of import from existing ware sources, there are 3 parameters (mutually exclusive) | |
* from a reference ware : use the `from_ref` parameter and provide the ware ID of the ware sources which will be used to create the new ware sources | |
The ID of the created ware sources must be the same as the original ID. | |
* from an existing ware in the space of the current user : use the `from_user` parameter and provide the ID of the existing ware sources which will be used to create the new ware sources. | |
The ID of the created ware sources must be the same as the original ID. | |
* from an existing ware in a group space : use the `from_group` parameter and provide the name of the group and the ID of the existing ware sources (separated by a comma `,`) which will be used to create the new ware sources. | |
The ID of the created ware sources must be the same as the original ID. | |
parameters: | |
- in: query | |
required: false | |
name: from_ref | |
description: name of the reference ware sources to import from | |
schema: | |
type: string | |
- in: query | |
required: false | |
name: from_user | |
description: name of the origin ware sources to import from the logged user space | |
schema: | |
type: string | |
- in: query | |
required: false | |
name: from_group | |
description: name of the origin ware sources to import from a group space | |
schema: | |
type: string | |
security: | |
- JWTAuth: [] | |
tags: | |
- workspaces/wares-dev | |
requestBody: | |
required: true | |
content: | |
application/json: | |
schema: | |
type: object | |
properties: | |
id: | |
description: The ID of the ware sources to create | |
type: string | |
example: 'sim.113' | |
responses: | |
201: | |
description: 'The new ware source was created' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/WareSources' | |
401: | |
$ref: '#/components/responses/Unauthenticated' | |
403: | |
$ref: '#/components/responses/Unauthorized' | |
404: | |
$ref: '#/components/responses/NotFound' | |
/workspaces/{spacetype}/{spacename}/wares-dev/{waretype}/{wareid}: | |
parameters: | |
- in: path | |
required: true | |
name: spacetype | |
description: type of space | |
schema: | |
type: string | |
enum: ["users", "groups"] | |
example: "groups" | |
- in: path | |
name: spacename | |
required: true | |
schema: | |
type: string | |
example: "my_workspace" | |
- in: path | |
name: waretype | |
required: true | |
description: type of ware | |
schema: | |
type: string | |
enum: ['simulators','observers'] | |
example: simulators | |
- in: path | |
name: wareid | |
required: true | |
schema: | |
type: string | |
example: "my.funny.simulator" | |
get: | |
summary: Get details on ware sources ❗ | |
security: | |
- JWTAuth: [] | |
tags: | |
- workspaces/wares-dev | |
responses: | |
200: | |
description: 'OK' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/WareSources' | |
401: | |
$ref: '#/components/responses/Unauthenticated' | |
403: | |
$ref: '#/components/responses/Unauthorized' | |
404: | |
$ref: '#/components/responses/NotFound' | |
# TODO Finaliser le update ware sources | |
patch: | |
summary: Update ware sources 🚧 | |
security: | |
- JWTAuth: [] | |
tags: | |
- workspaces/wares-dev | |
# requestBody: | |
# content: | |
# application/json: | |
# schema: | |
# readOnly: true | |
# allOf: | |
# - $ref: '#/components/schemas/WareSource' | |
responses: | |
200: | |
description: 'the ware source is updated' | |
# content: | |
# application/json: | |
# schema: | |
# $ref: '#/components/schemas/WareSource' | |
401: | |
$ref: '#/components/responses/Unauthenticated' | |
403: | |
$ref: '#/components/responses/Unauthorized' | |
404: | |
$ref: '#/components/responses/NotFound' | |
delete: | |
summary: Delete ware sources | |
description: This action deletes all files in the ware sources | |
security: | |
- JWTAuth: [] | |
tags: | |
- workspaces/wares-dev | |
responses: | |
200: | |
description: 'Ware sources were deleted' | |
401: | |
$ref: '#/components/responses/Unauthenticated' | |
403: | |
$ref: '#/components/responses/Unauthorized' | |
404: | |
$ref: '#/components/responses/NotFound' | |
/workspaces/{spacetype}/{spacename}/wares-dev/{waretype}/{wareid}/files: | |
parameters: | |
- in: path | |
required: true | |
name: spacetype | |
description: filter by category | |
schema: | |
type: string | |
enum: ["users", "groups"] | |
example: "users" | |
- in: path | |
name: spacename | |
required: true | |
schema: | |
type: string | |
example: "my_workspace" | |
- in: path | |
name: waretype | |
required: true | |
description: wares sources are filtered:sorted by category | |
schema: | |
type: string | |
enum: ['simulators','observers'] | |
example: observers | |
- in: path | |
name: wareid | |
required: true | |
schema: | |
type: string | |
example: "my.cool.observer" | |
get: | |
summary: Get list of files in ware sources ❗️ | |
description: paths are relative to the wares sources root directory. `_build*` and `.*` files are ignored | |
security: | |
- JWTAuth: [] | |
tags: | |
- workspaces/wares-dev | |
responses: | |
200: | |
description: 'OK' | |
content: | |
application/json: | |
schema: | |
type: object | |
properties: | |
files: | |
type: array | |
items: | |
type: string | |
example: ["CMakeLists.txt","CMake.in.config","doc/main.tex"] | |
401: | |
$ref: '#/components/responses/Unauthenticated' | |
403: | |
$ref: '#/components/responses/Unauthorized' | |
404: | |
$ref: '#/components/responses/NotFound' | |
post: | |
summary: Create a file in ware sources ❗️ | |
description: path is relative to the wares sources root directory | |
security: | |
- JWTAuth: [] | |
tags: | |
- workspaces/wares-dev | |
requestBody: | |
required: true | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/NewFile' | |
example: { "path" : "MyCoolObserver.cpp", "content" : "<base64 encoded content>" } | |
responses: | |
201: | |
description: 'the file is created' | |
401: | |
$ref: '#/components/responses/Unauthenticated' | |
403: | |
$ref: '#/components/responses/Unauthorized' | |
404: | |
$ref: '#/components/responses/NotFound' | |
/workspaces/{spacetype}/{spacename}/wares-dev/{waretype}/{wareid}/files/{filepath}: | |
parameters: | |
- in: path | |
required: true | |
name: spacetype | |
description: filter by category | |
schema: | |
type: string | |
enum: ["users", "groups"] | |
example: "groups" | |
- in: path | |
name: spacename | |
required: true | |
schema: | |
type: string | |
example: "my_workspace" | |
- in: path | |
name: waretype | |
required: true | |
description: wares sources are filtered:sorted by category | |
schema: | |
type: string | |
enum: ['simulators','observers'] | |
example: observers | |
- in: path | |
name: wareid | |
required: true | |
schema: | |
type: string | |
example: "my.cool.observer" | |
- in: path | |
name: filepath | |
description: path to file, using colon character (`:`) instead of path separators for subdirectories | |
required: true | |
schema: | |
type: string | |
example: "CMake.in.config" | |
get: | |
summary: Get content of file | |
description: Get content of file, path is relative to the ware sources directory | |
security: | |
- JWTAuth: [] | |
tags: | |
- workspaces/wares-dev | |
responses: | |
200: | |
description: 'OK' | |
content: | |
application/octet-stream: | |
schema: | |
format: binary | |
401: | |
$ref: '#/components/responses/Unauthenticated' | |
403: | |
$ref: '#/components/responses/Unauthorized' | |
404: | |
$ref: '#/components/responses/NotFound' | |
put: | |
summary: Set content of file | |
description: Set content of file, path is relative to the ware sources directory | |
security: | |
- JWTAuth: [] | |
tags: | |
- workspaces/wares-dev | |
requestBody: | |
content: | |
application/octet-stream: | |
schema: | |
format: binary | |
responses: | |
200: | |
description: 'The file content is updated' | |
401: | |
$ref: '#/components/responses/Unauthenticated' | |
403: | |
$ref: '#/components/responses/Unauthorized' | |
404: | |
$ref: '#/components/responses/NotFound' | |
patch: | |
summary: Rename or move a file | |
description: Rename or move a file in the ware sources, path is relative to the sources root directory | |
security: | |
- JWTAuth: [] | |
tags: | |
- workspaces/wares-dev | |
requestBody: | |
content: | |
application/json: | |
schema: | |
type: object | |
properties: | |
path: | |
type: string | |
responses: | |
200: | |
description: 'File is renamed/moved' | |
401: | |
$ref: '#/components/responses/Unauthenticated' | |
403: | |
$ref: '#/components/responses/Unauthorized' | |
404: | |
$ref: '#/components/responses/NotFound' | |
delete: | |
summary: Delete file | |
security: | |
- JWTAuth: [] | |
tags: | |
- workspaces/wares-dev | |
responses: | |
200: | |
description: 'File is deleted' | |
401: | |
$ref: '#/components/responses/Unauthenticated' | |
403: | |
$ref: '#/components/responses/Unauthorized' | |
404: | |
$ref: '#/components/responses/NotFound' | |
/workspaces/{spacetype}/{spacename}/wares-dev/{waretype}/{wareid}/configure: | |
parameters: | |
- in: path | |
required: true | |
name: spacetype | |
description: filter by category | |
schema: | |
type: string | |
enum: ["users", "groups"] | |
example: "groups" | |
- in: path | |
name: spacename | |
required: true | |
schema: | |
type: string | |
example: "theteam" | |
- in: path | |
name: waretype | |
required: true | |
description: wares sources are filtered:sorted by category | |
schema: | |
type: string | |
enum: ['simulators','observers'] | |
example: observers | |
- in: path | |
name: wareid | |
required: true | |
schema: | |
type: string | |
example: "my.cool.observer" | |
post: | |
summary: Launch configuration of ware sources for build | |
description: | | |
Uses the `cmake` command to perform the configuration for build | |
The configure is performed in a specific subdirectory named `_build-<mode>-<version>` | |
where `<mode>` is `release` and `<version>` is the version of OpenFLUID used in MAJOR.minor.patch format. | |
If exists, this directory must be deleted and created again. | |
The configure command to perform in this specific directory is `cmake /path/to/sources -DCMAKE_BUILD_TYPE=Release` | |
This action creates a new job. See OpenFLUID-Devstudio source code for details. | |
security: | |
- JWTAuth: [] | |
tags: | |
- workspaces/wares-dev | |
responses: | |
201: | |
description: 'The job was launched' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/JobLaunch' | |
401: | |
$ref: '#/components/responses/Unauthenticated' | |
403: | |
$ref: '#/components/responses/Unauthorized' | |
404: | |
$ref: '#/components/responses/NotFound' | |
/workspaces/{spacetype}/{spacename}/wares-dev/{waretype}/{wareid}/build: | |
parameters: | |
- in: path | |
required: true | |
name: spacetype | |
description: type of space | |
schema: | |
type: string | |
enum: ["users", "groups"] | |
example: "groups" | |
- in: path | |
name: spacename | |
required: true | |
schema: | |
type: string | |
example: "theteam" | |
- in: path | |
name: waretype | |
required: true | |
description: wares sources are filtered:sorted by category | |
schema: | |
type: string | |
enum: ['simulators','observers'] | |
example: observers | |
- in: path | |
name: wareid | |
required: true | |
schema: | |
type: string | |
example: "my.cool.observer" | |
post: | |
summary: Launch build of ware sources | |
description: | | |
Uses the `cmake` command to perform the build | |
The build is performed in a specific subdirectory named `_build-<mode>-<version>` | |
where `<mode>` is `release` and `<version>` is the version of OpenFLUID used in MAJOR.minor.patch format. | |
If this directory does not exist, a configure must be run before perform the build. | |
The build command to perform in this specific directory is `cmake --build . --target install` | |
This action creates a new job. See OpenFLUID-Devstudio source code for details. | |
security: | |
- JWTAuth: [] | |
tags: | |
- workspaces/wares-dev | |
responses: | |
201: | |
description: 'The job was launched' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/JobLaunch' | |
401: | |
$ref: '#/components/responses/Unauthenticated' | |
403: | |
$ref: '#/components/responses/Unauthorized' | |
404: | |
$ref: '#/components/responses/NotFound' | |
/workspaces/{spacetype}/{spacename}/wares: | |
parameters: | |
- in: path | |
required: true | |
name: spacetype | |
description: type of space | |
schema: | |
type: string | |
enum: ["users", "groups"] | |
example: "groups" | |
- in: path | |
name: spacename | |
required: true | |
schema: | |
type: string | |
example: "my_workspace" | |
get: | |
summary: Get list of built wares | |
description: Uses the values returned by the `openfluid report <waretype> --format=json -l` command applied to each ware type (requires OpenFLUID >= 2.1.10) | |
security: | |
- JWTAuth: [] | |
tags: | |
- workspaces/builtwares | |
responses: | |
200: | |
description: 'OK' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/BuiltWaresList' | |
401: | |
$ref: '#/components/responses/Unauthenticated' | |
403: | |
$ref: '#/components/responses/Unauthorized' | |
404: | |
$ref: '#/components/responses/NotFound' | |
/workspaces/{spacetype}/{spacename}/wares/{waretype}: | |
parameters: | |
- in: path | |
required: true | |
name: spacetype | |
description: type of space | |
schema: | |
type: string | |
enum: ["users", "groups"] | |
example: "groups" | |
- in: path | |
name: spacename | |
required: true | |
schema: | |
type: string | |
example: "my_workspace" | |
- in: path | |
name: waretype | |
required: true | |
description: type of ware | |
schema: | |
type: string | |
enum: ['simulators','observers'] | |
example: simulators | |
get: | |
summary: Get list of built wares for type | |
description: Returns the value given by the `openfluid report {waretype} --format=json -e` command (requires OpenFLUID >= 2.1.10) | |
security: | |
- JWTAuth: [] | |
tags: | |
- workspaces/builtwares | |
responses: | |
200: | |
description: 'OK' | |
content: | |
application/json: | |
schema: | |
$ref: '#/components/schemas/BuiltWares' | |
401: | |
$ref: '#/components/responses/Unauthenticated' | |
403: | |
$ref: '#/components/responses/Unauthorized' | |
404: | |
$ref: '#/components/responses/NotFound' | |
/workspaces/{spacetype}/{spacename}/wares/{waretype}/{wareid}: | |
parameters: | |
- in: path | |
required: true | |
name: spacetype | |
description: filter by category | |
schema: | |
type: string | |
enum: ["users", "groups"] | |
example: "groups" | |
- in: path | |
name: spacename | |
required: true | |
schema: | |
type: string | |
example: "my_workspace" | |
- in: path | |
name: waretype | |
required: true | |
description: wares are filtered:sorted by category . | |
schema: | |
type: string | |
enum: ['simulators','observers'] | |
example: simulators | |
- in: path | |
name: wareid | |
required: true | |
schema: | |
type: string | |
example: "my.fabulous.simulator" | |
# get: | |
# summary: Get details on built ware ⚠️ | |
# security: | |
# - JWTAuth: [] | |
# tags: | |
# - workspaces/builtwares | |
# responses: | |
# 200: | |
# description: 'OK' | |
# content: | |
# application/json: | |
# schema: | |
# $ref: '#/components/schemas/BuiltWare' | |
# 404: | |
# description: 'Not found' | |
# 501: | |
# description: 'Not implemented' | |
delete: | |
summary: Delete built ware | |
description: Deletes the binary plugin file of the ware (.so) , and associated documentation if any (.pdf) | |
security: | |
- JWTAuth: [] | |
tags: | |
- workspaces/builtwares | |
responses: | |
200: | |
description: 'Ware is deleted' | |
401: | |
$ref: '#/components/responses/Unauthenticated' | |
403: | |
$ref: '#/components/responses/Unauthorized' | |
404: | |
$ref: '#/components/responses/NotFound' | |
########################################################################## | |
########################################################################## | |
components: | |
responses: | |
Unauthenticated: | |
description: Not authenticated | |
Unauthorized: | |
description: 'Not authorized' | |
NotFound: | |
description: 'Not found' | |
securitySchemes: | |
BasicAuth: | |
type: http | |
scheme: basic | |
JWTAuth: | |
type: http | |
scheme: bearer | |
bearerFormat: JWT | |
schemas: | |
ErrorMessage: | |
type: object | |
properties: | |
detail : | |
type : string | |
example : 'This is an error message' | |
UserProfile: | |
type: string | |
enum: ['sciuser', 'scimodeller', 'scideveloper', 'superuser', 'admin'] | |
example: 'scimodeller' | |
UserBase: | |
type : object | |
properties: | |
first_name: | |
type: string | |
last_name: | |
type: string | |
organization: | |
type: string | |
UserItem: | |
allOf: | |
- type: object | |
properties: | |
unixname : | |
type : string | |
- $ref: '#/components/schemas/UserBase' | |
- type: object | |
properties: | |
user_url : | |
type: string | |
UserDetails: | |
type : object | |
properties: | |
email: | |
type : string | |
profile: | |
$ref: '#/components/schemas/UserProfile' | |
UserDetailsWithActive: | |
allOf: | |
- $ref: '#/components/schemas/UserDetails' | |
- type : object | |
properties: | |
is_active : | |
type : boolean | |
UserGroups: | |
type : object | |
properties: | |
groups: | |
type : array | |
items: | |
type: object | |
properties: | |
unixname: | |
type: string | |
name: | |
type: string | |
group_url: | |
type: string | |
GroupBase: | |
type: object | |
properties: | |
name: | |
type: string | |
GroupItem: | |
allOf: | |
- type: object | |
properties: | |
unixname : | |
type : string | |
- $ref: '#/components/schemas/GroupBase' | |
- type: object | |
properties: | |
group_url : | |
type: string | |
GroupDetails: | |
type: object | |
properties: | |
members: | |
type: array | |
items: | |
$ref: '#/components/schemas/UserItem' | |
JobStatus: | |
type: string | |
enum: ['waiting','running','completed','failed','stopped'] | |
JobBase: | |
type: object | |
properties: | |
id: | |
type: integer | |
user_unixname: | |
type: string | |
description: "unixname of the user who triggered the action" | |
space_type: | |
type: string | |
enum: ['users','groups'] | |
space_unixname: | |
type: string | |
description: "unixname of the space on which the action is launched" | |
action: | |
type: string | |
enum: ["run","configure","build"] | |
object_url: | |
type: string | |
description: "url to the project or wares-dev on which the action is launched" | |
status: | |
$ref: '#/components/schemas/JobStatus' | |
created_at: | |
type: string | |
updated_at: | |
type: string | |
JobLaunch: | |
allOf: | |
- $ref: '#/components/schemas/JobBase' | |
- type: object | |
properties: | |
job_url: | |
type: string | |
description : url to the job details | |
Job: | |
allOf: | |
- $ref: '#/components/schemas/JobBase' | |
- type: object | |
properties: | |
log_url: | |
type: string | |
description : url to the log file | |
GitCommitDetails: | |
type: object | |
properties: | |
sha: | |
type: string | |
example: '11d8394e7ad3ddcbd76a6fdbc2226510e6a438cc' | |
author-name: | |
type: string | |
example: 'Zoe' | |
author-email: | |
type: string | |
example: 'zoe@people.org' | |
date: | |
type: string | |
example: '20151120T145127' | |
message: | |
type: string | |
example: 'This is an update\n*Added feature A\n*Fixed bug B' | |
GitBranches: | |
type: array | |
items: | |
type: string | |
example: ['openfluid-2.1','openfluid-2.0','openfluid-1.7.2'] | |
GitBranchDetails: | |
type: object | |
properties: | |
name: | |
type: string | |
example: 'openfluid-2.1' | |
commits: | |
type: array | |
items: | |
$ref: '#/components/schemas/GitCommitDetails' | |
UsersROlist: | |
type: array | |
description: users with ro rights | |
items: | |
type: string | |
example: ['plebon', 'mlemauvais', 'hsimpson'] | |
UsersRWlist: | |
type: array | |
description: users with rw rights | |
items: | |
type: string | |
example: ['plebon', 'mlemauvais', 'hsimpson','fmichel'] | |
Ware: | |
type: object | |
properties: | |
id: | |
type: string | |
example: "my.sim.example97" | |
shortdesc: | |
type: string | |
example : 'This is a new simulator' | |
contributors : | |
type: array | |
items: | |
type: object | |
properties: | |
name: | |
type: string | |
example: 'Pierre' | |
email: | |
type: string | |
example: 'pierre@people.org' | |
commits_counts: | |
type: integer | |
example: 17 | |
users_ro: | |
$ref: '#/components/schemas/UsersROlist' | |
users_rw: | |
$ref: '#/components/schemas/UsersRWlist' | |
git_url: | |
type: string | |
example: 'https://my.fluidhub.org/git/simulators/sim.example.7' | |
git_branches: | |
type: array | |
items: | |
$ref: '#/components/schemas/WareGitBranchDetails' | |
WareGitBranchDetails: | |
allOf: | |
- $ref: '#/components/schemas/GitBranchDetails' | |
- type: object | |
properties: | |
tags: | |
type: array | |
items: | |
type: string | |
example: ['water','atmosphere','surface'] | |
contacts: | |
type: array | |
items: | |
type: string | |
example: ['pierre@people.org','marianne@users.org'] | |
license: | |
type: string | |
example: 'GPL-3.0' | |
issues: | |
type: array | |
items: | |
$ref: '#/components/schemas/WareGitIssueDetails' | |
WareGitIssueDetails: | |
type: object | |
properties: | |
id: | |
type: string | |
example: '5' | |
title: | |
type: string | |
example: 'Important feature' | |
creator-name: | |
type: string | |
example: 'Maxime' | |
date: | |
type: string | |
example: '20151120T145127' | |
type: | |
type: string | |
example: 'feature' | |
state: | |
enum: ['open','closed'] | |
example: 'open' | |
urgency: | |
enum: ['low','normal','high'] | |
example: 'normal' | |
description: | |
type: string | |
example: 'Add this brilliant new feature' | |
WareList: | |
title: WareList | |
type: object | |
properties: | |
simulators: | |
type: array | |
items: | |
type: string | |
example: ["my.sim.example1","my.sim.example18","my.sim.example97"] | |
observers: | |
type: array | |
items: | |
type: string | |
example: ["my.obs.example42","my.obs.example123"] | |
builderexts: | |
type: array | |
items: | |
type: string | |
example: [] | |
WareListByType: | |
title: WareListByType | |
type: object | |
additionalProperties: | |
type: string | |
properties: | |
shotdesc : | |
type : string | |
ware_url : | |
type : string | |
example: | |
my.obs.example42 : | |
shortdesc : "my observer as an example" | |
git_url : "" | |
ware_url : "" | |
git_branches : ["openfluid-2.0","openfluid-2.1"] | |
issues_counts : | |
bugs : 0 | |
features : 2 | |
reviews : 1 | |
users-ro : [] | |
users-rw : [] | |
my.obs.example123 : | |
shortdesc : "my observer as another example" | |
ware_url : "" | |
git_url : "" | |
git_branches : ["openfluid-2.1"] | |
issues_counts : | |
bugs : 1 | |
features : 0 | |
reviews : 0 | |
users-ro : [] | |
users-rw : [] | |
# le Dataset ne contient qu'un nom pour le moment , version future lien vers le contenu et l'id | |
# ainsi que la liste des utilisateurs ayant des droits ro et la liste de ceux ayant les droits rw | |
DatasetBase: | |
type: object | |
properties: | |
name: | |
type: string | |
example: "NameOfDataset" | |
git-url: | |
type: string | |
example: "https://hub.openfluid-projet.org/git/datasets/NameOfDataset" | |
DatasetInfo: | |
type: object | |
properties: | |
shortdesc: | |
type: string | |
example: "This dataset ..." | |
DatasetDetails: | |
type: object | |
properties: | |
users-ro: | |
$ref: '#/components/schemas/UsersROlist' | |
users-rw: | |
$ref: '#/components/schemas/UsersRWlist' | |
git-branches: | |
type: array | |
items: | |
$ref: '#/components/schemas/GitBranchDetails' | |
Workspace: | |
type: object | |
properties: | |
type: | |
type: string | |
enum: ["users", "groups"] | |
example: "groups" | |
name: | |
type: string | |
example: "theteam" | |
projects: | |
$ref: '#/components/schemas/ProjectsList' | |
waresdev: | |
$ref: '#/components/schemas/WaresDevList' | |
builtwares: | |
$ref: '#/components/schemas/BuiltWaresList' | |
WaresDevListItem: | |
type: object | |
properties: | |
wareid : | |
type: string | |
ware_url : | |
type: string | |
WaresDevList: | |
type: object | |
properties: | |
simulators: | |
type : array | |
items : | |
$ref : '#/components/schemas/WaresDevListItem' | |
observers: | |
type : array | |
items : | |
$ref : '#/components/schemas/WaresDevListItem' | |
example: { | |
"simulators": [ | |
{ | |
"wareid": "my.sim.01", | |
"ware_url": "http://127.0.0.1:8001/api/workspaces/users/afranklin5/wares-dev/simulators/my.sim.01/" | |
} | |
], | |
"observers": [ | |
{ | |
"wareid": "my.obs.05", | |
"ware_url": "http://127.0.0.1:8001/api/workspaces/users/afranklin5/wares-dev/observers/my.obs.05/" | |
} | |
] | |
} | |
WaresDevTypeList: | |
type: array | |
items: | |
$ref : '#/components/schemas/WaresDevListItem' | |
example: [ | |
{ | |
"wareid": "my.sim.01", | |
"ware_url": "http://127.0.0.1:8001/api/workspaces/users/afranklin5/wares-dev/simulators/my.sim.01/" | |
}, | |
{ | |
"wareid": "my.sim.18", | |
"ware_url": "http://127.0.0.1:8001/api/workspaces/users/afranklin5/wares-dev/simulators/my.sim.18/" | |
} | |
] | |
WareSources: | |
properties: | |
wareid: | |
type: string | |
created: | |
type: string | |
description: 'creation date' | |
files_url: | |
type: string | |
ProjectsList: | |
type: array | |
items: | |
type: object | |
properties: | |
name: | |
type : string | |
project_url: | |
type: string | |
example: [ | |
{ | |
"name": "medium_project", | |
"project_url": "http://127.0.0.1:8001/api/workspaces/users/afranklin5/projects/medium_project/" | |
}, | |
{ | |
"name": "small_project", | |
"project_url": "http://127.0.0.1:8001/api/workspaces/users/afranklin5/projects/small_project/" | |
} | |
] | |
Project: | |
title: Project | |
description: object specifying project inside a workspace | |
properties: | |
name: | |
type: string | |
example: 'my_project' | |
created: | |
type: string | |
description: 'creation date' | |
example: '2020-03-23 16:42:00.496323+00:00' | |
files_url: | |
type: string | |
example: 'http://127.0.0.1:8001/api/workspaces/users/afranklin5/projects/my_project/files/' | |
BuiltWaresList: | |
properties: | |
simulators: | |
type : object | |
properties: | |
available: | |
type : array | |
items : {} | |
example: ["sim.01","sim.02","sim.03"] | |
observers: | |
type : object | |
properties: | |
available: | |
type : array | |
items : {} | |
example: ["obs.01","obs.02","obs.03"] | |
BuiltWares: | |
properties: | |
available: | |
type : array | |
items : | |
type: object | |
example: {} | |
errored: | |
type : array | |
items : | |
type: object | |
example: {} | |
# WareSource: | |
# title: WareSource | |
# description: this is a set of files that allows a build of new wares. | |
# this set is available in the workspace. | |
# type: object | |
# properties: | |
# id: | |
# readOnly: true | |
# type: integer | |
# example: 23 | |
# category: | |
# type: string | |
# enum: ['simulators','observers','builderexts'] | |
# example: simulators | |
# name: | |
# type: string | |
# example: 'training.all.transfer_w' | |
# content: | |
# # possible link with NoSQL database | |
# type: array | |
# items: {} | |
# description: files witch complete ware source | |
# example: ['_build-release-2.1', 'CMake.in.config', 'CMakeLists.txt', 'SignalSim.cpp', 'wareshub.json'] | |
# path: | |
# description: location of the personnal workspace | |
# type: string | |
# example: "spaces/workgroups_space/groupA/ware-dev/simulators/training.all.transfer_w" | |
# this schema is used to fill the response of an array of wares sources available | |
# it will be not a model | |
# ArrayOfWareSource: | |
# type: array | |
# items: | |
# type: object | |
# properties: | |
# name: | |
# type: string | |
# category: | |
# type: string | |
# path: | |
# type: string | |
# example: | |
# - name: 'training.all.transfer_w' | |
# category: 'simulator' | |
# path: "spaces/workgroups_space/groupA/ware-dev/simulators/training.all.transfer_w" | |
# - name: 'training.signal.prod_w' | |
# category: 'simulator' | |
# path: "spaces/workgroups_space/groupA/ware-dev/simulators/training.signal.prod_w" | |
# - name: 'training.su.prod.explanation' | |
# category: 'simulator' | |
# path: "spaces/workgroups_space/groupA/ware-dev/simulators/training.su.prod.explanation" | |
NewFile: | |
type: object | |
properties: | |
path: | |
type: string | |
description: path of the file to create, relatively to the current project or ware sources directory | |
content: | |
type: string | |
description: content of the file to create, encoded into base64 | |
# requestBodies: | |
# Workgroup: | |
# description: a json object containing Workgroup information | |
# required: true | |
# content: | |
# application/json: | |
# schema: | |
# $ref: '#/components/schemas/Workgroup' | |
# Dataset: | |
# description: a json object containing Dataset information | |
# required: true | |
# content: | |
# application/json: | |
# schema: | |
# $ref: '#/components/schemas/Dataset' | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment