Odyssee Mobile

API User Guide

Fiddler

The easiest way to test our API is with the Fiddler tool, which can be found at: http://www.fiddler2.com/fiddler2/

Fiddler allows you to send messsages and examine the corresponding responses.


Creating the Authorization tag with Fiddler

Fiddler allows you to convert strings to Base64 strings, which is extremely handy for constructing the Authorization part of the request header.

To create the Base64 string open the Tools menu and click on “TextWizard...”. This wil open the screen below:

Enter your credentials in the top textbox using the following format: domain:username:password and select the option To Base64.

The lower textbox will display the resulting Base64 encoded string.

To complete the Authorization property of the header, we just need to add “Basic“ and a space to the returned Base64 encoded string.


Sending requests with Fiddler

In order to send requests to our API, open the “Composer” tab in the right part of the screen.

In the composer tab you can select the required method: GET, POST, PUT or DELETE. Then specify the url of our API.

In the Request Headers pane we will construct our Header. Remember we need to pass the Content-Type, the Authorization and the X-Api-Version tags.

In the Request Body you can specify the entities (in xml or json) which you would like to pass. This is only necessary for POST (add) and PUT (update) methods.


Examples:

How to retrieve a list of unavailabilities of the users in json:

• Method:GET
• URL: https://developers.odysseemobile.com/api/userunavailability
• Request Headers:
        User-Agent: Fiddler
        Host: developers.odysseemobile.com
        Content-Type: application/json; charset=utf-8
        Authorization: Basic bXl1c2VybmFtZTpteXBhc3N3b3JkQFNBTkRCT1g=
        X-Api-Version: 1
        Content-Length: 0
• Request body: empty

Retrieve a list of unavailabilities of the users in xml:

• Method:GET
• URL: https://developers.odysseemobile.com/api/userunavailability
• Request Headers:
        User-Agent: Fiddler
        Host: developers.odysseemobile.com
        Content-Type: application/xml; charset=utf-8
        Authorization: Basic bXl1c2VybmFtZTpteXBhc3N3b3JkQFNBTkRCT1g=
        X-Api-Version: 1
        Content-Length: 0
• Request body: empty

Retrieve a single unavailability with id 98461E3A-DCCB-436E-B975-002A78A7B52E in json:

• Method:GET
• URL: https://developers.odysseemobile.com/api/userunavailability/98461E3A-DCCB-436E-B975-002A78A7B52E
• Request Headers:
        User-Agent: Fiddler
        Host: developers.odysseemobile.com
        Content-Type: application/json; charset=utf-8
        Authorization: Basic bXl1c2VybmFtZTpteXBhc3N3b3JkQFNBTkRCT1g=
        X-Api-Version: 1
        Content-Length: 0
• Request body: empty

Delete that particular unavailability with id 98461E3A-DCCB-436E-B975-002A78A7B52E in json:

• Method:DELETE
• URL: https://developers.odysseemobile.com/api/userunavailability/98461E3A-DCCB-436E-B975-002A78A7B52E
• Request Headers:
        User-Agent: Fiddler
        Host: developers.odysseemobile.com
        Content-Type: application/json; charset=utf-8
        Authorization: Basic bXl1c2VybmFtZTpteXBhc3N3b3JkQFNBTkRCT1g=
        X-Api-Version: 1
        Content-Length: 0
• Request body: empty

Create a new unavailability for a user in json:

• Method:POST
• URL: https://developers.odysseemobile.com/api/userunavailability
• Request Headers:
        User-Agent: Fiddler
        Host: developers.odysseemobile.com
        Content-Type: application/json; charset=utf-8
        Authorization: Basic bXl1c2VybmFtZTpteXBhc3N3b3JkQFNBTkRCT1g=
        X-Api-Version: 1
        Content-Length: 0
• Request body: 
    {
	"date_end":"\/Date(928142400000+0200)\/",
	"date_start":"\/Date(928142400000+0200)\/",
	"description":"String content",
	"user_id":"81e29c98-37bc-49d2-88d8-46b473107d54",
	"user_unavailability_type_id":"8c2258f0-e146-4c19-8493-7993b7655dda"
    }

Update an existing unavailability in json:

• Method:POST
• URL: https://developers.odysseemobile.com/api/userunavailability
• Request Headers:
        User-Agent: Fiddler
        Host: developers.odysseemobile.com
        Content-Type: application/json; charset=utf-8
        Authorization: Basic bXl1c2VybmFtZTpteXBhc3N3b3JkQFNBTkRCT1g=
        X-Api-Version: 1
        Content-Length: 0
• Request body: 
    {
	"date_end":"\/Date(928142400000+0200)\/",
	"date_start":"\/Date(928142400000+0200)\/",
	"description":"String content",
        "id":"98461e3a-dccb-436e-b975-002a78a7b52e",
	"user_id":"81e29c98-37bc-49d2-88d8-46b473107d54",
	"user_unavailability_type_id":"8c2258f0-e146-4c19-8493-7993b7655dda"
    }

--For jobs you can perform the same operations, just change the url to: https://developers.odysseemobile.com/api/job--

For documents that are stored in the Odyssee database Retrieve file content in db_file:

• Method:GET
• URL: https://developers.odysseemobile.com/api/dbfile/getdbfilecontent/A67C87F4-891A-DC11-BD83-0030488C6C36
• Request Headers:
        User-Agent: Fiddler
        Host: developers.odysseemobile.com
        Content-Type: application/json; charset=utf-8
        Authorization: Basic bXl1c2VybmFtZTpteXBhc3N3b3JkQFNBTkRCT1g=
        X-Api-Version: 1
        Content-Length: 0
• Request body: empty


Inspecting responses with Fiddler

Each request returns a response offcourse. After you have executed a request you will see that on the left side off the Fiddler window a new line appeared which contains the response for your request.

When you doubleclick on this line, Fiddler opens the “Inspectors” tab, where you can examine actual response, in a chosen format (Json or Xml). If you would like to examine the response headers, those can be found under the “Headers” tab of the bottom tab control.