Skip to content

Latest commit

 

History

History
493 lines (318 loc) · 13.9 KB

SecurityProfiles.md

File metadata and controls

493 lines (318 loc) · 13.9 KB

OrderCloud.SecurityProfiles

All URIs are relative to https://api.ordercloud.io/v1

Method HTTP request Description
Create POST /securityprofiles
Delete DELETE /securityprofiles/{securityProfileID}
DeleteAssignment DELETE /securityprofiles/{securityProfileID}/assignments
Get GET /securityprofiles/{securityProfileID}
List GET /securityprofiles
ListAssignments GET /securityprofiles/assignments
Patch PATCH /securityprofiles/{securityProfileID}
Save PUT /securityprofiles/{securityProfileID}
SaveAssignment POST /securityprofiles/assignments

Create

SecurityProfile Create(securityProfile)

Example

var OrderCloud = require('OrderCloud');
var defaultClient = OrderCloud.Sdk.default;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new OrderCloud.SecurityProfiles();

var securityProfile = new OrderCloud.SecurityProfile(); // SecurityProfile | 

apiInstance.Create(securityProfile).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
securityProfile SecurityProfile

Return type

SecurityProfile

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json, text/plain; charset=utf-8
  • Accept: application/json

Delete

Delete(securityProfileID)

Example

var OrderCloud = require('OrderCloud');
var defaultClient = OrderCloud.Sdk.default;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new OrderCloud.SecurityProfiles();

var securityProfileID = "securityProfileID_example"; // String | ID of the security profile.

