Infoworks Rest API V3

Server
{protocol}://{host}:{port}/v3
Server Variables

Get `authentication_token` with `username` and `password`.

Get authentication_token with username and password.

Auth
Query String
service_idnumber

Used to represent the way user has login into infoworks

GET /security/authenticate
curl --get \
--url 'http://localhost:3001/v3/security/authenticate' \
--header 'Authorization: Basic {token}' \
--data service_id={service_id}
Copy
Responses
200

Authentication success response

objectobject
messagestring
result3 fieldsobject
400

Request has invalid body or parameters.

401

Forbidden. User lacks access to specified resource.

406

Authentication Failed response

500

Internal Server Error.

Response
{
"message": "Authentication Success",
"result": {
"authentication_token": "eyJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2MjUwMzc2MTcsInN1YiI6IntcbiAgXCJlbWFpbFwiIDogXCJhZG1pbkBpbmZvd29ya3MuaW9cIixcbiAgXCJzY29wZVwiIDoge1xuICAgIFwiYWN0aW9uXCIgOiBcInJlZnJlc2hfdG9rZW5cIlxuICB9XG59IiwianRpIjoiOTFlZGZkMWYtN2Y5My00NjM0LTg4MjctZTZlYjViYWJmNDJkIiwiZXhwIjoxNjI1MDM4NTE3fQ.aCTMjNebvC2Rf1CrJp_wA0dsozJd-uKpTcdEvDyigSU",
"is_authenticated": true,
"user_id": "6RkfybTRQQByEey3v"
}
}
Copy

Get `authentication_token` with `refresh_token`.

Get authentication_token with refresh_token.

Auth
Headers
Authorizationstring

refresh token auth header put Basic {refresh_token}

GET /security/token/access
curl --get \
--url 'http://localhost:3001/v3/security/token/access' \
--header 'Authorization: zThziQ7MoJJPYAha+U/+PBSTZG944F+SHBDs+m/z2qn8+m/ax8Prpzla1MHzQ5EBLzB2Bw8a+Qs9r6En5BEN2DsmUVJ6sKFb2yI2'
Copy
Responses
200

Authentication success response

objectobject
messagestring
resultobject
authentication_tokenstring
400

Request has invalid body or parameters.

401

Forbidden. User lacks access to specified resource.

406

Authentication Failed response

500

Internal Server Error.

Response
{
"message": "Authentication Success",
"result": {
"authentication_token": "eyJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2MjUwMzc2MTcsInN1YiI6IntcbiAgXCJlbWFpbFwiIDogXCJhZG1pbkBpbmZvd29ya3MuaW9cIixcbiAgXCJzY29wZVwiIDoge1xuICAgIFwiYWN0aW9uXCIgOiBcInJlZnJlc2hfdG9rZW5cIlxuICB9XG59IiwianRpIjoiOTFlZGZkMWYtN2Y5My00NjM0LTg4MjctZTZlYjViYWJmNDJkIiwiZXhwIjoxNjI1MDM4NTE3fQ.aCTMjNebvC2Rf1CrJp_wA0dsozJd-uKpTcdEvDyigSU"
}
}
Copy

Purge authentication token

Purges authentication token and logs out the user. The user will need to generate a new authentication token for subsequent API calls.

Auth
DELETE /security/token/access
curl --request DELETE \
--url 'http://localhost:3001/v3/security/token/access' \
--header 'Authorization: Bearer {token}'
Copy
Responses
200

ok

objectobject
messagestring
resultstring
400

Request has invalid body or parameters.

401

Forbidden. User lacks access to specified resource.

500

Internal Server Error.

Response
{
"message": "Example Success Message",
"result": "Token successfully blacklisted"
}
Copy

Validate `authentication_token` if its active or not.

Validate authentication_token if its active or not.

Auth
GET /security/token/validate
curl --get \
--url 'http://localhost:3001/v3/security/token/validate' \
--header 'Authorization: Bearer {token}'
Copy
Responses
200

Valid Token Response

