General API Usage Information

The following pages will help you use and authenticate to the CAM API’s as well as provision using them.

 

 

The CAM API provides authorized HTTP client access to CAM for managing and configuring an external system, and the basic user sessions required to access and customize the service. The CAM API additionally allows you to access the modules for authentication.

Steps

  1. Authorize the API Session

  2. Use the Refresh API as necessary to get refreshed tokens

  3. Connect and Provision within CAM with the relevant APIs. Refer to the Customer Center for specific API documentation as this is not publically available without a login. Litera Customer Center

Authorizing an API Session

  • The CAM API provides a session-related client service that manages the internal service authentication and authorization and access to the session resources.

  • Session API calls are for internal services and applications using the CAM domain

  • A token is required for using this against other API’s endpoints.

  • The token parameter authenticates internal services and applications and does not authorize end-user sessions.

  • The token is produced by accessing the login endpoints for the session API

  • Run a POST/session/login

    • A POST call to the /session/login endpoint logs in to CAM using a domain, username, and password.

    • Multiple simultaneous sessions using the same credential are supported but will have the same token.

    • Each token has a configurable expiry parameter, determining when to close sessions that are not processing requests.

 

Query Parameters

Parameter Name

Description

Parameter Name

Description

username

The user name for login

password

The password for login

domain

The session domain for login authentication

For example, mytenant.prosperowaredev.io

Note: The supported domain is CAM (https://api.{domain}/v1/cdu/auth)

 

Header Parameters

Header

Value

Description

Header

Value

Description

accept

application/json,text/plain

The response data type

Note: If no data type value is specified, the default data type is JSON.

content-type

application/x-www-form-urlencoded

The type of data form encoding

 

Responses and Codes

Code

Description

Code

Description

200

OK: Entity query executed successfully and authenticated

400

User not found: The user used is not found in the system

401

Unauthorized: Authentication has failed due to an Invalid/expired token

404

Not Found: Requested entity data could not be found

502

Internal server error: The server ran into an error when processing the post

 

 

 

Examples and Code

Replace the username, password, and domain for your instance as necessary.

You can also authenticate end-user sessions using a Keycloak access token created as the following:

{ "accessToken": "*******************************************************", "refreshToken": "*************************************************************************", "accessTokenExpiry": "2021-05-26T11:32:16.000Z" }

 

C# Code

var client = new RestClient("https://api.prosperowaredev.io/v1/cdu/auth"); client.Timeout = -1; var request = new RestRequest(Method.POST); request.AddHeader("Content-Type", "application/x-www-form-urlencoded"); request.AddParameter("username", "dev@prosperoware.com"); request.AddParameter("password", "*********"); request.AddParameter("domain", "dev.prosperowaredev.io"); IRestResponse response = client.Execute(request); Console.WriteLine(response.Content);

Node js Code

var request = require('request'); var options = {   'method': 'POST',   'url': 'https://api.prosperowaredev.io/v1/cdu/auth',   'headers': {     'Content-Type': 'application/x-www-form-urlencoded'   },   form: {     'username': 'dev@prosperoware.com',     'password': '*********',     'domain': 'dev.prosperowaredev.io'   } }; request(options, function (error, response) {   if (error) throw new Error(error);   console.log(response.body); });

 

 

Error Response Examples

 

Let's Connect📌

☎ +1 630.598.1100
☎ ‪+44 20 3880 1550‬
📧 support@litera.com
💻 https://www.litera.com/support/

📝 Support is available:
4 am - 8 pm US Eastern
(9 am - 1 am GMT/BST
7 pm - 11 am AET) on normal business days (excluding holidays)

© 2024 Litera