Public and private publications


Introduction

Depending of the managers, a publication may be private. By default, all publications are public : everyone have access to it and could see datas. But in some cases, managers may want to not giving publicly access to it. We call this king of publications "private publications".

A private publication is a publication you have to be authenticated and granted to have access. So, to have access to the API, you must have a user account and this user account must be autorized by the managers of the publication.

Authentication to the Navigart 3 API

To authenticate on the Navigart 3 API, you must first create an account on the publication. Then you will have a account login (your email) and a account password (the password you have entered). Then, you can authenticate on the API : curl -H "Content-Type: application/json" -X POST -d '{"email":"youremail","password":"yourpassword"}' 'https://api.navigart.fr/VAULT/login' Please replace youremail, yourpassword, and VAULT by proper values. Then, the response is a JSON object with a token you have to use to authenticate on the API side. Example : curl -H "Content-Type: application/json" -X POST -d '{"email":"youremail","password":"yourpassword"}' 'https://api.navigart.fr/VAULT/login' | jq '.'

{
    "user_id": 9456872,
    "token": "J0XAiOiKV1QiLCJhbGciOiJIUzNiJ9.J1c2VyXkIjoxMzF9.jgmX2ZTrJZUjyofVMwVhBJOZzvsz5VQ"
}

Then you can use this token to make others queries : curl -H 'X-Token: J0XAiOiKV1QiLCJhbGciOiJIUzNiJ9.J1c2VyXkIjoxMzF9.jgmX2ZTrJZUjyofVMwVhBJOZzvsz5VQ' 'https://api.navigart.fr/VAULT/me' | jq '.'

{
  "id": 131,
  "email": "...",
  "profile": {
               "11": {
                     "active_cart": "757"
                     }
             },
  "name": "...",
  "alias_names": [],
  "abilities": {
     "cart": {
        "create": false
     },
     "text_note": {
        "read_unpublished": false,
        "create": false,
        "edit_own": false,
        "edit_shared": false,
        "edit_all": false,
        "publish_all": false,
        "delete_own": false,
        "deleter": false
     },
     "publication": {
         "read_public": false,
         "read_private": false
     },
     "private_publ_management": {
         "manage_private": false,
         "access_private": true
     },
     "user_role": {
         "create_on_same_domain": false
     },
     "user": {
         "index": false,
         "show": false
     }
}
}

The abilities you have depend of the rights the publication's managers give you.

Contact us

You may contact us by sending an email to aide@videomuseum.fr