Skip to main content
Skip table of contents

Create a Parameter Set

Overview

POST /rest/parameterSets

This endpoint is used to create a new Parameter Set. The parameters sent to this endpoint are not automatically validated. To validate a parameter set, use the “Validate a Parameter Set” or “Validate a Parameter Set By ID” endpoint before or after creating.

Important Note on Parameters

The details of the parameters object have been intentionally omitted in this documentation. The endpoint does not perform validation on the incoming parameters object. Instead, the validation of these parameters is performed when the parameter set is loaded on the screen.

To ensure the integrity and correct format of the parameters you are submitting, we highly recommend the following steps:

  1. Get the Current Format: First, use the Get parameters endpoint to retrieve the current, valid format of the parameters object.

  2. Modify and Validate: Update the retrieved format with your desired values.

  3. Validate Endpoint: Before submitting your request, use the Validate endpoint to check the validity of your updated parameters object. This step is crucial for preventing errors and ensuring your data is correctly processed.

By following this process, you can guarantee that your parameter set is correctly formatted and ready for use.

Required Permissions

  • Admins can create parameter sets for any user (by specifying any ownerId).

  • Users can create parameter sets only for themselves (the ownerId must be their own user ID or null).

Request

CODE
POST <service_url>/rest/parameterSets

Request Body

The request body must be a JSON object with the following structure:

JSON
{
  "name": String, // The name of the parameter set
  "public": Boolean, // Indicates if the parameter set is public
  "parameters": Object, // The parameters in JSON format
  "ownerId": String // The ID of the owner of the parameter set
}

Example Request Body

JSON
{
  "name": "Parameter set From Rest",
  "public": false,
  "ownerId": null,
  "parameters": {
    "reportType": "statusDuration",
    "filterType": "project",
    "projectKey": "ITSAMPLE",
    "aggregationType": "tableList",
    "groupByFields": [
        "project",
        "date:year:created",
        "date:month:created"
    ],
    "averageDenominator": "nonNull",
    "multiVisitBehavior": "average",
    "timePeriod": "month",
    "statuses": [],
    "includeDeletedStatuses": true,
    "fields": [],
    "historyFields": [],
    "groups": [],
    "dbsMetrics": [],
    "assignees": [],
    "dateRangeField": "created",
    "startDate": "",
    "endDate": "",
    "trimHistoryStartDate": "",
    "trimHistoryEndDate": "",
    "calendar": "normalHours",
    "dayLength": "24HourDays",
    "pageSize": 10,
    "startIssueIndex": 0,
    "sortBy": "",
    "sortByDeleted": "",
    "sortDir": "desc",
    "filters": {
        "valueFilters": [],
        "hideEmptyRows": false
    },
    "outputType": "xls",
    "exportGroupByFields": [
        "project",
        "date:year:created",
        "date:month:created"
    ],
    "exportDateFormat": "",
    "exportDateTimeFormat": "",
    "exportEmptyValueToken": "hyphen",
    "exportDecimalSeparator": null,
    "exportCsvFieldSeparator": null,
    "exportValueQuotationMark": null,
    "viewFormat": "humanReadable",
    "visitCounts": false,
    "dataBars": false,
    "oneDimensionChartType": "pie",
    "twoDimensionsChartType": "stackedColumn",
    "dateChartType": "timeline",
    "oneDimensionChartPercentage": "off",
    "twoDimensionsChartPercentage": "off",
    "excludeCurrentState": false,
    "highlightsRules": []
  }
}

Example Requests

CODE
POST https://tis.obss.io/rest/parameterSets

Response

Response Structure

CODE
{
  "id": String, // The unique identifier of the parameter set
  "name": String, // The name of the parameter set
  "public": Boolean, // Indicates if the parameter set is public
  "ownerId": String // The ID of the owner of the parameter set
}

Example Response Body

JSON
{
  "id": "2710a694-ec07-4b68-b9f3-1be82fd3af10",
  "name": "Parameter set From Rest",
  "ownerId": "5d2wqe63b7a11eas7f31cd27",
  "public": false
}

Response Codes

  • 200 OK: Returns the details of the created parameter set.

  • 400 Bad Request: If the request body is invalid.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.