Packebian API
Markdown formatted description.
Login & Logout ¶
Login ¶
LoginPOST/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
- type
string
(required) Example: auth0Type of given auth token
with body
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)"
}
}
}
200
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 ¶
LogoutPOST/logout
Example URI
with body
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)"
}
}
}
200
Headers
Content-Type: application/json; charset=utf-8
User ¶
Retrieve all Users ¶
Retrieve all UsersGET/users/
Example URI
Headers
Content-Type: application/json; charset=utf-8
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwidXNlcm5hbWUiOiJubmljaG9scyIsImVtYWlsIjoibmFpZGFAbmljaG9scy5uZXQiLCJmaXJzdG5hbWUiOiJOYWlkYSIsImxhc3RuYW1lIjoiTklDSE9MUyIsInVzZXJsZXZlbCI6MiwiaWF0IjoxNDg5NTI4NDQzLCJleHAiOjEwMTQ4OTUyODQ0MiwiYXVkIjoicGFja2ViaWFuLmNvbSIsImlzcyI6InBhY2tlYmlhbi5jb20ifQ.kknw9_kGuB5l0c1lYuwchdMclnudYpYr2tnO00JOMkw
200
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"
}
500
Headers
Content-Type: application/json; charset=utf-8
Create a User ¶
Create a UserPOST/users/
Example URI
with body
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"
]
}
201
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"
]
}
500
Headers
Content-Type: application/json; charset=utf-8
Retrieve a User ¶
Retrieve a UserGET/users/{id}
Example URI
- id
integer
(required) Example: 1The user ID
Headers
Content-Type: application/json; charset=utf-8
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwidXNlcm5hbWUiOiJubmljaG9scyIsImVtYWlsIjoibmFpZGFAbmljaG9scy5uZXQiLCJmaXJzdG5hbWUiOiJOYWlkYSIsImxhc3RuYW1lIjoiTklDSE9MUyIsInVzZXJsZXZlbCI6MiwiaWF0IjoxNDg5NTI4NDQzLCJleHAiOjEwMTQ4OTUyODQ0MiwiYXVkIjoicGFja2ViaWFuLmNvbSIsImlzcyI6InBhY2tlYmlhbi5jb20ifQ.kknw9_kGuB5l0c1lYuwchdMclnudYpYr2tnO00JOMkw
200
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"
]
}
404
Headers
Content-Type: application/json; charset=utf-8
Update a User ¶
Update a UserPUT/users/{id}
Every field is optionnal. Here is an example of a request updating the firstname and lastname of a User.
Example URI
- id
integer
(required) Example: 1The user ID
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"
}
}
}
200
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"
]
}
404
Headers
Content-Type: application/json; charset=utf-8
500
Headers
Content-Type: application/json; charset=utf-8
Delete a User ¶
Delete a UserDELETE/users/{id}
Example URI
- id
integer
(required) Example: 1The user ID
Headers
Content-Type: application/json; charset=utf-8
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6MSwidXNlcm5hbWUiOiJubmljaG9scyIsImVtYWlsIjoibmFpZGFAbmljaG9scy5uZXQiLCJmaXJzdG5hbWUiOiJOYWlkYSIsImxhc3RuYW1lIjoiTklDSE9MUyIsInVzZXJsZXZlbCI6MiwiaWF0IjoxNDg5NTI4NDQzLCJleHAiOjEwMTQ4OTUyODQ0MiwiYXVkIjoicGFja2ViaWFuLmNvbSIsImlzcyI6InBhY2tlYmlhbi5jb20ifQ.kknw9_kGuB5l0c1lYuwchdMclnudYpYr2tnO00JOMkw
200
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"
]
}
404
Headers
Content-Type: application/json; charset=utf-8
Ticket ¶
Retrieve all Tickets ¶
Retrieve all TicketsGET/tickets/
Example URI
200
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"
}
500
Headers
Content-Type: application/json; charset=utf-8
Create a Ticket ¶
Create a TicketPOST/tickets/
Example URI
with body
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"
]
}
201
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"
]
}
500
Headers
Content-Type: application/json; charset=utf-8
Retrieve a Ticket ¶
Retrieve a TicketGET/tickets/{id}
Example URI
- id
integer
(required) Example: 1The ticket ID
200
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"
]
}
404
Headers
Content-Type: application/json; charset=utf-8
Update a Ticket ¶
Update a TicketPUT/tickets/{id}
Every field is optionnal. Here is an example of a request updating the major and class of a Ticket.
Example URI
- id
integer
(required) Example: 1The ticket ID
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)"
}
}
}
200
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"
]
}
404
Headers
Content-Type: application/json; charset=utf-8
500
Headers
Content-Type: application/json; charset=utf-8
Delete a Ticket ¶
Delete a TicketDELETE/tickets/{id}
Example URI
- id
integer
(required) Example: 1The ticket ID
200
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"
]
}
404
Headers
Content-Type: application/json; charset=utf-8
Vote ¶
Retrieve all Votes ¶
Retrieve all VotesGET/votes/
Example URI
200
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"
}
500
Headers
Content-Type: application/json; charset=utf-8
Create a Vote ¶
Create a VotePOST/votes/
Example URI
with body
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"
]
}
201
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"
]
}
500
Headers
Content-Type: application/json; charset=utf-8
Retrieve a Vote ¶
Retrieve a VoteGET/votes/{id}
Example URI
- id
integer
(required) Example: 1The vote ID
200
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"
]
}
404
Headers
Content-Type: application/json; charset=utf-8
Update a Vote ¶
Update a VotePUT/votes/{id}
Every field is optionnal. Here is an example of a request updating the value of a Vote.
Example URI
- id
integer
(required) Example: 1The vote ID
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."
}
}
}
200
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"
]
}
404
Headers
Content-Type: application/json; charset=utf-8
500
Headers
Content-Type: application/json; charset=utf-8
Delete a Vote ¶
Delete a VoteDELETE/votes/{id}
Example URI
- id
integer
(required) Example: 1The vote ID
200
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"
]
}
404
Headers
Content-Type: application/json; charset=utf-8
Package ¶
Retrieve all Packages ¶
Retrieve all PackagesGET/packages/
Example URI
200
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"
}
500
Headers
Content-Type: application/json; charset=utf-8
Create a Package ¶
Create a PackagePOST/packages/
Example URI
with body
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"
]
}
201
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"
]
}
500
Headers
Content-Type: application/json; charset=utf-8
Retrieve a Package ¶
Retrieve a PackageGET/packages/{id}
Example URI
- id
integer
(required) Example: 1The package ID
200
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"
]
}
404
Headers
Content-Type: application/json; charset=utf-8
Update a Package ¶
Update a PackagePUT/packages/{id}
Every field is optionnal. Here is an example of a request updating the class and major of a Package.
Example URI
- id
integer
(required) Example: 1The package ID
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"
}
}
}
200
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"
]
}
404
Headers
Content-Type: application/json; charset=utf-8
500
Headers
Content-Type: application/json; charset=utf-8
Delete a Package ¶
Delete a PackageDELETE/packages/{id}
Example URI
- id
integer
(required) Example: 1The package ID
200
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"
]
}
404
Headers
Content-Type: application/json; charset=utf-8
Build ¶
Retrieve all Builds ¶
Retrieve all BuildsGET/builds/
Example URI
200
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"
}
500
Headers
Content-Type: application/json; charset=utf-8
Create a Build ¶
Create a BuildPOST/builds/
Example URI
with body
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"
]
}
201
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"
]
}
500
Headers
Content-Type: application/json; charset=utf-8
Retrieve a Build ¶
Retrieve a BuildGET/builds/{id}
Example URI
- id
integer
(required) Example: 1The build ID
200
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"
]
}
404
Headers
Content-Type: application/json; charset=utf-8
Update a Build ¶
Update a BuildPUT/builds/{id}
Every field is optionnal. Here is an example of a request updating the results of a Build.
Example URI
- id
integer
(required) Example: 1The build ID
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"
}
}
}
200
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"
]
}
404
Headers
Content-Type: application/json; charset=utf-8
500
Headers
Content-Type: application/json; charset=utf-8
Delete a Build ¶
Delete a BuildDELETE/builds/{id}
Example URI
- id
integer
(required) Example: 1The build ID
200
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"
]
}
404
Headers
Content-Type: application/json; charset=utf-8
Message ¶
Retrieve all Messages ¶
Retrieve all MessagesGET/messages/
Example URI
200
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"
}
500
Headers
Content-Type: application/json; charset=utf-8
Create a Message ¶
Create a MessagePOST/messages/
Example URI
with body
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"
]
}
201
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"
]
}
500
Headers
Content-Type: application/json; charset=utf-8
Retrieve a Message ¶
Retrieve a MessageGET/messages/{id}
Example URI
- id
integer
(required) Example: 1The message ID
200
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"
]
}
404
Headers
Content-Type: application/json; charset=utf-8
Update a Message ¶
Update a MessagePUT/messages/{id}
Every field is optionnal. Here is an example of a request updating the content of a Message.
Example URI
- id
integer
(required) Example: 1The message ID
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"
]
}
200
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"
]
}
404
Headers
Content-Type: application/json; charset=utf-8
500
Headers
Content-Type: application/json; charset=utf-8
Delete a Message ¶
Delete a MessageDELETE/messages/{id}
Example URI
- id
integer
(required) Example: 1The message ID
200
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"
]
}
404
Headers
Content-Type: application/json; charset=utf-8