Global API

Updated 2 months ago by Copado Solutions


Copado's Global API is available as of version 10. Global API class access, included in the Copado User permission set, is required.

Copado's Global API allows you to invoke methods to conveniently automate some time-consuming tasks. From Salesforce, you may review Global API methods and their signature. In order to do so, follow these steps:

  1. Open Salesforce's Setup.
  2. Navigate to Apex Classes.
  3. Open the Global API Apex class.
  4. Review methods and signature from the Class Summary tab.

Supported Methods

  • Get Copado licenses Information:
    • Will provide total, available, and used information for your Copado licenses.
    • Signature:copado.GlobalAPI.CopadoLicenses getLicenseInformation()
  • Upsert a license:
    • Insert or update a Copado license.
    • Signature: String upsertCopadoLicense(Id userId, copado.GlobalAPI.UserLicense licenseDetails)
  • Delete a Copado License
    • Remove a Copado License
    • Signature:Boolean deleteCopadoLicense(Id userId)entation/global-api
  • List a Copado License
    • Review licenses assignments per user.
    • Signature:List listCopadoLicenses()
You can review inner classes and methods by going to Setup > Apex Classes > GlobalAPI

Sample Apex Anonymous Global API Call

copado.GlobalAPI copadoGlobalAPI = new copado.GlobalAPI(); System.debug(copadoGlobalAPI.getLicenseInformation()); System.debug(copadoGlobalAPI.listCopadoLicenses()[0]);
Id userId = Id.valueOf(copadoGlobalAPI.listCopadoLicenses()[0].userId);
copado.GlobalAPI.UserLicense UL = new copado.GlobalAPI.UserLicense(UserId,False,False,False,False,False);
UL.isCSTEnabled =true;

How did we do?