Obeo Designer Team Server - Administration Server

This guide describe the REST API of the administration server for Obeo Designer Team Server. This API will allow you to manage CDO repositories, shared modeling projects and depending on the type of repository you manage, you will be able to manager the repository users. If you already have configured the administration server for Obeo Designer Team Server you can start to use our API.

Remark: The protocol, host and port can be different from your server configuration.

In this documentation we will use the web service API in the version v1.0.

Disclaimers: As basic authentication is enabled for the administration server, the Authorization header must be added in all requests with the base64 encoded credentials.

Disclaimer: The administration server for Obeo Designer Team Server is currently installed in Team for Capella Server as en experimental feature.

This page has been generated from odts-admin-ws.yaml available in the server/experimental/openapi folder of your Team for Capella installation folder.
More information: https://www.obeosoft.com/en/team-for-capella-download
Contact Info: support@obeo.fr
Version: 1.0.0
Copyright (c) 2017, 2021 THALES GLOBAL SERVICE.
EULA

Methods

[ Jump to Models ]

Table of Contents

Repositories

Users

Repositories

Up
post /repositories
Create a repository (addRepository)

This request will allow you to creates a repository. The body of the request take a JSON object with the following parameters: repositoryName, authenticationType and datasourceType which are mandatory and also authenticationData and datasourceData which are optional.

While the authenticationType value can be empty, the repositoryName and the datasourceType values cannot.

By default you can use the following values to manage your repositories:

You can also contribute your own extensions and use the key value of your extension as described in the Administration Server documentation.

Those values describe how your repository will manage authentication and database.

As the optional parameters (authenticationData and datasourceDat) depends on the mandatory parameters, we will use examples to describe how to use them.

The repository is started after its creation and lifecycle hooks are called before and after its start.

Consumes

This API call consumes the following media types via the Content-Type request header:

Request body

body NewRepository (required)
Body Parameter — See example descriptions.
example: { "description" : "Create a repository without authentication with an H2 embedded database.\n\nWith an empty value set to _authenticationType_ your repository will not have authentication. With _H2_EMBEDDED_ value set to _datasourceType_ your repository database will be an h2 embedded database.\n", "value" : { "repositoryName" : "repository-without-authentication", "authenticationType" : "", "datasourceType" : "H2_EMBEDDED" } }

Return type

inline_response_201

Example data

