Vridlo/api/vridlo.rpms

vridlo.rpms
It allows accessing to a list of rpms, which are presented in the system. Do not poll this method more than once an hour. Added into API v1.0. It implements operation on the Rpm structure.

GET:/v1/rpms.json
Returns a list of rpms, which are presented in the system. Do not poll this method more than once an hour. Added into API v1.0.

Authentication
This method requires NO authentication.

Arguments
NOTE: Arguments can be provided as arguments along with headers fields.

Number of items to return per page. If this argument is omitted, it defaults to 10. The maximum allowed value is 50. The page of results to return. If this argument is omitted, it defaults to 1. Unique slug of the RPM. Name of the RPM, which is unique among the name group. Epoch number of the rpm build. Version of the rpm build. Usually is is represented as a number. Release of the rpm build. Usually is is represented as a number. Architecture slug name of the rpm build. Must be presented in the system. It represents slug link to Arch structure. Rpm is built at time. Slug name of the RPM builder, represents User structure. Represents a slug string of the group identifier, which the rpm belongs to. Sha of rpm file containment. Size of the rpm file. Slug of the source RPM. Must be presented and valid if arch is not src, or be blank if arch is src.
 * per_page is natural optional
 * page is natural optional
 * slug is string optional
 * name is string optional
 * epoch is natural optional
 * version is string optional
 * release is string optional
 * arch is string optional
 * built_at is string optional
 * builder_slug is string optional
 * group_slug is string optional
 * sha is string optional
 * size is string optional
 * src_slug is string optional

Example Request Url
GET:/v1/rpms.json?name=/ruby/

Example Good Response
[   {       "slug": "ruby-1:2.5.5-alt1-1286691010", "name": "ruby", "epoch": "1", "version": "2.5.5", "release": "alt1", "arch": "i586", "built_at": "10.10.10 10:10:10", "group_slug": "development", "sha": "4a01982354f6d7cab8d9275e43dc0e4329b1d307", "size": "100000", "builder_slug": "builder", "src_slug": "ruby-1:2.5.5-alt1-1286691009", "descriptions_count": 2, },   {       "slug": "ruby-1:2.5.5-alt1-1286691009", "name": "ruby", "epoch": "1", "version": "2.5.5", "release": "alt1", "arch": "src", "built_at": "10.10.2010 10:10:09", "group_slug": "development", "sha": "4a01982354f6d7cab8d9275e43dc0e4329b1d307", "size": "100000", "builder_slug": "builder", "descriptions_count": 3, }, ]

Return Codes
The resource list is accessible. Returned data responds to the current state of the resource list, and reading the list is finished.
 * 200 (OK)

The resource list is accessible. Returned data responds to the current state of the resource list, and reading the list is NOT finished yet.
 * 206 (Partial Content)

The resource list is accessible. But data can't be returned since range provided don't match the list boundaries.
 * 416 (Range Not Satisfiable)

SSL is required to access the Vridlo API.
 * 422.3 (SSL is required)

The requested service is temporarily unavailable.
 * 500 (Service currently unavailable)

POST:/v1/rpms.json
Creates the rpm specified by URI-parameter using the set of properties passed as form data or get parameter array, and returns state of the created record as JSON.

Authentication
This method requires write authentication with write permission to rpm model.

Arguments
Name of the RPM, which is unique among the name group. Can be renamed with a notification. Epoch number of the rpm build. Version of the rpm build. Usually is is represented as a number. Release of the rpm build. Usually is is represented as a number. Architecture slug name of the rpm build. Must be presented in the system. It represents slug link to Arch structure. Rpm is built at time. Slug name of the RPM builder, represents User structure. Represents a slug string of the group identifier, which the rpm belongs to. Sha of rpm file containment. Size of the rpm file. Slug of the source RPM. Must be presented and valid if arch is not src, or be blank if arch is src. Array of descriptions of the rpm, text of which is stored in encoding specified by cp field, and cpis autodetected or inferred from encoding RPM field. It represents Lorem structure.
 * name is string optional
 * epoch is natural optional
 * version is string mandatory
 * release is string mandatory
 * arch is string mandatory
 * built_at is string mandatory
 * builder_slug is string mandatory
 * group_slug is string mandatory
 * sha is string mandatory
 * size is string mandatory
 * src_slug is string optional
 * descriptions is Lorem array optional

Example Request Url
POST:/v1/rpms.json?name=ruby<...>

