ABF is currently being migrated to new servers. Pull requests should be working.

Read data REST API


ABF read data REST API

This describes the resources that make up the official Rosa ABF API. If you have any problems or requests please contact support.

Note: This API is in a beta state. Breaking changes may occur.

All of the urls in this manual have the same tail: .json. Because the default format is JSON

1. Projects

1.1. Project data

This request will return you all needed data of requested project into JSON format.

URL: /api/v1/projects/:id.json

TYPE: GET

PARAMS: * :id - identifier of current project

RESPONSE:

{
  "project":
    {
      "id": <resource id>,
      "name": <name>,
      "created_at": <created at date and time>,
      "updated_at" <updated at date and time>,
      "visibility": <visibility (open/hidden)>,
      "description": <description>,
      "ancestry": <project ancestry>,
      "has_issues": <true if issues enabled>,
      "has_wiki": <true if wiki enabled>,
      "default_branch": <git branch used by default>,
      "is_package": <true if project is package>,
      "average_build_time": <average build time for this project>,
      "owner": {
        "id": <parent owner id>,
        "name": <parent owner name>,
        "url": <url to owner profile>
      },
      "repositories": [
        {
          "id": <repository for package storage id>, 
          "name": <repository for package storage name>,
          "url":  <path to repository data page>,
          "platform": {
            "id": <repository platform id>, 
            "name": <repository platform name>,
            "url": <path to repository platform data page>
          }
        },
        ....
      ],
      "url": <url to build list page>
    }
}

EXAMPLE:

{
  "project":
  {
    "id":4661,
    "name":"hwinfo",
    "created_at":"2011-09-05T14:33:25Z",
    "updated_at":"2012-02-29T18:16:02Z",
    "visibility":"open",
    "description":"asfsafafsfasf fas fasfsa fas  fasfa s",
    "ancestry":null,
    "has_issues":true,
    "has_wiki":false,
    "default_branch":"master",
    "is_package":true,
    "average_build_time":0,
    "owner":{
      "id":4,
      "name":"Yaroslav Garkin",
      "type":"User",
      "url":"/users/4.json"
    },
    "repositories": [
      {
        "id": 1, 
        "name": "main",
        "url":  "/api/v1/repositories/1.json",
        "platform": {
          "id": 1, 
          "name": "mdv_main",
          "url": "/api/v1/platforms/1.json"
        }
      },
      {
        "id": 3, 
        "name": "main",
        "url":  "/api/v1/repositories/3.json",
        "platform": {
          "id": 3, 
          "name": "warpc_personal",
          "url": "/api/v1/platforms/3.json"
        }
      }
    ],
  },
  "url":"/api/v1/projects/4661.json"}
}

1.2. Project id get by name and owner

This request will return you all needed data about projects list into JSON format and also you can filter them by name.

URL: /api/v1/projects/getid.json?name=:projectname&owner=:owner_name

TYPE: GET

PARAMETERS:

  • project_name - project name
  • owner_name - project owner name

REQUEST EXAMPLES:

/api/v1/projects/get_id.json?name=rails&owner=warpc

RESPONSE:

{
  "project":
    {
      "id": <resource id>,
      "name": <name>,
      "visibility": <visibility (open/hidden)>,
      "owner": {
        "id": <owner id>,
        "name": <owner name>,
        "url": <url to owner profile>
      },
      "url": <url to project data page>
    }
}

EXAMPLE:

{
  "project":
    {
      "id":4661,
      "name":"hwinfo",
      "visibility":"open",
      "owner":{
        "id":4,
        "name":"Yaroslav Garkin",
        "type":"User",
        "url":"/users/4.json"
      },
      "url":"/api/v1/projects/4661.json"
    }
}

2. Repository

2.1. Repository data

This request will return you all needed data about repositories list into JSON format.

URL: /api/v1/repositories/:id.json

PARAMS: * :id - identifier of current project

TYPE: GET

RESPONSE:

{
  "repository":
    {
      "id": <resource id>,
      "name": <name>,
      "created_at": <created at date and time>,
      "updated_at": <updated at date and time>,
      "description": <description>,
      "platform": {
        "id": <platform id>,
        "name": <platform name>,
        "url": <url to platform>
      },
      "url": <url to platform page>
    },
  "url": <url to platforms list page>
}

EXAMPLE:

