Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

This page is designed to give you a quickstart on getting to know the system and how to work with it simply by following a step-by-step guide.

Table of Contents
Table of Contents
outlinetrue

Prerequisites

There is not a lot that you need to start these first steps, but it includes a computer and some free time!

Additionally some basic knowledge about terminal usage within Linux (Ubuntu) is assumed. You can find some good starter information on the official Ubuntu documentation, although you should be able to copy all the commands from this tuturial and learn on the go!

Installation

See the installation page for instructions on how to install the system and get it running.

Using the API

Prerequisites

Before you ask, API stands for Application Programming Interface, it describes how to use a system and what it can do, for us this is the place to start as it quickly shows you the power of the system!

To use the API we are going to use a tool called Postman, it is a well-established chrome extension that makes using a REST API a breeze.

If you are using chrome you can find Postman here, if you do not use chrome I suggest you install chrome first (big grin)

Steps to take

  1. Run the OMS system as instructed in the installation guide
  2. Fire up postman
  3. Check to see if the system is running and ready to be used
    1. Enter the URL to be `localhost`
    2. Set the method to GET (left of the URL)
    3. Hit Send!
  4. Check if the response matches screenshot 1 on the left
    1. Above the response are buttons: (pretty|raw|preview)
      1. These change the way the response is viewed
    2. Press preview
    3. It should look a little bit better now!
  5. Log in as a User
    1. Change the method to POST
    2. Change the URL to `localhost/api/login`
    3. Right below the the URL bar are buttons: (authorization|headers|body|pre-request scripts|tests)
      1. These are tabs to enter additional request settings.
      2. Note that the response has similar buttons, yet these are for the response!
    4. Click the body button (of the request)
      1. Enter 2 new keys
        1. key='username', value='admin@aegee.org'
        2. key='password', value='1234'
    5. Hit send!
    6. Verify the response looks similar to response 1
  6. See all the Users
    1. Open a new tab within Postman
      1. I like to keep one tab open to quickly login
    2. Set the method to GET
    3. Set the URL to `localhost/api/users`
    4. Open the request Header tab
      1. Enter a new key
        1. key='X-Auth-Token', value='yourlogintoken'
    5. Hit send!
      1. You should get a forbidden message
    6. Enter the correct login token
      1. Go back to your login request
      2. Copy the value with the key "data"
        1. In the example response this is `da78dbb0-6ff4-11e7-bb7e-476b0d476473`
      3. Paste it in the value for the X-Auth-Token
    7. Hit Send again!
    8. Check if the response equals response 2

Image Removed

Screenshot 1 - Postman

