# Get All Projects

This API allows users to get the details of all the available projects.

### Authentication

Response data is subject to user roles and permissions.

**Method**: Bearer Token or API Key

**Details**: For bearer token header name should be `X-OpsMx-Auth.`API keys can be generated from the SSD UI.&#x20;

### Request Details

### Endpoint URL

| **Method** | **URL Path**                             |
| ---------- | ---------------------------------------- |
| GET        | {host}/ssdservice/v1/{scanType}/projects |

### Request Headers

| **Header**   | **Description**                 |
| ------------ | ------------------------------- |
| Content-Type | application/json                |
| X-OpsMx-Auth | Bearer Token for authentication |

### CURL Example

{% code overflow="wrap" %}

```
curl --location '{host}/gate/ssdservice/v1/{scanType}/projects?teamId=3c5c9dcb-8466-4e06-8ea0-07f9820df897&pageNo=1&pageLimit=10' \
--header 'X-OpsMx-Auth: Bearer <token>'
```

{% endcode %}

### Response Details

#### Success Response (Status Code: 200/201)

{% code overflow="wrap" %}

```
{
  "projectSummaryResponse": [
    {
      "projectId": "0x29ab7",
      "summaryMetaData": {
        "projectName": "test-source-1",
        "platform": "Github",
        "organisation": "OpsMx",
        "status": "Failed",
        "error": "repo: docker-swarm, branch: onlyMain, error: repository OpsMx/docker-swarm does not exist or you do not have access to it"
      }
    },
    {
      "projectId": "0x2645c",
      "summaryMetaData": {
        "projectName": "git1",
        "platform": "Github",
        "organisation": "sriharshakancharla",
        "status": "Completed"
      }
    }
  ],
  "totalSize": 2
}
```

{% endcode %}

### Error Responses

| **Status Code** | **Description**                                             | **Example Error Response**            |
| --------------- | ----------------------------------------------------------- | ------------------------------------- |
| 400             | Bad Request (Invalid parameters or missing required fields) | {"error": "Invalid input data."}      |
| 401             | Unauthorized (Missing or invalid authentication token)      | {"error": "Authentication required."} |
| 500             | Some issues in Server                                       | {"error": "Resource not found."}      |

\
\
\ <br>


---

# 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://docs.opsmx.com/ssd/security-risk-and-prioritization/ssd-apis/get-all-projects.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.
