...
Code Block | ||||
---|---|---|---|---|
| ||||
{ "marketplaces": [ { # => marketplace # The name of this marketplace configuration. "marketplace": "maestrano", # => nid # NID of your app on this marketplace. "nid": "demo-app-production", # => environment # The name of your application. "environment": "demo-app", # => host # This is your application informations. "app": { "host": "https://demo-app-uat.your-domain.com" }, # => Marketplace (Mno-Hub) API # Informations & credentials for your app to connect to this marketplace API. # Those values are provided automatically. "api": { "id": "608d42d2-4bf2-f76a-ba5a-f76a-XXXXXXXXXXXX", "key": "bdePCmsBXz4XXXXXXXXX", "host": "https://api-hub.maestrano.iocom", "base": "/api/v1/" }, # => SSO configuration # Informations & credentials for your app to connect to this marketplace API. # Those values are provided automatically. "sso": { # => idm # By default we consider that the domain managing user identification is the same as your application host (see above app.host parameter). # If you have a dedicated domain managing user identification and therefore responsible for the single sign-on handshake (e.g: https://idp.my-app.com) then you can specify it in the developer platform. "idm": "https://demo-app-uat.your-domain.com", # => init_path (required) # This is the path in your application that allows users to initiate the Single Sign-On handshake. # Upon reaching this endpoint, users on your application will automatically create a SSO request and redirect the user to Maestrano. Maestrano will then authenticate and authorize the user. "init_path": "/maestrano/auth/saml/init/maestrano-dev", # => consume_path (required) # This is your application path to the SAML endpoint that allows users to finalize SSO authentication. # During the 'consume' action, your application sets users (and associated group) up and/or log them in. "consume_path": "/maestrano/auth/saml/consume/maestrano-dev", # => idp # It corresponds to the platform host. # The endpoint will provide you the correct host for the platform you are being connected to. "idp": "https://api-hub.maestrano.io", # => x509_fingerprint and x509_certificate # The endpoint will provide you the correct host for the platform you are being connected to. "x509_fingerprint": "1A:89:28:62:78:CE:63:26:3A:20:23:9C:20:78:36:8A:B5:2E:CC:BE", "x509_certificate": "-----BEGIN CERTIFICATE-----\nMIIDcjCCAlqgA (...) wjlUbMnInFMUsqbw==\n-----END CERTIFICATE-----\n" }, # ===> Data Sharing # This section describes Connec!™ configuration "connec": { # => connec.host (required) # It corresponds to the endpoint used to fetch data from. # It changes with the tenant and the environment. We will provide you the correct host for the platform you are being connected to. "host": "https://api-connec.maestrano.com", "base_path": "/api/v2", "timeout": 300 }, # => Data Sharing # This section describes Connec!™ configuration "webhooks": { # Maestrano will issue a DELETE request to the following paths to notify you # of any service cancellation (group deletion) or any user being removed from a group. # => groups_path # => group_users_path "account": { "group_path": "/maestrano/account/groups/:id/maestrano-dev", "group_user_path": "/maestrano/account/groups/:group_id/users/:id/maestrano-dev" }, # Connec Subscriptions/Webhook # The following section configures the Connec!™ webhooks "connec": { "external_ids": true, "initialization_path": null, # => notifications_path (required) # This is the path of your application where notifications (created/updated entities) will be POSTed to. # You should have a controller matching this path handling the update of your internal entities # based on the Connec!™ entities you receive "notification_path": "/maestrano/connec/notifications/maestrano-dev", "subscriptions": null } } }, { "nid": "demo-app-production", "marketplace": "some-telco", "environment": "demo-app", "app": { "host": "https://demo-app-uat.your-domain.com", "synchronization_start_path": "/maestrano/maestrano-uat/synchronizations", "synchronization_toggle_path": "/maestrano/maestrano-uat/synchronizations/toggle_sync", "synchronization_status_path": "/maestrano/maestrano-uat/synchronizations/:cld-uid" }, "api": { "id": "app-15dh", "key": "6daaadfa07701c8819ca4a6ad85948cc4b84051e0e4927aa33f29dd3faee1303", "host": "https://api-hub-uat.maestrano.io", "base": "/api/v1/" }, "sso": { "idm": "https://demo-app-uat.your-domain.com", "init_path": "/maestrano/auth/saml/init/maestrano-uat", "consume_path": "/maestrano/auth/saml/consume/maestrano-uat", "idp": "https://api-hub-uat.maestrano.io", "x509_fingerprint": "861e:2e:54:c4:67:80:68:47:81:18:f7:d3:29:87:77:f8:69:54:2f", "x509_certificate": "-----BEGIN CERTIFICATE-----\nMIIDezCCAuSgAwIBAgIJ (...) TnpziApEC7uUsBou2rlKmTGw==\n-----END CERTIFICATE-----\n" }, "connec": { "host": "https://api-connec-uat.maestrano.io", "base_path": "/api/v2", "timeout": 300 }, "webhooks": { "account": { "group_path": "/maestrano/account/groups/:id/maestrano-uat", "group_user_path": "/maestrano/account/groups/:group_id/users/:id/maestrano-uat" }, "connec": { "external_ids": true, "initialization_path": null, "notification_path": "/maestrano/connec/notifications/maestrano-uat", "subscriptions": null } } } ] } |
...
Our OpenID guide will give you all the details on the best way to integrate our OpenID provider into your application, just check it out here.
...
3 Account Management API & Webhooks
...
Code Block | ||
---|---|---|
| ||
# Request
curl -u <my-app-id>:<my-app-secret> \
-H "Accept: application/json" \
https://api-hub.maestrano.com/api/v1/account/groups
# Response
{
"success":true,
"errors":{},
"data":[
{
"object":"account_group",
"id":"cld-4",
"created_at":"2014-05-21T04:04:53Z",
"updated_at":"2014-05-21T04:04:53Z",
"has_credit_card":true,
"status":"running",
"name":"Logistics Department - Sales",
"free_trial_end_at":"2014-06-21T04:04:53Z",
"email":"cld-4@example.com",
"currency":"USD",
"timezone":"America/Los_Angeles",
"country":"US",
"city":"Los Angeles"
}
]
} |
...
Code Block | ||
---|---|---|
| ||
# Request
curl -u <my-app-id>:<my-app-secret> \
-H "Accept: application/json" \
https://api-hub.maestrano.com/api/v1/account/groups/cld-4
# Response
{
"success":true,
"errors":{},
"data": {
"object":"account_group",
"id":"cld-4",
"created_at":"2014-05-21T04:04:53Z",
"updated_at":"2014-05-21T04:04:53Z",
"has_credit_card":true,
"status":"running",
"name":"Logistics Department - Sales",
"free_trial_end_at":"2014-06-21T04:04:53Z",
"email":"cld-4@example.com",
"currency":"USD",
"timezone":"America/Los_Angeles",
"country":"US",
"city":"Los Angeles"
}
} |
...
Code Block | ||
---|---|---|
| ||
# Request
curl -u <my-app-id>:<my-app-secret> \
-H "Accept: application/json" \
https://api-hub.maestrano.com/api/v1/account/users
# Response
{
"success":true,
"errors":{},
"data":[
{
"object":"account_user",
"id":"usr-2",
"name":"John",
"surname":"Doe",
"email":"john.doe@gmail.com",
"country":"AU",
"sso_session":"d7kp1b5esnfgtz6xhiv9qwlja34yu8crm2o0",
"created_at":"2014-05-21T00:37:34Z",
"updated_at":"2015-03-09T06:37:28Z"
}
]
} |
...
Code Block | ||
---|---|---|
| ||
# Request
curl -u <my-app-id>:<my-app-secret> \
-H "Accept: application/json" \
https://api-hub.maestrano.com/api/v1/account/users/usr-2
# Response
{
"success":true,
"errors":{},
"data": {
"object":"account_user",
"id":"usr-2",
"name":"John",
"surname":"Doe",
"email":"john.doe@gmail.com",
"country":"AU",
"sso_session":"d7kp1b5esnfgtz6xhiv9qwlja34yu8crm2o0",
"created_at":"2014-05-21T00:37:34Z",
"updated_at":"2015-03-09T06:37:28Z"
}
} |
...
Code Block | ||
---|---|---|
| ||
# Request
curl -u <my-app-id>:<my-app-secret> \
-X "POST" \
-H 'Accept: application/json' \
-H "Content-type: application/json" \
-d '{"group_id":"cld-4", "price_cents":2000, "description":"Product purchase"}' \
https://api-hub.maestrano.com/api/v1/account/bills
# Response
{
"success":true,
"errors":{},
"data":{
"object":"account_bill",
"id":"bill-520",
"group_id":"cld-4",
"created_at":"2015-06-03T05:00:33Z",
"updated_at":"2015-06-03T05:00:33Z",
"price_cents":2000,
"status":"submitted",
"currency":"AUD",
"units":null,
"description":"Product purchase",
"period_started_at":null,
"period_ended_at":null
}
} |
...
Code Block | ||
---|---|---|
| ||
# Request
curl -u <my-app-id>:<my-app-secret> \
-X "DELETE" \
-H 'Accept: application/json' \
https://api-hub.maestrano.com/api/v1/account/bills/bill-520
# Response
{
"success":true,
"errors":{},
"data":{
"object":"account_bill",
"id":"bill-520",
"group_id":"cld-4",
"created_at":"2015-06-03T05:00:33Z",
"updated_at":"2015-06-03T05:00:33Z",
"price_cents":2000,
"status":"cancelled",
"currency":"AUD",
"units":null,
"description":"Product purchase",
"period_started_at":null,
"period_ended_at":null
}
} |
...
Code Block | ||
---|---|---|
| ||
# Retrieve all your bills curl -u <my-app-id>:<my-app-secret> \ -H 'Accept: application/json' \ https://api-hub.maestrano.com/api/v1/account/bills # Retrieve a specific bill curl -u <my-app-id>:<my-app-secret> \ -H 'Accept: application/json' \ https://api-hub.maestrano.com/api/v1/account/bills/bill-520 |
...
Code Block | ||
---|---|---|
| ||
# Request
curl -u <my-app-id>:<my-app-secret> \
-X "POST" \
-H 'Accept: application/json' \
-H "Content-type: application/json" \
-d '{"group_id":"cld-4", "price_cents":2990, "description":"User license", "period": "Month", "start_date": "2015-08-27T23:22:37Z" }' \
https://api-hub.maestrano.com/api/v1/account/recurring_bills
# Response
{
"success":true,
"errors":{},
"data":{
"object":"account_recurring_bill",
"id":"rbill-523",
"group_id":"cld-4",
"created_at":"2015-06-03T05:02:19Z",
"updated_at":"2015-06-03T05:02:19Z",
"price_cents":2990,
"status":"submitted",
"currency":"AUD",
"description":"User license",
"start_date":"2015-08-27T23:22:37Z",
"period":"month",
"frequency":1,
"cycles":null,
"initial_cents":0,
"last_execution_at":null,
"next_execution_at":"2015-08-27T23:22:37Z",
"remaining_cycles":null
}
} |
...
Code Block | ||
---|---|---|
| ||
# Request
curl -u <my-app-id>:<my-app-secret> \
-X "DELETE" \
-H 'Accept: application/json' \
https://api-hub.maestrano.com/api/v1/account/recurring_bills/rbill-523
# Response
{
"success":true,
"errors":{},
"data":{
"object":"account_recurring_bill",
"id":"rbill-523",
"group_id":"cld-4",
"created_at":"2015-06-03T05:02:19Z",
"updated_at":"2015-06-03T05:02:19Z",
"price_cents":2990,
"status":"cancelled",
"currency":"AUD",
"description":"User license",
"start_date":"2015-08-27T23:22:37Z",
"period":"month",
"frequency":1,
"cycles":null,
"initial_cents":0,
"last_execution_at":null,
"next_execution_at":"2015-08-27T23:22:37Z",
"remaining_cycles":null
}
} |
...
Code Block | ||
---|---|---|
| ||
# Retrieve all your recurring bills curl -u <my-app-id>:<my-app-secret> \ -H 'Accept: application/json' \ https://api-hub.maestrano.com/api/v1/account/recurring_bills # Retrieve a specific recurring bill curl -u <my-app-id>:<my-app-secret> \ -H 'Accept: application/json' \ https://api-hub.maestrano.com/api/v1/account/recurring_bills/rbill-523 |
...