ProjectApi#

class ansys.hps.client.jms.api.ProjectApi(client, project_id)#

Exposes the project endpoints of the JMS.

Parameters:
clientClient

HPS client object.

project_idstr

ID of the project.

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.

ProjectApi.copy_default_execution_script(...)

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

ProjectApi.create_parameter_definitions(...)

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.

ProjectApi.delete_job_definitions(...)

Delete a list of job definitions.

ProjectApi.delete_job_selections(selections)

Delete a list of job selections.

ProjectApi.delete_jobs(jobs)

Delete jobs.

ProjectApi.delete_license_contexts()

Delete license contexts.

ProjectApi.delete_parameter_definitions(...)

Delete a list of parameter definitions.

ProjectApi.delete_parameter_mappings(...)

Delete a list of parameter mappings.

ProjectApi.delete_task_definitions(...)

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

ProjectApi.get_parameter_definitions([...])

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

ProjectApi.update_parameter_definitions(...)

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

ProjectApi.fs_bucket_url

URL of the project's bucket in the file storage gateway.

ProjectApi.fs_url

URL of the file storage gateway.

ProjectApi.jms_api_url

Get the JMS API URL.

ProjectApi.url

URL of the API.