{
  "opencollection": "1.0.0",
  "info": {
    "name": "Code Climate Quality API",
    "version": "v1"
  },
  "request": {
    "auth": {
      "type": "apikey",
      "in": "header",
      "key": "Authorization",
      "value": "Token token={{token}}"
    }
  },
  "items": [
    {
      "info": {
        "name": "Organizations",
        "type": "folder"
      },
      "items": [
        {
          "info": { "name": "Get the authenticated user", "type": "http" },
          "http": { "method": "GET", "url": "https://api.codeclimate.com/v1/user" },
          "docs": "Returns the user associated with the supplied access token."
        },
        {
          "info": { "name": "List organizations", "type": "http" },
          "http": { "method": "GET", "url": "https://api.codeclimate.com/v1/orgs" },
          "docs": "Lists the organizations the authenticated user belongs to."
        }
      ]
    },
    {
      "info": {
        "name": "Repositories",
        "type": "folder"
      },
      "items": [
        {
          "info": { "name": "List repositories in an organization", "type": "http" },
          "http": { "method": "GET", "url": "https://api.codeclimate.com/v1/orgs/{{org_id}}/repos" },
          "docs": "Lists repositories under an organization."
        },
        {
          "info": { "name": "Add a private repository", "type": "http" },
          "http": {
            "method": "POST",
            "url": "https://api.codeclimate.com/v1/orgs/{{org_id}}/repos",
            "body": { "type": "json", "data": "{\"data\":{\"type\":\"repos\",\"attributes\":{\"url\":\"https://github.com/owner/name\"}}}" }
          },
          "docs": "Adds a private repository to an organization."
        },
        {
          "info": { "name": "Update a repository", "type": "http" },
          "http": {
            "method": "PUT",
            "url": "https://api.codeclimate.com/v1/orgs/{{org_id}}/repos/{{repo_id}}",
            "body": { "type": "json", "data": "{\"data\":{\"type\":\"repos\",\"attributes\":{}}}" }
          },
          "docs": "Updates a repository."
        },
        {
          "info": { "name": "Look up a repository by GitHub slug", "type": "http" },
          "http": { "method": "GET", "url": "https://api.codeclimate.com/v1/repos?github_slug=owner/name" },
          "docs": "Looks up a repository by GitHub slug (owner/name)."
        },
        {
          "info": { "name": "Get a repository", "type": "http" },
          "http": { "method": "GET", "url": "https://api.codeclimate.com/v1/repos/{{repo_id}}" },
          "docs": "Returns a single repository."
        },
        {
          "info": { "name": "List services on a repository", "type": "http" },
          "http": { "method": "GET", "url": "https://api.codeclimate.com/v1/repos/{{repo_id}}/services" },
          "docs": "Lists services configured on a repository."
        }
      ]
    },
    {
      "info": {
        "name": "Snapshots",
        "type": "folder"
      },
      "items": [
        {
          "info": { "name": "Get a snapshot", "type": "http" },
          "http": { "method": "GET", "url": "https://api.codeclimate.com/v1/repos/{{repo_id}}/snapshots/{{snapshot_id}}" },
          "docs": "Returns a repository analysis snapshot."
        },
        {
          "info": { "name": "List issues in a snapshot", "type": "http" },
          "http": { "method": "GET", "url": "https://api.codeclimate.com/v1/repos/{{repo_id}}/snapshots/{{snapshot_id}}/issues" },
          "docs": "Lists the code quality issues contained in a snapshot."
        }
      ]
    },
    {
      "info": {
        "name": "Test Coverage",
        "type": "folder"
      },
      "items": [
        {
          "info": { "name": "List test reports", "type": "http" },
          "http": { "method": "GET", "url": "https://api.codeclimate.com/v1/repos/{{repo_id}}/test_reports" },
          "docs": "Lists test reports for a repository."
        },
        {
          "info": { "name": "Get a test report", "type": "http" },
          "http": { "method": "GET", "url": "https://api.codeclimate.com/v1/repos/{{repo_id}}/test_reports/{{test_report_id}}" },
          "docs": "Returns a single test report."
        },
        {
          "info": { "name": "List test file reports", "type": "http" },
          "http": { "method": "GET", "url": "https://api.codeclimate.com/v1/repos/{{repo_id}}/test_reports/{{test_report_id}}/test_file_reports" },
          "docs": "Lists per-file test coverage reports for a test report."
        },
        {
          "info": { "name": "Create a batch of test file reports", "type": "http" },
          "http": {
            "method": "POST",
            "url": "https://api.codeclimate.com/v1/repos/{{repo_id}}/test_reports/{{test_report_id}}/test_file_reports/batch",
            "body": { "type": "json", "data": "{\"data\":[{\"type\":\"test_file_reports\",\"attributes\":{\"path\":\"lib/example.rb\",\"covered_percent\":87.5}}]}" }
          },
          "docs": "Uploads a batch of up to 500 source-file coverage records."
        }
      ]
    }
  ]
}
