---
# System prepended metadata

title: Untitled

---

### Howto (via HackMD)
```
$ curl "https://791ab699.ngrok.io/approval?sha=${CI_COMMIT_SHA}&project_name=${CI_PROJECT_PATH}" | jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   122  100   122    0     0     97      0  0:00:01  0:00:01 --:--:--    97
{
  "approvals": [
    "projects/defaults/notes/securebuild"
  ],
  "missing_approvals": [
    "projects/defaults/notes/qa"
  ],
  "status": "ERROR"
}
```

```
$ curl "https://791ab699.ngrok.io/approval" -X POST -H "Content-type: application/json" --data "{\"sha\":\"${CI_COMMIT_SHA}\",\"project_name\":\"${CI_PROJECT_PATH}\"}" | jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   211  100   126  100    85     10      6  0:00:14  0:00:12  0:00:02    49
{
  "occurrence_id": "projects/initial-group|env/occurrences/dfe6a2d6-be55-42b7-8ba6-16d9e79d22e7",
  "status": "occurrence_created"
}
```

```
$ curl "https://791ab699.ngrok.io/approval?sha=${CI_COMMIT_SHA}&project_name=${CI_PROJECT_PATH}" | jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   126  100   126    0     0      7      0  0:00:18  0:00:16  0:00:02    29
{
  "approvals": [
    "projects/defaults/notes/securebuild",
    "projects/defaults/notes/qa"
  ],
  "missing_approvals": [],
  "status": "APPROVED"
}
```



### ToDo Tasks

- [x] Dockerfile
- [x] Create Grafeas occurrence on build payload being received.
- [x] Create endpoint for approving images, receive uri parameter
- [x] Create endpoint for presenting approved status
- [ ] Create table view
