Back to top

Packebian API

Markdown formatted description.

Login & Logout

Login

Login
POST/login{?type}

A auth token is given to the API that will create a custom JWT token that can then be used to access the API. Currently, only auth0 token of the domain packebian.eu.auth0.com. token can be used.

Example URI

POST BASE_URL/login?type=auth0
URI Parameters
HideShow
type
string (required) Example: auth0

Type of given auth token

Request  with body
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "token": "eyJ[...]sdg"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "token": {
      "type": "string",
      "description": "auth0 token (JWT)"
    }
  }
}
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwidXNlcm5hbWUiOiJubmljaG9scyIsImVtYWlsIjoibmFpZGFAbmljaG9scy5uZXQiLCJmaXJzdG5hbWUiOiJOYWlkYSIsImxhc3RuYW1lIjoiTklDSE9MUyIsInVzZXJsZXZlbCI6MiwiaWF0IjoxNDg5NTI4NDQzLCJleHAiOjEwMTQ4OTUyODQ0MiwiYXVkIjoicGFja2ViaWFuLmNvbSIsImlzcyI6InBhY2tlYmlhbi5jb20ifQ.kknw9_kGuB5l0c1lYuwchdMclnudYpYr2tnO00JOMkw"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "token": {
      "type": "string",
      "description": "Json Web Token (JWT)"
    }
  }
}

Logout

Logout
POST/logout

Example URI

POST BASE_URL/logout
Request  with body
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwidXNlcm5hbWUiOiJubmljaG9scyIsImVtYWlsIjoibmFpZGFAbmljaG9scy5uZXQiLCJmaXJzdG5hbWUiOiJOYWlkYSIsImxhc3RuYW1lIjoiTklDSE9MUyIsInVzZXJsZXZlbCI6MiwiaWF0IjoxNDg5NTI4NDQzLCJleHAiOjEwMTQ4OTUyODQ0MiwiYXVkIjoicGFja2ViaWFuLmNvbSIsImlzcyI6InBhY2tlYmlhbi5jb20ifQ.kknw9_kGuB5l0c1lYuwchdMclnudYpYr2tnO00JOMkw"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "token": {
      "type": "string",
      "description": "Json Web Token (JWT)"
    }
  }
}
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8

User

Retrieve all Users

Retrieve all Users
GET/users/

Example URI

GET BASE_URL/users/
Request
HideShow
Headers
Content-Type: application/json; charset=utf-8
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwidXNlcm5hbWUiOiJubmljaG9scyIsImVtYWlsIjoibmFpZGFAbmljaG9scy5uZXQiLCJmaXJzdG5hbWUiOiJOYWlkYSIsImxhc3RuYW1lIjoiTklDSE9MUyIsInVzZXJsZXZlbCI6MiwiaWF0IjoxNDg5NTI4NDQzLCJleHAiOjEwMTQ4OTUyODQ0MiwiYXVkIjoicGFja2ViaWFuLmNvbSIsImlzcyI6InBhY2tlYmlhbi5jb20ifQ.kknw9_kGuB5l0c1lYuwchdMclnudYpYr2tnO00JOMkw
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
[
  {
    "id": 1,
    "username": "nnichols",
    "email": "naida@nichols.net",
    "firstname": "Naida",
    "lastname": "NICHOLS",
    "userlevel": 2,
    "createdAt": "2017-02-27T08:39:54.459Z",
    "updatedAt": "2017-02-27T08:39:54.459Z"
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}
Response  500
HideShow
Headers
Content-Type: application/json; charset=utf-8

Create a User

Create a User
POST/users/

Example URI

POST BASE_URL/users/
Request  with body
HideShow
Headers
Content-Type: application/json; charset=utf-8
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwidXNlcm5hbWUiOiJubmljaG9scyIsImVtYWlsIjoibmFpZGFAbmljaG9scy5uZXQiLCJmaXJzdG5hbWUiOiJOYWlkYSIsImxhc3RuYW1lIjoiTklDSE9MUyIsInVzZXJsZXZlbCI6MiwiaWF0IjoxNDg5NTI4NDQzLCJleHAiOjEwMTQ4OTUyODQ0MiwiYXVkIjoicGFja2ViaWFuLmNvbSIsImlzcyI6InBhY2tlYmlhbi5jb20ifQ.kknw9_kGuB5l0c1lYuwchdMclnudYpYr2tnO00JOMkw
Body
{
  "username": "nnichols",
  "email": "naida@nichols.net",
  "firstname": "Naida",
  "lastname": "NICHOLS",
  "userlevel": 2
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "username": {
      "type": "string",
      "description": "username of User"
    },
    "email": {
      "type": "string",
      "description": "email of User"
    },
    "firstname": {
      "type": "string",
      "description": "first name of User"
    },
    "lastname": {
      "type": "string",
      "description": "last name of User"
    },
    "userlevel": {
      "type": "number",
      "description": "permissions level of User"
    }
  },
  "required": [
    "username",
    "email"
  ]
}
Response  201
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "id": 1,
  "username": "nnichols",
  "email": "naida@nichols.net",
  "firstname": "Naida",
  "lastname": "NICHOLS",
  "userlevel": 2,
  "createdAt": "2017-02-27T08:39:54.459Z",
  "updatedAt": "2017-02-27T08:39:54.459Z"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "number",
      "description": "User unique identifier"
    },
    "username": {
      "type": "string",
      "description": "username of User"
    },
    "email": {
      "type": "string",
      "description": "email of User"
    },
    "firstname": {
      "type": "string",
      "description": "first name of User"
    },
    "lastname": {
      "type": "string",
      "description": "last name of User"
    },
    "userlevel": {
      "type": "number",
      "description": "permissions level of User"
    },
    "createdAt": {
      "type": "string",
      "description": "date/time (ISO8601 format) of creation of the User"
    },
    "updatedAt": {
      "type": "string",
      "description": "date/time (ISO8601 format) of last modification of the User"
    }
  },
  "required": [
    "username",
    "email",
    "createdAt",
    "updatedAt"
  ]
}
Response  500
HideShow
Headers
Content-Type: application/json; charset=utf-8

Retrieve a User

Retrieve a User
GET/users/{id}

Example URI

GET BASE_URL/users/1
URI Parameters
HideShow
id
integer (required) Example: 1

The user ID

Request
HideShow
Headers
Content-Type: application/json; charset=utf-8
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwidXNlcm5hbWUiOiJubmljaG9scyIsImVtYWlsIjoibmFpZGFAbmljaG9scy5uZXQiLCJmaXJzdG5hbWUiOiJOYWlkYSIsImxhc3RuYW1lIjoiTklDSE9MUyIsInVzZXJsZXZlbCI6MiwiaWF0IjoxNDg5NTI4NDQzLCJleHAiOjEwMTQ4OTUyODQ0MiwiYXVkIjoicGFja2ViaWFuLmNvbSIsImlzcyI6InBhY2tlYmlhbi5jb20ifQ.kknw9_kGuB5l0c1lYuwchdMclnudYpYr2tnO00JOMkw
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "id": 1,
  "username": "nnichols",
  "email": "naida@nichols.net",
  "firstname": "Naida",
  "lastname": "NICHOLS",
  "userlevel": 2,
  "createdAt": "2017-02-27T08:39:54.459Z",
  "updatedAt": "2017-02-27T08:39:54.459Z"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "number",
      "description": "User unique identifier"
    },
    "username": {
      "type": "string",
      "description": "username of User"
    },
    "email": {
      "type": "string",
      "description": "email of User"
    },
    "firstname": {
      "type": "string",
      "description": "first name of User"
    },
    "lastname": {
      "type": "string",
      "description": "last name of User"
    },
    "userlevel": {
      "type": "number",
      "description": "permissions level of User"
    },
    "createdAt": {
      "type": "string",
      "description": "date/time (ISO8601 format) of creation of the User"
    },
    "updatedAt": {
      "type": "string",
      "description": "date/time (ISO8601 format) of last modification of the User"
    }
  },
  "required": [
    "username",
    "email",
    "createdAt",
    "updatedAt"
  ]
}
Response  404
HideShow
Headers
Content-Type: application/json; charset=utf-8

