Procore.Api.CoreWorkflowsWorkflowInstancesProject (procore_sdk v0.3.0)

API calls for all endpoints tagged CoreWorkflowsWorkflowInstancesProject.

Summary

Functions

Bulk Create Project Workflow Instances Asynchronously bulk create workflow instances for a list of project-level items. If an active instance already exists for an item, a failure will be returned for that item. The returned async operation id can be used to query for status using the GET /rest/v2.0/companies/{company_id}/async_operations/{operation_id} API. The result field of the operation contains a list of completed and failed items. For example: json { "completed_items": [ { "item_id": "123", "instance_id": "456" } ], "failed_items": [ { "item_id": "789", "step": "create", "message": "Item not found" ] }

Functions

Link to this function

rest_v20_companies_company_id_projects_project_id_workflows_instances_bulk_create_post(connection, procore_company_id, project_id, company_id, opts \\ [])

@spec rest_v20_companies_company_id_projects_project_id_workflows_instances_bulk_create_post(
  Tesla.Env.client(),
  integer(),
  String.t(),
  String.t(),
  keyword()
) ::
  {:ok,
   Procore.Model.RestV20CompaniesCompanyIdProjectsProjectIdWorkflowsInstancesBulkCreatePost202Response.t()}
  | {:ok,
     Procore.Model.RestV20CompaniesCompanyIdWorkflowsToolsGet401Response.t()}
  | {:error, Tesla.Env.t()}

Bulk Create Project Workflow Instances Asynchronously bulk create workflow instances for a list of project-level items. If an active instance already exists for an item, a failure will be returned for that item. The returned async operation id can be used to query for status using the GET /rest/v2.0/companies/{company_id}/async_operations/{operation_id} API. The result field of the operation contains a list of completed and failed items. For example: json { "completed_items": [ { "item_id": "123", "instance_id": "456" } ], "failed_items": [ { "item_id": "789", "step": "create", "message": "Item not found" ] }

Parameters

  • connection (Procore.Connection): Connection to server
  • procore_company_id (integer()): Unique company identifier associated with the Procore User Account.
  • project_id (String.t): Unique identifier for the project.
  • company_id (String.t): Unique identifier for the company.
  • opts (keyword): Optional parameters
    • :body (RestV20CompaniesCompanyIdProjectsProjectIdWorkflowsInstancesBulkCreatePostRequest):

Returns

  • {:ok, Procore.Model.RestV20CompaniesCompanyIdProjectsProjectIdWorkflowsInstancesBulkCreatePost202Response.t} on success
  • {:error, Tesla.Env.t} on failure
Link to this function

rest_v20_companies_company_id_projects_project_id_workflows_instances_get(connection, procore_company_id, company_id, project_id, filters_left_square_brackettool_type_right_square_bracket, opts \\ [])

List Project Workflow Instances Returns a list of workflow instances for a given project.

Parameters

  • connection (Procore.Connection): Connection to server
  • procore_company_id (integer()): Unique company identifier associated with the Procore User Account.
  • company_id (String.t): Unique identifier for the company.
  • project_id (String.t): Unique identifier for the project.
  • filters_left_square_brackettool_type_right_square_bracket (String.t): Filter instances with matching tool type.
  • opts (keyword): Optional parameters
    • :"filters[tool_subtype]" (integer()): Filter instances by tool subtype. Required when tool_type is 'correspondence'.
    • :"filters[item_id]" (String.t): Filter instances with matching item id.
    • :"filters[assignee_id]" (String.t): Filter instances with matching current assignee.
    • :"filters[active]" (boolean()): Return only instances that are active.
    • :"filters[overdue]" (boolean()): Return only instances whose next workflow step is overdue.
    • :per_page (integer()): Elements per page
    • :cursor (String.t): Cursor location where the returned list of items are before or after this cursor location.

Returns

  • {:ok, Procore.Model.RestV20CompaniesCompanyIdProjectsProjectIdWorkflowsInstancesGet200Response.t} on success
  • {:error, Tesla.Env.t} on failure
Link to this function

rest_v20_companies_company_id_projects_project_id_workflows_instances_id_get(connection, procore_company_id, company_id, project_id, id, opts \\ [])

Get a Project Workflow Instance Returns a single instance for a given project.

Parameters

  • connection (Procore.Connection): Connection to server
  • procore_company_id (integer()): Unique company identifier associated with the Procore User Account.
  • company_id (String.t): Unique identifier for the company.
  • project_id (String.t): Unique identifier for the project.
  • id (String.t): Unique identifier for the workflow instance.
  • opts (keyword): Optional parameters

Returns

  • {:ok, Procore.Model.RestV20CompaniesCompanyIdProjectsProjectIdWorkflowsInstancesIdGet200Response.t} on success
  • {:error, Tesla.Env.t} on failure