ProjectApi#
- class ansys.hps.client.jms.api.ProjectApi(client, project_id)#
Exposes the project endpoints of the JMS.
- Parameters:
- client
Client
HPS client object.
- project_id
str
ID of the project.
- client
Examples
>>> from ansys.hps.client import Client >>> from ansys.hps.client.jms import JmsApi, Project, ProjectApi >>> cl = Client( ... url="https://127.0.0.1:8443/hps", username="repuser", password="repuser" ... ) >>> project = Project(name="Example project") >>> print(project) { "name": "Example project" } >>> jms_api = JmsApi(cl) >>> project = jms_api.create_project(project) >>> print(project) { "id": "02qtyJfpfAQ0fr3zkoIAfC", "name": "Example project", "active": false, "priority": 1, "creation_time": ... ... } >>> project_api = ProjectApi(cl, project.id) >>> print(project_api) 'https://127.0.0.1:8443/hps/jms/api/v1/projects/02qtyJfpfAQ0fr3zkoIAfC' >>> jobs = project_api.get_jobs()
Initialize project API.
Methods
ProjectApi.archive_project
(path[, ...])Archive a project and save it to disk.
- rtype:
2024 R1
ProjectApi.copy_job_definitions
(job_definitions)- rtype:
2024 R1
ProjectApi.copy_jobs
(jobs[, wait])- rtype:
2024 R1
ProjectApi.copy_project
([wait])- rtype:
2024 R1
ProjectApi.copy_task_definitions
(...[, wait])- rtype:
2024 R1
ProjectApi.create_algorithms
(algorithms[, ...])- rtype:
2024 R1
ProjectApi.create_files
(files[, as_objects])- rtype:
2024 R1
ProjectApi.create_job_definitions
(...[, ...])- rtype:
2024 R1
ProjectApi.create_job_selections
(selections)- rtype:
2024 R1
ProjectApi.create_jobs
(jobs[, as_objects])- rtype:
2024 R1
ProjectApi.create_license_contexts
([as_objects])- rtype:
2024 R1
- rtype:
2024 R1
ProjectApi.create_parameter_mappings
(...[, ...])- rtype:
2024 R1
ProjectApi.create_task_definitions
(...[, ...])- rtype:
2024 R1
ProjectApi.delete_algorithms
(algorithms)Delete a list of algorithms.
ProjectApi.delete_files
(files)Delete files.
Delete a list of job definitions.
ProjectApi.delete_job_selections
(selections)Delete a list of job selections.
ProjectApi.delete_jobs
(jobs)Delete jobs.
Delete license contexts.
Delete a list of parameter definitions.
Delete a list of parameter mappings.
Delete a list of task definitions.
ProjectApi.download_file
(file, target_path)- rtype:
2024 R1
ProjectApi.get_algorithms
([as_objects])- rtype:
2024 R1
ProjectApi.get_files
([as_objects, content])- rtype:
2024 R1
ProjectApi.get_job_definitions
([as_objects])- rtype:
2024 R1
ProjectApi.get_job_selections
([as_objects])- rtype:
2024 R1
ProjectApi.get_jobs
([as_objects])- rtype:
2024 R1
ProjectApi.get_license_contexts
([as_objects])- rtype:
2024 R1
- rtype:
2024 R1
ProjectApi.get_parameter_mappings
([as_objects])- rtype:
2024 R1
ProjectApi.get_permissions
([as_objects])- rtype:
2024 R1
ProjectApi.get_task_definitions
([as_objects])- rtype:
2024 R1
ProjectApi.get_tasks
([as_objects])- rtype:
2024 R1
ProjectApi.sync_jobs
(jobs)Sync a list of jobs.
ProjectApi.update_algorithms
(algorithms[, ...])- rtype:
2024 R1
ProjectApi.update_files
(files[, as_objects])Update files.
ProjectApi.update_job_definitions
(...[, ...])- rtype:
2024 R1
ProjectApi.update_job_selections
(selections)- rtype:
2024 R1
ProjectApi.update_jobs
(jobs[, as_objects])- rtype:
2024 R1
ProjectApi.update_license_contexts
(...[, ...])- rtype:
2024 R1
- rtype:
2024 R1
ProjectApi.update_parameter_mappings
(...[, ...])- rtype:
2024 R1
ProjectApi.update_permissions
(permissions[, ...])Update a list of permissions.
ProjectApi.update_task_definitions
(...[, ...])- rtype:
2024 R1
ProjectApi.update_tasks
(tasks[, as_objects])- rtype:
2024 R1
Attributes
URL of the project's bucket in the file storage gateway.
URL of the file storage gateway.
Get the JMS API URL.
URL of the API.