Update a User

Update a User
PUT/users/{id}

Every field is optionnal. Here is an example of a request updating the firstname and lastname of a User.

Example URI

PUT BASE_URL/users/1
URI Parameters
HideShow
id
integer (required) Example: 1

The user ID

Request
HideShow
Headers
Content-Type: application/json; charset=utf-8
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwidXNlcm5hbWUiOiJubmljaG9scyIsImVtYWlsIjoibmFpZGFAbmljaG9scy5uZXQiLCJmaXJzdG5hbWUiOiJOYWlkYSIsImxhc3RuYW1lIjoiTklDSE9MUyIsInVzZXJsZXZlbCI6MiwiaWF0IjoxNDg5NTI4NDQzLCJleHAiOjEwMTQ4OTUyODQ0MiwiYXVkIjoicGFja2ViaWFuLmNvbSIsImlzcyI6InBhY2tlYmlhbi5jb20ifQ.kknw9_kGuB5l0c1lYuwchdMclnudYpYr2tnO00JOMkw
Body
{
  "firstname": "Naidä",
  "lastname": "NICHÖL"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "firstname": {
      "type": "string",
      "description": "first name of User"
    },
    "lastname": {
      "type": "string",
      "description": "last name of User"
    }
  }
}
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "id": 1,
  "username": "nnichols",
  "email": "naida@nichols.net",
  "firstname": "Naida",
  "lastname": "NICHOLS",
  "userlevel": 2,
  "createdAt": "2017-02-27T08:39:54.459Z",
  "updatedAt": "2017-02-27T08:39:54.459Z"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "number",
      "description": "User unique identifier"
    },
    "username": {
      "type": "string",
      "description": "username of User"
    },
    "email": {
      "type": "string",
      "description": "email of User"
    },
    "firstname": {
      "type": "string",
      "description": "first name of User"
    },
    "lastname": {
      "type": "string",
      "description": "last name of User"
    },
    "userlevel": {
      "type": "number",
      "description": "permissions level of User"
    },
    "createdAt": {
      "type": "string",
      "description": "date/time (ISO8601 format) of creation of the User"
    },
    "updatedAt": {
      "type": "string",
      "description": "date/time (ISO8601 format) of last modification of the User"
    }
  },
  "required": [
    "username",
    "email",
    "createdAt",
    "updatedAt"
  ]
}
Response  404
HideShow
Headers
Content-Type: application/json; charset=utf-8
Response  500
HideShow
Headers
Content-Type: application/json; charset=utf-8

Delete a User

Delete a User
DELETE/users/{id}

Example URI

DELETE BASE_URL/users/1
URI Parameters
HideShow
id
integer (required) Example: 1

The user ID

Request
HideShow
Headers
Content-Type: application/json; charset=utf-8
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwidXNlcm5hbWUiOiJubmljaG9scyIsImVtYWlsIjoibmFpZGFAbmljaG9scy5uZXQiLCJmaXJzdG5hbWUiOiJOYWlkYSIsImxhc3RuYW1lIjoiTklDSE9MUyIsInVzZXJsZXZlbCI6MiwiaWF0IjoxNDg5NTI4NDQzLCJleHAiOjEwMTQ4OTUyODQ0MiwiYXVkIjoicGFja2ViaWFuLmNvbSIsImlzcyI6InBhY2tlYmlhbi5jb20ifQ.kknw9_kGuB5l0c1lYuwchdMclnudYpYr2tnO00JOMkw
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "id": 1,
  "username": "nnichols",
  "email": "naida@nichols.net",
  "firstname": "Naida",
  "lastname": "NICHOLS",
  "userlevel": 2,
  "createdAt": "2017-02-27T08:39:54.459Z",
  "updatedAt": "2017-02-27T08:39:54.459Z"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "number",
      "description": "User unique identifier"
    },
    "username": {
      "type": "string",
      "description": "username of User"
    },
    "email": {
      "type": "string",
      "description": "email of User"
    },
    "firstname": {
      "type": "string",
      "description": "first name of User"
    },
    "lastname": {
      "type": "string",
      "description": "last name of User"
    },
    "userlevel": {
      "type": "number",
      "description": "permissions level of User"
    },
    "createdAt": {
      "type": "string",
      "description": "date/time (ISO8601 format) of creation of the User"
    },
    "updatedAt": {
      "type": "string",
      "description": "date/time (ISO8601 format) of last modification of the User"
    }
  },
  "required": [
    "username",
    "email",
    "createdAt",
    "updatedAt"
  ]
}
Response  404
HideShow
Headers
Content-Type: application/json; charset=utf-8

Ticket

Retrieve all Tickets

Retrieve all Tickets
GET/tickets/

Example URI

GET BASE_URL/tickets/
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
[
  {
    "id": 1,
    "name": "processim",
    "maintainer": "naida@nichols.net",
    "architecture": "all",
    "major": "RICM3",
    "class": "ALM",
    "description": "Code you processor",
    "dependencies": "gcc",
    "versions": [
      "1.0",
      "1.1",
      "1.2"
    ],
    "status": 1,
    "results": {
      "upvotes": 5,
      "downvotes": 0,
      "neutrals": 0
    },
    "createdAt": "2017-02-27T08:39:58.641Z",
    "updatedAt": "2017-02-27T08:39:58.641Z",
    "user": {
      "username": "nnichols",
      "email": "naida@nichols.net",
      "firstname": "Naida",
      "lastname": "NICHOLS",
      "userlevel": 2,
      "createdAt": "2017-02-27T08:39:54.459Z",
      "updatedAt": "2017-02-27T08:39:54.459Z"
    }
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}
Response  500
HideShow
Headers
Content-Type: application/json; charset=utf-8

Create a Ticket

Create a Ticket
POST/tickets/

Example URI

POST BASE_URL/tickets/
Request  with body
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "user": 1,
  "name": "processim",
  "maintainer": "naida@nichols.net",
  "architecture": "all",
  "major": "RICM3",
  "class": "ALM",
  "description": "Code you processor",
  "dependencies": "gcc",
  "versions": [
    "1.0",
    "1.1",
    "1.2"
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "user": {
      "type": "number",
      "description": "User unique identifier"
    },
    "name": {
      "type": "string",
      "description": "Ticket's name"
    },
    "maintainer": {
      "type": "string",
      "description": "Ticket's maintainer"
    },
    "architecture": {
      "type": "string",
      "description": "Ticket's architecture (Package's architecture)"
    },
    "major": {
      "type": "string",
      "description": "Major for which this ticket was created (Package's major)"
    },
    "class": {
      "type": "string",
      "description": "Class for which this ticket was created (Package's class)"
    },
    "description": {
      "type": "string",
      "description": "Ticket's description (Package's description)"
    },
    "dependencies": {
      "type": "string",
      "description": "Ticket's dependencies (Package's dependencies)"
    },
    "versions": {
      "type": "array",
      "description": "Ticket's versions (Package's versions)"
    }
  },
  "required": [
    "name",
    "maintainer",
    "architecture"
  ]
}
Response  201
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "id": 1,
  "user": 1,
  "name": "processim",
  "maintainer": "naida@nichols.net",
  "architecture": "all",
  "major": "RICM3",
  "class": "ALM",
  "description": "Code you processor",
  "dependencies": "gcc",
  "versions": [
    "1.0",
    "1.1",
    "1.2"
  ],
  "status": 1,
  "results": {
    "upvotes": 5,
    "downvotes": 0,
    "neutrals": 0
  },
  "createdAt": "2017-02-27T08:39:58.641Z",
  "updatedAt": "2017-02-27T08:39:58.641Z"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "number",
      "description": "Ticket unique identifier"
    },
    "user": {
      "type": "number",
      "description": "User unique identifier"
    },
    "name": {
      "type": "string",
      "description": "Ticket's name"
    },
    "maintainer": {
      "type": "string",
      "description": "Ticket's maintainer"
    },
    "architecture": {
      "type": "string",
      "description": "Ticket's architecture (Package's architecture)"
    },
    "major": {
      "type": "string",
      "description": "Major for which this ticket was created (Package's major)"
    },
    "class": {
      "type": "string",
      "description": "Class for which this ticket was created (Package's class)"
    },
    "description": {
      "type": "string",
      "description": "Ticket's description (Package's description)"
    },
    "dependencies": {
      "type": "string",
      "description": "Ticket's dependencies (Package's dependencies)"
    },
    "versions": {
      "type": "array",
      "description": "Ticket's versions (Package's versions)"
    },
    "status": {
      "type": "number",
      "description": "Ticket's status. -1 if refused, 1 if accepted, 0 otherwise."
    },
    "results": {
      "type": "object",
      "properties": {
        "upvotes": {
          "type": "number",
          "description": "Number of upvotes"
        },
        "downvotes": {
          "type": "number",
          "description": "Number of downvotes"
        },
        "neutrals": {
          "type": "number",
          "description": "Number of neutral votes"
        }
      },
      "required": [
        "upvotes",
        "downvotes",
        "neutrals"
      ],
      "description": "Results of the votes on the ticket"
    },
    "createdAt": {
      "type": "string",
      "description": "date/time (ISO8601 format) of creation of the Ticket"
    },
    "updatedAt": {
      "type": "string",
      "description": "date/time (ISO8601 format) of last modification of the Ticket"
    }
  },
  "required": [
    "name",
    "maintainer",
    "architecture",
    "status",
    "results",
    "createdAt",
    "updatedAt"
  ]
}
Response  500
HideShow
Headers
Content-Type: application/json; charset=utf-8

