Page History
...
- With the API you can extract database and replica set information collected by iDNA Applications to use it in other applications
- With the API you can assign or update custom properties to databases or replica sets so that you can use them within iDNA Applications.
Postman
View file | ||||
---|---|---|---|---|
|
...
Note |
---|
Note that you have to set the host variable in the in postman (under settings → manage environments). The authorization headers in the postman collection are configured to use the mdapi user with the password mdapi. Either you will have to create a user with this username / password combination as described in the next section, or you will have to update it based on your existing user. |
The external API is located under https:/<IFA_host_name>/api/external/xxx
Authorization
A user is required which can be created under https:/<IFA_host_name>/idna/sys/accounts
Note |
---|
Please note that you have to select "API" from the Authority drop down list. |
In order to use the API an authorization header needs to be sent. We are using Basic Authentication, so the header should look like this:
Authorization: Basic base64encode (username:password)
if your credentials are for example user:password, then the header should be:
- Authorization: Basic dXNlcjpwYXNzd29yZA==
...
- No Authorization header is provided
- User credentials are wrong
- User Authority is insufficient
Database Instances
Description | URL | Payload | Response | Response Json | |||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Get a list of all databases | GET {{host}}/api/external/databases Parameters: focus - boolean: filter focus databases e.g.: {{host}}/api/external/databases?focus=true | - | Returns an array of database objects with basic information. |
| |||||||
Get a list of all databases with custom properties | GET {{host}}/api/external/databases/all/customProperties Parameters: resIds - string: comma separated list of res_id values that can be used to select specific databases e.g.: {{host}}/api/external/databases/all/customProperties?resIds=402,403,404 | - | Returns an array of database objects with custom properties |
| |||||||
Get a list of all databases with detailed information | GET {{host}}/api/external/databases/all/details Parameters: resIds - string: comma separated list of res_id values that can be used to select specific databases e.g.: {{host}}/api/external/databases/all/details?resIds=402,403,404 | - | Returns an array of database objects with detailed information (including custom properties) |
|
ReplicaSets
Description | URL | Payload | Response | Response Json | |||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Get a list of all replica sets | GET {{host}}/api/external/replicaSets Parameters: focus - boolean: filter focus databases e.g.: {{host}}/api/external/replicaSets?focus=true | - | Returns an array of replica set objects with basic information |
| |||||||
Get a list of all replica sets with custom properties | GET {{host}}/api/external/replicaSets/all/customProperties Parameters: replicaIds- string: comma separated list of replicaid values that can be used to select specific replica sets e.g.: {{host}}/api/external/databases/all/customProperties?replicaIds=C1257E4B007EDE78C2357E4B127EDE78,C12579AE0035A4B3C23579AE0125A4B3,C1257714004555A9C2258814004555A9 | - | Returns an array of replica set objects with custom properties |
| |||||||
Get a list of all replica sets with detailed information | GET {{host}}/api/external/replicaSets/all/details Parameters: replicaIds- string: comma separated list of replicaid values that can be used to select specific replica sets e.g.: {{host}}/api/external/databases/all/details?replicaIds=C1257E4B007EDE78C2357E4B127EDE78,C12579AE0035A4B3C23579AE0125A4B3,C1257714004555A9C2258814004555A9 | - | Returns an array of replica set objects with detailed information (including custom properties) |
|
Custom Properties
Description | URL | Payload | Response | Response Json | |||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Get all custom properties | GET {{host}}/api/external/customProperties Parameters: type - string: can be used to filter for database ('db') or replica set ('rs') custom properties e.g.: {{host}}/api/external/customProperties?type=rs {{host}}/api/external/customProperties?type=db | - | Returns an array of custom property objects |
|
Custom Property Assignments
Description | URL | Payload | Response | Response Json | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Assign x custom properties to y databases | POST {{host}}/api/external/customPropertyAssignment/database Headers: Content-Type: application/json |
targetIds - comma separated list of database res_id values customProperties - an object with key / value pairs of custom property id and custom property value | updated - An array of created / updated custom properties error - Contains error information. e.g. if certain targetIds does not exist |
| ||||||||||||
Assign x custom properties to y replica sets | POST {{host}}/api/external/customPropertyAssignment/replicaSet Headers: Content-Type: application/json |
targetIds - comma separated list of replicaset replicaid values customProperties - an object with key / value pairs of custom property id and custom property value | updated - An array of created / updated custom properties error - Contains error information. e.g. if certain targetIds does not exist |
|
...