{
  "repository":
    {
      "id":30,
      "name":"main",
      "platform":{
        "id":41,
        "name":"my_personal",
        "url":"/api/v1/platforms/41.json"
      },
    },
  "url":"/api/v1/repositories/30.json"
}

3. Platform

3.1. Platform data

This request will return you all needed data about platforms list into JSON format.

URL: /api/v1/platforms/:id.json

PARAMS: * :id - identifier of current project

TYPE: GET

RESPONSE:

{
  "id": <platform id>,
  "name": <platform name>,
  "description": <platform description>,
  "parent_platform_id": <parent platform id>,
  "created_at": <platform created at>,
  "updated_at": <platform updated_at>,
  "released": <platform released>,
  "visibility": <platform visibility>,
  "platform_type": <platform type>,
  "distrib_type": <platform distribution type>,
  "owner": {
    "id": <owner id>,
    "name": <owner name>,
    "type": <owner type>,
    "url": <owner data path>
  },
  "repositories": [
    {
      "id": <repository for package storage id>, 
      "name": <repository for package storage name>,
      "url":  <path to repository data page>
    }
    ...
  ],
  "url": <platform path>
}

EXAMPLE:

{
  "id": 1,
  "name": "mdv_main",
  "description": "mdv_main",
  "parent_platform_id": null,
  "created_at": 2012-05-09 11:26:46 UTC ,
  "updated_at": "2012-06-09 11:26:46 UTC ",
  "released": <platform released>,
  "visibility": "open",
  "platform_type": "main",
  "distrib_type": "mdv",
  "owner": {
    "id":5,
    "name":"Timothy Bobrov",
    "type":"User",
    "url":"/users/5.json"
  },
  "repositories": [
    {
      "id": 1, 
      "name": "main",
      "url":  "/api/v1/repositories/1.json"
    },
    {
      "id": 2, 
      "name": "release",
      "url":  "/api/v1/repositories/2.json"
    }
  ],
  "url": "/api/v1/platforms/1.json"
}

3.2. Platform list

This request will return you all needed data about platform into JSON format.

URL: /api/v1/platforms.json

TYPE: GET

PARAMETERS:

  • type - filter platforms by type (main/personal). Also you can don't set the type to get all of the platforms

REQUEST EXAMPLES:

/api/v1/platforms.json?type=main
/api/v1/platforms.json?type=personal
/api/v1/platforms.json

RESPONSE:

{
  "platforms":[
    {
      "id": <platform id>,
      "name": <platform name>,
      "platform_type": <platform type>,
      "visibility": <platform visibility (hidden/open)>,
      "owner":{
        "id": <owner id>,
        "name": <owner name>,
        "type": <owner type>,
        "url": <path to owner data>
      },
      "url": <path to platform data>
    },
    ...
  ]
}

EXAMPLE:

{
  "platforms":[
    {
      "id":26,
      "name":"fucktest",
      "platform_type":"mail",
      "visibility":"hidden",
      "owner":{
        "id":5,
        "name":"Timothy Bobrov1",
        "type":"User",
        "url":"/users/5.json"
      },
      "url":"/api/v1/platforms/26.json"
    },
    {
      "id":17,
      "name":"aaa",
      "platform_type":"main",
      "visibility":"hidden",
      "owner":{
        "id":5,
        "name":"Timothy Bobrov",
        "type":"User",
        "url":"/timothy_bobrov.json"
      },
      "url":"/api/v1/platforms/17.json"
    },
    {
      "id":18,
      "name":"timothy_tsvetkov",
      "platform_type":"main",
      "visibility":"hidden",
      "owner":{
        "id":4,
        "name":"Yaroslav Garkin",
        "type":"User",
        "url":"/users/4.json"
      },
    "url":"/api/v1/platforms/18.json"
    },
  ],"url":"/api/v1/platforms.json"
}

4. Architectures list

This request will return you all needed data about posible architectures into JSON format.

URL: /api/v1/arches.json

TYPE: GET

RESPONSE:

{
  "architectures": [
    {
      "id": <architecture identifier>,
      "name": <architecture name>
    },
    ...
  ]

RESPONSE EXAMPLE:

{
  "architectures": [
    {
      "id": 1,
      "name": "x86_64"
    },
    {
      "id": 2,
      "name": "i586"
    },
    ...
  ]

Last edited by warpc