Retrieve a Ticket

Retrieve a Ticket
GET/tickets/{id}

Example URI

GET BASE_URL/tickets/1
URI Parameters
HideShow
id
integer (required) Example: 1

The ticket ID

Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "id": 1,
  "name": "processim",
  "maintainer": "naida@nichols.net",
  "architecture": "all",
  "major": "RICM3",
  "class": "ALM",
  "description": "Code you processor",
  "dependencies": "gcc",
  "versions": [
    "1.0",
    "1.1",
    "1.2"
  ],
  "status": 1,
  "results": {
    "upvotes": 5,
    "downvotes": 0,
    "neutrals": 0
  },
  "createdAt": "2017-02-27T08:39:58.641Z",
  "updatedAt": "2017-02-27T08:39:58.641Z",
  "user": {
    "username": "nnichols",
    "email": "naida@nichols.net",
    "firstname": "Naida",
    "lastname": "NICHOLS",
    "userlevel": 2,
    "createdAt": "2017-02-27T08:39:54.459Z",
    "updatedAt": "2017-02-27T08:39:54.459Z"
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "number",
      "description": "Ticket unique identifier"
    },
    "name": {
      "type": "string",
      "description": "Ticket's name"
    },
    "maintainer": {
      "type": "string",
      "description": "Ticket's maintainer"
    },
    "architecture": {
      "type": "string",
      "description": "Ticket's architecture (Package's architecture)"
    },
    "major": {
      "type": "string",
      "description": "Major for which this ticket was created (Package's major)"
    },
    "class": {
      "type": "string",
      "description": "Class for which this ticket was created (Package's class)"
    },
    "description": {
      "type": "string",
      "description": "Ticket's description (Package's description)"
    },
    "dependencies": {
      "type": "string",
      "description": "Ticket's dependencies (Package's dependencies)"
    },
    "versions": {
      "type": "array",
      "description": "Ticket's versions (Package's versions)"
    },
    "status": {
      "type": "number",
      "description": "Ticket's status. -1 if refused, 1 if accepted, 0 otherwise."
    },
    "results": {
      "type": "object",
      "properties": {
        "upvotes": {
          "type": "number",
          "description": "Number of upvotes"
        },
        "downvotes": {
          "type": "number",
          "description": "Number of downvotes"
        },
        "neutrals": {
          "type": "number",
          "description": "Number of neutral votes"
        }
      },
      "required": [
        "upvotes",
        "downvotes",
        "neutrals"
      ],
      "description": "Results of the votes on the ticket"
    },
    "createdAt": {
      "type": "string",
      "description": "date/time (ISO8601 format) of creation of the Ticket"
    },
    "updatedAt": {
      "type": "string",
      "description": "date/time (ISO8601 format) of last modification of the Ticket"
    },
    "user": {
      "type": "object",
      "properties": {
        "username": {
          "type": "string",
          "description": "username of User"
        },
        "email": {
          "type": "string",
          "description": "email of User"
        },
        "firstname": {
          "type": "string",
          "description": "first name of User"
        },
        "lastname": {
          "type": "string",
          "description": "last name of User"
        },
        "userlevel": {
          "type": "number",
          "description": "permissions level of User"
        },
        "createdAt": {
          "type": "string",
          "description": "date/time (ISO8601 format) of creation of the User"
        },
        "updatedAt": {
          "type": "string",
          "description": "date/time (ISO8601 format) of last modification of the User"
        }
      },
      "required": [
        "username",
        "email",
        "createdAt",
        "updatedAt"
      ],
      "description": "Creator of ticket"
    }
  },
  "required": [
    "name",
    "maintainer",
    "architecture",
    "status",
    "results",
    "createdAt",
    "updatedAt",
    "user"
  ]
}
Response  404
HideShow
Headers
Content-Type: application/json; charset=utf-8

Update a Ticket

Update a Ticket
PUT/tickets/{id}

Every field is optionnal. Here is an example of a request updating the major and class of a Ticket.

Example URI

PUT BASE_URL/tickets/1
URI Parameters
HideShow
id
integer (required) Example: 1

The ticket ID

