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.analyze_task_definition
(...[, ...])Compare resource requirements against available compute resources.
ProjectApi.archive_project
(path[, ...])Archive a project and save it to disk.
Copy a default execution script to the current project.
ProjectApi.copy_job_definitions
(job_definitions)Create job definitions by copying existing job definitions.
ProjectApi.copy_jobs
(jobs[, wait])Create jobs by copying existing jobs.
ProjectApi.copy_project
([wait])Duplicate the project.
ProjectApi.copy_task_definitions
(...[, wait])Create task definitions by copying existing task definitions.
ProjectApi.create_algorithms
(algorithms[, ...])Create a list of algorithms.
ProjectApi.create_files
(files[, as_objects])Create a list of files.
ProjectApi.create_job_definitions
(...[, ...])Create a list of job definitions.
ProjectApi.create_job_selections
(selections)Create a list of job selections.
ProjectApi.create_jobs
(jobs[, as_objects])Create jobs.
ProjectApi.create_license_contexts
([as_objects])Create a list of license contexts.
Create a list of parameter definitions.
ProjectApi.create_parameter_mappings
(...[, ...])Get a list of created parameter mappings.
ProjectApi.create_task_commands
(commands[, ...])Create task commands.
ProjectApi.create_task_definitions
(...[, ...])Create a list of task definitions.
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)Download file content and save it to disk.
ProjectApi.get_algorithms
([as_objects])Get a list of algorithms.
ProjectApi.get_files
([as_objects, content])Get a list of file resources, optionally filtered by query parameters.
ProjectApi.get_job_definitions
([as_objects])Get a list of job definitions.
ProjectApi.get_job_selections
([as_objects])Get a list of job selections.
ProjectApi.get_jobs
([as_objects])Get a list of jobs.
ProjectApi.get_license_contexts
([as_objects])Get a list of license contexts.
Get a list of parameter definitions.
ProjectApi.get_parameter_mappings
([as_objects])Get a list of parameter mappings.
ProjectApi.get_permissions
([as_objects])Get a list of permissions.
Get the list of task command definitions.
ProjectApi.get_task_commands
([as_objects])Get a list of task commands.
ProjectApi.get_task_definitions
([as_objects])Get a list of task definitions.
ProjectApi.get_tasks
([as_objects])Get a list of tasks.
ProjectApi.queue_task_command
(task_id, name, ...)Queue a command to a task.
ProjectApi.sync_jobs
(jobs)Sync a list of jobs.
ProjectApi.update_algorithms
(algorithms[, ...])Update a list of algorithms.
ProjectApi.update_files
(files[, as_objects])Update files.
ProjectApi.update_job_definitions
(...[, ...])Update a list of job definitions.
ProjectApi.update_job_selections
(selections)Update a list of job selections.
ProjectApi.update_jobs
(jobs[, as_objects])Update jobs.
ProjectApi.update_license_contexts
(...[, ...])Update a list of license contexts.
Update a list of parameter definitions.
ProjectApi.update_parameter_mappings
(...[, ...])Get a list of updated parameter mappings.
ProjectApi.update_permissions
(permissions[, ...])Update a list of permissions.
ProjectApi.update_task_definitions
(...[, ...])Update a list of task definitions.
ProjectApi.update_tasks
(tasks[, as_objects])Update a list of tasks.
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.