Documentation

Mistake on this page? Email us

DeveloperCertificateApi

Hierarchy

  • ApiBase
    • DeveloperCertificateApi

Index

Constructors

constructor

  • Parameters

    • Optional options: ConnectionOptions
    • Default value responseHandler: function =¬†null
        • (sdkError: SDKError, response: superagent.Response): any
        • Parameters

          • sdkError: SDKError
          • response: superagent.Response

          Returns any

    Returns DeveloperCertificateApi

Methods

complete

  • complete(error: any, response: any, acceptHeader: string, callback?: function): void
  • Parameters

    • error: any
    • response: any
    • acceptHeader: string
    • Optional callback: function
        • Parameters

          Returns any

    Returns void

createDeveloperCertificate

  • createDeveloperCertificate(authorization: string, body: DeveloperCertificateRequestData, callback?: function, requestOptions?: object): superagent.SuperAgentRequest
  • Create a new developer certificate to connect to the bootstrap server. This REST API is intended to be used by customers to get a developer certificate (a certificate that can be flashed into multiple devices to connect to bootstrap server). Note: The number of developer certificates allowed per account is limited. Please see Using your own certificate authority. Example usage: curl -X POST "http://api.us-east-1.mbedcloud.com/v3/developer-certificates\" -H "accept: application/json" -H "Authorization: Bearer THE_ACCESS_TOKEN" -H "content-type: application/json" -d "{ \"name\": \"THE_CERTIFICATE_NAME\", \"description\": \"THE_CERTIFICATE_DESCRIPTION\"}"

    Parameters

    Returns superagent.SuperAgentRequest

currentConfig

  • currentConfig(): object
  • Returns the current configuration of this API module

    Returns object

    • apiKey: any
    • host: any

getDeveloperCertificate

  • getDeveloperCertificate(developerCertificateId: string, authorization: string, callback?: function, requestOptions?: object): superagent.SuperAgentRequest
  • Fetch an existing developer certificate to connect to the bootstrap server. This REST API is intended to be used by customers to fetch an existing developer certificate (a certificate that can be flashed into multiple devices to connect to bootstrap server). Example usage: curl -X GET "http://api.us-east-1.mbedcloud.com/v3/developer-certificates/THE_CERTIFICATE_ID\" -H "accept: application/json" -H "Authorization: Bearer THE_ACCESS_TOKEN"

    Parameters

    • developerCertificateId: string

      A unique identifier for the developer certificate.

    • authorization: string

      Bearer {Access Token}.

    • Optional callback: function
    • Optional requestOptions: object
      • [key: string]: any

    Returns superagent.SuperAgentRequest

request

  • request<T>(options: object, callback?: function): superagent.SuperAgentRequest
  • Type parameters

    • T

    Parameters

    • options: object
      • acceptTypes: Array<string>
      • Optional body?: any
      • contentTypes: Array<string>
      • Optional file?: boolean
      • formParams: __type
      • headers: object
        • [key: string]: string
      • method: string
      • query: __type
      • Optional requestOptions?: object
        • [key: string]: any
      • url: string
      • useFormData: boolean
    • Optional callback: function
        • Parameters

          Returns any

    Returns superagent.SuperAgentRequest