Project Classifications

Get All Project Classifications

This endpoint retrieves a list of Project Classification resources.

GET /api/v2/project-classifications/


GET /api/v2/project-classifications/ HTTP/1.1
Accept: application/json
Authorization: Token "YOUR SDE ACCESS TOKEN"
HTTP/1.1 200 OK
Content-Type: application/json

{
  "results": [{
    "id": 1,
    "ordinal": 1,
    "name": "Low",
    "description": "Used for internal projects.",
    "default_risk_policy": 1,
    "factor_expression": "RF1 * 3 + RF2 * 2 > 10",
    "risk_policies": [
      1
    ],
    "answers": ["A168"],
    "last_update_date_time": "2019-05-28T11:34:21.908541-04:00",
    "is_unclassified": false
  }]
}

Expand Parameters

See the Expand Parameters section for more details.

Parameter Description
default_risk_policy The default Risk Policy field is expanded to include Risk Policy id, name, and description.
risk_policies The Risk Policies field is expanded to include Risk Policies ids, names, and descriptions.
answers The Answers field is expanded to include Answers ids, texts, and descriptions.
GET /api/v2/project-classifications/?expand=default_risk_policy,risk_policies,answers HTTP/1.1
Accept: application/json
Authorization: Token: "YOUR SDE ACCESS TOKEN"
HTTP/1.1 200 OK
Content-Type: application/json

{
  "results": [{
    "id": 1,
    "ordinal": 1,
    "name": "Low",
    "description": "Used for internal projects.",
    "default_risk_policy": {
      "id": 1,
      "name": "On-Boarding Policy",
      "description": "A risk policy suitable for introducing an application to SD Elements by focusing on the tasks that are most important."
    },
    "factor_expression": "RF1 * 3 + RF2 * 2 > 10",
    "risk_policies": [{
      "id": 1,
      "name": "On-Boarding Policy",
      "description": "A risk policy suitable for introducing an application to SD Elements by focusing on the tasks that are most important."
    }],
    "answers": [{
      "id": "A168",
      "text": "ADO.NET",
      "description": "ADO.NET is a data access technology from the Microsoft .NET Framework. The application uses ADO.NET for persistence."
    }],
    "last_update_date_time": "2019-05-28T11:34:21.908541-04:00",
    "is_unclassified": false
  }]
}

Include Parameters

See the Include Parameters section for more details.

Parameter Description
unclassified Include the Unclassified Project Classification in the results. This Project Classification is read-only and cannot be modified.
GET /api/v2/project-classifications/?include=unclassified HTTP/1.1
Accept: application/json
Authorization: Token "YOUR SDE ACCESS TOKEN"
HTTP/1.1 200 OK
Content-Type: application/json

{
  "results": [{
    "id": 1,
    "ordinal": 1,
    "name": "Low",
    "description": "Used for internal projects.",
    "default_risk_policy": 1,
    "factor_expression": "RF1 * 3 + RF2 * 2 > 10",
    "risk_policies": [
      1
    ],
    "answers": ["A168"],
    "last_update_date_time": "2019-05-28T11:34:21.908541-04:00",
    "is_unclassified": false
  },
  {
    "id": 2,
    "ordinal": 381654729,
    "name": "Unclassified",
    "description": "This Project does not match with any organization Classification.",
    "default_risk_policy": null,
    "factor_expression": "",
    "risk_policies": [],
    "answers": [],
    "last_update_date_time": "2019-05-28T11:34:21.908541-04:00",
    "is_unclassified": true
  }]
}

Get a Specific Project Classification

This endpoint retrieves a specific Project Classification resource, as specified by the id parameter.

GET /api/v2/project-classifications/{id}/

URL Parameters

Parameter Description
id The id of the project classification to retrieve
GET /api/v2/project-classifications/1/ HTTP/1.1
Accept: application/json
Authorization: Token "YOUR SDE ACCESS TOKEN"
HTTP/1.1 200 OK
Content-Type: application/json

