# Get a list of all projects. GET https://app.unleash-instance.example.com/api/admin/projects This endpoint returns an list of all the projects in the Unleash instance. Reference: https://docs.getunleash.io/api/get-projects ## OpenAPI Specification ```yaml openapi: 3.1.1 info: title: Get a list of all projects. version: endpoint_projects.getProjects paths: /api/admin/projects: get: operationId: get-projects summary: Get a list of all projects. description: >- This endpoint returns an list of all the projects in the Unleash instance. tags: - - subpackage_projects parameters: - name: archived in: query required: false schema: type: boolean - name: Authorization in: header description: Header authentication of the form `undefined ` required: true schema: type: string responses: '200': description: projectsSchema content: application/json: schema: $ref: '#/components/schemas/projectsSchema' '401': description: >- Authorization information is missing or invalid. Provide a valid API token as the `authorization` header, e.g. `authorization:*.*.my-admin-token`. content: {} '403': description: >- The provided user credentials are valid, but the user does not have the necessary permissions to perform this operation content: {} components: schemas: ProjectSchemaMode: type: string enum: - value: open - value: protected - value: private ProjectSchemaOwnersOneOf0ItemsOneOf0OwnerType: type: string enum: - value: user ProjectSchemaOwnersOneOf0Items0: type: object properties: ownerType: $ref: '#/components/schemas/ProjectSchemaOwnersOneOf0ItemsOneOf0OwnerType' name: type: string imageUrl: type: - string - 'null' email: type: - string - 'null' required: - ownerType - name ProjectSchemaOwnersOneOf0ItemsOneOf1OwnerType: type: string enum: - value: group ProjectSchemaOwnersOneOf0Items1: type: object properties: ownerType: $ref: '#/components/schemas/ProjectSchemaOwnersOneOf0ItemsOneOf1OwnerType' name: type: string required: - ownerType - name ProjectSchemaOwnersOneOf0Items: oneOf: - $ref: '#/components/schemas/ProjectSchemaOwnersOneOf0Items0' - $ref: '#/components/schemas/ProjectSchemaOwnersOneOf0Items1' ProjectSchemaOwners0: type: array items: $ref: '#/components/schemas/ProjectSchemaOwnersOneOf0Items' ProjectSchemaOwnersOneOf1ItemsOwnerType: type: string enum: - value: system ProjectSchemaOwnersOneOf1Items: type: object properties: ownerType: $ref: '#/components/schemas/ProjectSchemaOwnersOneOf1ItemsOwnerType' required: - ownerType ProjectSchemaOwners1: type: array items: $ref: '#/components/schemas/ProjectSchemaOwnersOneOf1Items' ProjectSchemaOwners: oneOf: - $ref: '#/components/schemas/ProjectSchemaOwners0' - $ref: '#/components/schemas/ProjectSchemaOwners1' projectSchema: type: object properties: id: type: string description: The id of this project name: type: string description: The name of this project description: type: - string - 'null' description: Additional information about the project health: type: number format: double description: Use `technicalDebt` instead. technicalDebt: type: number format: double description: >- An indicator of the [project's technical debt](https://docs.getunleash.io/concepts/technical-debt#project-status) on a scale from 0 to 100 featureCount: type: number format: double description: The number of features this project has staleFeatureCount: type: number format: double description: The number of stale features this project has potentiallyStaleFeatureCount: type: number format: double description: The number of potentially stale features this project has memberCount: type: number format: double description: The number of members this project has createdAt: type: string format: date-time description: When this project was created. updatedAt: type: - string - 'null' format: date-time description: When this project was last updated. lastUpdatedAt: type: - string - 'null' format: date-time description: When this project was last updated. archivedAt: type: - string - 'null' format: date-time description: When this project was archived. favorite: type: boolean description: '`true` if the project was favorited, otherwise `false`.' mode: $ref: '#/components/schemas/ProjectSchemaMode' description: >- The project's [collaboration mode](https://docs.getunleash.io/concepts/project-collaboration-mode). Determines whether non-project members can submit change requests or not. defaultStickiness: type: string description: >- A default stickiness for the project affecting the default stickiness value for variants and Gradual Rollout strategy avgTimeToProduction: type: number format: double description: >- The average time from when a feature was created to when it was enabled in the "production" environment during the current window lastReportedFlagUsage: type: - string - 'null' format: date-time description: >- Across all flags in your project this is the last time usage metrics where reported from connected applications. owners: $ref: '#/components/schemas/ProjectSchemaOwners' description: >- The users and/or groups that have the "owner" role in this project. If no such users or groups exist, the list will contain the "system" owner instead. required: - id - name projectsSchema: type: object properties: version: type: integer description: The schema version used to represent the project data. projects: type: array items: $ref: '#/components/schemas/projectSchema' description: A list of projects in the Unleash instance required: - version - projects ``` ## SDK Code Examples ```python import requests url = "https://app.unleash-instance.example.com/api/admin/projects" headers = {"Authorization": ""} response = requests.get(url, headers=headers) print(response.json()) ``` ```javascript const url = 'https://app.unleash-instance.example.com/api/admin/projects'; const options = {method: 'GET', headers: {Authorization: ''}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go package main import ( "fmt" "net/http" "io" ) func main() { url := "https://app.unleash-instance.example.com/api/admin/projects" req, _ := http.NewRequest("GET", url, nil) req.Header.Add("Authorization", "") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby require 'uri' require 'net/http' url = URI("https://app.unleash-instance.example.com/api/admin/projects") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Get.new(url) request["Authorization"] = '' response = http.request(request) puts response.read_body ``` ```java import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.get("https://app.unleash-instance.example.com/api/admin/projects") .header("Authorization", "") .asString(); ``` ```php request('GET', 'https://app.unleash-instance.example.com/api/admin/projects', [ 'headers' => [ 'Authorization' => '', ], ]); echo $response->getBody(); ``` ```csharp using RestSharp; var client = new RestClient("https://app.unleash-instance.example.com/api/admin/projects"); var request = new RestRequest(Method.GET); request.AddHeader("Authorization", ""); IRestResponse response = client.Execute(request); ``` ```swift import Foundation let headers = ["Authorization": ""] let request = NSMutableURLRequest(url: NSURL(string: "https://app.unleash-instance.example.com/api/admin/projects")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "GET" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```