Projects

API Endpoints to access Projects

Get Project Details

  • Endpoint: GET /projects/{project_id}

  • Description: Retrieves the details of a specific project.

  • Path Parameters:

    • project_id(integer, required): The unique identifier of the project.

  • Response: 200 OK Returns a JSON object representing the project details.

Create Project

  • Endpoint: POST /projects/

  • Description: Creates a new project with email matching strategy.

  • Query Parameters:

    • match (string): Specifies the fields used to detect duplicate projects during creation. If a new project is being created and an existing project has the exact value for the field specified in match, it will be considered a duplicate. The following are possible values for the parameter.

      • [title, email, address]

    • strategy (string): Determines the action to take when a duplicate project is detected based on the match parameter. The following are possible values for the parameter.

      • create: If a duplicate project is found, a new project will still be created under the same client.

      • ignore: If a duplicate project is found, the POST request will be ignored, and the response will return the information of the existing project instead of creating a new one.

      Note: Both match and strategy are required for successful deduplication.

  • Request Body:

    • title__-1 (string, required): The title of the project.

    • address__-3 (string, required): The address of the project.

    • primaryemail__-32 (string, required): The primary email associated with the project.

    • system_size_(stc_dc_kw)__2483304 (number): The system size in STC DC KW.

    • projectvalue__-43 (number): The project value.

    • projectsize__-44 (number): The project size.

    • description__-2 (string): The description of the project.

    • blueprintid__-1000 (number, required): The blueprint ID.

    • parentprojectid__-1001 (number, required): The parent project ID.

  • Response: 201 CREATED Returns a JSON object representing the newly created project.

  • Response: 200 OK Returns a JSON object representing existing project.

Note: The field names in the request body must match the api_name of the respective properties, which can be obtained using the "List Project Properties" endpoint.

List Projects

  • Endpoint: GET /projects

  • Description: Retrieves a list of projects with pagination.

  • Query Parameters:

    • page (integer): The page number of the results.

    • page_size (integer): The number of projects per page.

  • Response: 200 OK Returns a JSON array containing project objects.

List Project Properties

  • Endpoint: GET /projects/properties

  • Description: Retrieves a list of properties available for projects.

  • Response: 200 OK Returns a JSON object containing an array of project properties.

Note: For properties of the person type, a user ID must be provided.

Last updated