# Navarik Catalog Management

Version 1.0

Base URLs: /api/rest/1.0

Email: Navarik REST API Support

# Authentication

API Key (sessionAuth) Parameter Name: api_key, in: query. Query parameter api_key appended to the URL.

# Login with a Web Service account credentials to retrieve the session api_key

Code examples:

# You can also use wget
curl -X POST /api/rest/1.0/sessions/{username} \
  -H 'Content-Type: application/x-www-form-urlencoded' \
  -H 'Accept: application/json'

const inputBody = '{
  "password": "string"
}';
const headers = {
  'Content-Type':'application/x-www-form-urlencoded',
  'Accept':'application/json'
};

fetch('/api/rest/1.0/sessions/{username}',
{
  method: 'POST',
  body: inputBody,
  headers: headers
})
.then(function(res) {
    return res.json();
}).then(function(body) {
    console.log(body);
});


require 'vendor/autoload.php';

$headers = array(
    'Content-Type' => 'application/x-www-form-urlencoded',
    'Accept' => 'application/json',
);

$client = new \GuzzleHttp\Client();

// Define array of request body.
$request_body = array();

try {
    $response = $client->request('POST','/api/rest/1.0/sessions/{username}', array(
        'headers' => $headers,
        'json' => $request_body,
       )
    );
    print_r($response->getBody()->getContents());
 }
 catch (\GuzzleHttp\Exception\BadResponseException $e) {
    // handle exception or api errors.
    print_r($e->getMessage());
 }

 // ...

POST /sessions/{username}

Login

Body parameter

password: string

Parameters

Name In Type Required Description
username path string true Username for Web Service user account
body body object true none
password body string true Password for Web Service user account

Response examples:

200 Response

{
  "sessionName": "string",
  "sessionId": "string",
  "username": "string"
}

Responses

Status Meaning Description Schema
200 OK (opens new window) Successful response Session