OAS v2 Discovery
- shell
- http
- js
- ruby
- python
- java
- go
- Example response
# You can also use wget
curl -X GET https://TENANT_NAME.mambu.com/api/swagger/resources \
-u 'username:password'
GET https://TENANT_NAME.mambu.com/api/swagger/resources HTTP/1.1
Host: TENANT_NAME.mambu.com
Authorization: Basic <credentials>
var headers = {
'Authorization':'Basic <credentials>'
};
$.ajax({
url: 'https://TENANT_NAME.mambu.com/api/swagger/resources',
method: 'GET',
headers: headers,
success: function(data) {
console.log(JSON.stringify(data));
}
})
require 'rest-client'
require 'json'
headers = {
'Authorization' => 'Basic <credentials>'
}
result = RestClient.get 'https://TENANT_NAME.mambu.com/api/swagger/resources',
params: {
}, headers: headers
p JSON.parse(result)
import requests
headers = {
'Authorization': 'Basic <credentials>'
}
r = requests.get('https://TENANT_NAME.mambu.com/api/swagger/resources', params={
}, headers = headers)
print r.json()
URL obj = new URL("https://TENANT_NAME.mambu.com/api/swagger/resources");
HttpURLConnection con = (HttpURLConnection) obj.openConnection();
con.setRequestProperty("Authorization", "Basic <credentials>");
con.setRequestMethod("GET");
int responseCode = con.getResponseCode();
BufferedReader in = new BufferedReader(
new InputStreamReader(con.getInputStream()));
String inputLine;
StringBuffer response = new StringBuffer();
while ((inputLine = in.readLine()) != null) {
response.append(inputLine);
}
in.close();
System.out.println(response.toString());
package main
import (
"bytes"
"net/http"
)
func main() {
headers := map[string][]string{
"Authorization": []string{"Basic <credentials>"},
}
data := bytes.NewBuffer([]byte{jsonReq})
req, err := http.NewRequest("GET", "https://TENANT_NAME.mambu.com/api/swagger/resources", data)
req.Header = headers
client := &http.Client{}
resp, err := client.Do(req)
// ...
}
{
"items": [
{
"jsonPath": "json/clients_v2_swagger.json",
"label": "Clients",
"hashValue": "Clients",
"index": 0
},
{
"jsonPath": "json/clients_documents_v2_swagger.json",
"label": "Client Documents",
"hashValue": "Client_Documents",
"index": 1
},
{
"jsonPath": "json/branches_v2_swagger.json",
"label": "Branches",
"hashValue": "Branches",
"index": 2
},
{
"jsonPath": "json/centres_v2_swagger.json",
"label": "Centres",
"hashValue": "Centres",
"index": 3
},
...
{
"jsonPath": "json/configuration_iddocumenttemplates.yaml_v2_swagger.json",
"label": "Identification Document Templates Configuration",
"hashValue": "Identification_Document_Templates_Configuration",
"index": 64
},
{
"jsonPath": "json/configuration_loanrisklevels.yaml_v2_swagger.json",
"label": "Loan Risk Levels Configuration",
"hashValue": "Loan_Risk_Levels_Configuration",
"index": 65
},
{
"jsonPath": "json/currencies_v2_swagger.json",
"label": "Currencies",
"hashValue": "Currencies",
"index": 66
}
]
}
To retrieve either the basic OAS file or the enriched OAS file with custom field values for a specific API, you must first build the path for the resource.
To build the path for a resource you must retrieve the jsonPath value. This value is provided when you retrieve the list of all available APIs.
To retrieve the list of all available APIs you may use the https://TENANT_NAME.mambu.com/api/swagger/resources endpoint.
The response returns an array of objects. Each object represents an API and includes its jsonPath value.
Next, to retrieve the OAS file for a specific API. See Retrieving OAS Files below.