1.0.0 • Published 8 years ago

mashery-client v1.0.0

Weekly downloads
10
License
-
Repository
github
Last release
8 years ago

Build Status

Mashery REST API Client

Node.js client for the Mashery REST API (v3).

Getting Started

Install the module with npm install mashery-client -g

var mashery = require('mashery');

// initialize the API client
var api = mashery.init({
    user: '<user_id>',
    pass: '<user_pass>',
    key: '<api_key>',
    secret: '<api_secret>',
    areaUuid: '<area_uuid>'
});

// note authentication will be automatically handled for you

// list all services
apiClient.methods.fetchAllServices({}, function(serviceData, serviceRawResponse){
	console.log(JSON.stringify(serviceData, null, 4));
});

// add an endpoint to an existing service
var args = {
	path: { serviceId: '<service_id>' },
    data: {<JSON_object_representing_endpoint>}
};

apiClient.methods.createServiceEndpoint(args, function(epData, epRawResponse){
	console.log(JSON.stringify(epData, null, 4));
});

Supported Methods

Services

Service Documentation

MethodArgs
fetchAllServices
fetchServiceid
createService
updateServiceid
deleteServiceid

Endpoints

Endpoint Documentation

MethodArgs
fetchAllServiceEndpointsid
fetchServiceEndpointserviceId, id
createServiceEndpointserviceId
updateServiceEndpointserviceId, id
deleteServiceEndpointserviceId, id

Methods

Method Documentation

MethodArgs
fetchAllEndpointMethodsserviceId, endpointId
fetchEndpointMethodserviceId, endpointId, id
createEndpointMethodserviceId, endpointId
updateEndpointMethodserviceId, endpointId, id
deleteEndpointMethodserviceId, endpointId, id

Service Cache

Service Cache Documentation

MethodArgs
fetchSecurityProfileserviceId
createSecurityProfile
updateSecurityProfileserviceId
deleteSecurityProfileserviceId

Service Error Sets

Service Error Set Documentation

MethodArgs
fetchAllServiceErrorSetsid
fetchServiceErrorSetserviceId, id
createServiceErrorSetserviceId
updateServiceErrorSetserviceId, id
deleteServiceErrorSetserviceId, id

Service Error Set Messages

Service Error Set Documentation

MethodArgs
fetchAllErrorMessagesserviceId, errorSetId
fetchErrorMessageserviceId, errorSetId, id
createErrorMessageserviceId, errorSetId
updateErrorMessageserviceId, errorSetId, id
deleteErrorMessageserviceId, errorSetId, id

Endpoint Cache

Cache Documentation

MethodArgs
fetchEndpointCacheserviceId, endpointId
createEndpointCacheserviceId, endpointId
updateEndpointCacheserviceId, endpointId
deleteEndpointCacheserviceId, endpointId

Security Profile

Security Profile Documentation

MethodArgs
fetchSecurityProfileserviceId
createSecurityProfile
updateSecurityProfileserviceId
deleteSecurityProfileserviceId

Security Profile - OAuth

Security Profile Documentation

MethodArgs
fetchSecurityProfileOAuthserviceId
createSecurityProfileOAuth
updateSecurityProfileOAuthserviceId
deleteSecurityProfileOAuthserviceId

Response Filters

Response Filter Documentation

MethodArgs
fetchAllResponseFiltersserviceId, endpointId, methodId
fetchResponseFilterserviceId, endpointId, methodId, id
createResponseFilterserviceId, endpointId, methodId
updateResponseFilterserviceId, endpointId, methodId, id
deleteResponseFilterserviceId, endpointId, methodId, id

Scheduled Maintenance Event

Scheduled Maintenance Documentation

MethodArgs
fetchScheduledEventserviceId, endpointId
createScheduledEventserviceId, endpointId
updateScheduledEventserviceId, endpointId
deleteScheduledEventserviceId, endpointId

CORS

CORS Documentation

MethodArgs
fetchCORSserviceId, endpointId
createCORSserviceId, endpointId
updateCORSserviceId, endpointId
deleteCORSserviceId, endpointId

System Domain Authentication

CORS Documentation

MethodArgs
fetchSysAuthserviceId, endpointId
createSysAuthserviceId, endpointId
updateSysAuthserviceId, endpointId
deleteSysAuthserviceId, endpointId

Service Roles

Role Documentation

MethodArgs
fetchAllServiceRolesid
fetchServiceRoleserviceId, id
createServiceRoleserviceId
updateServiceRoleserviceId, id
deleteServiceRoleserviceId, id

Packages

Package Documentation

MethodArgs
fetchAllPackages
fetchPackageid
createPackage
updatePackageid
deletePackageid

Package Keys

Package Keys Documentation

MethodArgs
fetchAllPackageKeys
fetchPackageKeyid
updatePackageKeyid
deletePackageKeyid

Plans

Plan Documentation

MethodArgs
fetchAllPlanspackageId
fetchPlanpackageId, id
createPlanpackageId

Plan Services

Plan Services Documentation

MethodArgs
fetchAllPlanServicespackageId, planId
fetchAllPlanServicesForServicepackageId, planId, id
createPlanServicepackageId, planId
createPlanEndpointpackageId, planId, serviceId
createPlanMethodpackageId, planId, serviceId, endpointId

Domains

MethodArgsDocumentation
fetchAllDomainsDomains
fetchDomain
createDomain
fetchPublicDomainsPublic Domains
fetchPublicDomainFQDNsFQDN
fetchSystemDomainsSystem Domain

Roles

Roles Documentation

MethodArgs
fetchAllRoles

Scheduled Maintenance Events

Scheduled Maintenance Documentation

MethodArgs
fetchAllScheduledMaintenance
fetchScheduledMaintenanceid
createScheduledMaintenance
updateScheduledMaintenanceid
deleteScheduledMaintenanceid

Scheduled Maintenance Event Endpoints

Scheduled Maintenance Endpoint Documentation

MethodArgs
fetchAllScheduledMaintenanceEndpointsmaintenanceId
fetchScheduledMaintenanceEndpointmaintenanceId, id
createScheduledMaintenanceEndpointmaintenanceId
updateScheduledMaintenanceEndpointmaintenanceId, id
deleteScheduledMaintenanceEndpointmaintenanceId, id

Email Template Sets

Email Template Set Documentation

MethodArgs
fetchAllEmailTemplateSets
fetchEmailTemplateSetid
createEmailTemplateSet
updateEmailTemplateSetid
deleteEmailTemplateSetid

Email Templates

Email Templates Documentation

MethodArgs
fetchAllEmailTemplatesemailSetId
fetchEmailTemplateemailSetId, id
createEmailTemplateemailSetId
updateEmailTemplateemailSetId, id
deleteEmailTemplateemailSetId, id

##Authors

Brian Antonelli

Copyright and license

Copyright (c) 2016 Cox Automotive

Licensed under the MIT License (the "License"); you may not use this work except in compliance with the License. You may obtain a copy of the License in the COPYING file.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

1.0.0

8 years ago

0.0.5

8 years ago

0.0.4

9 years ago

0.0.3

9 years ago

0.0.2

9 years ago

0.0.1

9 years ago