Releases

Get all releases

This endpoint returns a list of Release resources.

GET /api/v2/projects/{project_id}/releases/

Query Parameters

The following parameters may be used to filter the release resources in the response.

Parameter Description
name Filter releases by name.
slug Filter releases by slug.
ordering Sort releases by the specified field. Prefix field name with minus to sort descending. Sortable fields: name, created, updated.
search Filter releases by performing a textual search on name and profile name.

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

{
    "results": [{
        "id": 30,
        "slug": "release-1",
        "url": "http://example.com/bunits/bu/app/release-1/",
        "application": 7,
        "profile": {
            "logo_url": "/static/images/logo-django.png",
            "id": "P5",
            "name": "Django Project"
        },
        "archived": false,
        "base_project": {
            "id": 1,
            "slug": "parent-984-gamma",
            "name": "Parent 9.8.4 Gamma",
            "url": "http://example.com/bunits/bu-test/app-test/parent-984-gamma/",
            "archived": false
        },
        "name": "Release 1",
        "creator": 1,
        "description": "",
        "tags": [ ],
        "created": "2016-05-02T15:33:15.782770Z",
        "updated": "2016-05-02T15:33:16.929107Z",
        "parent": {
            "id": 1,
            "slug": "parent-984-gamma",
            "name": "Parent 9.8.4 Gamma",
            "url": "http://example.com/bunits/bu-test/app-test/parent-984-gamma/",
            "archived": false
        },
        "users": [
            {
                "first_name": "Admin",
                "last_name": "Testerton",
                "role": "PR4",
                "id": 1,
                "email": "admin@example.com"
            }
        ],
        "groups": [ ],
        "custom_attributes": { }
    }]
}

Include Parameters

See the Include Parameters section for more details.

Parameter Description
permissions Includes a list of permissions the requesting user has for the release.
GET /api/v2/projects/1/releases/?include=permissions HTTP/1.1
Accept: application/json
Authorization: Token "YOUR SDE ACCESS TOKEN"
HTTP/1.1 200 OK
Content-Type: application/json

{
    "results": [{
        "id": 1936,
        "slug": "project-test",
        "url": "http://example.com/bunits/bu-test/app-test/project-test",
        "application": 7,
        "profile" : {
            "id": "P9",
            "name": "Android App",
            "logo_url": "/static/images/android.png"
        },
        "archived": false,
        "base_project": {
            "id": 1,
            "slug": "parent-984-gamma",
            "name": "Parent 9.8.4 Gamma",
            "url": "http://example.com/bunits/bu-test/app-test/parent-984-gamma/",
            "archived": false
        },
        "name": "Project Test",
        "creator": 1,
        "description": "API Project",
        "tags": ["foo", "bar"],
        "created": "2015-04-15T19:30:04.132712Z",
        "updated": "2015-04-15T19:57:15.042353Z",
        "parent": {
            "id": 1,
            "slug": "parent-984-gamma",
            "name": "Parent 9.8.4 Gamma",
            "url": "http://example.com/bunits/bu-test/app-test/parent-984-gamma/",
            "archived": false
        },
        "users": [{
            "id": "1",
            "email": "test@example.com",
            "role": "PR4",
            "first_name": "Admin",
            "last_name": "Testerton"
        }],
        "groups": [{
            "id": "G1",
            "name": "Devs",
            "role": "PR4"
        }],
        "custom_attributes": {
          "slug": "value"
        },
        "permissions": [
            "edit_project_details",
            "assign_task",
            "mark_task",
            "create_project_specific_task",
            "archive_project",
            "verify_task",
            "edit_project_membership",
            "view_project",
            "write_task_note",
            "sync_with_issue_tracker",
            "edit_project_survey"
        ]
    }]
}

Get a specific release

This endpoint returns a specific Release resource.

GET /api/v2/projects/{project_id}/releases/{realease_id}/

URL Parameters

Parameter Description
project_id The id of the Release to retrieve.
GET /api/v2/projects/1/releases/30/ HTTP/1.1
Accept: application/json
Authorization: Token "YOUR SDE ACCESS TOKEN"
HTTP/1.1 200 OK
Content-Type: application/json

