Skip to content

GET /api/v3/status

Summary

GET status

Description

Validates that we can hit the v3 API, requires app_id, and auth token (authenticated) This will also fail if the user does not have access to the application id that was sent

Tags: status

Parameters

Header Parameters

Name Type Required Description Example
Authorization string ✓ Yes Bearer {AuthToken}
Content-Type string ✓ Yes application/json
Accept string ✓ Yes application/json
AppIdV3 string ✓ Yes LCUID-LAP-********-****-****-****-************

Responses

Response: 200

Content Type: text/plain

Schema

Type: string

Example Response
"success {\n \"api_version\": \"v3\",\n \"app\": {\n     \"application_class\": \"App\\\\LuCore\\\\Applications\\\\CoreApplicationClass\",\n     \"application_class_description\": \"Core\",\n     \"created_at\": \"2023-01-09T23:14:42.000000Z\",\n     \"description\": \"An application for demonstrating various app capabilities\",\n     \"id\": 19659,\n     \"lcuid\": \"LCUID-LAP-332a5d02-ac33-46be-a7d5-e5705c513669\",\n     \"name\": \"Lucit Demo Application\",\n     \"options\": {\n     \"allowed_permissions_at_version\": {\n         \"1\": [\n         \"account.update\",\n         \"account.createCampaigns\",\n         \"account.createContent\",\n         \"account.viewAnalytics\",\n         \"agency.update\",\n         \"agency.canEditBoards\",\n         \"agency.createCampaigns\",\n         \"agency.viewAnalytics\"\n         ]\n     },\n     \"permissions_version\": 1,\n     \"primary_image_public_url\": \"http://localhost:8080/storage/56/img_63b8675e4f4db_c159edd9dfd85c600a3a.png\",\n     },\n     \"permissions\": {\n     \"allowed\": [\n         \"account.update\",\n         \"account.createCampaigns\",\n         \"account.createContent\",\n         \"account.viewAnalytics\",\n         \"agency.update\",\n         \"agency.canEditBoards\",\n         \"agency.createCampaigns\",\n         \"agency.viewAnalytics\"\n     ]\n     },\n     \"slug\": \"LucitDemoApplication3\",\n     \"status\": 1,\n     \"updated_at\": \"2023-02-03T14:42:56.000000Z\"\n },\n \"app_id_required\": true,\n \"auth_required\": true,\n \"auth_user_id_sent\": \"LCUID-LU-8f4500d2-4ca8-49ac-9da0-bdc682033b67\",\n \"message\": \"LuCore V3 REST API is accessible with an v3_app_id, un-authenticated, and returns json\",\n \"ok\": true,\n \"timestamp\": 1675462006,\n \"user\": {\n     \"lcuid\": \"LCUID-LU-8f4500d2-4ca8-49ac-9da0-bdc682033b67\",\n     \"name\": \"UT - Corrine Rogahn DVM\"\n },\n \"v3_app_id_sent\": \"LCUID-LAP-332a5d02-ac33-46be-a7d5-e5705c513669\"\n }"

Response: 401

Content Type: application/json

Schema

Type: object

Properties:

  • ok (boolean)
  • http_code (integer)
  • code (string)
  • message (string)
  • data (object) Type: object

Properties:

  • auth_error_code (string)
  • auth_error_details (string)

  • lucore_error_response (boolean)

Example Response
{
    "ok": false,
    "http_code": 401,
    "code": "app_token_invalid_or_unauthorized",
    "message": "Your AppTokenV2 is missing from the header, invalid, or un-authorized",
    "data": {
        "auth_error_code": "user_is_not_valid_app_user",
        "auth_error_details": ""
    },
    "lucore_error_response": true
}

Example Implementations

Bash (cURL)

curl --request GET \
    --get "https://api.lucit.app/api/v3/status" \
    --header "Authorization: Bearer {AuthToken}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --header "AppIdV3: LCUID-LAP-********-****-****-****-************"

JavaScript (Fetch API)

const url = new URL(
    "https://api.lucit.app/api/v3/status"
);

const headers = {
    "Authorization": "Bearer {AuthToken}",
    "Content-Type": "application/json",
    "Accept": "application/json",
    "AppIdV3": "LCUID-LAP-********-****-****-****-************",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());

PHP (Guzzle)

$client = new \GuzzleHttp\Client();
$response = $client->get(
    'https://api.lucit.app/api/v3/status',
    [
        'headers' => [
            'Authorization' => 'Bearer {AuthToken}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
            'AppIdV3' => 'LCUID-LAP-********-****-****-****-************',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));

Python (Requests)

import requests
import json

url = 'https://api.lucit.app/api/v3/status'
headers = {
  'Authorization': 'Bearer {AuthToken}',
  'Content-Type': 'application/json',
  'Accept': 'application/json',
  'AppIdV3': 'LCUID-LAP-********-****-****-****-************'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example Responses

200 Response

success {
 "api_version": "v3",
 "app": {
     "application_class": "App\\LuCore\\Applications\\CoreApplicationClass",
     "application_class_description": "Core",
     "created_at": "2023-01-09T23:14:42.000000Z",
     "description": "An application for demonstrating various app capabilities",
     "id": 19659,
     "lcuid": "LCUID-LAP-332a5d02-ac33-46be-a7d5-e5705c513669",
     "name": "Lucit Demo Application",
     "options": {
     "allowed_permissions_at_version": {
         "1": [
         "account.update",
         "account.createCampaigns",
         "account.createContent",
         "account.viewAnalytics",
         "agency.update",
         "agency.canEditBoards",
         "agency.createCampaigns",
         "agency.viewAnalytics"
         ]
     },
     "permissions_version": 1,
     "primary_image_public_url": "http://localhost:8080/storage/56/img_63b8675e4f4db_c159edd9dfd85c600a3a.png",
     },
     "permissions": {
     "allowed": [
         "account.update",
         "account.createCampaigns",
         "account.createContent",
         "account.viewAnalytics",
         "agency.update",
         "agency.canEditBoards",
         "agency.createCampaigns",
         "agency.viewAnalytics"
     ]
     },
     "slug": "LucitDemoApplication3",
     "status": 1,
     "updated_at": "2023-02-03T14:42:56.000000Z"
 },
 "app_id_required": true,
 "auth_required": true,
 "auth_user_id_sent": "LCUID-LU-8f4500d2-4ca8-49ac-9da0-bdc682033b67",
 "message": "LuCore V3 REST API is accessible with an v3_app_id, un-authenticated, and returns json",
 "ok": true,
 "timestamp": 1675462006,
 "user": {
     "lcuid": "LCUID-LU-8f4500d2-4ca8-49ac-9da0-bdc682033b67",
     "name": "UT - Corrine Rogahn DVM"
 },
 "v3_app_id_sent": "LCUID-LAP-332a5d02-ac33-46be-a7d5-e5705c513669"
 }

401 Response

{
    "ok": false,
    "http_code": 401,
    "code": "app_token_invalid_or_unauthorized",
    "message": "Your AppTokenV2 is missing from the header, invalid, or un-authorized",
    "data": {
        "auth_error_code": "user_is_not_valid_app_user",
        "auth_error_details": ""
    },
    "lucore_error_response": true
}

← Back to status index | Back to main index