Vridlo/api/vridlo.rpms: Difference between revisions

From ALT Linux Wiki
(Created page with "== vridlo.rpm.slug == This allows accessing to the specified rpm record by <slug> URI-parameter. Added into API v1.0. === Path === /v1/rpms/<slug> === Methods === ==== PO...")
 
No edit summary
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
== vridlo.rpm.slug ==
== vridlo.rpms ==


This allows accessing to the specified rpm record by <slug> URI-parameter. Added into API v1.0.
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 [[Vridlo/types/Rpm|Rpm]] structure.


=== Path ===
=== GET:/v1/rpms.json ===


/v1/rpms/<slug>
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.


=== Methods ===
==== Authentication ====


==== POST ====
This method requires NO authentication.


Creates the rpm specified by <slug> URI-parameter using the set of properties passed as form data or get parameter array, and returns state of the created record as JSON.
==== Arguments ====


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


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


===== Arguments =====
==== Examples ====
===== Example Request Url =====


* name (Mandatory)
  GET:/v1/rpms.json?name=/ruby/
  Name of the rpm.
* epoch (Optoinal)
Name of the rpm.
* version (Mandatory)
Name of the rpm.
* release (Mandatory)
Name of the rpm.
* arch (Mandatory)
Name of the rpm.
* built_at (Mandatory)
Name of the rpm.
* group_id (Mandatory)
Group Id which the rpm is belong to. Must be valid.
* sha (Mandatory)
Sha of rpm file. Must be valid.
* size (Mandatory)
Size of the rpm.
* builder_id (Mandatory)
Id of the builder. Must be valid.
* description (Optional)
Description of the rpm.
* src_id (Optional)
Id of the source repo. Must be valid if arch is not "src", or blank if arch is "src".
* repo_status (Optional)
Status of validation the package by a repocop.


===== Example Response =====
===== Example Good Response =====
 
Good response with created record:


  [
  [
  {
    {
  "name": "ruby",
      "slug": "ruby-1:2.5.5-alt1-1286691010",
  "epoch": "1",
      "name": "ruby",
  "version": "2.5.5",
      "epoch": "1",
  "release": "alt1",
      "version": "2.5.5",
  "arch": "src",
      "release": "alt1",
  "built_at": "10.10.10 10:10:10",
      "arch": "i586",
  "description": "ruby package",
      "built_at": "10.10.10 10:10:10",
  "group_id": 100,
      "group_slug": "development",
  "md5": "236abd7880b4577f2b9470c09fee79d6",
      "sha": "4a01982354f6d7cab8d9275e43dc0e4329b1d307",
  "sha": "4a01982354f6d7cab8d9275e43dc0e4329b1d307",
      "size": "100000",
  "size": "100000",
      "builder_slug": "builder",
  "builder_id": 1000,
      "src_slug": "ruby-1:2.5.5-alt1-1286691009",
  "src_id": 100000,
      "descriptions_count": 2,
  "repo_status": "skip",
    },
  }
    {
      "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,
    },
  ]
  ]


Error response ''423'':
===== Return Codes =====


[
* '''200''' (''OK'')
  {
  The resource list is accessible. Returned data responds to the current state of the resource list, and reading the list is finished.
  "error_code": 3
  }
  ]


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


* '''200''' (''OK'')
* '''416''' (''Range Not Satisfiable'')
  The resource wasn't found, and was created. Returned data responds to the current state of the resource.
  The resource list is accessible. But data can't be returned since range provided don't match the list boundaries.


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


* '''422.5''' (''Invalid incoming data'')
* '''500''' (''Service currently unavailable'')
  The incoming data is invalid. See details for help.
  The requested service is temporarily unavailable.
 
=== POST:/v1/rpms.json ===
 
Creates the rpm specified by <slug> 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 ====


* '''404''' (''Not Found'')
This method requires write authentication with write permission to rpm model.
The record with provided slug is not found.


* '''500''' (''Internal Server Error'')
==== Arguments ====
The Internal Server Error has occurred.


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


Gets properties of the rpm specified by <slug> URI-parameter, and returns then as JSON. Do not poll this method more than once an hour.
==== Examples ====
===== Example Request Url =====


===== Authentication =====
POST:/v1/rpms.json?name=ruby<...>


This method requires NO authentication.
===== Example Request Form =====


===== Arguments =====
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",
      },
    ],
}


This method requires NO arguments.
===== Example Good Response =====


===== Example Response =====
Good response with created record:


