List Projects
  • 21 Feb 2024
  • 1 Minute to read
  • Dark
    Light
  • PDF

List Projects

  • Dark
    Light
  • PDF

Article Summary

The List Projects is an endpoint in ProGet's SCA Directory API that 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"

Request Specification

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

GET /api/sca/projects

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?