apiInstance.Delete(securityProfileID).then(function() {
  console.log('API called successfully.');
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
securityProfileID String ID of the security profile.

Return type

null (empty response body)

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json, text/plain; charset=utf-8
  • Accept: application/json

DeleteAssignment

DeleteAssignment(securityProfileID, opts)

Example

var OrderCloud = require('OrderCloud');
var defaultClient = OrderCloud.Sdk.default;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new OrderCloud.SecurityProfiles();

var securityProfileID = "securityProfileID_example"; // String | ID of the security profile.

var opts = { 
  'buyerID': "buyerID_example", // String | ID of the buyer.
  'userID': "userID_example", // String | ID of the user.
  'userGroupID': "userGroupID_example", // String | ID of the user group.
  'supplierID': "supplierID_example" // String | ID of the supplier.
};
apiInstance.DeleteAssignment(securityProfileID, opts).then(function() {
  console.log('API called successfully.');
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
securityProfileID String ID of the security profile.
buyerID String ID of the buyer. [optional]
userID String ID of the user. [optional]
userGroupID String ID of the user group. [optional]
supplierID String ID of the supplier. [optional]

Return type

null (empty response body)

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json, text/plain; charset=utf-8
  • Accept: application/json

Get

SecurityProfile Get(securityProfileID)

Example

var OrderCloud = require('OrderCloud');
var defaultClient = OrderCloud.Sdk.default;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new OrderCloud.SecurityProfiles();

var securityProfileID = "securityProfileID_example"; // String | ID of the security profile.

apiInstance.Get(securityProfileID).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
securityProfileID String ID of the security profile.

Return type

SecurityProfile

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json, text/plain; charset=utf-8
  • Accept: application/json

List

ListSecurityProfile List(opts)

Example

var OrderCloud = require('OrderCloud');
var defaultClient = OrderCloud.Sdk.default;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new OrderCloud.SecurityProfiles();

var opts = { 
  'search': "search_example", // String | Word or phrase to search for.
  'searchOn': "searchOn_example", // String | Comma-delimited list of fields to search on.
  'sortBy': "sortBy_example", // String | Comma-delimited list of fields to sort by.
  'page': 56, // Number | Page of results to return. Default: 1
  'pageSize': 56, // Number | Number of results to return per page. Default: 20, max: 100.
  'filters': {key: "filters_example"} // {String: String} | Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???'
};
apiInstance.List(opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
search String Word or phrase to search for. [optional]
searchOn String Comma-delimited list of fields to search on. [optional]
sortBy String Comma-delimited list of fields to sort by. [optional]
page Number Page of results to return. Default: 1 [optional]
pageSize Number Number of results to return per page. Default: 20, max: 100. [optional]
filters {String: String} Any additional key/value pairs passed in the query string are interpretted as filters. Valid keys are top-level properties of the returned model or 'xp.???' [optional]

Return type

ListSecurityProfile

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json, text/plain; charset=utf-8
  • Accept: application/json

ListAssignments

ListSecurityProfileAssignment ListAssignments(opts)

Example

var OrderCloud = require('OrderCloud');
var defaultClient = OrderCloud.Sdk.default;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new OrderCloud.SecurityProfiles();

var opts = { 
  'buyerID': "buyerID_example", // String | ID of the buyer.
  'supplierID': "supplierID_example", // String | ID of the supplier.
  'securityProfileID': "securityProfileID_example", // String | ID of the security profile.
  'userID': "userID_example", // String | ID of the user.
  'userGroupID': "userGroupID_example", // String | ID of the user group.
  'commerceRole': "commerceRole_example", // String | Commerce role of the security profile assignment. Possible values: Buyer, Seller, Supplier.
  'level': "level_example", // String | Level of the security profile assignment. Possible values: User, Group, Company.
  'page': 56, // Number | Page of results to return. Default: 1
  'pageSize': 56 // Number | Number of results to return per page. Default: 20, max: 100.
};
apiInstance.ListAssignments(opts).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
buyerID String ID of the buyer. [optional]
supplierID String ID of the supplier. [optional]
securityProfileID String ID of the security profile. [optional]
userID String ID of the user. [optional]
userGroupID String ID of the user group. [optional]
commerceRole String Commerce role of the security profile assignment. Possible values: Buyer, Seller, Supplier. [optional]
level String Level of the security profile assignment. Possible values: User, Group, Company. [optional]
page Number Page of results to return. Default: 1 [optional]
pageSize Number Number of results to return per page. Default: 20, max: 100. [optional]

Return type

ListSecurityProfileAssignment

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json, text/plain; charset=utf-8
  • Accept: application/json

Patch

SecurityProfile Patch(securityProfileID, partialSecurityProfile)

Example

var OrderCloud = require('OrderCloud');
var defaultClient = OrderCloud.Sdk.default;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new OrderCloud.SecurityProfiles();

var securityProfileID = "securityProfileID_example"; // String | ID of the security profile.

var partialSecurityProfile = new OrderCloud.SecurityProfile(); // SecurityProfile | 

apiInstance.Patch(securityProfileID, partialSecurityProfile).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
securityProfileID String ID of the security profile.
partialSecurityProfile SecurityProfile

Return type

SecurityProfile

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json, text/plain; charset=utf-8
  • Accept: application/json

Save

SecurityProfile Save(securityProfileID, securityProfile)

Example

var OrderCloud = require('OrderCloud');
var defaultClient = OrderCloud.Sdk.default;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new OrderCloud.SecurityProfiles();

var securityProfileID = "securityProfileID_example"; // String | ID of the security profile.

var securityProfile = new OrderCloud.SecurityProfile(); // SecurityProfile | 

apiInstance.Save(securityProfileID, securityProfile).then(function(data) {
  console.log('API called successfully. Returned data: ' + data);
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
securityProfileID String ID of the security profile.
securityProfile SecurityProfile

Return type

SecurityProfile

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json, text/plain; charset=utf-8
  • Accept: application/json

SaveAssignment

SaveAssignment(securityProfileAssignment)

Example

var OrderCloud = require('OrderCloud');
var defaultClient = OrderCloud.Sdk.default;

// Configure OAuth2 access token for authorization: oauth2
var oauth2 = defaultClient.authentications['oauth2'];
oauth2.accessToken = 'YOUR ACCESS TOKEN';

var apiInstance = new OrderCloud.SecurityProfiles();

var securityProfileAssignment = new OrderCloud.SecurityProfileAssignment(); // SecurityProfileAssignment | 

apiInstance.SaveAssignment(securityProfileAssignment).then(function() {
  console.log('API called successfully.');
}, function(error) {
  console.error(error);
});

Parameters

Name Type Description Notes
securityProfileAssignment SecurityProfileAssignment

Return type

null (empty response body)

Authorization

oauth2

HTTP request headers

  • Content-Type: application/json, text/plain; charset=utf-8
  • Accept: application/json