Search API

Search around the ABF

GET /api/v1/search.json

Input:

type:
Optional String type of search results (projects/users/groups/platforms).
query:
Optional String search term.

Request

{
  "query": "search term",
  "type": "type of search results"
}

Request example:

{
  "query": "test",
  "type": "users"
}

Response:

{
  "results": [
    {
      "users": [
        {
          "id": "user id",
          "uname": "user uname",
          "name": "user name",
          "url": "api user path"
        }
      ],
      "groups": [
        {
          "id": "group id",
          "uname": "group uname",
          "url": "api group path"
        }
      ],
      "projects": [
        {
          "id": "project id",
          "name": "project name",
          "visibility": "visibility (open/hidden)",
          "fullname": "project fullname",
          "url": "url to project data page",
          "git_url": "path to project git",
          "ssh_url": "path to project git over ssh",
          "maintainer": {
            "id": "user id",
            "uname": "user uname",
            "name": "user name",
            "url": "api user path",
            "email": "user email"
          }
        }
      ],
      "platforms": [
        {
          "id": "platform id",
          "name": "platform name",
          "visibility": "platform visibility",
          "platform_type": "platform type",
          "url": "platform data page path"
        }
      ]
    }
  ],
  "url": "path to search request"
}

Example:

{
  "results": {
    "users": [
      {
        "id": 1,
        "name": "Ivan Aivazovsky",
        "uname": "ivan_aivazovsky",
        "url": "/api/v1/users/1.json"
      }
    ],
    "groups": [
      {
        "id": 1,
        "uname": "rosa",
        "url": "/api/v1/groups/1.json"
      }
    ],
    "projects": [
      {
        "id": 666,
        "name": "evil_tools",
        "visibility": "open",
        "fullname": "abf/evil_tools",
        "url": "/api/v1/projects/666.json",
        "git_url": "https:/ivan@abf.rosalinux.ru/jaroslav_garkin/hwinfo.git",
        "ssh_url": "git@abf.rosalinux.ru:jaroslav_garkin/hwinfo.git",
        "maintainer": {
          "id": 1,
          "name": "Ivan Aivazovsky",
          "uname": "ivan_aivazovsky",
          "url": "/api/v1/users/1.json",
          "email": "ivan.aivazovsky@email.ru "
        }
      }
    ],
    "platforms": [
      {
        "id": 1,
        "name": "rosa2012",
        "visibility": "open",
        "platform_type": "main",
        "url": "/api/v1/platforms/1.json"
      }
    ]
  },
  "url": "/api/v1/search.json"
}