objectobject
messagestring
resultobject
is_validboolean
400

Request has invalid body or parameters.

401

Forbidden. User lacks access to specified resource.

500

Internal Server Error.

Response
{
"message": "{string}",
"result": {
"is_valid": true
}
}
Copy

Create Refresh Token.

Create Refresh Token.

Auth
Request Body
objectobject
usersarray[object]
emailstring
POST /security/token/refresh
curl --request POST \
--url 'http://localhost:3001/v3/security/token/refresh' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {token}' \
--data '{
"users": [
{
"email": "{string}"
}
]
}'
Copy
Responses
200
objectobject
messagestring
resultarray[object]
emailstring
refresh_tokenstring
400

Request has invalid body or parameters.

401

Forbidden. User lacks access to specified resource.

500

Internal Server Error.

Response
{
"message": "{string}",
"result": [
{
"email": "{string}",
"refresh_token": "{string}"
}
]
}
Copy

Authorise User.

Authorise User.

Auth
Request Body
objectobject
entityTypestring
actionstring
entityIdstring
POST /security/authorise/user
curl --request POST \
--url 'http://localhost:3001/v3/security/authorise/user' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {token}' \
--data '{
"entityType": "{string}",
"action": "{string}",
"entityId": "{string}"
}'
Copy
Responses
200
objectobject
messagestring
resultobject
delegation_tokenstring
is_authorisedboolean
400

Request has invalid body or parameters.

401

Forbidden. User lacks access to specified resource.

500

Internal Server Error.

Response
{
"message": "{string}",
"result": {
"delegation_token": "{string}",
"is_authorised": "{boolean}"
}
}
Copy

Get SAML Redirect URL.

Get SAML Redirect URL.

Auth
GET /security/sso/initialise
curl --get \
--url 'http://localhost:3001/v3/security/sso/initialise' \
--header 'Authorization: Bearer {token}'
Copy
Responses
200

Valid Token Response

objectobject
Locationstring
400

Request has invalid body or parameters.

401

Forbidden. User lacks access to specified resource.

500

Internal Server Error.

Response
{
"Location": "{string}"
}
Copy

LDAP Authorise User.

LDAP Authorise User.

Auth
Request Body
objectobject
userIdsarray[string]
searchAttributestring
POST /security/get/user/data
curl --request POST \
--url 'http://localhost:3001/v3/security/get/user/data' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {token}' \
--data '{
"userIds": [
"{array[string]...}"
],
"searchAttribute": "{string}"
}'
Copy
Responses
200
objectobject
usersarray[string]
400

Request has invalid body or parameters.

401

Forbidden. User lacks access to specified resource.

500

Internal Server Error.

Response
{
"users": [
"{array[string]...}"
]
}
Copy

bulk sync (add/update) ldap user by providing login attribute

bulk sync (add/update) ldap user by providing login attribute

Auth
Request Body
objectobject
search_onstring
search_listarray[string]
should_updateboolean

Default: true

should_addboolean

Default: true

POST /security/bulk-ldap-sync
curl --request POST \
--url 'http://localhost:3001/v3/security/bulk-ldap-sync' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic {token}' \
--data '{
"search_on": "email",
"search_list": "admin@infoworks.io",
"should_update": true,
"should_add": true
}'
Copy
Responses
200

bulk ldap users sync response

objectobject
messagestring
result5 fieldsobject
400

Request has invalid body or parameters.

401

Forbidden. User lacks access to specified resource.

406

Authentication Failed response

500

Internal Server Error.

Response
{
"message": "Successfully synced ldap users",
"result": {
"new_users_count": 1,
"existing_user_count": 20,
"added": [
{
"email": "modeller@infoworks.io",
"id": "8qvdcWsT5foNuryNF"
}
],
"updated": [
{
"email": "admin@infoworks.io",
"id": "6RkfybTRQQByEey3v"
}
],
"failed": [
{
"email": "prodops@infoworks.io",
"id": "9DvdcZsH5foNuryVN",
"error": "No valid role found for the User."
}
]
}
}
Copy