Request
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "major": "RICM",
  "class": "ALM2"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "major": {
      "type": "string",
      "description": "Major for which this ticket was created (major of package)"
    },
    "class": {
      "type": "string",
      "description": "Class for which this ticket was created (class of package)"
    }
  }
}
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "id": 1,
  "name": "processim",
  "maintainer": "naida@nichols.net",
  "architecture": "all",
  "major": "RICM3",
  "class": "ALM",
  "description": "Code you processor",
  "dependencies": "gcc",
  "versions": [
    "1.0",
    "1.1",
    "1.2"
  ],
  "status": 1,
  "results": {
    "upvotes": 5,
    "downvotes": 0,
    "neutrals": 0
  },
  "createdAt": "2017-02-27T08:39:58.641Z",
  "updatedAt": "2017-02-27T08:39:58.641Z",
  "user": {
    "username": "nnichols",
    "email": "naida@nichols.net",
    "firstname": "Naida",
    "lastname": "NICHOLS",
    "userlevel": 2,
    "createdAt": "2017-02-27T08:39:54.459Z",
    "updatedAt": "2017-02-27T08:39:54.459Z"
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "number",
      "description": "Ticket unique identifier"
    },
    "name": {
      "type": "string",
      "description": "Ticket's name"
    },
    "maintainer": {
      "type": "string",
      "description": "Ticket's maintainer"
    },
    "architecture": {
      "type": "string",
      "description": "Ticket's architecture (Package's architecture)"
    },
    "major": {
      "type": "string",
      "description": "Major for which this ticket was created (Package's major)"
    },
    "class": {
      "type": "string",
      "description": "Class for which this ticket was created (Package's class)"
    },
    "description": {
      "type": "string",
      "description": "Ticket's description (Package's description)"
    },
    "dependencies": {
      "type": "string",
      "description": "Ticket's dependencies (Package's dependencies)"
    },
    "versions": {
      "type": "array",
      "description": "Ticket's versions (Package's versions)"
    },
    "status": {
      "type": "number",
      "description": "Ticket's status. -1 if refused, 1 if accepted, 0 otherwise."
    },
    "results": {
      "type": "object",
      "properties": {
        "upvotes": {
          "type": "number",
          "description": "Number of upvotes"
        },
        "downvotes": {
          "type": "number",
          "description": "Number of downvotes"
        },
        "neutrals": {
          "type": "number",
          "description": "Number of neutral votes"
        }
      },
      "required": [
        "upvotes",
        "downvotes",
        "neutrals"
      ],
      "description": "Results of the votes on the ticket"
    },
    "createdAt": {
      "type": "string",
      "description": "date/time (ISO8601 format) of creation of the Ticket"
    },
    "updatedAt": {
      "type": "string",
      "description": "date/time (ISO8601 format) of last modification of the Ticket"
    },
    "user": {
      "type": "object",
      "properties": {
        "username": {
          "type": "string",
          "description": "username of User"
        },
        "email": {
          "type": "string",
          "description": "email of User"
        },
        "firstname": {
          "type": "string",
          "description": "first name of User"
        },
        "lastname": {
          "type": "string",
          "description": "last name of User"
        },
        "userlevel": {
          "type": "number",
          "description": "permissions level of User"
        },
        "createdAt": {
          "type": "string",
          "description": "date/time (ISO8601 format) of creation of the User"
        },
        "updatedAt": {
          "type": "string",
          "description": "date/time (ISO8601 format) of last modification of the User"
        }
      },
      "required": [
        "username",
        "email",
        "createdAt",
        "updatedAt"
      ],
      "description": "Creator of ticket"
    }
  },
  "required": [
    "name",
    "maintainer",
    "architecture",
    "status",
    "results",
    "createdAt",
    "updatedAt",
    "user"
  ]
}
Response  404
HideShow
Headers
Content-Type: application/json; charset=utf-8
Response  500
HideShow
Headers
Content-Type: application/json; charset=utf-8

Delete a Ticket

Delete a Ticket
DELETE/tickets/{id}

Example URI

DELETE BASE_URL/tickets/1
URI Parameters
HideShow
id
integer (required) Example: 1

The ticket ID

Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "id": 1,
  "name": "processim",
  "maintainer": "naida@nichols.net",
  "architecture": "all",
  "major": "RICM3",
  "class": "ALM",
  "description": "Code you processor",
  "dependencies": "gcc",
  "versions": [
    "1.0",
    "1.1",
    "1.2"
  ],
  "status": 1,
  "results": {
    "upvotes": 5,
    "downvotes": 0,
    "neutrals": 0
  },
  "createdAt": "2017-02-27T08:39:58.641Z",
  "updatedAt": "2017-02-27T08:39:58.641Z",
  "user": {
    "username": "nnichols",
    "email": "naida@nichols.net",
    "firstname": "Naida",
    "lastname": "NICHOLS",
    "userlevel": 2,
    "createdAt": "2017-02-27T08:39:54.459Z",
    "updatedAt": "2017-02-27T08:39:54.459Z"
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "number",
      "description": "Ticket unique identifier"
    },
    "name": {
      "type": "string",
      "description": "Ticket's name"
    },
    "maintainer": {
      "type": "string",
      "description": "Ticket's maintainer"
    },
    "architecture": {
      "type": "string",
      "description": "Ticket's architecture (Package's architecture)"
    },
    "major": {
      "type": "string",
      "description": "Major for which this ticket was created (Package's major)"
    },
    "class": {
      "type": "string",
      "description": "Class for which this ticket was created (Package's class)"
    },
    "description": {
      "type": "string",
      "description": "Ticket's description (Package's description)"
    },
    "dependencies": {
      "type": "string",
      "description": "Ticket's dependencies (Package's dependencies)"
    },
    "versions": {
      "type": "array",
      "description": "Ticket's versions (Package's versions)"
    },
    "status": {
      "type": "number",
      "description": "Ticket's status. -1 if refused, 1 if accepted, 0 otherwise."
    },
    "results": {
      "type": "object",
      "properties": {
        "upvotes": {
          "type": "number",
          "description": "Number of upvotes"
        },
        "downvotes": {
          "type": "number",
          "description": "Number of downvotes"
        },
        "neutrals": {
          "type": "number",
          "description": "Number of neutral votes"
        }
      },
      "required": [
        "upvotes",
        "downvotes",
        "neutrals"
      ],
      "description": "Results of the votes on the ticket"
    },
    "createdAt": {
      "type": "string",
      "description": "date/time (ISO8601 format) of creation of the Ticket"
    },
    "updatedAt": {
      "type": "string",
      "description": "date/time (ISO8601 format) of last modification of the Ticket"
    },
    "user": {
      "type": "object",
      "properties": {
        "username": {
          "type": "string",
          "description": "username of User"
        },
        "email": {
          "type": "string",
          "description": "email of User"
        },
        "firstname": {
          "type": "string",
          "description": "first name of User"
        },
        "lastname": {
          "type": "string",
          "description": "last name of User"
        },
        "userlevel": {
          "type": "number",
          "description": "permissions level of User"
        },
        "createdAt": {
          "type": "string",
          "description": "date/time (ISO8601 format) of creation of the User"
        },
        "updatedAt": {
          "type": "string",
          "description": "date/time (ISO8601 format) of last modification of the User"
        }
      },
      "required": [
        "username",
        "email",
        "createdAt",
        "updatedAt"
      ],
      "description": "Creator of ticket"
    }
  },
  "required": [
    "name",
    "maintainer",
    "architecture",
    "status",
    "results",
    "createdAt",
    "updatedAt",
    "user"
  ]
}
Response  404
HideShow
Headers
Content-Type: application/json; charset=utf-8

Vote

Retrieve all Votes

Retrieve all Votes
GET/votes/

Example URI

GET BASE_URL/votes/
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
[
  {
    "id": 1,
    "user": 1,
    "ticket": 1,
    "vote": 1,
    "createdAt": "2017-02-27T08:40:01.551Z",
    "updatedAt": "2017-02-27T08:40:01.551Z"
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}
Response  500
HideShow
Headers
Content-Type: application/json; charset=utf-8

Create a Vote

Create a Vote
POST/votes/

Example URI

POST BASE_URL/votes/
Request  with body
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "user": 1,
  "ticket": 1,
  "vote": 1
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "user": {
      "type": "number",
      "description": "User unique identifier"
    },
    "ticket": {
      "type": "number",
      "description": "Ticket unique identifier"
    },
    "vote": {
      "type": "number",
      "description": "Vote on the ticket. -1 if downvote, 1 if upvote, 0 if neutral."
    }
  },
  "required": [
    "vote"
  ]
}
Response  201
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "id": 1,
  "user": 1,
  "ticket": 1,
  "vote": 1,
  "createdAt": "2017-02-27T08:40:01.551Z",
  "updatedAt": "2017-02-27T08:40:01.551Z"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "number",
      "description": "Vote unique identifier"
    },
    "user": {
      "type": "number",
      "description": "User unique identifier"
    },
    "ticket": {
      "type": "number",
      "description": "Ticket unique identifier"
    },
    "vote": {
      "type": "number",
      "description": "Vote on the ticket. -1 if downvote, 1 if upvote, 0 if neutral."
    },
    "createdAt": {
      "type": "string",
      "description": "date/time (ISO8601 format) of creation of the Ticket"
    },
    "updatedAt": {
      "type": "string",
      "description": "date/time (ISO8601 format) of last modification of the Ticket"
    }
  },
  "required": [
    "id",
    "vote",
    "createdAt",
    "updatedAt"
  ]
}
Response  500
HideShow
Headers
Content-Type: application/json; charset=utf-8

Retrieve a Vote

Retrieve a Vote
GET/votes/{id}

Example URI

