Skip to content

Commit

Permalink
feat: Web Modeler API v1
Browse files Browse the repository at this point in the history
  • Loading branch information
wollefitz committed Sep 28, 2023
1 parent 15a8d92 commit d8e91fd
Show file tree
Hide file tree
Showing 36 changed files with 1,424 additions and 506 deletions.
4 changes: 2 additions & 2 deletions web-modeler-openapi-cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ Downloads all files of the project.
create files. If a folder name is ambiguous, all folders with the same name get merged. If files are ambiguous, they
overwrite each other and the last file wins
* `CANONICAL_PATH` - Recommended if your folder and file names are not unique. It uses the canonical path. Each folder
and file name is suffixed by its unique ID (i.e.. `<name>[<id>]`). This makes names unique, but also less pleasant to
look at)
and file name is suffixed by its unique ID (i.e. `<name>[<id>]`). This makes names unique, but also less pleasant to
look at.

## Building from source

Expand Down
231 changes: 231 additions & 0 deletions web-modeler-openapi-cli/docs/CollaboratorsApi.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,231 @@
# CollaboratorsApi

All URIs are relative to *https://modeler.cloud.camunda.io*

| Method | HTTP request | Description |
|--------------------------------------------------------------------|---------------------------------------------------------------|-------------|
| [**deleteCollaborator**](CollaboratorsApi.md#deleteCollaborator) | **DELETE** /api/v1/projects/{projectId}/collaborators/{email} | |
| [**modifyCollaborator**](CollaboratorsApi.md#modifyCollaborator) | **PUT** /api/v1/collaborators | |
| [**searchCollaborators**](CollaboratorsApi.md#searchCollaborators) | **POST** /api/v1/collaborators/search | |

<a name="deleteCollaborator"></a>

# **deleteCollaborator**

> deleteCollaborator(projectId, email)
Deletion of resources is recursive and cannot be undone.

### Example

```java
// Import classes:
import org.camunda.community.webmodeler.client.invoker.ApiClient;
import org.camunda.community.webmodeler.client.invoker.ApiException;
import org.camunda.community.webmodeler.client.invoker.Configuration;
import org.camunda.community.webmodeler.client.invoker.auth.*;
import org.camunda.community.webmodeler.client.invoker.models.*;
import org.camunda.community.webmodeler.client.api.CollaboratorsApi;

public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://modeler.cloud.camunda.io");

// Configure HTTP bearer authorization: Bearer
HttpBearerAuth Bearer = (HttpBearerAuth) defaultClient.getAuthentication("Bearer");
Bearer.setBearerToken("BEARER TOKEN");

CollaboratorsApi apiInstance = new CollaboratorsApi(defaultClient);
UUID projectId = new UUID(); // UUID |
String email = "email_example"; // String |
try {
apiInstance.deleteCollaborator(projectId, email);
} catch (ApiException e) {
System.err.println("Exception when calling CollaboratorsApi#deleteCollaborator");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
```

### Parameters

| Name | Type | Description | Notes |
|---------------|-----------------|-------------|-------|
| **projectId** | [**UUID**](.md) | | |
| **email** | **String** | | |

### Return type

null (empty response body)

### Authorization

[Bearer](../README.md#Bearer)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: application/json

### HTTP response details

| Status code | Description | Response headers |
|-------------|-----------------------|------------------|
| **204** | No Content | - |
| **404** | Not Found | - |
| **500** | Internal Server Error | - |

<a name="modifyCollaborator"></a>

# **modifyCollaborator**

> modifyCollaborator(createCollaboratorDto)
Adds a new collaborator to a project or modifies the permission level of an existing collaborator.

**Note:** Only users that are part of the authorized organization (see `GET /api/v1/info`) *and* logged in to Web Modeler at least once can be added to a project.

### Example

```java
// Import classes:
import org.camunda.community.webmodeler.client.invoker.ApiClient;
import org.camunda.community.webmodeler.client.invoker.ApiException;
import org.camunda.community.webmodeler.client.invoker.Configuration;
import org.camunda.community.webmodeler.client.invoker.auth.*;
import org.camunda.community.webmodeler.client.invoker.models.*;
import org.camunda.community.webmodeler.client.api.CollaboratorsApi;

public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://modeler.cloud.camunda.io");

// Configure HTTP bearer authorization: Bearer
HttpBearerAuth Bearer = (HttpBearerAuth) defaultClient.getAuthentication("Bearer");
Bearer.setBearerToken("BEARER TOKEN");

CollaboratorsApi apiInstance = new CollaboratorsApi(defaultClient);
CreateCollaboratorDto createCollaboratorDto = new CreateCollaboratorDto(); // CreateCollaboratorDto |
try {
apiInstance.modifyCollaborator(createCollaboratorDto);
} catch (ApiException e) {
System.err.println("Exception when calling CollaboratorsApi#modifyCollaborator");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
```

### Parameters

| Name | Type | Description | Notes |
|---------------------------|-------------------------------------------------------|-------------|-------|
| **createCollaboratorDto** | [**CreateCollaboratorDto**](CreateCollaboratorDto.md) | | |

### Return type

null (empty response body)

### Authorization

[Bearer](../README.md#Bearer)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

### HTTP response details

| Status code | Description | Response headers |
|-------------|-----------------------|------------------|
| **204** | No Content | - |
| **400** | Bad Request | - |
| **404** | Not Found | - |
| **500** | Internal Server Error | - |

<a name="searchCollaborators"></a>

# **searchCollaborators**

> PubSearchResultDtoProjectCollaboratorDto searchCollaborators(pubSearchDtoProjectCollaboratorDto)
Searches for collaborators.
* *filter* specifies which fields should match. Only items that match the given fields will be returned.
* *sort* specifies by which fields and direction (`ASC`/`DESC`) the result should be sorted.
* *page* specifies the page number to return.
* *size* specifies the number of items per page. The default value is 10.

### Example

```java
// Import classes:
import org.camunda.community.webmodeler.client.invoker.ApiClient;
import org.camunda.community.webmodeler.client.invoker.ApiException;
import org.camunda.community.webmodeler.client.invoker.Configuration;
import org.camunda.community.webmodeler.client.invoker.auth.*;
import org.camunda.community.webmodeler.client.invoker.models.*;
import org.camunda.community.webmodeler.client.api.CollaboratorsApi;

public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();
defaultClient.setBasePath("https://modeler.cloud.camunda.io");

// Configure HTTP bearer authorization: Bearer
HttpBearerAuth Bearer = (HttpBearerAuth) defaultClient.getAuthentication("Bearer");
Bearer.setBearerToken("BEARER TOKEN");

CollaboratorsApi apiInstance = new CollaboratorsApi(defaultClient);
PubSearchDtoProjectCollaboratorDto pubSearchDtoProjectCollaboratorDto = new PubSearchDtoProjectCollaboratorDto(); // PubSearchDtoProjectCollaboratorDto |
try {
PubSearchResultDtoProjectCollaboratorDto result = apiInstance.searchCollaborators(pubSearchDtoProjectCollaboratorDto);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling CollaboratorsApi#searchCollaborators");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
```

### Parameters

| Name | Type | Description | Notes |
|----------------------------------------|---------------------------------------------------------------------------------|-------------|-------|
| **pubSearchDtoProjectCollaboratorDto** | [**PubSearchDtoProjectCollaboratorDto**](PubSearchDtoProjectCollaboratorDto.md) | | |

### Return type

[**PubSearchResultDtoProjectCollaboratorDto**](PubSearchResultDtoProjectCollaboratorDto.md)

### Authorization

[Bearer](../README.md#Bearer)

### HTTP request headers

- **Content-Type**: application/json
- **Accept**: application/json

### HTTP response details

| Status code | Description | Response headers |
|-------------|-----------------------|------------------|
| **200** | OK | - |
| **400** | Bad Request | - |
| **404** | Not Found | - |
| **500** | Internal Server Error | - |

10 changes: 10 additions & 0 deletions web-modeler-openapi-cli/docs/CreateCollaboratorDto.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# CreateCollaboratorDto

## Properties

| Name | Type | Description | Notes |
|---------------|------------|-------------------------------------------------------------------------|-------|
| **email** | **String** | | |
| **projectId** | **String** | | |
| **role** | **String** | Allowed values are: "project_admin", "editor", "viewer" and "commenter" | |

14 changes: 7 additions & 7 deletions web-modeler-openapi-cli/docs/CreateFileDto.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

## Properties

| Name | Type | Description | Notes |
|---------------|------------|--------------------------------------------------------------------------------------------------------------------|------------|
| **name** | **String** | |
| **parentId** | **String** | | [optional] |
| **projectId** | **String** | | [optional] |
| **content** | **String** | |
| **fileType** | **String** | Allowed values are: \&quot;bpmn\&quot;, \&quot;dmn\&quot;, \&quot;form\&quot; and \&quot;connector_template\&quot; |
| Name | Type | Description | Notes |
|---------------|------------|--------------------------------------------------------------------|------------|
| **name** | **String** | | |
| **folderId** | **String** | | [optional] |
| **projectId** | **String** | | [optional] |
| **content** | **String** | | |
| **fileType** | **String** | Allowed values are: "bpmn", "dmn", "form" and "connector_template" | |

2 changes: 1 addition & 1 deletion web-modeler-openapi-cli/docs/CreateFolderDto.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

| Name | Type | Description | Notes |
|---------------|------------|-------------|------------|
| **name** | **String** | |
| **name** | **String** | | |
| **projectId** | **String** | | [optional] |
| **parentId** | **String** | | [optional] |

8 changes: 4 additions & 4 deletions web-modeler-openapi-cli/docs/CreateMilestoneDto.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

## Properties

| Name | Type | Description | Notes |
|------------|------------|-------------|------------|
| **name** | **String** | |
| **fileId** | **String** | | [optional] |
| Name | Type | Description | Notes |
|------------|------------|-------------|-------|
| **name** | **String** | | |
| **fileId** | **String** | | |

2 changes: 1 addition & 1 deletion web-modeler-openapi-cli/docs/CreateProjectDto.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@

| Name | Type | Description | Notes |
|----------|------------|-------------|-------|
| **name** | **String** | |
| **name** | **String** | | |

Loading

0 comments on commit d8e91fd

Please sign in to comment.