Good response:
{
    "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 =====
  {
  "name": "ruby",
  "epoch": "1",
  "version": "2.5.5",
  "release": "alt1",
  "arch": "src",
  "built_at": "10.10.10 10:10:10",
  "description": "ruby package",
  "group_id": 100,
  "group_name": "Development/Ruby",
  "md5": "236abd7880b4577f2b9470c09fee79d6",
  "sha": "4a01982354f6d7cab8d9275e43dc0e4329b1d307",
  "size": "100000",
  "builder_name": "Ruby Builder Bot",
  "builder_id": 1000,
  "src_id": 100000,
  "repo_status": "skip",
  }
]


Error response ''423'':
Error response ''422'':


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


===== Return Codes =====
==== Return Codes ====


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


* '''422.3''' (''SSL is required'')
* '''422.3''' (''SSL is required'')
  SSL is required to access the Vridlo API.
  SSL is required to access the Vridlo API.
* '''422.5''' (''Invalid incoming data'')
The incoming data is invalid. See details for help.


* '''404''' (''Not Found'')
* '''404''' (''Not Found'')
Line 153: Line 219:
  The Internal Server Error has occurred.
  The Internal Server Error has occurred.


==== PUT/PATCH ====
=== GET:/v1/rpms/<slug>.json ===


Sets one or many properties of the rpm specified by <slug> URI-parameter, and returns updated state as JSON.
Gets properties of the rpm specified by <slug> URI-parameter, and returns then as JSON. Do not poll this method more than once an hour.


===== Authentication =====
==== Authentication ====


This method requires write authentication with write permission to rpm model.
This method requires NO authentication.
 
==== Inline Arguments ====
 
* '''slug''' is ''string '''optional'''''
Unique slug of the RPM.
 
==== Arguments ====
 
This method requires NO arguments.


===== Arguments =====
==== Examples ====
* name (Mandatory)
===== Example Request Url =====
Name of the rpm.
* epoch (Optoinal)
Name of the rpm.
* version (Mandatory)
Name of the rpm.
* release (Mandatory)
Name of the rpm.
* arch (Mandatory)
Name of the rpm.
* built_at (Mandatory)
Name of the rpm.
* group_id (Mandatory)
Group Id which the rpm is belong to. Must be valid.
* sha (Mandatory)
Sha of rpm file. Must be valid.
* size (Mandatory)
Size of the rpm.
* builder_id (Mandatory)
Id of the builder. Must be valid.
* description (Optional)
Description of the rpm.
* src_id (Optional)
Id of the source repo. Must be valid if arch is not "src", or blank if arch is "src".
* repo_status (Optional)
Status of validation the package by a repocop.


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


PUT:/v1/rpms/ca?name=Core_Assembler
===== Example Good Response =====


===== Example Response =====
Good response with created record:


Good response:
{
    "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 =====
  {
  "name": "ruby",
  "epoch": "1",
  "version": "2.5.5",
  "release": "alt1",
  "arch": "src",
  "built_at": "10.10.10 10:10:10",
  "description": "ruby package",
  "group_id": 100,
  "md5": "236abd7880b4577f2b9470c09fee79d6",
  "sha": "4a01982354f6d7cab8d9275e43dc0e4329b1d307",
  "size": "100000",
  "builder_id": 1000,
  "src_id": 100000,
  "repo_status": "skip",
  }
]


Error response ''423'':
Error response ''422'':


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


===== Return Codes =====
==== Return Codes ====


* '''200''' (''OK'')
* '''200''' (''OK'')
  The resource was found and is accessible. Changes were made on the resource successfully. Returned data responds to the current state of the resource.
  The resource was found and is accessible. Returned data responds to the current state of the resource.
 
* '''204''' (''No Content'')
The resource was found and is accessible. But no changes were made on the resource.


* '''422.3''' (''SSL is required'')
* '''422.3''' (''SSL is required'')
  SSL is required to access the Vridlo API.
  SSL is required to access the Vridlo API.
* '''422.5''' (''Invalid incoming data'')
The incoming data is invalid. See details for help.


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


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


==== DELETE ====
=== DELETE:/v1/rpms/<slug>.json ===


Destroys the rpm specified by <slug> URI-parameter, and returns state of the destroyed record as JSON.
Destroys the rpm specified by <slug> URI-parameter, and returns state of the destroyed record as JSON.


===== Authentication =====
==== Authentication ====


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


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


This method requires NO arguments.
This method requires NO arguments.


===== Example Response =====
==== Examples ====
===== Example Request Url =====