GET BASE_URL/votes/1
URI Parameters
HideShow
id
integer (required) Example: 1

The vote ID

Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "id": 1,
  "user": 1,
  "ticket": 1,
  "vote": 1,
  "createdAt": "2017-02-27T08:40:01.551Z",
  "updatedAt": "2017-02-27T08:40:01.551Z"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "number",
      "description": "Vote unique identifier"
    },
    "user": {
      "type": "number",
      "description": "User unique identifier"
    },
    "ticket": {
      "type": "number",
      "description": "Ticket unique identifier"
    },
    "vote": {
      "type": "number",
      "description": "Vote on the ticket. -1 if downvote, 1 if upvote, 0 if neutral."
    },
    "createdAt": {
      "type": "string",
      "description": "date/time (ISO8601 format) of creation of the Ticket"
    },
    "updatedAt": {
      "type": "string",
      "description": "date/time (ISO8601 format) of last modification of the Ticket"
    }
  },
  "required": [
    "id",
    "vote",
    "createdAt",
    "updatedAt"
  ]
}
Response  404
HideShow
Headers
Content-Type: application/json; charset=utf-8

Update a Vote

Update a Vote
PUT/votes/{id}

Every field is optionnal. Here is an example of a request updating the value of a Vote.

Example URI

PUT BASE_URL/votes/1
URI Parameters
HideShow
id
integer (required) Example: 1

The vote ID

Request
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "vote": -1
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "vote": {
      "type": "number",
      "description": "Vote on the ticket. -1 if downvote, 1 if upvote, 0 if neutral."
    }
  }
}
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "id": 1,
  "user": 1,
  "ticket": 1,
  "vote": 1,
  "createdAt": "2017-02-27T08:40:01.551Z",
  "updatedAt": "2017-02-27T08:40:01.551Z"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "number",
      "description": "Vote unique identifier"
    },
    "user": {
      "type": "number",
      "description": "User unique identifier"
    },
    "ticket": {
      "type": "number",
      "description": "Ticket unique identifier"
    },
    "vote": {
      "type": "number",
      "description": "Vote on the ticket. -1 if downvote, 1 if upvote, 0 if neutral."
    },
    "createdAt": {
      "type": "string",
      "description": "date/time (ISO8601 format) of creation of the Ticket"
    },
    "updatedAt": {
      "type": "string",
      "description": "date/time (ISO8601 format) of last modification of the Ticket"
    }
  },
  "required": [
    "id",
    "vote",
    "createdAt",
    "updatedAt"
  ]
}
Response  404
HideShow
Headers
Content-Type: application/json; charset=utf-8
Response  500
HideShow
Headers
Content-Type: application/json; charset=utf-8

Delete a Vote

Delete a Vote
DELETE/votes/{id}

Example URI

DELETE BASE_URL/votes/1
URI Parameters
HideShow
id
integer (required) Example: 1

The vote ID

Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "id": 1,
  "user": 1,
  "ticket": 1,
  "vote": 1,
  "createdAt": "2017-02-27T08:40:01.551Z",
  "updatedAt": "2017-02-27T08:40:01.551Z"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "number",
      "description": "Vote unique identifier"
    },
    "user": {
      "type": "number",
      "description": "User unique identifier"
    },
    "ticket": {
      "type": "number",
      "description": "Ticket unique identifier"
    },
    "vote": {
      "type": "number",
      "description": "Vote on the ticket. -1 if downvote, 1 if upvote, 0 if neutral."
    },
    "createdAt": {
      "type": "string",
      "description": "date/time (ISO8601 format) of creation of the Ticket"
    },
    "updatedAt": {
      "type": "string",
      "description": "date/time (ISO8601 format) of last modification of the Ticket"
    }
  },
  "required": [
    "id",
    "vote",
    "createdAt",
    "updatedAt"
  ]
}
Response  404
HideShow
Headers
Content-Type: application/json; charset=utf-8

Package

Retrieve all Packages

Retrieve all Packages
GET/packages/

Example URI

GET BASE_URL/packages/
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
[
  {
    "id": 1,
    "name": "processim",
    "maintainer": "naida@nichols.net",
    "architecture": "all",
    "major": "RICM3",
    "class": "ALM",
    "description": "Code you processor",
    "dependencies": "gcc",
    "versions": [
      "1.0",
      "1.1",
      "1.2"
    ],
    "createdAt": "2017-02-27T08:40:04.135Z",
    "updatedAt": "2017-02-27T08:40:04.135Z",
    "ticket": 1,
    "user": {
      "username": "nnichols",
      "email": "naida@nichols.net",
      "firstname": "Naida",
      "lastname": "NICHOLS",
      "userlevel": 2,
      "createdAt": "2017-02-27T08:39:54.459Z",
      "updatedAt": "2017-02-27T08:39:54.459Z"
    }
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}
Response  500
HideShow
Headers
Content-Type: application/json; charset=utf-8

Create a Package

Create a Package
POST/packages/

Example URI

POST BASE_URL/packages/
Request  with body
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "user": 1,
  "ticket": 1,
  "name": "processim",
  "maintainer": "naida@nichols.net",
  "architecture": "all",
  "major": "RICM3",
  "class": "ALM",
  "description": "Code you processor",
  "dependencies": "gcc",
  "versions": [
    "1.0",
    "1.1",
    "1.2"
  ]
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "user": {
      "type": "number",
      "description": "User unique identifier"
    },
    "ticket": {
      "type": "number",
      "description": "Ticket unique identifier"
    },
    "name": {
      "type": "string",
      "description": "Package's name"
    },
    "maintainer": {
      "type": "string",
      "description": "Package's maintainer"
    },
    "architecture": {
      "type": "string",
      "description": "Package's architecture"
    },
    "major": {
      "type": "string",
      "description": "Major for which this package was created"
    },
    "class": {
      "type": "string",
      "description": "Class for which this package was created"
    },
    "description": {
      "type": "string",
      "description": "Package's description"
    },
    "dependencies": {
      "type": "string",
      "description": "Package's dependencies"
    },
    "versions": {
      "type": "array",
      "description": "Package's versions"
    }
  },
  "required": [
    "name",
    "maintainer",
    "architecture"
  ]
}
Response  201
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "id": 1,
  "user": 1,
  "ticket": 1,
  "name": "processim",
  "maintainer": "naida@nichols.net",
  "architecture": "all",
  "major": "RICM3",
  "class": "ALM",
  "description": "Code you processor",
  "dependencies": "gcc",
  "versions": [
    "1.0",
    "1.1",
    "1.2"
  ],
  "createdAt": "2017-02-27T08:40:04.135Z",
  "updatedAt": "2017-02-27T08:40:04.135Z"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "number",
      "description": "Package unique identifier"
    },
    "user": {
      "type": "number",
      "description": "User unique identifier"
    },
    "ticket": {
      "type": "number",
      "description": "Ticket unique identifier"
    },
    "name": {
      "type": "string",
      "description": "Package's name"
    },
    "maintainer": {
      "type": "string",
      "description": "Package's maintainer"
    },
    "architecture": {
      "type": "string",
      "description": "Package's architecture"
    },
    "major": {
      "type": "string",
      "description": "Major for which this package was created"
    },
    "class": {
      "type": "string",
      "description": "Class for which this package was created"
    },
    "description": {
      "type": "string",
      "description": "Package's description"
    },
    "dependencies": {
      "type": "string",
      "description": "Package's dependencies"
    },
    "versions": {
      "type": "array",
      "description": "Package's versions"
    },
    "createdAt": {
      "type": "string",
      "description": "date/time (ISO8601 format) of creation of the Package"
    },
    "updatedAt": {
      "type": "string",
      "description": "date/time (ISO8601 format) of last modification of the Package"
    }
  },
  "required": [
    "name",
    "maintainer",
    "architecture",
    "createdAt",
    "updatedAt"
  ]
}
Response  500
HideShow
Headers
Content-Type: application/json; charset=utf-8