{
  "id": 1,
  "ordinal": 1,
  "name": "Low",
  "description": "Used for internal projects.",
  "default_risk_policy": 1,
  "factor_expression": "RF1 * 3 + RF2 * 2 > 10",
  "risk_policies": [
    1
  ],
  "answers": ["A168"],
  "last_update_date_time": "2019-05-28T11:34:21.908541-04:00",
  "is_unclassified": false
}

Create a Project Classification

This endpoint creates a new project classification resource. The ordinal is set to the new maximum ordinal value excluding the ordinal of the Unclassified classification.

Project Classification can be toggled between Off, Basic, Advanced. When in Basic mode, the answers are used to determine the classification and factor_expression is ignored. In Advanced mode, the factor_expression is used and answers are ignored.

POST /api/v2/project-classifications/

Payload

Fields Required Description
name Yes The name of the project classification.
description Yes The description of the project classification.
default_risk_policy No A default risk policy that will automatically be recommended for a project with this project classification.
risk_policies No A list of risk policies that may be chosen for a project with this project classification.
answers No A list of answers that will determine if a project matches this project classification.
factor_expression No A boolean expression using factors which determines if a project matches this classification.
POST /api/v2/project-classifications/ HTTP/1.1
Accept: application/json
Authorization: Token "YOUR SDE ACCESS TOKEN"

{
  "name": "Maximum",
  "description": "Used for projects with maximum risk.",
  "default_risk_policy": 1,
  "factor_expression": "RF1 * 3 + RF2 * 2 > 10",
  "risk_policies": [1],
  "answers": ["A168"]
}
HTTP/1.1 200 OK
Content-Type: application/json

{
  "id": 3,
  "ordinal": 2,
  "name": "Maximum",
  "description": "Used for projects with maximum risk.",
  "default_risk_policy": 1,
  "factor_expression": "RF1 * 3 + RF2 * 2 > 10",
  "risk_policies": [
    1
  ],
  "answers": ["A168"],
  "last_update_date_time": "2019-05-28T11:34:21.908541-04:00",
  "is_unclassified": false
}

Update a Project Classification

Update a single project classification by specifying a new name and priority. The project classification to update is identified by the id. Project Classification can be toggled between Off, Basic, Advanced. When in Basic mode, the answers are used to determine the classification and factor_expression is ignored. In Advanced mode, the factor_expression is used and answers are ignored.

PATCH /api/v2/project-classifications/{id}/

URL Parameters

Parameter Description
id The id of the project classification to edit must be submitted in the request

Payload

Fields Required Description
name No The new name of the project classification.
description No The new description of the project classification.
default_risk_policy No A default risk policy that will automatically be recommended for a project with this project classification.
risk_policies No A list of risk policies that may be chosen for a project with this project classification.
answers No A list of answers that will determine if a project matches this project classification.
factor_expression No A boolean expression using factors which determines if a project matches this classification.
PATCH /api/v2/project-classifications/2/ HTTP/1.1
Accept: application/json
Authorization: Token "YOUR SDE ACCESS TOKEN"

{
  "name": "Maximum",
  "description": "Used for projects with maximum risk.",
  "default_risk_policy": 1,
  "factor_expression": "RF1 * 3 + RF2 * 2 > 10",
  "risk_policies": [1],
  "answers": ["A168"]
}
HTTP/1.1 200 OK
Content-Type: application/json

{
  "id": 2,
  "ordinal": 2,
  "name": "Maximum",
  "description": "Used for projects with maximum risk.",
  "default_risk_policy": 1,
  "factor_expression": "RF1 * 3 + RF2 * 2 > 10",
  "risk_policies": [
    1
  ],
  "answers": ["A168"],
  "last_update_date_time": "2019-05-28T11:34:21.908541-04:00",
  "is_unclassified": false
}

results matching ""

    No results matching ""