What's on this page

Projects

The following details the API to manage Projects within TNC-O. A Project is auto-created for every Assembly descriptor added to TNC-O.

Associated with each definition are details of the request parameters and responses. These include the name of each field plus a brief description and whether the field is mandatory. Whether a field is required or not is based on the context of the examples. The underlying API definition may mark a field as optional, but in some contexts, the fields must be supplied.

For a 40x, 50x or any other error response please see error response codes

Create Project

Create a new Assembly Configuration

Request

AspectValue
Endpoint URL/api/behaviour/projects
Content-Typeapplication/json
HTTP MethodPOST

Body

FieldDescriptionMandatory
nameUnique name of the ProjectYes
descriptionSupplied description of the ProjectNo

Example:

{
​  "name": "assembly::t_simple::1.0",
​  "description": "Project for assembly::t_simple::1.0"
}

Response

AspectValue
Content-Typeapplication/json
Response Code201 (Created)

Headers

FieldDescription
locationEndpoint to created resource

Body

FieldDescription
idID assigned to the Project (will be the same as the name value)
nameName of the Project
descriptionSupplied description of the Project

Example:

{
  "id": "assembly::t_simple::1.0",
​  "name": "assembly::t_simple::1.0",
​  "description": "Project for assembly::t_simple::1.0"
}

Update Project

Update a Project

Request

AspectValue
Endpoint URL/api/behaviour/projects/{projectId}
HTTP MethodPUT

Path Parameters

FieldDescriptionMandatory
projectIdID of the ProjectYes

Body

FieldDescriptionMandatory
nameUnique name of the ProjectYes
descriptionSupplied description of the ProjectNo

Example:

{
​  "name": "assembly::t_simple::1.0",
​  "description": "Project for assembly::t_simple::1.0"
}

Response

AspectValue
Content-Typeapplication/json
Response Code200 (OK)

Body

FieldDescription
idID assigned to the Project (will be the same as the name value)
nameName of the Project
descriptionSupplied description of the Project

Example:

{
  "id": "assembly::t_simple::1.0",
​  "name": "assembly::t_simple::1.0",
​  "description": "Project for assembly::t_simple::1.0"
}

Remove Project

Removes a Project and all contained Assembly Configurations, Scenarios and Scenario Executions.

Request

AspectValue
Endpoint URL/api/behaviour/projects/{projectId}
HTTP MethodDELETE

Path Parameters

FieldDescriptionMandatory
projectIdID of the ProjectYes

Response

AspectValue
Content-Typeapplication/json
Response Code204 (No Content)

Get all Projects

Retrieve all Projects

Request

AspectValue
Endpoint URL/api/behaviour/projects
HTTP MethodGET

Response

AspectValue
Content-Typeapplication/json
Response Code200 (OK)

Body

The body will contain a single list of Projects. Each entry will have the following fields:

FieldDescription
idID assigned to the Project (will be the same as the name value)
nameName of the Project
descriptionSupplied description of the Project

Example:

{
  "id": "assembly::t_simple::1.0",
​  "name": "assembly::t_simple::1.0",
​  "description": "Project for assembly::t_simple::1.0"
}

Get Project

Retrieve a single Project by ID

Request

AspectValue
Endpoint URL/api/behaviour/projects/{projectId}
HTTP MethodGET

Path Parameters

FieldDescriptionMandatory
projectIdID of the ProjectYes

Response

AspectValue
Content-Typeapplication/json
Response Code200 (OK)

Body

FieldDescription
idID assigned to the Project (will be the same as the name value)
nameName of the Project
descriptionSupplied description of the Project

Example:

{
  "id": "assembly::t_simple::1.0",
​  "name": "assembly::t_simple::1.0",
​  "description": "Project for assembly::t_simple::1.0"
}