Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature]: Korifi API users should be able to list the builds of an app #2335

Open
danail-branekov opened this issue Mar 21, 2023 · 1 comment
Labels
good first issue Good for newcomers mta support the MTA controller

Comments

@danail-branekov
Copy link
Member

danail-branekov commented Mar 21, 2023

Blockers/Dependencies

No response

Background

Accoding to the cf v3 api docs one should be able to list the builds for an app

Acceptance Criteria

GIVEN I have pushed an app to korifi
WHEN I request GET /v3/apps/{guid}/build
THEN I should get a response that looks like:

HTTP/1.1 200 OK
Content-Type: application/json

{
  "pagination": {
    "total_results": 1,
    "total_pages": 1,
    "first": {
      "href": "https://api.example.org/v3/apps/[guid]/builds?states=STAGING&page=1&per_page=2"
    },
    "last": {
      "href": "https://api.example.org/v3/apps/[guid]/builds?states=STAGING&page=1&per_page=2"
    },
    "next": null,
    "previous": null
  },
  "resources": [
    {
      "guid": "585bc3c1-3743-497d-88b0-403ad6b56d16",
      "created_at": "2016-03-28T23:39:34Z",
      "updated_at": "2016-06-08T16:41:26Z",
      "created_by": {
        "guid": "3cb4e243-bed4-49d5-8739-f8b45abdec1c",
        "name": "bill",
        "email": "[email protected]"
      },
      "state": "STAGING",
      "staging_memory_in_mb": 1024,
      "staging_disk_in_mb": 1024,
      "staging_log_rate_limit_bytes_per_second": 1024,
      "error": null,
      "lifecycle": {
        "type": "buildpack",
        "data": {
          "buildpacks": [ "ruby_buildpack" ],
          "stack": "cflinuxfs3"
        }
      },
      "package": {
        "guid": "8e4da443-f255-499c-8b47-b3729b5b7432"
      },
      "droplet": null,
      "relationships": {
        "app": {
          "data": {
            "guid": "7b34f1cf-7e73-428a-bb5a-8a17a8058396"
          }
        }
      },
      "metadata": {
        "labels": {},
        "annotations": {}
      },
      "links": {
        "self": {
          "href": "https://api.example.org/v3/builds/585bc3c1-3743-497d-88b0-403ad6b56d16"
        },
        "app": {
          "href": "https://api.example.org/v3/apps/7b34f1cf-7e73-428a-bb5a-8a17a8058396"
        }
      }
    }
  ]
}

Dev Notes

For now it is okay to ignore all query params. There will be follow on stories for them.

@c0d1ngm0nk3y
Copy link
Contributor

For now it is okay to ignore all query params. There will be follow on stories for them.

For the query params where we know how to implement it, this is probably fine. But what is with pagination?

see #3701

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers mta support the MTA controller
Projects
Status: 🧊 Icebox
Development

No branches or pull requests

2 participants