- 1. 简介
- 2. 开始
- 3. 配置
- 4. Flowable API
- 5. 集成 Spring
- 6. 部署
- 7. BPMN 2.0 介绍
- 8. BPMN 2.0 结构
- 9. 表单
- 10. JPA
- 11. 历史
- 12. 身份管理
- 13. Eclipse Designer
- 14. Flowable UI 应用
- 15. REST API
- 16. 集成 CDI
- 17. 集成 LDAP
- 18. 高级
- 19. 工具
15.4. Models
15.4.1. Get a list of models
GET repository/models
Parameter | Required | Value | Description |
---|---|---|---|
id | No | String | Only return models with the given id. |
category | No | String | Only return models with the given category. |
categoryLike | No | String | Only return models with a category like the given value. Use the % character as wildcard. |
categoryNotEquals | No | String | Only return models without the given category. |
name | No | String | Only return models with the given name. |
nameLike | No | String | Only return models with a name like the given value. Use the % character as wildcard. |
key | No | String | Only return models with the given key. |
deploymentId | No | String | Only return models which are deployed in the given deployment. |
version | No | Integer | Only return models with the given version. |
latestVersion | No | Boolean | If true , only return models which are the latest version. Best used in combination with key . If false is passed in as value, this is ignored and all versions are returned. |
deployed | No | Boolean | If true , only deployed models are returned. If false , only undeployed models are returned (deploymentId is null). |
tenantId | No | String | Only return models with the given tenantId. |
tenantIdLike | No | String | Only return models with a tenantId like the given value. |
withoutTenantId | No | Boolean | If true , only returns models without a tenantId set. If false , the withoutTenantId parameter is ignored. |
sort | No | id (default), category, createTime, key, lastUpdateTime, name, version or tenantId | Property to sort on, to be used together with the order. |
Response code | Description |
---|---|
200 | Indicates request was successful and the models are returned |
400 | Indicates a parameter was passed in the wrong format. The status-message contains additional information. |
Success response body:
{
"data":[
{
"name":"Model name",
"key":"Model key",
"category":"Model category",
"version":2,
"metaInfo":"Model metainfo",
"deploymentId":"7",
"id":"10",
"url":"http://localhost:8182/repository/models/10",
"createTime":"2013-06-12T14:31:08.612+0000",
"lastUpdateTime":"2013-06-12T14:31:08.612+0000",
"deploymentUrl":"http://localhost:8182/repository/deployments/7",
"tenantId":null
},
...
],
"total":2,
"start":0,
"sort":"id",
"order":"asc",
"size":2
}
15.4.2. Get a model
GET repository/models/{modelId}
Parameter | Required | Value | Description |
---|---|---|---|
modelId | Yes | String | The id of the model to get. |
Response code | Description |
---|---|
200 | Indicates the model was found and returned. |
404 | Indicates the requested model was not found. |
Success response body:
{
"id":"5",
"url":"http://localhost:8182/repository/models/5",
"name":"Model name",
"key":"Model key",
"category":"Model category",
"version":2,
"metaInfo":"Model metainfo",
"deploymentId":"2",
"deploymentUrl":"http://localhost:8182/repository/deployments/2",
"createTime":"2013-06-12T12:31:19.861+0000",
"lastUpdateTime":"2013-06-12T12:31:19.861+0000",
"tenantId":null
}
15.4.3. Update a model
PUT repository/models/{modelId}
Request body:
{
"name":"Model name",
"key":"Model key",
"category":"Model category",
"version":2,
"metaInfo":"Model metainfo",
"deploymentId":"2",
"tenantId":"updatedTenant"
}
All request values are optional. For example, you can only include the name attribute in the request body JSON-object, only updating the name of the model, leaving all other fields unaffected. When an attribute is explicitly included and is set to null, the model-value will be updated to null. Example: {"metaInfo" : null}
will clear the metaInfo of the model).
Response code | Description |
---|---|
200 | Indicates the model was found and updated. |
404 | Indicates the requested model was not found. |
Success response body:
{
"id":"5",
"url":"http://localhost:8182/repository/models/5",
"name":"Model name",
"key":"Model key",
"category":"Model category",
"version":2,
"metaInfo":"Model metainfo",
"deploymentId":"2",
"deploymentUrl":"http://localhost:8182/repository/deployments/2",
"createTime":"2013-06-12T12:31:19.861+0000",
"lastUpdateTime":"2013-06-12T12:31:19.861+0000",
"tenantId":""updatedTenant"
}
15.4.4. Create a model
POST repository/models
Request body:
{
"name":"Model name",
"key":"Model key",
"category":"Model category",
"version":1,
"metaInfo":"Model metainfo",
"deploymentId":"2",
"tenantId":"tenant"
}
All request values are optional. For example, you can only include the name attribute in the request body JSON-object, only setting the name of the model, leaving all other fields null.
Response code | Description |
---|---|
201 | Indicates the model was created. |
Success response body:
{
"id":"5",
"url":"http://localhost:8182/repository/models/5",
"name":"Model name",
"key":"Model key",
"category":"Model category",
"version":1,
"metaInfo":"Model metainfo",
"deploymentId":"2",
"deploymentUrl":"http://localhost:8182/repository/deployments/2",
"createTime":"2013-06-12T12:31:19.861+0000",
"lastUpdateTime":"2013-06-12T12:31:19.861+0000",
"tenantId":"tenant"
}
15.4.5. Delete a model
DELETE repository/models/{modelId}
Parameter | Required | Value | Description |
---|---|---|---|
modelId | Yes | String | The id of the model to delete. |
Response code | Description |
---|---|
204 | Indicates the model was found and has been deleted. Response-body is intentionally empty. |
404 | Indicates the requested model was not found. |
15.4.6. Get the editor source for a model
GET repository/models/{modelId}/source
Parameter | Required | Value | Description |
---|---|---|---|
modelId | Yes | String | The id of the model. |
Response code | Description |
---|---|
200 | Indicates the model was found and source is returned. |
404 | Indicates the requested model was not found. |
Success response body:
Response body contains the model’s raw editor source. The response’s content-type is set to application/octet-stream
, regardless of the content of the source.
15.4.7. Set the editor source for a model
PUT repository/models/{modelId}/source
Parameter | Required | Value | Description |
---|---|---|---|
modelId | Yes | String | The id of the model. |
Request body:
The request should be of type multipart/form-data
. There should be a single file-part included with the binary value of the source.
Response code | Description |
---|---|
200 | Indicates the model was found and the source has been updated. |
404 | Indicates the requested model was not found. |
Success response body:
Response body contains the model’s raw editor source. The response’s content-type is set to application/octet-stream
, regardless of the content of the source.
15.4.8. Get the extra editor source for a model
GET repository/models/{modelId}/source-extra
Parameter | Required | Value | Description |
---|---|---|---|
modelId | Yes | String | The id of the model. |
Response code | Description |
---|---|
200 | Indicates the model was found and source is returned. |
404 | Indicates the requested model was not found. |
Success response body:
Response body contains the model’s raw extra editor source. The response’s content-type is set to application/octet-stream
, regardless of the content of the extra source.
15.4.9. Set the extra editor source for a model
PUT repository/models/{modelId}/source-extra
Parameter | Required | Value | Description |
---|---|---|---|
modelId | Yes | String | The id of the model. |
Request body:
The request should be of type multipart/form-data
. There should be a single file-part included with the binary value of the extra source.
Response code | Description |
---|---|
200 | Indicates the model was found and the extra source has been updated. |
404 | Indicates the requested model was not found. |
Success response body:
Response body contains the model’s raw editor source. The response’s content-type is set to application/octet-stream
, regardless of the content of the source.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论