@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen") @Beta public class ProjectsApi extends AbstractOpenApiService
apiClient
Constructor and Description |
---|
ProjectsApi(ApiClient apiClient)
Instantiates this API class to invoke operations on the Rule Authoring API for Cloud Foundry based on a given
ApiClient . |
ProjectsApi(HttpDestinationProperties httpDestination)
Instantiates this API class to invoke operations on the Rule Authoring API for Cloud Foundry.
|
Modifier and Type | Method and Description |
---|---|
ProjectVersionObject |
addProject(ProjectVersionObject body)
Create a project.
|
CopyProject |
copyProject(CopyProjectInput body)
Create a copy of a project
|
ProjectVersionObject |
createVersion(String id,
CreateVersionInput body)
Create a version of a project
|
OpenApiResponse |
deleteProject(String id)
Delete a project and all its versions
|
OpenApiResponse |
deleteSpecificProjectVersion(String id,
String version)
Delete a project version.
|
ProjectVersionObject |
migration(MigrateProject body)
Migrates rule expressions of a project from expression language 1.0 to 2.0
|
ProjectVersionObject |
readProject(String id)
Retrieve a working set project
|
List<ProjectVersionObject> |
readProjects()
Retrieve all projects.
|
List<ProjectVersionObject> |
readProjects(List<String> name,
List<String> version,
Integer $skip,
Integer $top)
Retrieve all projects.
|
List<ProjectVersionObject> |
readProjectVersions(String id)
Retrieves the content of all versions of a Project
|
ProjectVersionObject |
readRevisionedProject(String id,
String revision)
Retrieve the content of the highest semantic version of a project for a given revision.
|
ProjectVersionObject |
readVersionedProject(String id,
String version)
Retrieves the content of the versioned project.
|
OpenApiResponse |
recoverVersion(String id,
RecoverVersion body)
Update working set project with project version
|
ProjectVersionObject |
updateProject(String id)
Update a working set project
|
ProjectVersionObject |
updateProject(String id,
ProjectVersionObject body)
Update a working set project
|
public ProjectsApi(@Nonnull HttpDestinationProperties httpDestination)
httpDestination
- The destination that API should be used with@Nullable public ProjectVersionObject addProject(@Nonnull ProjectVersionObject body) throws OpenApiRequestException
Create a project.
Creates a new business rule project.
201 - Created
401 - Unauthorized. User does not have required authorization to execute this request.
body
- JSON payload of the project.OpenApiRequestException
- if an error occurs while attempting to invoke the API@Nullable public CopyProject copyProject(@Nonnull CopyProjectInput body) throws OpenApiRequestException
Create a copy of a project
Returns a copy of the project with all the entities like data objects, rules, rule services and rulesets with new IDs. It also returns the list of mappings of source project's entity id to the new project's entity id.
201 - Project copied successfully
400 - Bad Request
401 - Unauthorized. User does not have required authorization to execute this request.
body
- The value for the parameter bodyOpenApiRequestException
- if an error occurs while attempting to invoke the API@Nullable public ProjectVersionObject createVersion(@Nonnull String id, @Nonnull CreateVersionInput body) throws OpenApiRequestException
Create a version of a project
Creates a version of the active working set project with the specifed project ID. Project should be activated before creating a version. Maximum of 10 versions can be created.
201 - The version has been successfully released for a given project
400 - Bad Request.
401 - Unauthorized. User does not have required authorization to execute this request.
409 - Conflict. The version with id specified in JSON payload already exists in the given project.
500 - Exception occurred while processing the request.
id
- ID of the project for which the version is created. The ID is 32 characters long.body
- JSON payload of the version.OpenApiRequestException
- if an error occurs while attempting to invoke the API@Nonnull public OpenApiResponse deleteProject(@Nonnull String id) throws OpenApiRequestException
Delete a project and all its versions
Deletes a project and all its versions with the specified project ID.
204 - Project deleted successfully.
401 - Unauthorized. User does not have required authorization to execute this request.
404 - Object not found. The entity you are trying to delete does not exist.
id
- ID of the project. The ID is 32 characters long.OpenApiRequestException
- if an error occurs while attempting to invoke the API@Nonnull public OpenApiResponse deleteSpecificProjectVersion(@Nonnull String id, @Nonnull String version) throws OpenApiRequestException
Delete a project version.
Deletes a project version with the specfied version ID.
204 - Project deleted successfully.
401 - Unauthorized. User does not have required authorization to execute this request.
404 - Object not found. The entity you are trying to delete does not exist.
id
- ID of the project. The ID is 32 characters long.version
- Version ID of the project. The ID is 18 digits long.OpenApiRequestException
- if an error occurs while attempting to invoke the API@Nullable public ProjectVersionObject migration(@Nonnull MigrateProject body) throws OpenApiRequestException
Migrates rule expressions of a project from expression language 1.0 to 2.0
Migrates rule expressions(conditions and result expressions) from expression language 1.0 to 2.0 of the specified version of the specified project. A project and all its entities like data objects, rules, rule services, rulesets must be in active state. It is recommended to activate the project using project activation API(see resource '/v1/projects/{id}/activation') before migrating the workingset project
200 - Successful Migration
400 - Bad Request. Project is inactive or expression language is already migrated to 2.0
404 - Project not found
body
- The value for the parameter bodyOpenApiRequestException
- if an error occurs while attempting to invoke the API@Nullable public ProjectVersionObject readProject(@Nonnull String id) throws OpenApiRequestException
Retrieve a working set project
Retrieves the working set project with the specified project ID.
200 - Request for reading the project is completed successfully.
401 - Unauthorized. User does not have required authorization to execute this request.
404 - Object not found. The entity you are trying to read does not exist.
id
- ID of the project. The ID is 32 characters long.OpenApiRequestException
- if an error occurs while attempting to invoke the API@Nullable public List<ProjectVersionObject> readProjectVersions(@Nonnull String id) throws OpenApiRequestException
Retrieves the content of all versions of a Project
Retrieves the content of all versions of the specified project ID.
200 - Request for reading the project is completed successfully.
401 - Unauthorized. User does not have required authorization to execute this request.
404 - Project not found. The project you are trying to read does not exist.
id
- ID of the project. The ID is 32 characters long.OpenApiRequestException
- if an error occurs while attempting to invoke the API@Nullable public List<ProjectVersionObject> readProjects(@Nullable List<String> name, @Nullable List<String> version, @Nullable Integer $skip, @Nullable Integer $top) throws OpenApiRequestException
Retrieve all projects.
Retrieves all projects and its versions, including the working set projects.
200 - Request for reading the projects is completed successfully.
401 - Unauthorized. User does not have required authorization to execute this request.
name
- (Optional The name of the project. Retrieves the project with the specified name. You can provide
multiple names to retrieve multiple projects.version
- (Optional The version of the project. Retrieves the project with the specified version. You can
provide multiple project versions to retrieve all the projects with the specified version.$skip
- (Optional, default to 0) The number of projects you want to skip from the beginning while fetching
them. If $skip is not specified, no projects are skipped. The records are implicitly sorted by the
project name in ascending order. You can use this parameter only once. For example: To fetch
the projects starting from 101 until 150, set $skip=100 and $top=50. Also, refer to the $top
parameter.$top
- (Optional, default to 100) The number of projects you want to fetch from the beginning. If not
specified, 100 projects are returned. The records are implicitly sorted by the project name in
ascending order. You can use this parameter only once. For example: To fetch the projects
starting from 101 until 150, set $skip=100 and $top=50. Also, refer to the $skip parameter.OpenApiRequestException
- if an error occurs while attempting to invoke the API@Nullable public List<ProjectVersionObject> readProjects() throws OpenApiRequestException
Retrieve all projects.
Retrieves all projects and its versions, including the working set projects.
200 - Request for reading the projects is completed successfully.
401 - Unauthorized. User does not have required authorization to execute this request.
OpenApiRequestException
- if an error occurs while attempting to invoke the API@Nullable public ProjectVersionObject readRevisionedProject(@Nonnull String id, @Nonnull String revision) throws OpenApiRequestException
Retrieve the content of the highest semantic version of a project for a given revision.
Retrieves the content of the highest semantic version of a project for a given revision.
200 - Request for reading the project is completed.
401 - Unauthorized. User does not have required authorization to execute this request.
404 - Project with given revision not found. The entity you are trying to read does not exist.
id
- ID of the project. The ID is 32 characters long.revision
- Revision of the project.OpenApiRequestException
- if an error occurs while attempting to invoke the API@Nullable public ProjectVersionObject readVersionedProject(@Nonnull String id, @Nonnull String version) throws OpenApiRequestException
Retrieves the content of the versioned project.
Retrieves the content of the project for the specified version.
200 - Request for reading the project is completed successfully.
401 - Unauthorized. User does not have required authorization to execute this request.
404 - Project with given version not found. The entity you are trying to read does not exist.
id
- ID of the project. The ID is 32 characters long.version
- Version ID of the project. The ID is 18 digits long.OpenApiRequestException
- if an error occurs while attempting to invoke the API@Nonnull public OpenApiResponse recoverVersion(@Nonnull String id, @Nonnull RecoverVersion body) throws OpenApiRequestException
Update working set project with project version
Update a working set project and all its entities like data objects, rules, rule services, rulesets with a specified version of the same project. This API overwrites the content of both active and inactive project.
204 - Request to update the given workingset project is completed successfully.
401 - Unauthorized. User does not have required authorization to execute this request.
404 - Object not found. The entity you are trying to update does not exist.
500 - Exception occurred while processing the request.
id
- ID of the project. The ID is 32 characters long.body
- JSON payload of the version in source project.OpenApiRequestException
- if an error occurs while attempting to invoke the API@Nullable public ProjectVersionObject updateProject(@Nonnull String id, @Nullable ProjectVersionObject body) throws OpenApiRequestException
Update a working set project
Updates a working set project with the specified project ID.
200 - Request to update the given project is completed successfully.
400 - Bad Request. ID of the project provided in the URL path and in JSON payload do not match.
401 - Unauthorized. User does not have required authorization to execute this request.
404 - Object not found. The entity you are trying to update does not exist.
409 - Conflict. A projet with name specified in JSON payload already exists.
id
- (Required) ID of the project. The ID is 32 characters long.body
- (Optional) JSON payload of the project.OpenApiRequestException
- if an error occurs while attempting to invoke the API@Nullable public ProjectVersionObject updateProject(@Nonnull String id) throws OpenApiRequestException
Update a working set project
Updates a working set project with the specified project ID.
200 - Request to update the given project is completed successfully.
400 - Bad Request. ID of the project provided in the URL path and in JSON payload do not match.
401 - Unauthorized. User does not have required authorization to execute this request.
404 - Object not found. The entity you are trying to update does not exist.
409 - Conflict. A projet with name specified in JSON payload already exists.
id
- ID of the project. The ID is 32 characters long.OpenApiRequestException
- if an error occurs while attempting to invoke the APICopyright © 2021 SAP SE. All rights reserved.