Retrieve a Package

Retrieve a Package
GET/packages/{id}

Example URI

GET BASE_URL/packages/1
URI Parameters
HideShow
id
integer (required) Example: 1

The package ID

Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "id": 1,
  "name": "processim",
  "maintainer": "naida@nichols.net",
  "architecture": "all",
  "major": "RICM3",
  "class": "ALM",
  "description": "Code you processor",
  "dependencies": "gcc",
  "versions": [
    "1.0",
    "1.1",
    "1.2"
  ],
  "createdAt": "2017-02-27T08:40:04.135Z",
  "updatedAt": "2017-02-27T08:40:04.135Z",
  "ticket": 1,
  "user": {
    "username": "nnichols",
    "email": "naida@nichols.net",
    "firstname": "Naida",
    "lastname": "NICHOLS",
    "userlevel": 2,
    "createdAt": "2017-02-27T08:39:54.459Z",
    "updatedAt": "2017-02-27T08:39:54.459Z"
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "number",
      "description": "Package unique identifier"
    },
    "name": {
      "type": "string",
      "description": "Package's name"
    },
    "maintainer": {
      "type": "string",
      "description": "Package's maintainer"
    },
    "architecture": {
      "type": "string",
      "description": "Package's architecture"
    },
    "major": {
      "type": "string",
      "description": "Major for which this package was created"
    },
    "class": {
      "type": "string",
      "description": "Class for which this package was created"
    },
    "description": {
      "type": "string",
      "description": "Package's description"
    },
    "dependencies": {
      "type": "string",
      "description": "Package's dependencies"
    },
    "versions": {
      "type": "array",
      "description": "Package's versions"
    },
    "createdAt": {
      "type": "string",
      "description": "date/time (ISO8601 format) of creation of the Package"
    },
    "updatedAt": {
      "type": "string",
      "description": "date/time (ISO8601 format) of last modification of the Package"
    },
    "ticket": {
      "type": "number",
      "description": "Ticket unique identifier"
    },
    "user": {
      "type": "object",
      "properties": {
        "username": {
          "type": "string",
          "description": "username of User"
        },
        "email": {
          "type": "string",
          "description": "email of User"
        },
        "firstname": {
          "type": "string",
          "description": "first name of User"
        },
        "lastname": {
          "type": "string",
          "description": "last name of User"
        },
        "userlevel": {
          "type": "number",
          "description": "permissions level of User"
        },
        "createdAt": {
          "type": "string",
          "description": "date/time (ISO8601 format) of creation of the User"
        },
        "updatedAt": {
          "type": "string",
          "description": "date/time (ISO8601 format) of last modification of the User"
        }
      },
      "required": [
        "username",
        "email",
        "createdAt",
        "updatedAt"
      ],
      "description": "Creator of package"
    }
  },
  "required": [
    "name",
    "maintainer",
    "architecture",
    "createdAt",
    "updatedAt",
    "user"
  ]
}
Response  404
HideShow
Headers
Content-Type: application/json; charset=utf-8

Update a Package

Update a Package
PUT/packages/{id}

Every field is optionnal. Here is an example of a request updating the class and major of a Package.

Example URI

PUT BASE_URL/packages/1
URI Parameters
HideShow
id
integer (required) Example: 1

The package ID

Request
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "major": "RICM",
  "class": "ALM2"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "major": {
      "type": "string",
      "description": "Major for which this package was created"
    },
    "class": {
      "type": "string",
      "description": "Class for which this package was created"
    }
  }
}
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "id": 1,
  "name": "processim",
  "maintainer": "naida@nichols.net",
  "architecture": "all",
  "major": "RICM3",
  "class": "ALM",
  "description": "Code you processor",
  "dependencies": "gcc",
  "versions": [
    "1.0",
    "1.1",
    "1.2"
  ],
  "createdAt": "2017-02-27T08:40:04.135Z",
  "updatedAt": "2017-02-27T08:40:04.135Z",
  "ticket": 1,
  "user": {
    "username": "nnichols",
    "email": "naida@nichols.net",
    "firstname": "Naida",
    "lastname": "NICHOLS",
    "userlevel": 2,
    "createdAt": "2017-02-27T08:39:54.459Z",
    "updatedAt": "2017-02-27T08:39:54.459Z"
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "number",
      "description": "Package unique identifier"
    },
    "name": {
      "type": "string",
      "description": "Package's name"
    },
    "maintainer": {
      "type": "string",
      "description": "Package's maintainer"
    },
    "architecture": {
      "type": "string",
      "description": "Package's architecture"
    },
    "major": {
      "type": "string",
      "description": "Major for which this package was created"
    },
    "class": {
      "type": "string",
      "description": "Class for which this package was created"
    },
    "description": {
      "type": "string",
      "description": "Package's description"
    },
    "dependencies": {
      "type": "string",
      "description": "Package's dependencies"
    },
    "versions": {
      "type": "array",
      "description": "Package's versions"
    },
    "createdAt": {
      "type": "string",
      "description": "date/time (ISO8601 format) of creation of the Package"
    },
    "updatedAt": {
      "type": "string",
      "description": "date/time (ISO8601 format) of last modification of the Package"
    },
    "ticket": {
      "type": "number",
      "description": "Ticket unique identifier"
    },
    "user": {
      "type": "object",
      "properties": {
        "username": {
          "type": "string",
          "description": "username of User"
        },
        "email": {
          "type": "string",
          "description": "email of User"
        },
        "firstname": {
          "type": "string",
          "description": "first name of User"
        },
        "lastname": {
          "type": "string",
          "description": "last name of User"
        },
        "userlevel": {
          "type": "number",
          "description": "permissions level of User"
        },
        "createdAt": {
          "type": "string",
          "description": "date/time (ISO8601 format) of creation of the User"
        },
        "updatedAt": {
          "type": "string",
          "description": "date/time (ISO8601 format) of last modification of the User"
        }
      },
      "required": [
        "username",
        "email",
        "createdAt",
        "updatedAt"
      ],
      "description": "Creator of package"
    }
  },
  "required": [
    "name",
    "maintainer",
    "architecture",
    "createdAt",
    "updatedAt",
    "user"
  ]
}
Response  404
HideShow
Headers
Content-Type: application/json; charset=utf-8
Response  500
HideShow
Headers
Content-Type: application/json; charset=utf-8

Delete a Package

Delete a Package
DELETE/packages/{id}

Example URI

DELETE BASE_URL/packages/1
URI Parameters
HideShow
id
integer (required) Example: 1