Good response returning deleted record:
DELETE:/v1/rpms/ruby-1:2.5.5-alt1-1286691010.json


  [
===== Example Good Response =====
  {
 
  "name": "ruby",
Good response with created record:
  "epoch": "1",
 
  "version": "2.5.5",
  {
  "release": "alt1",
    "slug": "ruby-1:2.5.5-alt1-1286691010",
  "arch": "src",
    "name": "ruby",
  "built_at": "10.10.10 10:10:10",
    "epoch": "1",
  "description": "ruby package",
    "version": "2.5.5",
  "group_id": 100,
    "release": "alt1",
  "group_name": "Development/Ruby",
    "arch": "src",
  "md5": "236abd7880b4577f2b9470c09fee79d6",
    "built_at": "10.10.2010 10:10:10",
  "sha": "4a01982354f6d7cab8d9275e43dc0e4329b1d307",
    "group_id": 100,
  "size": "100000",
    "md5": "236abd7880b4577f2b9470c09fee79d6",
  "builder_name": "Ruby Builder Bot",
    "sha": "4a01982354f6d7cab8d9275e43dc0e4329b1d307",
  "builder_id": 1000,
    "size": "100000",
  "src_id": 100000,
    "builder_id": 1000,
  "repo_status": "skip",
    "repo_status": "skip",
  }
    "descriptions_count: 2,
]
}
 
===== Example Bad Response =====


Error response ''423'':
Error response ''422'':


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


===== Return Codes =====
==== Return Codes ====


* '''200''' (''OK'')
* '''200''' (''OK'')

Latest revision as of 17:00, 4 December 2019

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

Examples

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
  • 200 (OK)
The resource list is accessible. Returned data responds to the current state of the resource list, and reading the list is finished.
  • 206 (Partial Content)
The resource list is accessible. Returned data responds to the current state of the resource list, and reading the list is NOT finished yet.
  • 416 (Range Not Satisfiable)
The resource list is accessible. But data can't be returned since range provided don't match the list boundaries.
  • 422.3 (SSL is required)
SSL is required to access the Vridlo API.
  • 500 (Service currently unavailable)
The requested service is temporarily unavailable.

POST:/v1/rpms.json

Creates the rpm specified by <slug> 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 is string optional
Name of the RPM, which is unique among the name group. Can be renamed with a notification.
  • epoch is natural optional
Epoch number of the rpm build.
  • version is string mandatory
Version of the rpm build. Usually is is represented as a number.
  • release is string mandatory
Release of the rpm build. Usually is is represented as a number.
  • arch is string mandatory
Architecture slug name of the rpm build. Must be presented in the system. It represents slug link to Arch structure.
  • built_at is string mandatory
Rpm is built at time.
  • builder_slug is string mandatory
Slug name of the RPM builder, represents User structure.
  • group_slug is string mandatory
Represents a slug string of the group identifier, which the rpm belongs to.
  • sha is string mandatory
Sha of rpm file containment.
  • size is string mandatory
Size of the rpm file.
  • src_slug is string optional
Slug of the source RPM. Must be presented and valid if arch is not src, or be blank if arch is src.
  • descriptions is Lorem array optional
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.

Examples

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

  • 200 (OK)
The resource wasn't found, and was created. Returned data responds to the current state of the resource.
  • 422.3 (SSL is required)
SSL is required to access the Vridlo API.
  • 422.5 (Invalid incoming data)
The incoming data is invalid. See details for help.
  • 404 (Not Found)
The record with provided slug is not found.
  • 500 (Internal Server Error)
The Internal Server Error has occurred.

GET:/v1/rpms/<slug>.json

Gets properties of the rpm specified by <slug> 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

  • slug is string optional
Unique slug of the RPM.

Arguments

This method requires NO arguments.

Examples

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

  • 200 (OK)
The resource was found and is accessible. Returned data responds to the current state of the resource.
  • 422.3 (SSL is required)
SSL is required to access the Vridlo API.
  • 404 (Not Found)
The record with provided slug is not found.
  • 500 (Internal Server Error)
The Internal Server Error has occurred.

DELETE:/v1/rpms/<slug>.json

Destroys the rpm specified by <slug> 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

  • slug is string optional
Unique slug of the RPM.

Arguments

This method requires NO arguments.

Examples

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

  • 200 (OK)
The resource was found and is accessible, and successfully destroyed. Returned data responds to the state of the destroyed resource.
  • 422.3 (SSL is required)
SSL is required to access the Vridlo API.
  • 404 (Not Found)
The record with provided slug is not found.
  • 500 (Internal Server Error)
The Internal Server Error has occurred.