# GetTestsuiteById

## Parameters

The following URL, Headers and Parameters are required for requests to this API endpoint. Where a parameter is optional, it will be indicated. Otherwise treat all parameters as mandatory.

### Headers

```
GET /api/ss/testsuites/:id HTTP/1.1
Host: demo.attackforge.com
X-SSAPI-KEY: APIKey
Content-Type: application/json
Connection: close
```

### Query

**id (string)**

Id of the testsuite.

Example:

```
GET /api/ss/testsuites/5e641773899bb708b55ea489 HTTP/1.1
```

**cf\_key\_allowlist (string) (optional)**

List of custom field keys to include in response. Add multiple for more than one key e.g. `?cf_key_allowlist=key1&cf_key_allowlist=key2` or specify no keys to exclude all fields e.g. `?cf_key_allowlist=`

Example:

```
GET /api/ss/testsuites/5e641773899bb708b55ea489?cf_key_allowlist=key1&cf_key_allowlist=key2 HTTP/1.1
```

**cf\_key\_blocklist (string) (optional)**

List of custom field keys to exclude from response. Add multiple for more than one key e.g. `?cf_key_blocklist=key1&cf_key_blocklist=key2`

Example:

```
GET /api/ss/testsuites/5e641773899bb708b55ea489?cf_key_blocklist=key1&cf_key_blocklist=key2 HTTP/1.1
```

## Example

The following example is a cURL request to get a testsuite and its testcases.

### Request

Include API Token instead of stars in 'X-SSAPI-KEY: \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*' parameter.

```
curl -X GET 'https://demo.attackforge.com/api/ss/testsuites/5e641773899bb708b55ea489' -H 'Host: demo.attackforge.com' -H 'X-SSAPI-KEY: ***************************************' -H 'Content-Type: application/json' -H 'Connection: close'
```

### Response

Response contains a testsuite object.

```
{
  "testsuite": {
    "id": "...",
    "created": "...",
    "last_modified": "...",
    "name": "...",
    "description": "...",
    "code": "...",
    "sort_order": 999,
    "tags": [
      "..."
    ],
    "created_by": "...",
    "testcases": [
      {
        "id": "...",
        "created": "...",
        "last_modified": "...",
        "title": "...",
        "details": "...",
        "details_html": "...",
        "code": "...",
        "sort_order": 999,
        "tags": [
          "..."
        ],
        "created_by": "...",
        "execution_flow": [
          {
            "title": "...",
            "details": "...",
            "details_html": "..."
          }
        ],
        "custom_fields": [
          {
            "key": "...",
            "value": "...",
            "type": "Field"
          }
        ],
        "files": [
          {
            "file_name": "...",
            "file_name_custom": "...",
            "storage_name": "...",
            "file_type": "...",
            "file_size": 999,
            "file_size_kb": 99999
          }
        ]
      }
    ]
  }
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://support.attackforge.com/attackforge-enterprise/modules/self-service-restful-api/gettestsuite.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
