--- swagger: "2.0" info: description: "Provides access to the core features of Activiti Modeling." version: "1.0" title: "Activiti Modeling REST API" host: "localhost" basePath: "/" tags: - name: "models" description: "Retrieve and manage models" - name: "projects" description: "Retrieve and manage project definitions" paths: /v1/model-types: get: tags: - "models" summary: "List model types" description: "Get the list of available model types." operationId: "getModelTypesUsingGET" produces: - "application/json" - "application/hal+json" parameters: - name: "skipCount" in: "query" required: false type: "integer" format: "int32" - name: "maxItems" in: "query" required: false type: "integer" format: "int32" - name: "sort" in: "query" required: false type: "string" responses: 200: description: "OK" schema: $ref: "#/definitions/ListResponseContent«ModelType»" 401: description: "Unauthorized" 403: description: "Forbidden" 404: description: "Not Found" /v1/models/{modelId}: get: tags: - "models" summary: "Get metadata information for a model" operationId: "getModelUsingGET" produces: - "application/json" - "application/hal+json" parameters: - name: "modelId" in: "path" description: "The id of the model to retrieve" required: true type: "string" responses: 200: description: "OK" schema: $ref: "#/definitions/EntryResponseContent«Model»" 401: description: "Unauthorized" 403: description: "Forbidden" 404: description: "Not Found" put: tags: - "models" summary: "Update model metadata" description: "Update the details of a model." operationId: "updateModelUsingPUT" consumes: - "application/json" produces: - "application/json" - "application/hal+json" parameters: - name: "modelId" in: "path" description: "The id of the model to update" required: true type: "string" - in: "body" name: "model" description: "The new values to update" required: false schema: $ref: "#/definitions/Model" responses: 200: description: "OK" schema: $ref: "#/definitions/EntryResponseContent«Model»" 201: description: "Created" 401: description: "Unauthorized" 403: description: "Forbidden" 404: description: "Not Found" delete: tags: - "models" summary: "Delete model" operationId: "deleteModelUsingDELETE" produces: - "application/json" - "application/hal+json" parameters: - name: "modelId" in: "path" description: "The id of the model to delete" required: true type: "string" responses: 204: description: "No Content" 401: description: "Unauthorized" 403: description: "Forbidden" /v1/models/{modelId}/content: get: tags: - "models" summary: "Get the model content" description: "Retrieve the content of the model for the identifier modelId\ \ with the content type corresponding to the model type (xml for process models\ \ and json for the others).
For Accept: image/svg+xml request header,\ \ the svg image corresponding to the model content will be retrieved." operationId: "getModelContentUsingGET" produces: - "application/json" - "application/hal+json" - "image/svg+xml" parameters: - name: "modelId" in: "path" description: "The id of the model to get the content" required: true type: "string" responses: 200: description: "OK" 401: description: "Unauthorized" 403: description: "Forbidden" 404: description: "Not Found" put: tags: - "models" summary: "Update model content" description: "Update the content of the model from file." operationId: "updateModelContentUsingPUT" consumes: - "multipart/form-data" produces: - "application/json" - "application/hal+json" parameters: - name: "modelId" in: "path" description: "The id of the model to update" required: true type: "string" - name: "file" in: "formData" description: "The file containing the model content" required: false type: "file" responses: 201: description: "Created" 204: description: "No Content" 401: description: "Unauthorized" 403: description: "Forbidden" 404: description: "Not Found" /v1/models/{modelId}/export: get: tags: - "models" summary: "Export a model definition as file" description: "Allows to download a file containing a model metadata along with\ \ the model content." operationId: "exportModelUsingGET" produces: - "application/json" - "application/hal+json" parameters: - name: "modelId" in: "path" description: "The id of the model to export" required: true type: "string" - name: "attachment" in: "query" description: "true value enables a web browser to download the file\ \ as an attachment.
false means that a web browser may preview\ \ the file in a new tab or window, but not download the file." required: false type: "boolean" default: true responses: 200: description: "OK" 401: description: "Unauthorized" 403: description: "Forbidden" 404: description: "Not Found" /v1/models/{modelId}/validate: post: tags: - "models" summary: "Validate a model content" description: "Allows to validate the model content without save it." operationId: "validateModelUsingPOST" consumes: - "multipart/form-data" produces: - "application/json" - "application/hal+json" parameters: - name: "modelId" in: "path" description: "The id of the model to validate the content for" required: true type: "string" - name: "file" in: "formData" description: "The file containing the model definition to validate" required: false type: "file" responses: 201: description: "Created" 204: description: "No Content" 401: description: "Unauthorized" 403: description: "Forbidden" 404: description: "Not Found" /v1/models/{modelId}/validate/extensions: post: tags: - "models" summary: "Validate model extensions" description: "Allows to validate the model extensions without save them." operationId: "validateModelExtensionsUsingPOST" consumes: - "multipart/form-data" produces: - "application/json" - "application/hal+json" parameters: - name: "modelId" in: "path" description: "The id of the model to validate the content for" required: false type: "string" - name: "file" in: "formData" description: "The file containing the model extensions to validate" required: false type: "file" responses: 201: description: "Created" 204: description: "No Content" 401: description: "Unauthorized" 403: description: "Forbidden" 404: description: "Not Found" /v1/projects: get: tags: - "projects" summary: "List projects" description: "Get the list of available projects. Minimal information for each\ \ project is returned." operationId: "getProjectsUsingGET" produces: - "application/json" - "application/hal+json" parameters: - name: "skipCount" in: "query" required: false type: "integer" format: "int32" - name: "maxItems" in: "query" required: false type: "integer" format: "int32" - name: "sort" in: "query" required: false type: "string" - name: "name" in: "query" description: "The name or part of the name to filter projects" required: false type: "string" responses: 200: description: "OK" schema: $ref: "#/definitions/ListResponseContent«Project»" 401: description: "Unauthorized" 403: description: "Forbidden" 404: description: "Not Found" post: tags: - "projects" summary: "Create new project" operationId: "createProjectUsingPOST" consumes: - "application/json" produces: - "application/json" - "application/hal+json" parameters: - in: "body" name: "project" description: "The details of the project to create" required: false schema: $ref: "#/definitions/Project" responses: 201: description: "Created" schema: $ref: "#/definitions/EntryResponseContent«Project»" 401: description: "Unauthorized" 403: description: "Forbidden" 404: description: "Not Found" /v1/projects/import: post: tags: - "projects" summary: "Import an project as zip file" description: "Allows a zip file to be uploaded containing an project definition\ \ and any number of included models." operationId: "importProjectUsingPOST" consumes: - "multipart/form-data" produces: - "application/json" - "application/hal+json" parameters: - name: "file" in: "formData" description: "The file containing the zipped project" required: false type: "file" - name: "name" in: "query" description: "The name of the project that will override the current name\ \ of the project in the zip file" required: false type: "string" responses: 201: description: "Created" schema: $ref: "#/definitions/EntryResponseContent«Project»" 401: description: "Unauthorized" 403: description: "Forbidden" 404: description: "Not Found" /v1/projects/{projectId}: get: tags: - "projects" summary: "Get project" operationId: "getProjectUsingGET" produces: - "application/json" - "application/hal+json" parameters: - name: "projectId" in: "path" description: "The id of the project to retrieve" required: true type: "string" responses: 200: description: "OK" schema: $ref: "#/definitions/EntryResponseContent«Project»" 401: description: "Unauthorized" 403: description: "Forbidden" 404: description: "Not Found" put: tags: - "projects" summary: "Update project details" operationId: "updateProjectUsingPUT" consumes: - "application/json" produces: - "application/json" - "application/hal+json" parameters: - name: "projectId" in: "path" description: "The id of the project to update" required: true type: "string" - in: "body" name: "project" description: "The new values to update" required: false schema: $ref: "#/definitions/Project" responses: 200: description: "OK" schema: $ref: "#/definitions/EntryResponseContent«Project»" 201: description: "Created" 401: description: "Unauthorized" 403: description: "Forbidden" 404: description: "Not Found" delete: tags: - "projects" summary: "Delete project" operationId: "deleteProjectUsingDELETE" produces: - "application/json" - "application/hal+json" parameters: - name: "projectId" in: "path" description: "The id of the project to delete" required: true type: "string" responses: 204: description: "No Content" 401: description: "Unauthorized" 403: description: "Forbidden" /v1/projects/{projectId}/export: get: tags: - "projects" summary: "Export an project as zip file" description: "This will create and download the zip containing the project folder\ \ and all related models.
" operationId: "exportProjectUsingGET" produces: - "application/json" - "application/hal+json" parameters: - name: "projectId" in: "path" description: "The id of the project to export" required: true type: "string" - name: "attachment" in: "query" description: "true value enables a web browser to download the file\ \ as an attachment.
false means that a web browser may preview\ \ the file in a new tab or window, but not download the file." required: false type: "boolean" default: true responses: 200: description: "OK" 401: description: "Unauthorized" 403: description: "Forbidden" 404: description: "Not Found" /v1/projects/{projectId}/models: get: tags: - "models" summary: "List models for an project" description: "Get the models associated with an project. Minimal information\ \ for each model is returned." operationId: "getModelsUsingGET" produces: - "application/json" - "application/hal+json" parameters: - name: "projectId" in: "path" description: "The id of the project to get the models for" required: true type: "string" - name: "type" in: "query" description: "The type of the model to filter" required: false type: "string" - name: "skipCount" in: "query" required: false type: "integer" format: "int32" - name: "maxItems" in: "query" required: false type: "integer" format: "int32" - name: "sort" in: "query" required: false type: "string" responses: 200: description: "OK" schema: $ref: "#/definitions/ListResponseContent«Model»" 401: description: "Unauthorized" 403: description: "Forbidden" 404: description: "Not Found" post: tags: - "models" summary: "Create new model belonging to an project" description: "Create a new model related to an existing project" operationId: "createModelUsingPOST" consumes: - "application/json" produces: - "application/json" - "application/hal+json" parameters: - name: "projectId" in: "path" description: "The id of the project to associate the new model with" required: true type: "string" - in: "body" name: "model" description: "The details of the model to create" required: false schema: $ref: "#/definitions/Model" responses: 201: description: "Created" schema: $ref: "#/definitions/EntryResponseContent«Model»" 401: description: "Unauthorized" 403: description: "Forbidden" 404: description: "Not Found" /v1/projects/{projectId}/models/import: post: tags: - "models" summary: "Import a model from file" description: "Allows a file to be uploaded containing a model definition." operationId: "importModelUsingPOST" consumes: - "multipart/form-data" produces: - "application/json" - "application/hal+json" parameters: - name: "projectId" in: "path" description: "The id of the project to associate the new model with" required: true type: "string" - name: "type" in: "query" description: "The type of the model to be imported" required: false type: "string" - name: "file" in: "formData" description: "The file containing the model definition" required: false type: "file" responses: 201: description: "Created" schema: $ref: "#/definitions/EntryResponseContent«Model»" 401: description: "Unauthorized" 403: description: "Forbidden" 404: description: "Not Found" /v1/projects/{projectId}/validate: get: tags: - "projects" summary: "Validate an project by id" operationId: "validateProjectUsingGET" produces: - "application/json" - "application/hal+json" parameters: - name: "projectId" in: "path" description: "The id of the project to validate" required: false type: "string" responses: 200: description: "OK" 401: description: "Unauthorized" 403: description: "Forbidden" 404: description: "Not Found" definitions: EntriesResponseContent«ModelType»: type: "object" properties: entries: type: "array" items: $ref: "#/definitions/EntryResponseContent«ModelType»" pagination: $ref: "#/definitions/PaginationMetadata" title: "EntriesResponseContent«ModelType»" EntriesResponseContent«Model»: type: "object" properties: entries: type: "array" items: $ref: "#/definitions/EntryResponseContent«Model»" pagination: $ref: "#/definitions/PaginationMetadata" title: "EntriesResponseContent«Model»" EntriesResponseContent«Project»: type: "object" properties: entries: type: "array" items: $ref: "#/definitions/EntryResponseContent«Project»" pagination: $ref: "#/definitions/PaginationMetadata" title: "EntriesResponseContent«Project»" EntryResponseContent«ModelType»: type: "object" properties: entry: $ref: "#/definitions/ModelType" title: "EntryResponseContent«ModelType»" EntryResponseContent«Model»: type: "object" properties: entry: $ref: "#/definitions/Model" title: "EntryResponseContent«Model»" EntryResponseContent«Project»: type: "object" properties: entry: $ref: "#/definitions/Project" title: "EntryResponseContent«Project»" File: type: "object" properties: absolute: type: "boolean" absoluteFile: $ref: "#/definitions/File" absolutePath: type: "string" canonicalFile: $ref: "#/definitions/File" canonicalPath: type: "string" directory: type: "boolean" executable: type: "boolean" file: type: "boolean" freeSpace: type: "integer" format: "int64" hidden: type: "boolean" lastModified: type: "integer" format: "int64" name: type: "string" parent: type: "string" parentFile: $ref: "#/definitions/File" path: type: "string" readable: type: "boolean" totalSpace: type: "integer" format: "int64" usableSpace: type: "integer" format: "int64" writable: type: "boolean" title: "File" InputStream: type: "object" title: "InputStream" ListResponseContent«ModelType»: type: "object" properties: list: $ref: "#/definitions/EntriesResponseContent«ModelType»" title: "ListResponseContent«ModelType»" ListResponseContent«Model»: type: "object" properties: list: $ref: "#/definitions/EntriesResponseContent«Model»" title: "ListResponseContent«Model»" ListResponseContent«Project»: type: "object" properties: list: $ref: "#/definitions/EntriesResponseContent«Project»" title: "ListResponseContent«Project»" Model: type: "object" properties: content: type: "string" format: "byte" contentType: type: "string" createdBy: type: "object" creationDate: type: "string" format: "date-time" extensions: type: "object" id: type: "string" lastModifiedBy: type: "object" lastModifiedDate: type: "string" format: "date-time" name: type: "string" project: $ref: "#/definitions/Project" template: type: "string" type: type: "string" version: type: "string" title: "Model" ModelType: type: "object" properties: allowedContentFileExtension: type: "array" items: type: "string" contentFileExtension: type: "string" extensionsFileSuffix: type: "string" folderName: type: "string" name: type: "string" title: "ModelType" PaginationMetadata: type: "object" properties: count: type: "integer" format: "int64" hasMoreItems: type: "boolean" maxItems: type: "integer" format: "int64" skipCount: type: "integer" format: "int64" totalItems: type: "integer" format: "int64" title: "PaginationMetadata" Project: type: "object" properties: createdBy: type: "object" creationDate: type: "string" format: "date-time" description: type: "string" id: type: "string" lastModifiedBy: type: "object" lastModifiedDate: type: "string" format: "date-time" name: type: "string" version: type: "string" title: "Project" Resource: type: "object" properties: description: type: "string" file: $ref: "#/definitions/File" filename: type: "string" inputStream: $ref: "#/definitions/InputStream" open: type: "boolean" readable: type: "boolean" uri: $ref: "#/definitions/URI" url: $ref: "#/definitions/URL" title: "Resource" URI: type: "object" properties: absolute: type: "boolean" authority: type: "string" fragment: type: "string" host: type: "string" opaque: type: "boolean" path: type: "string" port: type: "integer" format: "int32" query: type: "string" rawAuthority: type: "string" rawFragment: type: "string" rawPath: type: "string" rawQuery: type: "string" rawSchemeSpecificPart: type: "string" rawUserInfo: type: "string" scheme: type: "string" schemeSpecificPart: type: "string" userInfo: type: "string" title: "URI" URL: type: "object" properties: authority: type: "string" content: type: "object" defaultPort: type: "integer" format: "int32" deserializedFields: $ref: "#/definitions/URLStreamHandler" file: type: "string" host: type: "string" path: type: "string" port: type: "integer" format: "int32" protocol: type: "string" query: type: "string" ref: type: "string" serializedHashCode: type: "integer" format: "int32" userInfo: type: "string" title: "URL" URLStreamHandler: type: "object" title: "URLStreamHandler"