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": [{
    "ordinal": 1,
    "name": "Low",
    "description": "Used for internal projects.",
    "default_risk_policy": 1,
    "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": [{
    "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."
    },
    "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": [{
    "ordinal": 1,
    "name": "Low",
    "description": "Used for internal projects.",
    "default_risk_policy": 1,
    "risk_policies": [
      1
    ],
    "answers": ["A168"],
    "last_update_date_time": "2019-05-28T11:34:21.908541-04:00",
    "is_unclassified": false
  },
  {
    "ordinal": 6,
    "name": "Unclassified",
    "description": "This Project does not match with any organization Classification.",
    "default_risk_policy": null,
    "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 ordinal parameter.
GET /api/v2/project-classifications/{project_classification_ordinal}/
URL Parameters
| Parameter | Description | 
|---|---|
| project_classification_ordinal | The ordinal 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
{
  "ordinal": 1,
  "name": "Low",
  "description": "Used for internal projects.",
  "default_risk_policy": 1,
  "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 ordinal.
PATCH /api/v2/project-classifications/{project_classification_ordinal}/
URL Parameters
| Parameter | Description | 
|---|---|
| project_classification_ordinal | The ordinal 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. | 
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,
  "risk_policies": [1],
  "answers": ["A168"]
}
HTTP/1.1 200 OK
Content-Type: application/json
{
  "ordinal": 2,
  "name": "Maximum",
  "description": "Used for projects with maximum risk.",
  "default_risk_policy": 1,
  "risk_policies": [
    1
  ],
  "answers": ["A168"],
  "last_update_date_time": "2019-05-28T11:34:21.908541-04:00",
  "is_unclassified": false
}