List Projects
  • 03 May 2024
  • 1 Minute to read
  • Dark
    Light
  • PDF

List Projects

  • Dark
    Light
  • PDF

Article Summary

List Projects is available as both a pgutil command and an HTTP Request, and will return an array of ProjectInfo Object objects describing all projects.

🚀 Quick Example: Listing Projects with Curl

This example lists all projects, authenticating with the API key abc12345:

curl -X GET -H "X-ApiKey: abc12345" "https://proget.corp.local/api/sca/projects"

Command Specification (CLI)

🚧 Coming Soon 🚧

The sca projects list command is coming soon. Similar to the HTTP Request, it will list all specified projects.

HTTP Request Specification

To list all projects, simply GET to the URL with an appropriate API Key.

GET /api/sca/projects

HTTP Response Specification

A successful (200) response body will contain an array of ProjectInfo Object objects. For example, to listing all projects, the request would return this:

GET /api/sca/projects

[
  { 
    "id":1,
    "name":"myProject"
  },
  { 
    "id":2,
    "name":"anotherProject"
  },
  { 
    "id":3,
    "name":"yetAnotherProject"
  },
  {...}
]
ResponseDetails
200 (Success)body will contain an array of ProjectInfo objects
400 (Invalid Input)indicates invalid or missing properties
403 (Unauthorized API Key)indicates a missing, unknown, or unauthorized API Key; the body will be empty
404 (Project or Release Not Found)indicates that the specified project
500 (Server Error)indicates an unexpected error; the body will contain the message and stack trace, and this will also be logged

Was this article helpful?