Tenant Calls

Server Calls for Tenant#

1. Get Auth Token#

POST {{user_server_url}}/v2/oauth2/oauth/token?scope=SCOPE_TENANT_ADMIN&grant_type=client_credentials

curl --location --request POST '{{user_server_url}}/v2/oauth2/oauth/token?scope=SCOPE_TENANT_ADMIN&grant_type=client_credentials' \
--header 'authorization: Basic {{auth_credentials}}' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-raw ''

2. Get Tenant Data#

GET {{gmi_server_url}}/v2/gmiserver/tenant/{{tenant_code}}

curl --location --request GET '{{gmi_server_url}}/v2/gmiserver/tenant/{{tenant_code}}' \
--header 'authorization: Bearer {{token}}'

3. Update Tenant Data#

PUT {{gmi_server_url}}/v1/tenant/{{tenant_code}}

curl --location --request PUT '{{gmi_server_url}}/v1/tenant/{{tenant_code}}' \
--header 'Authorization: Bearer {{token}}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Tenant Name",
"code": "{{tenant_code}}",
"maxIdentities": 99,
"defaultPostBack": null
}'

4. Get Tenant User Data (Including Enrollment Status)#

GET {{gmi_server_url}}/v2/gmiserver/tenant/{{tenant_code}}/person/{{person_uuid}}

curl --location --request GET '{{gmi_server_url}}/v2/gmiserver/tenant/{{tenant_code}}/person/{{person_uuid}}' \
--header 'authorization: Bearer {{token}}'

Server Calls for Tenant User#

5. Get a List of Users for the Tenant Using a Filter#

GET {{gmi_server_url}}/v2/gmiserver/tenant/{{tenant_code}}/person?find={{find_string}}&sort={+,-}{{field}}&pageSize={int}&pageNo={{page_no}}&notEmpty={{field}}

curl --location --request GET '{{gmi_server_url}}/v2/gmiserver/tenant/{{tenant_code}}/person?find={{find_string}}&sort={+,-}{{field}}&pageSize={int}&pageNo={{page_no}}&notEmpty={{field}}' \
--header 'authorization: Bearer {{token}}'

6. Generate New User Associated with a Tenant#

POST {{gmi_server_url}}/v2/gmiserver/tenant/{{tenant_code}}/person

curl --location --request POST '{{gmi_server_url}}/v2/gmiserver/tenant/{{tenant_code}}/person' \
--header 'authorization: Bearer {{token}}' \
--header 'Content-Type: application/json' \
--data-raw '{"userId":"{{email}}"}'

7. Associate an Existing User w/Tenant#

PUT {{gmi_server_url}}/v2/gmiserver/tenant/{{tenant_code}}/person/{{person_uuid}}

curl --location --request PUT '{{gmi_server_url}}/v2/gmiserver/tenant/{{tenant_code}}/person/{{person_uuid}}' \
--header 'authorization: Bearer {{token}}' \
--data-raw ''

8. Disassociate a User from a Tenant#

DELETE {{gmi_server_url}}/v2/gmiserver/tenant/{{tenant_code}}/person/{{person_uuid}}

curl --location --request DELETE '{{gmi_server_url}}/v2/gmiserver/tenant/{{tenant_code}}/person/{{person_uuid}}' \
--header 'authorization: Bearer {{token}}' \
--data-raw ''

Server Calls for Tenant Application#

9. Get List of Applications Associated with Tenant#

GET {{gmi_server_url}}/v2/gmiserver/tenant/{{tenant_code}}/app

curl --location --request GET '{{gmi_server_url}}/v2/gmiserver/tenant/{{tenant_code}}/app' \
--header 'authorization: Bearer {{token}}'

10. Get a Specific Application Associated with Tenant#

GET {{gmi_server_url}}/v2/gmiserver/tenant/{{tenant_code}}/app/{{app_code}}

curl --location --request GET '{{gmi_server_url}}/v2/gmiserver/tenant/{{tenant_code}}/app/{{app_code}}' \
--header 'authorization: Bearer {{token}}'

11. Associate an Application with Tenant#

PUT {{gmi_server_url}}/v2/gmiserver/tenant/{{tenant_code}}/app/{{app_code}}

curl --location --request PUT '{{gmi_server_url}}/v2/gmiserver/tenant/{{tenant_code}}/app/{{app_code}}' \
--header 'authorization: Bearer {{token}}'

12. Disassociate an Application from a Tenant#

DELETE {{gmi_server_url}}/v2/gmiserver/tenant/{{tenant_code}}/app/{{app_code}}

curl --location --request DELETE '{{gmi_server_url}}/v2/gmiserver/tenant/{{tenant_code}}/app/{{app_code}}' \
--header 'authorization: Bearer {{token}}'

Server Calls for Tenant Algorithm#

13. Associate an Algorithm with Tenant#

PUT {{gmi_server_url}}/v2/gmiserver/tenant/{{tenant_code}}/svrgrp/main/alg/{{alg_code}}

curl --location --request PUT '{{gmi_server_url}}/v2/gmiserver/tenant/{{tenant_code}}/svrgrp/main/alg/{{alg_code}}' \
--header 'Authorization: Bearer {{token}}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data-raw '{
"licenseData": {
"info": "license info",
"maxIdentities": 100000,
"expireDate": 1563456524312
}
}'

14. Associate a Liveness for a Tenant Algorithm#

PUT {{gmi_server_url}}/v2/gmiserver/tenant/{{tenant_code}}/svrgrp/main/alg/{{alg_code}}/liveness/{{liveness_code}}

curl --location --request PUT '{{gmi_server_url}}/v2/gmiserver/tenant/{{tenant_code}}/svrgrp/main/alg/{{alg_code}}/liveness/{{liveness_code}}' \
--header 'Authorization: Bearer {{token}}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data-raw ''

15. Disassociate a Liveness from a Tenant Algorithm#

DELETE {{gmi_server_url}}/v2/gmiserver/tenant/{{tenant_code}}/svrgrp/main/alg/{{alg_code}}/liveness/{{liveness_code}}

curl --location --request DELETE '{{gmi_server_url}}/v2/gmiserver/tenant/{{tenant_code}}/svrgrp/main/alg/{{alg_code}}/liveness/{{liveness_code}}' \
--header 'Authorization: Bearer {{token}}' \
--header 'Content-Type: application/json' \
--data-raw ''

16. Disassociate an Algorithm from a Tenant#

DELETE {{gmi_server_url}}/v2/gmiserver/tenant/{{tenant_code}}/svrgrp/main/alg/{{alg_code}}

curl --location --request DELETE '{{gmi_server_url}}/v2/gmiserver/tenant/{{tenant_code}}/svrgrp/main/alg/{{alg_code}}' \
--header 'Authorization: Bearer {{token}}' \
--header 'Content-Type: application/json' \
--data-raw ''