Example Request Form
POST:/v1/rpms.json DATA: {   "name": "ruby", "epoch": "1", "version": "2.5.5", "release": "alt1", "arch": "src", "built_at": "10.10.2010 10:10:10", "group_slug": "development", "md5": "236abd7880b4577f2b9470c09fee79d6", "sha": "4a01982354f6d7cab8d9275e43dc0e4329b1d307", "size": "100000", "builder_slug": "builder", "repo_status": "skip", "spec": "spec flow....", "descriptions": [ {         text: "ruby package", language: "en_US.UTF8", },      {          text: "руби пакет", language: "ru_RU.UTF8", },   ], }

Example Good Response
Good response with created record:

{   "slug": "ruby-1:2.5.5-alt1-1286691010", "name": "ruby", "epoch": "1", "version": "2.5.5", "release": "alt1", "arch": "src", "built_at": "10.10.2010 10:10:10", "group_slug": "development", "md5": "236abd7880b4577f2b9470c09fee79d6", "sha": "4a01982354f6d7cab8d9275e43dc0e4329b1d307", "size": "100000", "builder_slug": "builder", "repo_status": "skip", "descriptions_count: 2, }

Example Bad Response
Error response 422:

{  "error_code": 3, "message": "Error text according the active language", }

Return Codes
The resource wasn't found, and was created. Returned data responds to the current state of the resource.
 * 200 (OK)

SSL is required to access the Vridlo API.
 * 422.3 (SSL is required)

The incoming data is invalid. See details for help.
 * 422.5 (Invalid incoming data)

The record with provided slug is not found.
 * 404 (Not Found)

The Internal Server Error has occurred.
 * 500 (Internal Server Error)

GET:/v1/rpms/ .json
Gets properties of the rpm specified by URI-parameter, and returns then as JSON. Do not poll this method more than once an hour.

Authentication
This method requires NO authentication.

Inline Arguments
Unique slug of the RPM.
 * slug is string optional

Arguments
This method requires NO arguments.

Example Request Url
GET:/v1/rpms/ruby-1:2.5.5-alt1-1286691010.json

Example Good Response
Good response with created record:

{   "slug": "ruby-1:2.5.5-alt1-1286691010", "name": "ruby", "epoch": "1", "version": "2.5.5", "release": "alt1", "arch": "src", "built_at": "10.10.2010 10:10:10", "group_id": 100, "md5": "236abd7880b4577f2b9470c09fee79d6", "sha": "4a01982354f6d7cab8d9275e43dc0e4329b1d307", "size": "100000", "builder_id": 1000, "repo_status": "skip", "descriptions_count: 2, }

Example Bad Response
Error response 422:

{  "error_code": 3, "message": "Error text according the active language", }

Return Codes
The resource was found and is accessible. Returned data responds to the current state of the resource.
 * 200 (OK)

SSL is required to access the Vridlo API.
 * 422.3 (SSL is required)

The record with provided slug is not found.
 * 404 (Not Found)

The Internal Server Error has occurred.
 * 500 (Internal Server Error)

DELETE:/v1/rpms/ .json
Destroys the rpm specified by URI-parameter, and returns state of the destroyed record as JSON.

Authentication
This method requires write authentication with write permission to rpm model.

Inline Arguments
Unique slug of the RPM.
 * slug is string optional

Arguments
This method requires NO arguments.

Example Request Url
DELETE:/v1/rpms/ruby-1:2.5.5-alt1-1286691010.json

Example Good Response
Good response with created record:

{   "slug": "ruby-1:2.5.5-alt1-1286691010", "name": "ruby", "epoch": "1", "version": "2.5.5", "release": "alt1", "arch": "src", "built_at": "10.10.2010 10:10:10", "group_id": 100, "md5": "236abd7880b4577f2b9470c09fee79d6", "sha": "4a01982354f6d7cab8d9275e43dc0e4329b1d307", "size": "100000", "builder_id": 1000, "repo_status": "skip", "descriptions_count: 2, }

Example Bad Response
Error response 422:

{  "error_code": 3, "message": "Error text according the active language", }

Return Codes
The resource was found and is accessible, and successfully destroyed. Returned data responds to the state of the destroyed resource.
 * 200 (OK)

SSL is required to access the Vridlo API.
 * 422.3 (SSL is required)

The record with provided slug is not found.
 * 404 (Not Found)

The Internal Server Error has occurred.
 * 500 (Internal Server Error)