The package ID

Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "id": 1,
  "name": "processim",
  "maintainer": "naida@nichols.net",
  "architecture": "all",
  "major": "RICM3",
  "class": "ALM",
  "description": "Code you processor",
  "dependencies": "gcc",
  "versions": [
    "1.0",
    "1.1",
    "1.2"
  ],
  "createdAt": "2017-02-27T08:40:04.135Z",
  "updatedAt": "2017-02-27T08:40:04.135Z",
  "ticket": 1,
  "user": {
    "username": "nnichols",
    "email": "naida@nichols.net",
    "firstname": "Naida",
    "lastname": "NICHOLS",
    "userlevel": 2,
    "createdAt": "2017-02-27T08:39:54.459Z",
    "updatedAt": "2017-02-27T08:39:54.459Z"
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "number",
      "description": "Package unique identifier"
    },
    "name": {
      "type": "string",
      "description": "Package's name"
    },
    "maintainer": {
      "type": "string",
      "description": "Package's maintainer"
    },
    "architecture": {
      "type": "string",
      "description": "Package's architecture"
    },
    "major": {
      "type": "string",
      "description": "Major for which this package was created"
    },
    "class": {
      "type": "string",
      "description": "Class for which this package was created"
    },
    "description": {
      "type": "string",
      "description": "Package's description"
    },
    "dependencies": {
      "type": "string",
      "description": "Package's dependencies"
    },
    "versions": {
      "type": "array",
      "description": "Package's versions"
    },
    "createdAt": {
      "type": "string",
      "description": "date/time (ISO8601 format) of creation of the Package"
    },
    "updatedAt": {
      "type": "string",
      "description": "date/time (ISO8601 format) of last modification of the Package"
    },
    "ticket": {
      "type": "number",
      "description": "Ticket unique identifier"
    },
    "user": {
      "type": "object",
      "properties": {
        "username": {
          "type": "string",
          "description": "username of User"
        },
        "email": {
          "type": "string",
          "description": "email of User"
        },
        "firstname": {
          "type": "string",
          "description": "first name of User"
        },
        "lastname": {
          "type": "string",
          "description": "last name of User"
        },
        "userlevel": {
          "type": "number",
          "description": "permissions level of User"
        },
        "createdAt": {
          "type": "string",
          "description": "date/time (ISO8601 format) of creation of the User"
        },
        "updatedAt": {
          "type": "string",
          "description": "date/time (ISO8601 format) of last modification of the User"
        }
      },
      "required": [
        "username",
        "email",
        "createdAt",
        "updatedAt"
      ],
      "description": "Creator of package"
    }
  },
  "required": [
    "name",
    "maintainer",
    "architecture",
    "createdAt",
    "updatedAt",
    "user"
  ]
}
Response  404
HideShow
Headers
Content-Type: application/json; charset=utf-8

Build

Retrieve all Builds

Retrieve all Builds
GET/builds/

Example URI

GET BASE_URL/builds/
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
[
  {
    "id": 1,
    "package": 1,
    "version": "1.1",
    "result": "Pending",
    "createdAt": "2017-02-27T08:40:09.056Z",
    "updatedAt": "2017-02-27T08:40:09.056Z"
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}
Response  500
HideShow
Headers
Content-Type: application/json; charset=utf-8

Create a Build

Create a Build
POST/builds/

Example URI

POST BASE_URL/builds/
Request  with body
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "package": 1,
  "version": "1.1"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "package": {
      "type": "number",
      "description": "Package unique identifier"
    },
    "version": {
      "type": "string",
      "description": "Version of the package to build"
    }
  },
  "required": [
    "version"
  ]
}
Response  201
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "id": 1,
  "package": 1,
  "version": "1.1",
  "result": "Pending",
  "createdAt": "2017-02-27T08:40:09.056Z",
  "updatedAt": "2017-02-27T08:40:09.056Z"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "number",
      "description": "Build unique identifier"
    },
    "package": {
      "type": "number",
      "description": "Package unique identifier"
    },
    "version": {
      "type": "string",
      "description": "Version of the package to build"
    },
    "result": {
      "type": "string",
      "description": "Result of build"
    },
    "createdAt": {
      "type": "string",
      "description": "date/time (ISO8601 format) of creation of the Package"
    },
    "updatedAt": {
      "type": "string",
      "description": "date/time (ISO8601 format) of last modification of the Package"
    }
  },
  "required": [
    "version",
    "result",
    "createdAt",
    "updatedAt"
  ]
}
Response  500
HideShow
Headers
Content-Type: application/json; charset=utf-8

Retrieve a Build

Retrieve a Build
GET/builds/{id}

Example URI

GET BASE_URL/builds/1
URI Parameters
HideShow
id
integer (required) Example: 1

The build ID

Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "id": 1,
  "package": 1,
  "version": "1.1",
  "result": "Pending",
  "createdAt": "2017-02-27T08:40:09.056Z",
  "updatedAt": "2017-02-27T08:40:09.056Z"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "number",
      "description": "Build unique identifier"
    },
    "package": {
      "type": "number",
      "description": "Package unique identifier"
    },
    "version": {
      "type": "string",
      "description": "Version of the package to build"
    },
    "result": {
      "type": "string",
      "description": "Result of build"
    },
    "createdAt": {
      "type": "string",
      "description": "date/time (ISO8601 format) of creation of the Package"
    },
    "updatedAt": {
      "type": "string",
      "description": "date/time (ISO8601 format) of last modification of the Package"
    }
  },
  "required": [
    "version",
    "result",
    "createdAt",
    "updatedAt"
  ]
}
Response  404
HideShow
Headers
Content-Type: application/json; charset=utf-8

Update a Build

Update a Build
PUT/builds/{id}

Every field is optionnal. Here is an example of a request updating the results of a Build.

Example URI

PUT BASE_URL/builds/1
URI Parameters
HideShow
id
integer (required) Example: 1

The build ID

Request
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "result": "Failure"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "result": {
      "type": "string",
      "description": "Result of build"
    }
  }
}
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "id": 1,
  "package": 1,
  "version": "1.1",
  "result": "Pending",
  "createdAt": "2017-02-27T08:40:09.056Z",
  "updatedAt": "2017-02-27T08:40:09.056Z"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "number",
      "description": "Build unique identifier"
    },
    "package": {
      "type": "number",
      "description": "Package unique identifier"
    },
    "version": {
      "type": "string",
      "description": "Version of the package to build"
    },
    "result": {
      "type": "string",
      "description": "Result of build"
    },
    "createdAt": {
      "type": "string",
      "description": "date/time (ISO8601 format) of creation of the Package"
    },
    "updatedAt": {
      "type": "string",
      "description": "date/time (ISO8601 format) of last modification of the Package"
    }
  },
  "required": [
    "version",
    "result",
    "createdAt",
    "updatedAt"
  ]
}
Response  404
HideShow
Headers
Content-Type: application/json; charset=utf-8
Response  500
HideShow
Headers
Content-Type: application/json; charset=utf-8

Delete a Build

Delete a Build
DELETE/builds/{id}

Example URI

DELETE BASE_URL/builds/1
URI Parameters
HideShow
id
integer (required) Example: 1

The build ID

Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "id": 1,
  "package": 1,
  "version": "1.1",
  "result": "Pending",
  "createdAt": "2017-02-27T08:40:09.056Z",
  "updatedAt": "2017-02-27T08:40:09.056Z"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "number",
      "description": "Build unique identifier"
    },
    "package": {
      "type": "number",
      "description": "Package unique identifier"
    },
    "version": {
      "type": "string",
      "description": "Version of the package to build"
    },
    "result": {
      "type": "string",
      "description": "Result of build"
    },
    "createdAt": {
      "type": "string",
      "description": "date/time (ISO8601 format) of creation of the Package"
    },
    "updatedAt": {
      "type": "string",
      "description": "date/time (ISO8601 format) of last modification of the Package"
    }
  },
  "required": [
    "version",
    "result",
    "createdAt",
    "updatedAt"
  ]
}
Response  404
HideShow
Headers
Content-Type: application/json; charset=utf-8

Message

Retrieve all Messages

Retrieve all Messages
GET/messages/

Example URI

GET BASE_URL/messages/
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
[
  {
    "id": 1,
    "ticket": 1,
    "content": "Upvoted",
    "createdAt": "2017-02-27T08:40:06.359Z",
    "updatedAt": "2017-02-27T08:40:06.359Z",
    "user": {
      "username": "nnichols",
      "email": "naida@nichols.net",
      "firstname": "Naida",
      "lastname": "NICHOLS",
      "userlevel": 2,
      "createdAt": "2017-02-27T08:39:54.459Z",
      "updatedAt": "2017-02-27T08:39:54.459Z"
    }
  }
]
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "array"
}
Response  500
HideShow
Headers
Content-Type: application/json; charset=utf-8

Create a Message

Create a Message
POST/messages/

Example URI

