UNPKG

@itentialopensource/adapter-nexus_repository

Version:

This adapter integrates with system described as: nexusRepositoryManagerRestApi.

1,721 lines 449 kB
{ "id": "@itentialopensource/adapter-nexus_repository", "type": "Adapter", "export": "NexusRepository", "title": "NexusRepository", "src": "adapter.js", "roles": [ "admin" ], "methods": [ { "name": "iapUpdateAdapterConfiguration", "summary": "Updates the adapter configuration", "description": "Updates the adapter configuration file with the provided changes", "input": [ { "name": "configFile", "type": "string", "info": "The name of the file to change", "required": true, "schema": { "title": "configFile", "type": "string" } }, { "name": "changes", "type": "object", "info": "JSON object containing the configuration changes", "required": true, "schema": { "title": "changes", "type": "object" } }, { "name": "entity", "type": "string", "info": "The entity in which the changes are being made", "required": false, "schema": { "title": "entity", "type": "string" } }, { "name": "type", "type": "string", "info": "The type of file to change - action, schema, or mock", "required": false, "schema": { "title": "type", "type": "string" } }, { "name": "action", "type": "string", "info": "The action to be changed", "required": false, "schema": { "title": "action", "type": "string" } }, { "name": "replace", "type": "boolean", "info": "True to replace entire mock data, false to merge/append", "required": false, "schema": { "title": "replace", "type": "boolean" } } ], "output": { "name": "result", "type": "object", "description": "A JSON Object containing status, code and the result", "schema": { "title": "result", "type": "object" } }, "roles": [ "admin" ], "route": { "verb": "POST", "path": "/iapUpdateAdapterConfiguration" }, "task": true }, { "name": "iapSuspendAdapter", "summary": "Suspends the adapter", "description": "Suspends the adapter", "input": [ { "name": "mode", "type": "enum", "enumerals": [ "pause", "error" ], "info": "How incoming requests are handled. Defaults to 'pause'", "description": "How incoming requests are handled. Defaults to 'pause'", "schema": { "title": "mode", "type": "string" }, "required": false } ], "output": { "name": "result", "type": "object", "description": "A JSON Object containing the adapter suspended status", "schema": { "title": "result", "type": "object" } }, "roles": [ "admin" ], "route": { "verb": "POST", "path": "/iapSuspendAdapter" }, "task": true }, { "name": "iapUnsuspendAdapter", "summary": "Unsuspends the adapter", "description": "Unsuspends the adapter", "input": [], "output": { "name": "result", "type": "object", "description": "A JSON Object containing the adapter suspended status", "schema": { "title": "result", "type": "object" } }, "roles": [ "admin" ], "route": { "verb": "POST", "path": "/iapUnsuspendAdapter" }, "task": true }, { "name": "iapGetAdapterQueue", "summary": "Return the requests that are waiting in the queue if throttling is enabled", "description": "Return the requests that are waiting in the queue if throttling is enabled", "input": [], "output": { "name": "result", "type": "object", "description": "A JSON Object containing the adapter queue", "schema": { "title": "result", "type": "object" } }, "roles": [ "admin" ], "route": { "verb": "POST", "path": "/iapGetAdapterQueue" }, "task": true }, { "name": "iapFindAdapterPath", "summary": "Provides the ability to see if a particular API path is supported by the adapter", "description": "Provides the ability to see if a particular API path is supported by the adapter", "input": [ { "name": "apiPath", "type": "string", "info": "The API Path you want to check - make sure to not include base path and version", "description": "The API Path you want to check - make sure to not include base path and version", "schema": { "title": "apiPath", "type": "string" }, "required": true } ], "output": { "name": "result", "type": "object", "description": "A JSON Object containing the result", "schema": { "title": "result", "type": "object" } }, "roles": [ "admin" ], "route": { "verb": "POST", "path": "/iapFindAdapterPath" }, "task": true }, { "name": "iapTroubleshootAdapter", "summary": "Runs troubleshoot script for adapter", "description": "Runs troubleshoot script for adapter", "input": [ { "name": "props", "type": "object", "info": "Object containing configuration, healthcheck and auth properties {'connProps':{'host': 'api.service.com', 'base_path': '/', 'protocol': 'http', 'port': 443, 'version': 'v1'},'healthCheckEndpoint': '/healthcheck', 'auth': {'auth_method': 'no authentication', 'username': 'username', 'password': 'password'}}", "required": true, "schema": { "title": "props", "type": "object" } } ], "output": { "name": "result", "type": "object", "description": "A JSON Object containing the test results", "schema": { "title": "result", "type": "object" } }, "roles": [ "admin" ], "route": { "verb": "POST", "path": "/iapTroubleshootAdapter" }, "task": true }, { "name": "iapRunAdapterHealthcheck", "summary": "Runs healthcheck script for adapter", "description": "Runs healthcheck script for adapter", "input": [], "output": { "name": "result", "type": "boolean", "description": "Whether healthcheck passed or failed", "schema": { "title": "result", "type": "boolean" } }, "roles": [ "admin" ], "route": { "verb": "POST", "path": "/iapRunAdapterHealthcheck" }, "task": true }, { "name": "iapRunAdapterConnectivity", "summary": "Runs connectivity check script for adapter", "description": "Runs connectivity check script for adapter", "input": [], "output": { "name": "result", "type": "object", "description": "A JSON Object containing the test results", "schema": { "title": "result", "type": "object" } }, "roles": [ "admin" ], "route": { "verb": "POST", "path": "/iapRunAdapterConnectivity" }, "task": true }, { "name": "iapRunAdapterBasicGet", "summary": "Runs basicGet script for adapter", "description": "Runs basicGet script for adapter", "input": [ { "name": "maxCalls", "required": false, "type": "number", "info": "How many GET endpoints to test (defaults to 5)", "schema": { "title": "maxCalls", "type": "number", "default": 5 } } ], "output": { "name": "result", "type": "object", "description": "A JSON Object containing the test results", "schema": { "title": "result", "type": "object" } }, "roles": [ "admin" ], "route": { "verb": "POST", "path": "/iapRunAdapterBasicGet" }, "task": true }, { "name": "iapMoveAdapterEntitiesToDB", "summary": "Moves entities from an adapter into the Itential Platform database", "description": "Moves entities from an adapter into the Itential Platform database", "input": [], "output": { "name": "res", "type": "object", "description": "A JSON Object containing status, code and the response from the mongo transaction", "schema": { "title": "res", "type": "object" } }, "roles": [ "admin" ], "route": { "verb": "POST", "path": "/iapMoveAdapterEntitiesToDB" }, "task": true }, { "name": "iapDeactivateTasks", "summary": "Deactivate the inputted tasks", "description": "Deactivate the inputted tasks", "input": [ { "name": "tasks", "type": "array", "description": "Tasks to deactivate", "schema": { "title": "tasks", "type": "array" } } ], "output": { "name": "result", "type": "object", "description": "A JSON Object containing success status", "schema": { "title": "result", "type": "object" } }, "roles": [ "admin" ], "route": { "verb": "POST", "path": "/iapDeactivateTasks" }, "task": true }, { "name": "iapActivateTasks", "summary": "Activate the inputted tasks", "description": "activate the inputted tasks", "input": [ { "name": "tasks", "type": "array", "description": "Tasks to activate", "schema": { "title": "tasks", "type": "array" } } ], "output": { "name": "result", "type": "object", "description": "A JSON Object containing success status", "schema": { "title": "result", "type": "object" } }, "roles": [ "admin" ], "route": { "verb": "POST", "path": "/iapActivateTasks" }, "task": true }, { "name": "iapPopulateEntityCache", "summary": "Populate the cache for the given entities", "description": "Populate the cache for the given entities", "input": [ { "name": "entityTypes", "type": "array", "info": "the entity type(s) to populate", "required": true, "schema": { "title": "entityTypes", "type": "array" } } ], "output": { "name": "result", "type": "object", "description": "A JSON Object containing status, code and the result", "schema": { "title": "result", "type": "object" } }, "roles": [ "admin" ], "route": { "verb": "POST", "path": "/iapPopulateEntityCache" }, "task": true }, { "name": "iapRetrieveEntitiesCache", "summary": "Retrieves data from cache for specified entity type", "description": "Retrieves data from cache for specified entity type", "input": [ { "name": "entityType", "type": "string", "info": "entity of which to retrieve", "required": true, "schema": { "title": "entityType", "type": "string" } }, { "name": "options", "type": "object", "info": "settings of which data to return and how to return it", "required": false, "schema": { "title": "options", "type": "object" } } ], "output": { "name": "result", "type": "object", "description": "A JSON Object containing status, code and the result", "schema": { "title": "result", "type": "object" } }, "roles": [ "admin" ], "route": { "verb": "POST", "path": "/iapRetrieveEntitiesCache" }, "task": true }, { "name": "getDevice", "summary": "Get the Appliance", "description": "Get the Appliance", "input": [ { "name": "deviceName", "type": "string", "info": "An Appliance Device Name", "required": true, "schema": { "title": "deviceName", "type": "string" } } ], "output": { "name": "result", "type": "object", "description": "A JSON Object containing status, code and the result", "schema": { "title": "result", "type": "object" } }, "roles": [ "admin" ], "route": { "verb": "POST", "path": "/getDevice" }, "task": false }, { "name": "getDevicesFiltered", "summary": "Get Appliances that match the filter", "description": "Get Appliances that match the filter", "input": [ { "name": "options", "type": "object", "info": "options - e.g. { 'start': 1, 'limit': 20, 'filter': { 'name': 'abc123' } }", "required": true, "schema": { "title": "options", "type": "object" } } ], "output": { "name": "result", "type": "array", "description": "A JSON Object containing status, code and the result", "schema": { "title": "result", "type": "array" } }, "roles": [ "admin" ], "route": { "verb": "POST", "path": "/getDevicesFiltered" }, "task": false }, { "name": "isAlive", "summary": "Checks the status for the provided Appliance", "description": "Checks the status for the provided Appliance", "input": [ { "name": "deviceName", "type": "string", "info": "An Appliance Device Name", "required": true, "schema": { "title": "deviceName", "type": "string" } } ], "output": { "name": "result", "type": "boolean", "description": "A JSON Object containing status, code and the result", "schema": { "title": "result", "type": "boolean" } }, "roles": [ "admin" ], "route": { "verb": "POST", "path": "/isAlive" }, "task": false }, { "name": "getConfig", "summary": "Gets a config for the provided Appliance", "description": "Gets a config for the provided Appliance", "input": [ { "name": "deviceName", "type": "string", "info": "An Appliance Device Name", "required": true, "schema": { "title": "deviceName", "type": "string" } }, { "name": "format", "type": "string", "info": "The format to be returned - this is ignored as we always return json", "required": false, "schema": { "title": "format", "type": "string" } } ], "output": { "name": "result", "type": "object", "description": "A JSON Object containing status, code and the result", "schema": { "title": "result", "type": "object" } }, "roles": [ "admin" ], "route": { "verb": "POST", "path": "/getConfig" }, "task": false }, { "name": "iapGetDeviceCount", "summary": "Gets a device count from the system", "description": "Gets a device count from the system", "input": [], "output": { "name": "result", "type": "object", "description": "A JSON Object containing status, code and the result", "schema": { "title": "result", "type": "object" } }, "roles": [ "admin" ], "route": { "verb": "POST", "path": "/iapGetDeviceCount" }, "task": false }, { "name": "iapExpandedGenericAdapterRequest", "summary": "Makes the requested generic call with additional options", "description": "Makes the requested generic call with additional options via metadata", "input": [ { "name": "metadata", "type": "object", "info": "metadata for the call (optional)", "description": "metadata for the call - allows for many enhancements (optional)", "schema": { "title": "metadata", "type": "object" }, "required": false }, { "name": "uriPath", "type": "string", "info": "the path of the api call - do not include the host, port, base path or version", "description": "the path of the api call", "schema": { "title": "uriPath", "type": "string" }, "required": false }, { "name": "restMethod", "type": "string", "info": "the rest method (GET, POST, PUT, PATCH, DELETE)", "description": "the rest method (GET, POST, PUT, PATCH, DELETE)", "schema": { "title": "restMethod", "type": "string" }, "required": false }, { "name": "pathVars", "type": "object", "info": "the parameters to be put within the url path (optional)", "description": "the parameters to be put within the url path (optional)", "schema": { "title": "pathVars", "type": "object" }, "required": false }, { "name": "queryData", "type": "object", "info": "the query parameters to be put on the url (optional)", "description": "the query parameters to be put on the url (optional)", "schema": { "title": "queryData", "type": "object" }, "required": false }, { "name": "requestBody", "type": "object", "info": "the payload to be sent with the request (optional)", "description": "the payload to be sent with the request (optional)", "schema": { "title": "requestBody", "type": "object" }, "required": false }, { "name": "addlHeaders", "type": "object", "info": "additional headers to be put on the call (optional)", "description": "additional headers to be put on the call (optional)", "schema": { "title": "addlHeaders", "type": "object" }, "required": false } ], "output": { "name": "result", "type": "object", "description": "A JSON Object containing status, code and the result", "schema": { "title": "result", "type": "object" } }, "roles": [ "admin" ], "route": { "verb": "POST", "path": "/iapExpandedGenericAdapterRequest" }, "task": true }, { "name": "genericAdapterRequest", "summary": "Makes the requested generic call", "description": "Makes the requested generic call", "input": [ { "name": "uriPath", "type": "string", "info": "the path of the api call - do not include the host, port, base path or version", "description": "the path of the api call", "schema": { "title": "uriPath", "type": "string" }, "required": true }, { "name": "restMethod", "type": "string", "info": "the rest method (GET, POST, PUT, PATCH, DELETE)", "description": "the rest method (GET, POST, PUT, PATCH, DELETE)", "schema": { "title": "restMethod", "type": "string" }, "required": true }, { "name": "queryData", "type": "object", "info": "the query parameters to be put on the url (optional)", "description": "the query parameters to be put on the url (optional)", "schema": { "title": "queryData", "type": "object" }, "required": false }, { "name": "requestBody", "type": "object", "info": "the payload to be sent with the request (optional)", "description": "the payload to be sent with the request (optional)", "schema": { "title": "requestBody", "type": "object" }, "required": false }, { "name": "addlHeaders", "type": "object", "info": "additional headers to be put on the call (optional)", "description": "additional headers to be put on the call (optional)", "schema": { "title": "addlHeaders", "type": "object" }, "required": false } ], "output": { "name": "result", "type": "object", "description": "A JSON Object containing status, code and the result", "schema": { "title": "result", "type": "object" } }, "roles": [ "admin" ], "route": { "verb": "POST", "path": "/genericAdapterRequest" }, "task": true }, { "name": "genericAdapterRequestNoBasePath", "summary": "Makes the requested generic call", "description": "Makes the requested generic call", "input": [ { "name": "uriPath", "type": "string", "info": "the path of the api call - do not include the host, port, base path or version", "description": "the path of the api call", "schema": { "title": "uriPath", "type": "string" }, "required": true }, { "name": "restMethod", "type": "string", "info": "the rest method (GET, POST, PUT, PATCH, DELETE)", "description": "the rest method (GET, POST, PUT, PATCH, DELETE)", "schema": { "title": "restMethod", "type": "string" }, "required": true }, { "name": "queryData", "type": "object", "info": "the query parameters to be put on the url (optional)", "description": "the query parameters to be put on the url (optional)", "schema": { "title": "queryData", "type": "object" }, "required": false }, { "name": "requestBody", "type": "object", "info": "the payload to be sent with the request (optional)", "description": "the payload to be sent with the request (optional)", "schema": { "title": "requestBody", "type": "object" }, "required": false }, { "name": "addlHeaders", "type": "object", "info": "additional headers to be put on the call (optional)", "description": "additional headers to be put on the call (optional)", "schema": { "title": "addlHeaders", "type": "object" }, "required": false } ], "output": { "name": "result", "type": "object", "description": "A JSON Object containing status, code and the result", "schema": { "title": "result", "type": "object" } }, "roles": [ "admin" ], "route": { "verb": "POST", "path": "/genericAdapterRequestNoBasePath" }, "task": true }, { "name": "iapRunAdapterLint", "summary": "Run the adapter lint script to return the results", "description": "Run the adapter lint script to return the results", "input": [], "output": { "name": "result", "type": "string", "description": "A string containing the run results", "schema": { "title": "result", "type": "string" } }, "roles": [ "admin" ], "route": { "verb": "GET", "path": "/iapRunAdapterLint" }, "task": true }, { "name": "iapRunAdapterTests", "summary": "Run the adapter test scripts (baseunit and unit) to return the results", "description": "Run the adapter test scripts (baseunit and unit) to return the results", "input": [], "output": { "name": "result", "type": "object", "description": "A JSON Object containing status, code and the result", "schema": { "title": "result", "type": "object" } }, "roles": [ "admin" ], "route": { "verb": "GET", "path": "/iapRunAdapterTests" }, "task": true }, { "name": "iapGetAdapterInventory", "summary": "Provide inventory information abbout the adapter", "description": "Provide inventory information abbout the adapter", "input": [], "output": { "name": "result", "type": "object", "description": "A JSON Object containing status, code and the result", "schema": { "title": "result", "type": "object" } }, "roles": [ "admin" ], "route": { "verb": "GET", "path": "/iapGetAdapterInventory" }, "task": true }, { "name": "getUserSources", "summary": "Retrieve a list of the available user sources.", "description": "Retrieve a list of the available user sources.", "input": [], "output": { "name": "result", "type": "object", "description": "A JSON Object containing status, code and the result", "schema": { "type": "array", "items": { "type": "object", "properties": { "id": { "type": "string" }, "name": { "type": "string" } } } } }, "roles": [ "admin" ], "route": { "verb": "GET", "path": "/getUserSources" }, "task": true }, { "name": "updateUser", "summary": "Update an existing user.", "description": "Update an existing user.", "input": [ { "name": "userId", "type": "string", "info": "The userid the request should apply to.: string", "required": true, "schema": { "title": "userId", "type": "string" } }, { "name": "body", "type": "object", "info": "A representation of the user to update.: {\"userId\": \"string\", \"firstName\": \"string\", \"lastName\": \"string\", \"emailAddress\": \"string\", \"source\": \"string\", \"status\": \"Must be one of [active, locked, disabled, changepassword]\", \"readOnly\": \"boolean\", \"roles\": \"array\", \"externalRoles\": \"array\"}", "required": false, "schema": { "type": "object", "required": [ "status" ], "properties": { "userId": { "type": "string", "description": "The userid which is required for login. This value cannot be changed." }, "firstName": { "type": "string", "description": "The first name of the user." }, "lastName": { "type": "string", "description": "The last name of the user." }, "emailAddress": { "type": "string", "description": "The email address associated with the user." }, "source": { "type": "string", "description": "The user source which is the origin of this user. This value cannot be changed." }, "status": { "type": "string", "description": "The user's status, e.g. active or disabled.", "enum": [ "active", "locked", "disabled", "changepassword" ] }, "readOnly": { "type": "boolean", "description": "Indicates whether the user's properties could be modified by Nexus. When false only roles are considered during update." }, "roles": { "type": "array", "description": "The roles which the user has been assigned within Nexus.", "uniqueItems": true, "items": { "type": "string" } }, "externalRoles": { "type": "array", "description": "The roles which the user has been assigned in an external source, e.g. LDAP group. These cannot be changed within Nexus.", "uniqueItems": true, "items": { "type": "string" } } } } } ], "output": { "name": "result", "type": "object", "description": "A JSON Object containing status, code and the result", "schema": { "title": "result", "type": "object" } }, "roles": [ "admin" ], "route": { "verb": "POST", "path": "/updateUser" }, "task": true }, { "name": "deleteUser", "summary": "Delete a user.", "description": "Delete a user.", "input": [ { "name": "userId", "type": "string", "info": "The userid the request should apply to.: string", "required": true, "schema": { "title": "userId", "type": "string" } } ], "output": { "name": "result", "type": "object", "description": "A JSON Object containing status, code and the result", "schema": { "title": "result", "type": "object" } }, "roles": [ "admin" ], "route": { "verb": "POST", "path": "/deleteUser" }, "task": true }, { "name": "getUsers", "summary": "Retrieve a list of users. Note if the source is not 'default' the response is limited to 100 users.", "description": "Retrieve a list of users. Note if the source is not 'default' the response is limited to 100 users.", "input": [ { "name": "userId", "type": "string", "info": "An optional term to search userids for.: string", "required": false, "schema": { "title": "userId", "type": "string" } }, { "name": "source", "type": "string", "info": "An optional user source to restrict the search to.: string", "required": false, "schema": { "title": "source", "type": "string" } } ], "output": { "name": "result", "type": "object", "description": "A JSON Object containing status, code and the result", "schema": { "type": "array", "items": { "type": "object", "required": [ "status" ], "properties": { "userId": { "type": "string", "description": "The userid which is required for login. This value cannot be changed." }, "firstName": { "type": "string", "description": "The first name of the user." }, "lastName": { "type": "string", "description": "The last name of the user." }, "emailAddress": { "type": "string", "description": "The email address associated with the user." }, "source": { "type": "string", "description": "The user source which is the origin of this user. This value cannot be changed." }, "status": { "type": "string", "description": "The user's status, e.g. active or disabled.", "enum": [ "active", "locked", "disabled", "changepassword" ] }, "readOnly": { "type": "boolean", "description": "Indicates whether the user's properties could be modified by Nexus. When false only roles are considered during update." }, "roles": { "type": "array", "description": "The roles which the user has been assigned within Nexus.", "uniqueItems": true, "items": { "type": "string" } }, "externalRoles": { "type": "array", "description": "The roles which the user has been assigned in an external source, e.g. LDAP group. These cannot be changed within Nexus.", "uniqueItems": true, "items": { "type": "string" } } } } } }, "roles": [ "admin" ], "route": { "verb": "POST", "path": "/getUsers" }, "task": true }, { "name": "createUser", "summary": "Create a new user in the default source.", "description": "Create a new user in the default source.", "input": [ { "name": "body", "type": "object", "info": "A representation of the user to create.: {\"userId\": \"string\", \"firstName\": \"string\", \"lastName\": \"string\", \"emailAddress\": \"string\", \"password\": \"string\", \"status\": \"Must be one of [active, locked, disabled, changepassword]\", \"roles\": \"array\"}", "required": false, "schema": { "type": "object", "required": [ "status" ], "properties": { "userId": { "type": "string", "description": "The userid which is required for login. This value cannot be changed." }, "firstName": { "type": "string", "description": "The first name of the user." }, "lastName": { "type": "string", "description": "The last name of the user." }, "emailAddress": { "type": "string", "description": "The email address associated with the user." }, "password": { "type": "string", "description": "The password for the new user." }, "status": { "type": "string", "description": "The user's status, e.g. active or disabled.", "enum": [ "active", "locked", "disabled", "changepassword" ] }, "roles": { "type": "array", "description": "The roles which the user has been assigned within Nexus.", "uniqueItems": true, "items": { "type": "string" } } } } } ], "output": { "name": "result", "type": "object", "description": "A JSON Object containing status, code and the result", "schema": { "type": "object", "required": [ "status" ], "properties": { "userId": { "type": "string", "description": "The userid which is required for login. This value cannot be changed." }, "firstName": { "type": "string", "description": "The first name of the user." }, "lastName": { "type": "string", "description": "The last name of the user." }, "emailAddress": { "type": "string", "description": "The email address associated with the user." }, "source": { "type": "string", "description": "The user source which is the origin of this user. This value cannot be changed." }, "status": { "type": "string", "description": "The user's status, e.g. active or disabled.", "enum": [ "active", "locked", "disabled", "changepassword" ] }, "readOnly": { "type": "boolean", "description": "Indicates whether the user's properties could be modified by Nexus. When false only roles are considered during update." }, "roles": { "type": "array", "description": "The roles which the user has been assigned within Nexus.", "uniqueItems": true, "items": { "type": "string" } }, "externalRoles": { "type": "array", "description": "The roles which the user has been assigned in an external source, e.g. LDAP group. These cannot be changed within Nexus.", "uniqueItems": true, "items": { "type": "string" } } } } }, "roles": [ "admin" ], "route": { "verb": "POST", "path": "/createUser" }, "task": true }, { "name": "changePassword", "summary": "Change a user's password.", "description": "Change a user's password.", "input": [ { "name": "userId", "type": "string", "info": "The userid the request should apply to.: string", "required": true, "schema": { "title": "userId", "type": "string" } }, { "name": "body", "type": "string", "info": "The new password to use.: string", "required": false, "schema": { "type": "string" } } ], "output": { "name": "result", "type": "object", "description": "A JSON Object containing status, code and the result", "schema": { "title": "result", "type": "object" } }, "roles": [ "admin" ], "route": { "verb": "POST", "path": "/changePassword" }, "task": true }, { "name": "getPrivileges", "summary": "Retrieve a list of privileges.", "description": "Retrieve a list of privileges.", "input": [], "output": { "name": "result", "type": "object", "description": "A JSON Object containing status, code and the result", "schema": { "type": "array", "items": { "type": "object", "properties": { "type": { "type": "string", "description": "The type of privilege, each type covers different portions of the system. External values supplied to this will be ignored by the system." }, "name": { "type": "string", "description": "The name of the privilege. This value cannot be changed.", "pattern": "^[a-zA-Z0-9\\-]{1}[a-zA-Z0-9_\\-\\.]*$" }, "description": { "type": "string" }, "readOnly": { "type": "boolean", "description": "Indicates whether the privilege can be changed. External values supplied to this will be ignored by the system." } } } } }, "roles": [ "admin" ], "route": { "verb": "GET", "path": "/getPrivileges" }, "task": true }, { "name": "getPrivilege", "summary": "Retrieve a privilege by id.", "description": "Retrieve a privilege by id.", "input": [ { "name": "privilegeId", "type": "string", "info": "The id of the privilege to retrieve.: string", "required": true, "schema": { "title": "privilegeId", "type": "string" } } ], "output": { "name": "result", "type": "object", "description": "A JSON Object containing status, code and the result", "schema": { "type": "object", "properties": { "type": { "type": "string", "description": "The type of privilege, each type covers different portions of the system. External values supplied to this will be ignored by the system." }, "name": { "type": "string", "description": "The name of the privilege. This value cannot be changed.", "pattern": "^[a-zA-Z0-9\\-]{1}[a-zA-Z0-9_\\-\\.]*$" }, "description": { "type": "string" }, "readOnly": { "type": "boolean", "description": "Indicates whether the privilege can be changed. External values supplied to this will be ignored by the system." } } } }, "roles": [ "admin" ], "route": { "verb": "POST", "path": "/getPrivilege" }, "task": true }, { "name": "deletePrivilege", "summary": "Delete a privilege by id.", "description": "Delete a privilege by id.", "input": [ { "name": "privilegeId", "type": "string", "info": "The id of the privilege to delete.: string", "required": true, "schema": { "title": "privilegeId", "type": "string" } } ], "output": { "name": "result", "type": "object", "description": "A JSON Object containing status, code and the result", "schema": { "title": "result", "type": "object" } }, "roles": [ "admin" ], "route": { "verb": "POST", "path": "/deletePrivilege" }, "task": true }, { "name": "createPrivilege", "summary": "Create a wildcard type privilege.", "description": "Create a wildcard type privilege.", "input": [ { "name": "body", "type": "object", "info": "The privilege to create.: {\"name\": \"string\", \"description\": \"string\", \"pattern\": \"string\"}", "required": false, "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of the privilege. This value cannot be changed.", "pattern": "^[a-zA-Z0-9\\-]{1}[a-zA-Z0-9_\\-\\.]*$" }, "description": { "type": "string" }, "pattern": { "type": "string", "description": "A colon separated list of parts that create a permission string." } } } } ], "output": { "name": "result", "type": "object", "description": "A JSON Object containing status, code and the result", "schema": { "title": "result", "type": "object" } }, "roles": [ "admin" ], "route": { "verb": "POST", "path": "/createPrivilege" }, "task": true }, { "name": "createPrivilege1", "summary": "Create an application type privilege.", "description": "Create an application type privilege.", "input": [ { "name": "body", "type": "object", "info": "The privilege to create.: {\"name\": \"string\", \"description\": \"string\", \"actions\": \"array\", \"domain\": \"string\"}", "required": false, "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of the privilege. This value cannot be changed.", "pattern": "^[a-zA-Z0-9\\-]{1}[a-zA-Z0-9_\\-\\.]*$" }, "description": { "type": "string" }, "actions": { "type": "array", "description": "A collection of actions to associate with the privilege, using BREAD syntax (browse,read,edit,add,delete,all) as well as 'run' for script privileges.", "items": { "type": "string", "enum": [ "READ", "BROWSE", "EDIT", "ADD", "DELETE", "RUN", "ASSOCIATE", "DISASSOCIATE", "ALL" ] } }, "domain": { "type": "string", "description": "The domain (i.e. 'blobstores', 'capabilities' or even '*' for all) that this privilege is granting access to. Note that creating new privileges with a domain is only necessary when using plugins that define their own domain(s)." } } } } ], "output": { "name": "result", "type": "object", "description": "A JSON Object containing status, code and the result", "schema": { "title": "result", "type": "object" } }, "roles": [ "admin" ], "route": { "verb": "POST", "path": "/createPrivilege1" }, "task": true }, { "name": "updatePrivilege", "summary": "Update a wildcard type privilege.", "description": "Update a wildcard type privilege.", "input": [ { "name": "privilegeId", "type": "string", "info": "The id of the privilege to update.: string", "required": true, "schema": { "title": "privilegeId", "type": "string" } }, { "name": "body", "type": "object", "info": "The privilege to update.: {\"name\": \"string\", \"description\": \"string\", \"pattern\": \"string\"}", "required": false, "schema": { "type": "object", "properties": { "name": { "type": "string", "description": "The name of the privilege. This value cannot be changed.", "pattern": "^[a-zA-Z0-9\\-]{1}[a-zA-Z0-9_\\-\\.]*$" }, "description": { "type": "string" }, "pattern": { "type": "string", "description": "A colon separated list of parts that create a permission string." } } } } ], "output": { "name": "result", "type": "object", "description": "A JSON Object containing status, code and the result", "schema": { "title": "result", "type": "object" } }, "rol