Difference between revisions of "API Authentication"

From IVS Wiki
Jump to: navigation, search
(Resource Information)
Line 9: Line 9:
 
|'''Method'''
 
|'''Method'''
 
|POST
 
|POST
|-
 
|'''Headers'''
 
|Content-Type:application/json
 
 
|-
 
|-
 
|'''Response Type'''
 
|'''Response Type'''
Line 19: Line 16:
 
|No
 
|No
 
|}
 
|}
 
  
 
==Request Parameters==
 
==Request Parameters==

Revision as of 09:55, 3 March 2026

Prior to issuing any API call, you will first need to authenticate with the VALT application. This should be completed by issuing the following API call. After authenticating successfully, you will receive an access token. Save this access token as it will be used in all other API calls.


Resource URL

http://valt.example.com/api/v3/login

Resource Information

Method POST
Response Type JSON
Authentication Required No

Request Parameters

Path Parameters

No path parameters are required for this request.

Query Parameters

No query parameters are required for this request.

Headers

Name Value
Content-Type application/json

Body

The JSON body must be properly formatted. All fields and values should be enclosed in double quotes and separated by a colon

Name Description Required Example
Username Username for a VALT user, can be a local or LDAP user. yes admin
Password VALT password for the specified user. yes admin


Response

HTTP Code

Code Reason
200 Authentication Successful
401 Invalid Username or Password

JSON Body

data
access_token access token for use in any API calls that require authentication


Examples

Request

The sample JSON body below is formatted with line breaks and indentation to make it easier to read. This is not required.

https://ivstest1.ad.ipivs.com/api/v3/login
{
  "username":"admin",
  "password":"admin"
}

Successful Response

{"data":{"access_token": "e82632d19c523678fea3d1016c6df9e9" }}

Failure Response

{"data": "Invalid username or password"}