{
    "id": 30,
    "slug": "release-1",
    "url": "http://example.com/bunits/bu/app/release-1/",
    "application": 7,
    "profile": {
        "logo_url": "/static/images/logo-django.png",
        "id": "P5",
        "name": "Django Project"
    },
    "archived": false,
    "base_project": {
        "id": 1,
        "slug": "parent-984-gamma",
        "name": "Parent 9.8.4 Gamma",
        "url": "http://example.com/bunits/bu-test/app-test/parent-984-gamma/",
        "archived": false
    },
    "name": "Release 1",
    "creator": 1,
    "description": "",
    "tags": [ ],
    "created": "2016-05-02T15:33:15.782770Z",
    "updated": "2016-05-02T15:33:16.929107Z",
    "parent": {
        "id": 1,
        "slug": "parent-984-gamma",
        "name": "Parent 9.8.4 Gamma",
        "url": "http://example.com/bunits/bu-test/app-test/parent-984-gamma/",
        "archived": false
    },
    "users": [
        {
            "first_name": "Admin",
            "last_name": "Testerton",
            "role": "PR4",
            "id": 1,
            "email": "admin@example.com"
        }
    ],
    "groups": [ ],
    "custom_attributes": { }
}

Create a release

This endpoint creates an Project Release resource.

POST /api/v2/projects/{project_id}/releases/

Fields Required Description
name Yes The name of the new release.
description No The description for the new release.
persistent_phases No A list of phases whose Countermeasure states are to persist in the new release.
issue_tracker_connection_retention No A boolean that determines whether Issue Tracker connection settings should be retained in the new release.
analysis_connection_retention No A boolean that determines whether verification connection settings should be retained in the new release.
carryover_project_specific_tasks No A boolean that determines whether to retain project-specific Countermeasures in the new release.
carryover_project_specific_problems No A boolean that determines whether to retain project-specific Weaknesses in the new release.
carryover_project_specific_problems_task_statuses No A boolean that determines whether to retain the Countermeasure statuses of tasks belonging to project specific Weaknesses in the new release. Only applicable when carryover_project_specific_problems is true.
pinned_survey_comments_retention No One of the following string values "NO_COMMENTS", "REQUIRED", "ALL_PINNED"
answers No An array of strings that represents the survey answers that are appended to the new project release.
deselect_answers No An array of strings that represents the survey answers that are removed from the new project release. These are selected in the parent project.
tags No A list of tags applicable to the new project release.
custom_attributes Depends All new Project Releases will not inherit any custom_attributes provided by the parent project. The JSON of custom attributes as defined by your administrator. This field is not required unless mandated by your administrator. See Project attributes for more information.

POST /api/v2/projects/1/releases/ HTTP/1.1
Accept: application/json
Authorization: Token "YOUR SDE ACCESS TOKEN"

{
    "name": "Foo",
    "description": "A foo project",
    "persistent_phases": ["X1", "X2"],
    "issue_tracker_connection_retention": true,
    "analysis_connection_retention": true,
    "answers": ["A1", "A2"],
    "pinned_survey_comments_retention": "ALL_PINNED",
    "custom_attributes": {
        "project_owner": "Foo Bar"
    }
}
HTTP/1.1 201 CREATED
Content-Type: application/json

{
    "id": 31,
    "slug": "foo",
    "url": "http://example.com/bunits/bu/app/foo/",
    "application": 7,
    "profile": {
        "logo_url": "/static/images/logo-django.png",
        "id": "P5",
        "name": "Django Project"
    },
    "archived": false,
    "base_project": {
        "id": 1,
        "slug": "parent-984-gamma",
        "name": "Parent 9.8.4 Gamma",
        "url": "http://example.com/bunits/bu-test/app-test/parent-984-gamma/",
        "archived": false
    },
    "name": "Foo",
    "creator": 1,
    "description": "A foo project",
    "tags": [ ],
    "created": "2016-05-02T15:33:15.782770Z",
    "updated": "2016-05-02T15:33:16.929107Z",
    "parent": {
        "id": 1,
        "slug": "parent-984-gamma",
        "name": "Parent 9.8.4 Gamma",
        "url": "http://example.com/bunits/bu-test/app-test/parent-984-gamma/",
        "archived": false
    },
    "users": [
        {
            "first_name": "Admin",
            "last_name": "Testerton",
            "role": "PR4",
            "id": 1,
            "email": "admin@example.com"
        }
    ],
    "groups": [ ],
    "custom_attributes": {
        "project_owner": "Foo Bar"
    }
}

results matching ""

    No results matching ""