Code Block
languagejs
titleResponse 1 - Login
{
    "success": true,
    "meta": null,
    "data": "da78dbb0-6ff4-11e7-bb7e-476b0d476473",
    "message": "User login token"
}
Code Block
languagejs
titleResponse 2 - GET Users
collapsetrue
{ "success": true, "meta": null, "data": [
  1. See your User
    1. Keep the GET method
    2. Keep the X-Auth-Token
    3. Change the URL to 'localhost/api/users/1'
    4. Hit Send!
    5. Check if the response equals response 3
  2. Create a Users
    1. Set the method to POST
    2. Set the URL back to 'localhost/api/bodies'
    3. Hit Send!
    4. Check the errors you got
    5. Go to the Body tab of the request and enter the following keys
      1. key='type_id', value='1'
      2. key='address_id', value='1'
      3. key='name', value='yourfavouritelocal'
      4. key='email', value='yourfavouriteemailaddress'
    6. Hit Send!
    7. Check if your response is similar to response 4
  3. Check all the Bodies
    1. Try finding this out yourself!
  4. Check the rest of the API
    1. The API documentation can be found here

Screenshot 1 - Postman

Image Added

Code Block
languagejs
titleResponse 1 - Login
{
    "success": true,
    "meta": null,
    "data": "da78dbb0-6ff4-11e7-bb7e-476b0d476473",
    "message": "User login token"
}


Code Block
languagejs
titleResponse 2 - GET Users
collapsetrue
{
    "success": true,
    "meta": null,
    "data": [
        {
            "id": 2,
            "address_id": 2,
            "personal_email": "derk.snijders@aegee.org",
            "first_name": "Derk",
            "last_name": "Snijders",
            "date_of_birth": "1993-10-31 00:00:00",
            "gender": "male",
            "phone": null,
            "description": null,
            "remember_token": null,
            "is_superadmin": 1,
            "is_suspended": null,
            "suspended_reason": null,
            "seo_url": "i3anaan",
            "activated_at": "2017-07-18 10:13:06",
            "created_at": "2017-07-18 10:13:06",
            "updated_at": "2017-07-18 10:13:06",
            "internal_email": "derk.snijders@aegee.eu",
            "first_name_simple": "Derk",
            "last_name_simple": "Snijders"
        },
        {
            "id": 3,
            "address_id": 1,
            "personal_email": "nico.westerbeck@aegee.org",
            "first_name": "Nico",
            "last_name": "Westerbeck",
            "date_of_birth": "1985-04-16 00:00:00",
            "gender": "male",
            "phone": null,
            "description": null,
            "remember_token": null,
            "is_superadmin": 0,
            "is_suspended": null,
            "suspended_reason": null,
            "seo_url": "blacksph3re",
            "activated_at": "2017-07-18 10:13:06",
            "created_at": "2017-07-18 10:13:06",
            "updated_at": "2017-07-18 10:13:06",
            "internal_email": null,
            "first_name_simple": "Nico",
            "last_name_simple": "Westerbeck"
        },
        {
            "id": 4,
            "address_id": 1,
            "personal_email": "sergey.peshkov@aegee.org",
            "first_name": "Sergey",
            "last_name": "Peshkov",
            "date_of_birth": "1985-04-16 00:00:00",
            "gender": "male",
            "phone": null,
            "description": null,
            "remember_token": null,
            "is_superadmin": 0,
            "is_suspended": null,
            "suspended_reason": null,
            "seo_url": "sergey.peshkov",
            "activated_at": "2017-07-18 10:13:06",
            "created_at": "2017-07-18 10:13:06",
            "updated_at": "2017-07-18 10:13:06",
            "internal_email": null,
            "first_name_simple": "Sergey",
            "last_name_simple": "Peshkov"
        },
        {
            "id": 
2
5,
            "address_id": 
2
1,
            "personal_email": "
derk
fabrizio.
snijders@aegee
bellicano@aegee.org",
            "first_name": "
Derk
Grace",
            "last_name": "
Snijders
Hopper",
            "date_of_birth": "
1993
1985-
10
04-
31
16 00:00:00",
            "gender": "
male
female",
            "phone": null,
            "description": null,
            "remember_token": null,
            "is_superadmin": 
1
0,
            "is_suspended": null,
            "suspended_reason": null,
            "seo_url": "
i3anaan
gracehopper",
            "activated_at": "2017-07-18 10:13:
06
07",
            "created_at": "2017-07-18 10:13:
06
07",
            "updated_at": "2017-07-18 10:13:
06
07",
            "internal_email": 
"derk.snijders@aegee.eu"
null,
            "first_name_simple": "
Derk
Grace",
            "last_name_simple": "
Snijders
Hopper"
        },
        {
            "id": 
3
6,
            "address_id": 1,
            "personal_email": "
nico
headoffice@aegee.
westerbeck@aegee.
org",
            "first_name": "
Nico
Big",
            "last_name": "
Westerbeck
Boobs",
            "date_of_birth": "
1985
1998-04-16 00:00:00",
            "gender": "
male
female",
            "phone": null,
            "description": null,
            "remember_token": null,
            "is_superadmin": 0,
            "is_suspended": null,
            "suspended_reason": null,
            "seo_url": "
blacksph3re
boobies",
            "activated_at": "2017-07-18 10:13:
06
07",
            "created_at": "2017-07-18 10:13:
06
07",
            "updated_at": "2017-07-18 10:13:
06
07",
            "internal_email": null,
            "first_name_simple": "
Nico
Big",
            "last_name_simple": "
Westerbeck
Boobs"
        },
        {
            "id": 
4
1,
            "address_id": 1,
            "personal_email": "
sergey.peshkov@aegee
admin@aegee.org",
            "first_name": "
Sergey
Super",
            "last_name": "
Peshkov
Admin",
            "date_of_birth": "1985-04-16 00:00:00",
            "gender": "
male
other",
            "phone": null,
            "description": null,
            "remember_token": 
null
"whFezyRDtQV1zRvgoh3rxbKarI39fDObmKiRmPDFDQwjfnhP1xZ9nXVkD8NE",
            "is_superadmin": 
0
1,
            "is_suspended": null,
            "suspended_reason": null,
            "seo_url": "
sergey.peshkov
superadmin",
            "activated_at": "2017-07-18 10:13:06",
            "created_at": "2017-07-18 10:13:06",
            "updated_at": "2017-07-18 10:13:06",
            "internal_email": null,
            "first_name_simple": "
Sergey
Super",
            "last_name_simple": "
Peshkov"
Admin"
        }
    ],
    "message": null
}


Code Block
languagejs
titleResponse 3 - GET Users/1
collapsetrue
{
    "success": true,
  
},
  "meta": null,
    "data": {
        
"id": 
5
1,
        
"address_id": 1,

        "personal_email": "
fabrizio
admin@aegee.
bellicano@aegee.
org",
        
"first_name": "
Grace
Super",
        
"last_name": "
Hopper
Admin",

        
"date_of_birth": "1985-04-16 00:00:00",
        
"gender": "
female
other",
        
"phone":
null,
 null,
        
"description": null,
        
"remember_token": 
null
"whFezyRDtQV1zRvgoh3rxbKarI39fDObmKiRmPDFDQwjfnhP1xZ9nXVkD8NE",
        
"is_superadmin": 
0
1,
        "is_suspended": null,
        "
is
suspended_
suspended
reason": null,
        "seo_url": "superadmin",
        "
suspended
activated_
reason
at": 
null,
"2017-07-18 10:13:06",
        
"
seo
created_
url
at": "
gracehopper
2017-07-18 10:13:06",
        
"
activated
updated_at": "2017-07-18 10:13:
07
06",
        "internal_email": null,
  
"created_at
      "first_name_simple": "
2017-07-18 10:13:07
Super",
        
"updated_at
"last_name_simple": "
2017-07-18 10:13:07
Admin",
        
"internal_email
"address": 
null,
{
            "
first_name_simple
id": 
"Grace"
1,
            "
last
country_
name_simple
id": 
"Hopper"
21,
        
},
    "street": "Notelaarsstraat 55",
  
{
          
"
id
zipcode": 
6
"1000",
            "
address_id
city": 
1
"Brussels",
            "
personal
created_
email
at": "
headoffice@aegee.org
2017-07-18 10:13:06",
            "
first
updated_
name
at": "
Big",
2017-07-18 10:13:06"
        },
        "
last_name
bodies": 
"Boobs",
[
            
"date_of_birth": "1998-04-16 00:00:00",
{
                "
gender
id": 
"female"
1,
            
"phone
    "type_id": 
null
2,
            
"description
    "address_id": 
null
1,
            
"remember_token
    "name": 
null,
"AEGEE-Europe",
                "
is_superadmin
email": 
0,
"headoffice@aegee.org",
                "
is_suspended
phone": null,
            
"suspended_reason
    "description": null,
                "
seo
legacy_
url
key": "
boobies
AEU",
            
"activated_at":
 
"2017-07-18
 
10:13:07",
  "created_at": "2017-07-18 10:13:
07
06",
                "updated_at": "2017-07-18 10:13:
07
06",

   
"internal_email": null,
             "
first_
name_simple": "
Big
AEGEE-Europe",
              
"last_name_simple
  "pivot": 
"Boobs"
{
        
},
         
{
   "user_id": 1,
        
"id":
 
1,
           "
address
body_id": 1
,

                
"personal_email": "admin@aegee.org",
}
            }
  
"first_name": "Super",
      ],
        "
last_name
circles": 
"Admin",
[
            {
 
"date_of_birth":
 
"1985-04-16
 
00:00:00",
             "
gender
id": 
"other"
4,
            
"phone": null,
    "body_id": 4,
                "
description
parent_id": 
null
1,
             
"remember_token
   "name": "
whFezyRDtQV1zRvgoh3rxbKarI39fDObmKiRmPDFDQwjfnhP1xZ9nXVkD8NE
Lia & Derk",
            
"is_superadmin
    "description":
1
 "IT people in da house",
                "
is_suspended": null,
created_at": "2017-07-18 10:13:07",
                "
suspended
updated_
reason
at":
null
 "2017-07-18 10:13:07",
                "
seo
name_
url
simple": "
superadmin
Lia & Derk",
         
"activated_at": "2017-07-18
 
10:13:06",
      "pivot": {
     
"created_at":
 
"2017-07-18
 
10:13:06",
             "
updated
user_
at
id": 
"2017-07-18 10:13:06",
1,
                    "
internal
circle_
email
id": 
null,
4
             
"first_name_simple":
 
"Super",
  }
          
"last_name_simple": "Admin"
  }
        
}
]
    
]
},
    "message": null
}

Response 4

Jira Legacy
serverJIRA (oms-project.atlassian.net)
columnskey,summary,type,created,updated,due,assignee,reporter,priority,status,resolution
serverIdedf3f91b-210c-3cfc-933c-f8d8084c5f2c
keyCORE-112

Get to know docker

Doing your first Pull Request