id: api-gitlab

info:
  name: Gitlab API Test
  author: Adam Crosser
  severity: info
  reference:
    - https://docs.gitlab.com/ee/api/personal_access_tokens.html
  metadata:
    max-request: 1
  tags: token-spray,gitlab

self-contained: true

http:
  - method: GET
    path:
      - "https://gitlab.com/api/v4/personal_access_tokens"

    headers:
      PRIVATE-TOKEN: "{{token}}"
    matchers:
      - type: word
        part: body
        words:
          - '"id":'
          - '"created_at":'
        condition: and

# digest: 4a0a00473045022018e1d08da7b95bd30fe3380bf4314f6ea6c51c6885fe6e8c30838de488d446b8022100d1806cb0d3f05c93ba34ce2ff0796ad4bd0c2d4ea6a40962b628d43ac829abea:922c64590222798bb761d5b6d8e72950
