openapi: 3.0.0 info: title: Agents version: 2.0.0 description: Agents API Documentation contact: name: OpsRamp Support email: support@opsramp.com url: 'https://www.opsramp.com/about-opsramp/contact-us/' servers: - url: 'https://api.opsramp.com' description: Partner - All Others - url: 'https://{subdomain}.api.opsramp.com' description: Partner or Client custom branded sub-domain variables: subdomain: default: demo description: Custom sub-domain assigned to the client paths: '/api/v2/tenants/{tenantId}/agents/{platform}/download/{package-name}': summary: Download Linux Agent description: Downloads the Linux agents. get: tags: - agents responses: '200': description: OK content: application/octet-stream: schema: type: string format: byte readOnly: true example: '' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error-messages' examples: error-messages: value: code: '0002' message: Invalid package-name description: |- This usually followed after calling the Get Agent Package for Linux API. 1. To capture the agent file:Use the package name from the response headers with the specific header package-name. The content of the file is available in the response body. 2. Create a file with the same name as provided in the header and then write the contents of the response body into the file. operationId: downloads-package-get parameters: - $ref: '#/components/parameters/tenantId' - schema: type: string enum: - LINUX in: path name: platform required: true description: The operating system on which you want to deploy the agent. Supported is LINUX - schema: type: string name: package-name in: path required: true description: 'Describes the supported linux flavour agent binary. /agents/{platform}/info to get the list of package names.' '/api/v2/tenants/{tenantId}/agents/{platform}/info': summary: Get Agent Package Details description: Gets the details of agent package names. get: tags: - agents responses: '200': description: OK content: application/json: schema: type: object properties: name: type: string description: Name of the Agent package which is available for deployment. version: type: string size: type: integer 'checksumType ': type: string description: Checksum type checksum: type: string description: checksum value generation: type: string examples: example-linux-agent: value: name: opsramp-agent-9.0.2-1.x86_64.rpm version: 9.0.2-1 size: 45726770 checksum: 2cecbc472d2ba5a3b9dde21ff03a0054eb8b46f700cf67541cc758eac5f82b58 checksumType: SHA-256 generation: G2 example-free-bsd-agent: value: name: opsramp-agent-12.0.0-1_freebsd12-amd64.txz version: 12.0.0-1 size: 30565824 checksum: 8dc3206b371b1ea2bce4e35cb47eddddf16011d5ccc2ef5635915a72a1b35c11 checksumType: SHA-256 generation: G2 example-windows-exe-agent: value: name: nraccessInst.exe registryKey: \HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\OpsRamp\Agent version: 6.00.0026 size: 25757552 checksum: 119d23cddade87cad959efe3dc50b83b14fa360fcd101bc8741f34048cd2dd23 checksumType: SHA-256 generation: G2 example-windows-msi-agent: value: name: OpsRampAgent.msi registryKey: \HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\OpsRamp\Agent version: 6.00.0026 size: 25757552 checksum: 119d23cddade87cad959efe3dc50b83b14fa360fcd101bc8741f34048cd2dd23 checksumType: SHA-256 generation: G2 '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error-messages' examples: example-error: value: code: '002' message: Invalid architecture parameters: - schema: type: string enum: - ubuntu - redhat - amazon - fedora - sles - freebsd10 - freebsd11 - freebsd12 - WindowsMSI - WindowsEXE in: query name: distName required: true description: 'Distribution name of the operating system on which you want to deploy the agent. For windows platform use WindowsEXE,WindowsMSI' - schema: type: string enum: - amd64 - i686 - x86_64 - i386 in: query name: architecture required: true description: Supported os architectures. Please see the above descriptions description: |- This endpoint is usually followed by an API call to download agent.Response JSON payload contains package name, package size, package checksum based on the platform on which agent gets installed. ### Sample URLs 1. To query `windows` exe packageName use `{baseurl}/api/v2/tenants/{tenantId}/agents/windows/info?distName=WindowsEXE&architecture=i386` 2. To query `windows` msi packageName use `{baseurl}/api/v2/tenants/{tenantId}/agents/windows/info?distName=WindowsMSI&architecture=i386` 3. To query `linux` packageName use `{baseurl}/api/v2/tenants/{clientId}/agents/LINUX/info?distName=ubuntu&architecture=amd64` 4. To query `freebsd` msi packageName use `{baseurl}/api/v2/tenants/{clientId}/agents/LINUX/info?distName=freebsd10&architecture=amd64` ### Supported os architectures ( used in query parameter "architecture" ) 1. 64-bit and 32-bit operating system architectures. 2. For Ubuntu distributions, use amd64 (64-bit) or i686 (32-bit). 3. For all other distributions including windows, use x86_64 (64-bit) or i386 (32-bit). 4. For freebsd10, freebsd11 and freebsd12 use amd64 only. operationId: downloads-package-platform-get parameters: - $ref: '#/components/parameters/tenantId' - schema: type: string enum: - LINUX - WINDOWS in: path name: platform required: true description: Operating system on which you want to deploy the agent '/api/v2/tenants/{tenantId}/agents/deployAgentsScript': summary: Download Linux Agent Installation Script description: |- Downloads the Linux agent installation script for given configuration environment like a regular installation or proxy based installation get: tags: - agents responses: '200': description: OK content: application/octet-stream: schema: type: string description: '' format: binary readOnly: true example: 'Script file in Text ' '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error-messages' examples: example-errors: value: code: '0002' message: Invalid scriptType parameters: - schema: type: string default: shell enum: - shell - python - ansible in: query name: scriptType description: The type of the script to be downloaded(Shell or Python) - $ref: '#/components/parameters/profileUUID' description: |- This payload has the octet-stream of the deployment script. ### Prescribed headers: 1. Content-Type: application/octet-stream 2. Accept : application/octet-stream ### Example urls: 1. https://server/api/v2/tenants/client_id/agents/deployAgentsScript?scriptType=SHELL 2. https://server/api/v2/tenants/client_id/agents/deployAgentsScript?scriptType=PYTHON 3. https://server/api/v2/tenants/client_id/agents/deployAgentsScript?scriptType=ANSIBLE 4. Default scriptType = SHELL i..e https://server/api/v2/tenants/client_14/agents/deployAgentsScript - Values are case insensitive supports (SHELL or shell ,ANSIBLE or ansible) 5. https://server/api/v2/tenants/client_id/agents/deployAgentsScript?scriptType=SHELL&profileUUID=5ea2df1f-287a-481d-b847-90a5cfedb674 ### Response payload: Consists of the octet-stream of the queried script. summary: '' operationId: download-deployment parameters: - schema: type: string name: tenantId in: path required: true description: ClientId of the tenant '/api/v2/tenants/{tenantId}/agents/windows': summary: Download Windows Agent description: This returns the octet-stream payload. Downloads the regular installer or proxy based installer. get: tags: - agents responses: '200': description: OK content: application/octet-stream: schema: type: string format: binary readOnly: true examples: example-download: value: binary data '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error-messages' examples: example-invalid-distribution: value: code: '0002' message: Invalid distName example-invalid-package: value: code: '0002' message: Invalid package-name parameters: - schema: type: string enum: - EXE - MSI default: EXE in: query name: agentType description: Downloads the binary type of the agent installer - $ref: '#/components/parameters/profileUUID' summary: '' description: |- ### Prescribed headers 1. Content-Type: application/octet-stream 2. Accept : application/octet-stream ### Example urls: 1. https://server/api/v2/tenants/client_id/agents/windows?agentType=MSI 2. https://server/api/v2/tenants/client_id/agents/windows?agentType=EXE 3. Default agentType = EXE i..e https://server/api/v2/tenants/client_id/agents/windows - Values are case insensitive supports (exe or EXE) 4. https://server/api/v2/tenants/client_id/agents/windows?agentType=MSI&profileUUID=5ea2df1f-287a-481d-b847-90a5cfedb674 ### Response payload: Consists of the octet-stream of the agent installer in the requested format operationId: downloads-windows-get parameters: - schema: type: string name: tenantId in: path required: true description: ClientId of the tenant '/api/v2/tenants/{tenantId}/agents/updates': x-new-path: true summary: Agent Auto-Updates description: Post request to auto-update resources to latest Agent version. parameters: - $ref: '#/components/parameters/tenantId' post: operationId: post-api-v2-tenants-tenantId-agents-update description: |- Details on executing the endpoint ### Notes - This request enables to post request for auto-update resources to the latest version of agent. - The request is asynchronous to scale for bulk operations. - User can perform - Bulk request to auto-update all resources within scope. - Selected resources to have the auto-update. - User needs to - Query and check for resources with agent version for successful update. - Supported conditions in filterCriteria - IN : Includes all of the listed resources in csv - commas separate value (csv) refers as AND : "condition-1,condition-2" refers to condition-1 AND condition-2 responses: '202': description: Accepted content: application/json: schema: type: object properties: message: type: object properties: filter: type: string description: Used filter status: type: string description: Status message examples: example-updated-linux-os: value: message: filter: os ='Linux' status: Agents auto-update enabling in progress example-updated-7.0: value: message: filter: 'filterCriteria : agentVersion= ''7.0'' ' status: Agents auto-update enabling in progress example-resource: value: message: filterCriteria: id = 'de93495e-07f4-492d-8461-ec2786464f41' status: Agents auto-update enabling in progress example-few-resources: value: message: filterCriteria: 'id IN (''1f15bdb9-a30e-459b-b2bd-d9eea20197d1'' , ''de93495e-07f4-492d-8461-ec2786464f41'')' status: Agents auto-update enabling in progress example-all-resources: value: message: filter: All Resources status: Agents auto-update enabling in progress example-no-updates-with-condtion: value: message: filter: os ='Linux' status: Agents auto-update disabling in progress '400': description: Bad Request content: application/json: schema: $ref: '#/components/schemas/error-messages' examples: example-auto-update-errors: value: code: '0002' message: Invalid Filter Criteria requestBody: content: application/json: schema: type: object properties: filterCriteria: type: string description: Describes the conditional filtered resource's agent auto-update update: type: string description: Option to not allow agent auto-update example: do-not-allow examples: update-linux-os-resources: value: filterCriteria: os = 'Linux' update-agent-7.0-versions: value: filterCriteria: agentVersion = '7.0' example-few-resources: value: filterCriteria: 'id IN (''1f15bdb9-a30e-459b-b2bd-d9eea20197d1'' , ''de93495e-07f4-492d-8461-ec2786464f41'')' example-resource: value: filterCriteria: ' id = ''de93495e-07f4-492d-8461-ec2786464f41''' example-all-resources: value: {} update-linux-os-and-agent-version-resources: value: filterCriteria: 'os = ''Linux'',agentVersion = ''7.0''' example-no-updates: value: update: do-not-allow example-no-updates-with-condtion: value: filterCriteria: 'os = ''Linux'',agentVersion = ''7.0''' update: do-not-allow description: |- ### Notes Usable attributes in the filterCriteria string - os - agentVersion - id - update : "do-not-allow" supported values tags: - agents summary: Enable agent auto-updates '/api/v2/tenants/{tenantId}/agentPolicies/{policyId}/devices': summary: Assign Agent Resources Policy description: Assigns agent resource policies. post: tags: - agents responses: '200': description: OK content: application/json: schema: type: object properties: failedEntities: type: object properties: entityID: type: string failedCount: type: integer successCount: type: integer examples: example-agent-policy-applied: value: failedEntities: 023471da-698b-3a2e-1e93-6dbaca8eea23: No device 023471da-698b-3a2e-1e93-6dbaca8eea23 found under client client_5 failedCount: 1 successCount: 2 requestBody: content: application/json: schema: type: array items: type: object properties: id: type: string required: - id examples: example-resources: value: - id: 042761ba-542e-4a7a-8e38-3ebbea7eeb16 - id: 023471da-698b-3a2e-1e93-6dbaca8eea23 - id: 855eb82e-3064-40a1-a26e-77efabe300da operationId: agent-policy description: List resources with agent policy parameters: - $ref: '#/components/parameters/tenantId' - schema: type: string name: policyId in: path required: true description: Agent policy uuid to apply '/api/v2/tenants/{tenantId}/agentProfiles/{profileId}/devices': summary: Assign Master Agent profile to Resources description: Assign the Agent management profile (master agent) profile to the agent installed resources. post: description: The API endpoint purpose is to assign the Agent management profile (master agent) profile to the agent installed resources. tags: - agents responses: '200': description: OK content: application/json: schema: type: object properties: failedEntities: type: object properties: entityId: type: string failedCount: type: integer successCount: type: integer examples: example-master-agent-profiles: value: failedEntities: a982812c-28f7-433e-bba0-f349d2f33a38: No device a982812c-28f7-433e-bba0-f349d2f33a38 found under client 8d35e688-6808-e2c0-2794-7b71034c6edd failedCount: 1 successCount: 2 requestBody: content: application/json: schema: type: array items: type: object properties: id: type: string description: UUIDs of agent-installed devices required: - id examples: example-master-agent-profiles: value: - id: 042761ba-542e-4a7a-8e38-3ebbea7eeb16 - id: 023471da-698b-3a2e-1e93-6dbaca8eea23 - id: a982812c-28f7-433e-bba0-f349d2f33a38 summary: '' operationId: profiles parameters: - $ref: '#/components/parameters/tenantId' - schema: type: string in: path name: profileId required: true description: Assign agent profile uuid components: securitySchemes: accessToken: type: oauth2 flows: clientCredentials: tokenUrl: 'https://subdomain.api.opsramp.com' scopes: {} parameters: tenantId: in: path name: tenantId schema: type: string required: true description: Describes the uuid of the tenant profileUUID: name: profileUUID in: query required: false schema: type: string description: The gateway profile uuid schemas: error-messages: type: object properties: code: type: string message: type: string tags: - name: agents description: Agent tag