POST BASE_URL/messages/
Request  with body
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "user": 1,
  "ticket": 1,
  "content": "Upvoted"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "user": {
      "type": "number",
      "description": "User unique identifier"
    },
    "ticket": {
      "type": "number",
      "description": "Ticket unique identifier"
    },
    "content": {
      "type": "string",
      "description": "Content of Message"
    }
  },
  "required": [
    "content"
  ]
}
Response  201
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "id": 1,
  "user": 1,
  "ticket": 1,
  "content": "Upvoted",
  "createdAt": "2017-02-27T08:40:06.359Z",
  "updatedAt": "2017-02-27T08:40:06.359Z"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "number",
      "description": "Message unique identifier"
    },
    "user": {
      "type": "number",
      "description": "User unique identifier"
    },
    "ticket": {
      "type": "number",
      "description": "Ticket unique identifier"
    },
    "content": {
      "type": "string",
      "description": "Content of Message"
    },
    "createdAt": {
      "type": "string",
      "description": "date/time (ISO8601 format) of creation of the Message"
    },
    "updatedAt": {
      "type": "string",
      "description": "date/time (ISO8601 format) of last modification of the Message"
    }
  },
  "required": [
    "content",
    "createdAt",
    "updatedAt"
  ]
}
Response  500
HideShow
Headers
Content-Type: application/json; charset=utf-8

Retrieve a Message

Retrieve a Message
GET/messages/{id}

Example URI

GET BASE_URL/messages/1
URI Parameters
HideShow
id
integer (required) Example: 1

The message ID

Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "id": 1,
  "ticket": 1,
  "content": "Upvoted",
  "createdAt": "2017-02-27T08:40:06.359Z",
  "updatedAt": "2017-02-27T08:40:06.359Z",
  "user": {
    "username": "nnichols",
    "email": "naida@nichols.net",
    "firstname": "Naida",
    "lastname": "NICHOLS",
    "userlevel": 2,
    "createdAt": "2017-02-27T08:39:54.459Z",
    "updatedAt": "2017-02-27T08:39:54.459Z"
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "number",
      "description": "Message unique identifier"
    },
    "ticket": {
      "type": "number",
      "description": "Ticket unique identifier"
    },
    "content": {
      "type": "string",
      "description": "Content of Message"
    },
    "createdAt": {
      "type": "string",
      "description": "date/time (ISO8601 format) of creation of the Message"
    },
    "updatedAt": {
      "type": "string",
      "description": "date/time (ISO8601 format) of last modification of the Message"
    },
    "user": {
      "type": "object",
      "properties": {
        "username": {
          "type": "string",
          "description": "username of User"
        },
        "email": {
          "type": "string",
          "description": "email of User"
        },
        "firstname": {
          "type": "string",
          "description": "first name of User"
        },
        "lastname": {
          "type": "string",
          "description": "last name of User"
        },
        "userlevel": {
          "type": "number",
          "description": "permissions level of User"
        },
        "createdAt": {
          "type": "string",
          "description": "date/time (ISO8601 format) of creation of the User"
        },
        "updatedAt": {
          "type": "string",
          "description": "date/time (ISO8601 format) of last modification of the User"
        }
      },
      "required": [
        "username",
        "email",
        "createdAt",
        "updatedAt"
      ],
      "description": "Creator of message"
    }
  },
  "required": [
    "content",
    "createdAt",
    "updatedAt",
    "user"
  ]
}
Response  404
HideShow
Headers
Content-Type: application/json; charset=utf-8

Update a Message

Update a Message
PUT/messages/{id}

Every field is optionnal. Here is an example of a request updating the content of a Message.

Example URI

PUT BASE_URL/messages/1
URI Parameters
HideShow
id
integer (required) Example: 1

The message ID

Request
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "content": "Upvoted !"
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "content": {
      "type": "string",
      "description": "Content of Message"
    }
  },
  "required": [
    "content"
  ]
}
Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "id": 1,
  "ticket": 1,
  "content": "Upvoted",
  "createdAt": "2017-02-27T08:40:06.359Z",
  "updatedAt": "2017-02-27T08:40:06.359Z",
  "user": {
    "username": "nnichols",
    "email": "naida@nichols.net",
    "firstname": "Naida",
    "lastname": "NICHOLS",
    "userlevel": 2,
    "createdAt": "2017-02-27T08:39:54.459Z",
    "updatedAt": "2017-02-27T08:39:54.459Z"
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "number",
      "description": "Message unique identifier"
    },
    "ticket": {
      "type": "number",
      "description": "Ticket unique identifier"
    },
    "content": {
      "type": "string",
      "description": "Content of Message"
    },
    "createdAt": {
      "type": "string",
      "description": "date/time (ISO8601 format) of creation of the Message"
    },
    "updatedAt": {
      "type": "string",
      "description": "date/time (ISO8601 format) of last modification of the Message"
    },
    "user": {
      "type": "object",
      "properties": {
        "username": {
          "type": "string",
          "description": "username of User"
        },
        "email": {
          "type": "string",
          "description": "email of User"
        },
        "firstname": {
          "type": "string",
          "description": "first name of User"
        },
        "lastname": {
          "type": "string",
          "description": "last name of User"
        },
        "userlevel": {
          "type": "number",
          "description": "permissions level of User"
        },
        "createdAt": {
          "type": "string",
          "description": "date/time (ISO8601 format) of creation of the User"
        },
        "updatedAt": {
          "type": "string",
          "description": "date/time (ISO8601 format) of last modification of the User"
        }
      },
      "required": [
        "username",
        "email",
        "createdAt",
        "updatedAt"
      ],
      "description": "Creator of message"
    }
  },
  "required": [
    "content",
    "createdAt",
    "updatedAt",
    "user"
  ]
}
Response  404
HideShow
Headers
Content-Type: application/json; charset=utf-8
Response  500
HideShow
Headers
Content-Type: application/json; charset=utf-8

Delete a Message

Delete a Message
DELETE/messages/{id}

Example URI

DELETE BASE_URL/messages/1
URI Parameters
HideShow
id
integer (required) Example: 1

The message ID

Response  200
HideShow
Headers
Content-Type: application/json; charset=utf-8
Body
{
  "id": 1,
  "ticket": 1,
  "content": "Upvoted",
  "createdAt": "2017-02-27T08:40:06.359Z",
  "updatedAt": "2017-02-27T08:40:06.359Z",
  "user": {
    "username": "nnichols",
    "email": "naida@nichols.net",
    "firstname": "Naida",
    "lastname": "NICHOLS",
    "userlevel": 2,
    "createdAt": "2017-02-27T08:39:54.459Z",
    "updatedAt": "2017-02-27T08:39:54.459Z"
  }
}
Schema
{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "type": "object",
  "properties": {
    "id": {
      "type": "number",
      "description": "Message unique identifier"
    },
    "ticket": {
      "type": "number",
      "description": "Ticket unique identifier"
    },
    "content": {
      "type": "string",
      "description": "Content of Message"
    },
    "createdAt": {
      "type": "string",
      "description": "date/time (ISO8601 format) of creation of the Message"
    },
    "updatedAt": {
      "type": "string",
      "description": "date/time (ISO8601 format) of last modification of the Message"
    },
    "user": {
      "type": "object",
      "properties": {
        "username": {
          "type": "string",
          "description": "username of User"
        },
        "email": {
          "type": "string",
          "description": "email of User"
        },
        "firstname": {
          "type": "string",
          "description": "first name of User"
        },
        "lastname": {
          "type": "string",
          "description": "last name of User"
        },
        "userlevel": {
          "type": "number",
          "description": "permissions level of User"
        },
        "createdAt": {
          "type": "string",
          "description": "date/time (ISO8601 format) of creation of the User"
        },
        "updatedAt": {
          "type": "string",
          "description": "date/time (ISO8601 format) of last modification of the User"
        }
      },
      "required": [
        "username",
        "email",
        "createdAt",
        "updatedAt"
      ],
      "description": "Creator of message"
    }
  },
  "required": [
    "content",
    "createdAt",
    "updatedAt",
    "user"
  ]
}
Response  404
HideShow
Headers
Content-Type: application/json; charset=utf-8

Generated by aglio on 14 Mar 2017