Content-Type: application/json
{
  "repository" : {
    "datasourceType" : "H2_EMBEDDED",
    "authenticationType" : "",
    "repositorName" : "repositorName",
    "type" : "STATIC",
    "status" : "ONLINE"
  },
  "message" : "message",
  "status" : "status"
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

201

Repository response inline_response_201

Example data

Content-Type: UserProfile + LDAP authentication, H2 Embedded
{"repository":{"name":"repository-with-userprofile-ldap","status":"ONLINE","type":"DYNAMIC","authenticationType":"LDAP_USERPROFILE","datasourceType":"H2_EMBEDDED"},"message":"The repository repository-with-userprofile-ldap has been created.","status":201}

Example data

Content-Type: UseUserProfilerManager authentication, H2 Embedded
{"repository":{"name":"repository-with-userprofile","status":"ONLINE","type":"DYNAMIC","authenticationType":"USERPROFILE","datasourceType":"H2_EMBEDDED"},"message":"The repository repository-with-userprofile has been created.","status":201}

Example data

Content-Type: UserManager authentication, H2 Embedded
{"repository":{"name":"repository-with-file","status":"ONLINE","type":"DYNAMIC","authenticationType":"FILE","datasourceType":"H2_EMBEDDED"},"message":"The repository repository-with-file has been created.","status":201}

Example data

Content-Type: UserManager + LDAP authentication, H2 Embedded
{"repository":{"name":"repository-with-file-ldap","status":"ONLINE","type":"DYNAMIC","authenticationType":"LDAP_FILE","datasourceType":"H2_EMBEDDED"},"message":"The repository repository-with-file-ldap has been created.","status":201}

Example data

Content-Type: No authentication, H2 Embedded
{"repository":{"name":"repository-without-authentication","status":"ONLINE","type":"DYNAMIC","authenticationType":"","datasourceType":"H2_EMBEDDED"},"message":"The repository repository-without-authentication has been created.","status":201}

Example data

Content-Type: LDAP authenticationn, H2 Embedded
{"repository":{"name":"repository-with-ldap","status":"ONLINE","type":"DYNAMIC","authenticationType":"LDAP","datasourceType":"H2_EMBEDDED"},"message":"The repository repository-with-ldap has been created.","status":201}

Example data

Content-Type: No authentication, H2 Server
{"repository":{"name":"repository-without-authentication","status":"ONLINE","type":"DYNAMIC","authenticationType":"","datasourceType":"H2_SERVER"},"message":"The repository repository-without-authentication3 has been created.","status":201}

400

<p>Bad Request</p> <p>Some parameters depend on the repository type (authentication and database), their validation is done by the corresponding extensions.</p>

Example data

Content-Type: application/json
{"message":"The repository repository-with-userprofile-ldap has not been created.","status":400,"error":"The url to the ldap server is empty."}

500

<p>Internal error</p> <p>Something unexpected occurred during the repository creation.</p>

Example data

Content-Type: application/json
{"message":"The repository repository-with-userprofile-ldap has not been created.","status":500,"error":"An error occurred during the repository configuration: The h2 server was not able to start.\nException: ...."}

Up
delete /repositories/{repositoryId}
Delete a repository (deleteRepository)

Delete a repository that was created using the create repository web service.

The deletetion of repository removes the folder and all of its content in the directory that contains the repositories. This directory can be configured in the properties files of the administration server as described in Administration Server configuration.

No effect on static repositories.

Path parameters

repositoryId (required)
Path Parameter — id of a repository

Query parameters

deleteDatabase (optional)
Query Parameter — Parameter to indicate if the databse must be deleted or kep. true by default. No effect for the moment

Return type

inline_response_200_1

Example data

Content-Type: application/json
{
  "repositoryName" : "repositoryName",
  "message" : "message",
  "status" : "status"
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

Ok inline_response_200_1

Example data

Content-Type: application/json
{"repositoryName":"repository-without-authentication","isDatabaseDeleted":true,"message":"The repository repository-without-authentication has been completely deleted.","status":200}

204

No Content

404

Not Found

Example data

Content-Type: application/json
{"error":"The repository SampleRepository has not been found.","message":"The repository SampleRepository has not been deleted.","status":404}

500

Server error for static repository

Example data

Content-Type: application/json
{"error":"Something happens during the repository deletion: The repository designer-server could not to be stopped because the file used to store repository data has not been found.","message":"The repository repository-with has not been deleted.","status":500}

Up
post /repositories/export/{repositoryId}
Export the repository database as xml or encrypted zip file (exportRepository)

Export the database of the repository into an xml file.

The body of the request take two parameters: needsEncryption which is mandatory and password which is optional but needed if needsEncryption is set to true.

As the export of the database can take time, the web service will schedule an asynchronous job and return the link where you will be able to download the file in the response under the url attribute.

If needsEncryption is set to false the export of the database will create an xml file representing the CDO database in the export folder which can be configured in the properties files of the Administration Server as described in Administration Server configuration. If needsEncryption is set to true then an encrypted zip file containing the xml file will be created instead.

Path parameters

repositoryId (required)
Path Parameter — id of a repository

Consumes

This API call consumes the following media types via the Content-Type request header:

Request body

body export_repositoryId_body (required)
Body Parameter — Export parameters
example: { "value" : { "needsEncryption" : true, "password" : "aPassword" } }

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

202

Ok

Example data

Content-Type: clearExport
{"url":"http://localhost:8080/api/v1.0/exports/uc2/uc2_200306122258+0100.xml","repository":"SampleRepository","message":"The export for the repository uc2 as been launched. You will be able to retrieved the exported data at the url: http://localhost:8080/api/v1.0/exports/uc2/uc2_200306122258+0100.xml","status":202}

Example data

Content-Type: encryptedExport
{"url":"http://localhost:8080/api/v1.0/exports/uc2/uc2_200306122313+0100.zip","repository":"SampleRepository","message":"The export for the repository uc2 as been launched. You will be able to retrieved the exported data at the url: http://localhost:8080/api/v1.0/exports/uc2/uc2_200306122313+0100.zip","status":202}

400

Bad request

Example data

Content-Type: application/json
{"error":"NO_ISSUE_DIAGNOSTIC","message":"The repository repository-with-file will not be exported.","status":400}

404

Not Found

Example data

Content-Type: application/json
{"error":"The repository SampleRepository has not been found.","message":"The repository SampleRepository will not be exported.","status":404}

Up
get /repositories
List all repositories (getRepositories)
Retrieve all repositories on the current server.

Return type

inline_response_200

Example data

Content-Type: application/json
{
  "repositories" : [ {
    "datasourceType" : "H2_EMBEDDED",
    "authenticationType" : "",
    "repositorName" : "repositorName",
    "type" : "STATIC",
    "status" : "ONLINE"
  }, {
    "datasourceType" : "H2_EMBEDDED",
    "authenticationType" : "",
    "repositorName" : "repositorName",
    "type" : "STATIC",
    "status" : "ONLINE"
  } ],
  "message" : "message",
  "status" : "status"
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

Ok inline_response_200

Example data

Content-Type: application/json
{"repositories":[{"name":"OnlineDynamicRepositorySample","status":"ONLINE","type":"DYNAMIC","authenticationType":"","datasourceType":"H2_EMBEDDED"},{"name":"OfflineDynamicRepositorySample","status":"OFFLINE","type":"DYNAMIC","authenticationType":"","datasourceType":"H2_EMBEDDED"},{"name":"designer-server","status":"ONLINE","type":"STATIC"}],"message":"All available repositories","status":200}

404

Not Found

Up
post /repositories/import/{repositoryId}
Restores the repository database from an xml file (importRepository)

Restore a repository from the uploaded xml file.

This file must be a backup of the database.

As this API needs a file, we suggest you to use the input file of your favorite browser in order to let it set the correct headers for the upload of the file. As the import of the database can take time, the web service will schedule an asynchronous job.

The state (ONLINE | OFFLINE) of the repository will be the same after the import as before the import.

Static repositories are not managed.

Path parameters

repositoryId (required)
Path Parameter — id of a repository

Consumes

This API call consumes the following media types via the Content-Type request header:

Form parameters

upFile (required)
Form Parameter — format: binary

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

202

Request accepted

Example data

Content-Type: appication/json
{"repository":"SampleRespository","message":"The data are being imported to the repository SampleRepository. The state of the repository will be the same after and before the import.","status":202}

400

Bad Request

Example data

Content-Type: Connected users
{"message":"The import of the repository repository-with-userprofile will not be launched.","status":400,"error":"The import will not be executed because some connections remains (alice, bob)"}

Example data

Content-Type: Wrong kind of request
{"error":"javax.servlet.ServletException: Not a multipart request!","status":400}

404

Not Found

Example data

Content-Type: application/json
{"error":"The repository SampleRepository has not been found.","message":"The import of the repository SampleRepository will not be launched.","status":404}

Up
get /repositories/start/{repositoryId}
Start a repository (startRepository)

Start a repository that was created using the web service to create a repository.

The lifecycle hooks will be called before and after its start.

No effect on static repositories.

Path parameters

repositoryId (required)
Path Parameter — id of a repository

Return type

inline_response_201

Example data

Content-Type: application/json
{
  "repository" : {
    "datasourceType" : "H2_EMBEDDED",
    "authenticationType" : "",
    "repositorName" : "repositorName",
    "type" : "STATIC",
    "status" : "ONLINE"
  },
  "message" : "message",
  "status" : "status"
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

Ok inline_response_201

Example data

Content-Type: application/json
{"repository":{"name":"SampleRepository","status":"ONLINE","type":"DYNAMIC","authenticationType":"LDAP_USERPROFILE","datasourceType":"H2_EMBEDDED"},"message":"The repository uc1 has been started.","status":200}

400

Ko

Example data

Content-Type: application/json
{"error":"The repository SampleRepository is not stopped.","message":"The repository SampleRepository has not been started.","status":400}

404

Not Found

Example data

Content-Type: application/json
{"error":"The repository SampleRepository has not been found.","message":"The repository SampleRepository has not been started.","status":404}

Up
get /repositories/stop/{repositoryId}
Stop a repository (stopRepository)

Stop a repository that was created using the web service to create a repository.

The lifecycle hooks will be called before and after its stop.

No effect on static repositories.

Path parameters

repositoryId (required)
Path Parameter — id of a repository

Return type

inline_response_200_2

Example data

Content-Type: application/json
{
  "repository" : {
    "repositorName" : "repositorName",
    "type" : "STATIC",
    "status" : "ONLINE"
  },
  "message" : "message",
  "status" : "status"
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

Ok inline_response_200_2

Example data

Content-Type: application/json
{"repository":{"name":"SampleRepository","status":"OFFLINE","type":"DYNAMIC"},"message":"The repository SampleRepository has been stopped.","status":200}

400

Not Found

Example data

Content-Type: application/json
{"error":"The repository SampleRepository is not started.","message":"The repository SampleRepository has not been stopped.","status":400}

404

Not Found

Example data

Content-Type: application/json
{"error":"The repository SampleRepository has not been found.","message":"The repository SampleRepository has not been stopped.","status":404}

500

Server error for static repository

Example data

Content-Type: application/json
{"error":"An error occurred while stopping the repository: The repository designer-server could not to be stopped because the file used to store repository data has not been found.","message":"The repository designer-server has not been stopped.","status":500}

Users

Up
post /users
Create a new user to the repository (addUser)

Create a user in the repository.

The body of the request take a JSON object with the following parameters: id, isAdministrator, password and permissions. The id and isAdministrator are mandatory.

The password is required if the repository authentication is not managed with LDAP.

The permissions parameter is used for repositories with authorization managed with user profiles. This parameter is an array of project name which will be used to grant writing rights to the user for those projects.

Consumes

This API call consumes the following media types via the Content-Type request header:

Request body

body NewUser (optional)
Body Parameter — User to create.
example: { "value" : { "id" : "Horatio Nelson", "isAdmin" : true, "password" : "samplePassword", "permissions" : [ ] } }

Query parameters

repositoryName (required)
Query Parameter — id of a repository

Return type

inline_response_200_4

Example data

Content-Type: application/json
{
  "projectNames" : [ "projectNames", "projectNames" ],
  "repositoryName" : "repositoryName",
  "message" : "message",
  "user" : {
    "permissions" : [ "permissions", "permissions" ],
    "id" : "id",
    "isAdmin" : true
  },
  "status" : "status"
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

Ok inline_response_200_4

Example data

Content-Type: User with permissions
{"user":{"id":"John Fryer","isAdmin":false,"permissions":["Awesome-project"]},"repositoryName":"repository-with-userprofile","projectNames":["Awesome-project"],"message":"The user Horatio Nelson has been created in the repository repository-with-userprofile.","status":201}

Example data

Content-Type: Admin
{"user":{"id":"Horatio Nelson","isAdmin":true,"permissions":[]},"repositoryName":"repository-with-userprofile","projectNames":["Awesome-project"],"message":"The user Horatio Nelson has been created in the repository repository-with-userprofile.","status":201}

400

Bad Request

Example data

Content-Type: Respository not found
{"error":"The repository SampleRepository has not been found.","message":"The user Horatio Nelson4 cannot be created.","status":400}

Example data

Content-Type: Existing user
{"error":"The user is already registered for repository repository-with-userprofile.","message":"The user Horatio Nelson cannot be created.","status":400}

Up
delete /users/{userName}
Delete the user from the repository (delteUser)
Deletes the user from the repository.

Path parameters

userName (required)
Path Parameter — id of a user

Query parameters

repositoryName (required)
Query Parameter — id of a repository

Return type

inline_response_200_1

Example data

Content-Type: application/json
{
  "repositoryName" : "repositoryName",
  "message" : "message",
  "status" : "status"
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

Ok inline_response_200_1

Example data

Content-Type: application/json
{"repositoryName":"repository-with-userprofile","message":"The user Horatio Nelson has been deleted from the repository repository-with-userprofile.","status":200}

400

Bad Request

Example data

Content-Type: application/json
{"error":"The repository repository-with-userprofile has not been found.","message":"The user Horatio Nelson has not been deleted from the repository repository-with-userprofile.","status":400}

404

Not Found

Example data

Content-Type: application/json
{"error":"The user Horatio Nelson has not been found in the repository repository-with-userprofile.","message":"The user Horatio Nelson has not been deleted from the repository repository-with-userprofile.","status":404}

Up
get /users
List all users of a repository (listUsers)
List all users the given repository.

Query parameters

repositoryName (required)
Query Parameter — id of a repository

Return type

inline_response_200_3

Example data

Content-Type: application/json
{
  "repositoryName" : "repositoryName",
  "message" : "message",
  "users" : [ {
    "permissions" : [ "permissions", "permissions" ],
    "id" : "id",
    "isAdmin" : true
  }, {
    "permissions" : [ "permissions", "permissions" ],
    "id" : "id",
    "isAdmin" : true
  } ],
  "status" : "status"
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

Ok inline_response_200_3

Example data

Content-Type: application/json
{"repositoryName":"repository-with-userprofile","users":[{"id":"Horatio Nelson","isAdmin":true,"permissions":[]}],"message":"The list of users for the repository repository-with-userprofile.","status":200}

400

Not Found

Example data

Content-Type: application/json
{"error":"The repository SampleRepository has not been found.","message":"Users cannot be listed on repository SampleRepository.","status":400}

Up
put /users/{userName}
Update the user of the repository (updateUser)

Update user data.

The behavior of this service is to delete and recreate the user with the new data.

The body of the request takes the same data than the creation request.

Path parameters

userName (required)
Path Parameter — id of a user

Consumes

This API call consumes the following media types via the Content-Type request header:

Request body

body NewUser (optional)
Body Parameter — New user data.
example: { "id" : "Horatio Nelson", "isAdmin" : false, "password" : "samplePassword", "permissions" : [ "Other-project" ] }

Query parameters

repositoryName (required)
Query Parameter — id of a repository

Return type

inline_response_200_4

Example data

Content-Type: application/json
{
  "projectNames" : [ "projectNames", "projectNames" ],
  "repositoryName" : "repositoryName",
  "message" : "message",
  "user" : {
    "permissions" : [ "permissions", "permissions" ],
    "id" : "id",
    "isAdmin" : true
  },
  "status" : "status"
}

Produces

This API call produces the following media types according to the Accept request header; the media type will be conveyed by the Content-Type response header.

Responses

200

Ok inline_response_200_4

Example data

Content-Type: application/json
{"user":{"id":"Horatio Nelson","isAdmin":false,"permissions":["Other-project"]},"repositoryName":"repository-with-userprofile","projectNames":["Awesome-project","Other-project"],"message":"The user Horatio Nelson has been updated in the repository repository-with-userprofile.","status":201}

400

Bad Request

Example data

Content-Type: Respository not found
{"error":"The repository SampleRepository has not been found.","message":"The user Horatio Nelson has not been updated in the repository SampleRepository.","status":400}

Example data

Content-Type: Different user name in data
{"error":"The user name of the user (John Fryer) to update is not the same than the user name provided in data used to update (John Fryer2).","message":"The user John Fryer has not been updated in the repository SampleRepository.","status":400}

404

Not Found

Example data

Content-Type: application/json
{"error":"The user John Fryer has not been found in the repository repository-with-userprofile.","message":"The user John Fryers has not been updated in the repository repository-with-userprofile.","status":404}

Models

[ Jump to Methods ]

Table of Contents

  1. NewRepository
  2. NewUser
  3. Repository
  4. SimpleRepository
  5. User
  6. export_repositoryId_body
  7. import_repositoryId_body
  8. inline_response_200
  9. inline_response_200_1
  10. inline_response_200_2
  11. inline_response_200_3
  12. inline_response_200_4
  13. inline_response_201
  14. inline_response_201_1
  15. projects_body

NewRepository Up

repositorName (optional)
authenticationType
Enum:
LDAP
USERPROFILE
LDAP_USERPROFILE
FILE
LDAP_FILE
authenticationData (optional)
datasourceType
Enum:
H2_EMBEDDED
H2_SERVER
datasourceData (optional)

NewUser Up

id
password (optional)
String format: password
isAdmin
permissions (optional)

Repository Up

repositorName (optional)
status (optional)
Enum:
ONLINE
OFFLINE
type (optional)
Enum:
STATIC
DYNAMIC
authenticationType (optional)
Enum:
LDAP
USERPROFILE
LDAP_USERPROFILE
FILE
LDAP_FILE
datasourceType (optional)
Enum:
H2_EMBEDDED
H2_SERVER

SimpleRepository Up

repositorName (optional)
status (optional)
Enum:
ONLINE
OFFLINE
type (optional)
Enum:
STATIC
DYNAMIC

User Up

id (optional)
isAdmin (optional)
permissions (optional)

export_repositoryId_body Up

needsEncryption
password (optional)
String format: password

import_repositoryId_body Up

upFile (optional)
byte[] format: binary

inline_response_200 Up

repositories (optional)
message (optional)
status (optional)

inline_response_200_1 Up

repositoryName (optional)
message (optional)
status (optional)

inline_response_200_2 Up

repository (optional)
message (optional)
status (optional)

inline_response_200_3 Up

repositoryName (optional)
users (optional)
message (optional)
status (optional)

inline_response_200_4 Up

user (optional)
repositoryName (optional)
projectNames (optional)
message (optional)
status (optional)

inline_response_201 Up

repository (optional)
message (optional)
status (optional)

inline_response_201_1 Up

projectName (optional)
message (optional)
status (optional)

projects_body Up

projectName
repositoryName