Cumulocity Device enrollment API

Device enroll API to be used by a device to issue an X509 certificate signed by tenant's [certificate authority](#operation/postBulkNewDeviceRequestCollectionResource). The identifier and enrollment OTP for a device must be first shared as a pre-shared-key (PSK) with Cumulocity using the [bulkNewDeviceRequests](#operation/postBulkNewDeviceRequestCollectionResource) endpoint or [NewDeviceRequests](#operation/postNewDeviceRequestCollectionResource) endpoint for certificate provisioning. Internally, ID and ENROLLMENT_OTP fields will be added to the NewDeviceRegistration list with a status of Accepted, serving as temporary device credentials for device authentication. Device re-enroll API to be used by a device to renew its certificate or replace its certificate with its current credentials (being a password or a JWT token).

Operations 2

POST /.well-known/est/simpleenroll Create Device certificate which is signed by tenant's Certificate Authority(CA) #
POST /.well-known/est/simplereenroll Re-Issue certificates to Devices which is signed by tenant's Certificate… #

Documentation

Specifications

Schemas & Data

Other Resources

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/cumulocity:cumulocity-device-enrollment-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

cumulocity-device-enrollment-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: Latest
  title: Cumulocity Device enrollment API
  x-logo:
    url: https://www.cumulocity.com/docs/images/logo-platform.svg
    backgroundColor: '#F8F8F8'
    altText: Cumulocity
    href: https://www.cumulocity.com/api
  description: '# REST implementation


    This section describes the aspects common to all REST-based interfaces of Cumulocity. The interfaces are based on the Hypertext Transfer Protocol 1.1 using HTTPS. ## HTTP usage


    ### Application management


    Cumulocity uses a so-called "application key" to distinguish requests coming from devices and traffic from applications. If you write an application, pass the following header as part of all requests:


    ```markup

    X-Cumulocity-Application-Key:

    ```


    For example, if you registered your application in the Cumulocity Administration application with the key "myapp", your requests should contain the header:


    ```markup

    X-Cumulocity-Application-Key: myapp

    ```


    This makes your application subscribable and billable. If you implement a device, do not pass the key. > **ⓘ Info:** Make sure that you pass the key in **all** requests coming from an application. If you leave out the key,

    > the request will be considered as a device request, and the corresponding device will be marked as "available". ### Limited HTTP clients


    If you use an HTTP client that can only perform GET and POST methods in HTTP, you can emulate the other methods through an additional "X-HTTP-METHOD" header. Simply issue a POST request and add the header, specifying the actual REST method to be executed. For example, to emulate the "PUT" (modify) method, you can use:


    ```http

    POST ... X-HTTP-METHOD: PUT

    ```


    ### Processing mode


    Every update request (PUT, POST, DELETE) executes with a so-called *processing mode*. The processing modes are as follows:


    |Processing mode|Description|

    |---|---|

    |PERSISTENT (default)|Stores data in the Cumulocity database and sends data to the Streaming Analytics engine. Afterwards, Cumulocity returns the result of the request. This is the default mode.|

    |TRANSIENT|Sends data to the Streaming Analytics engine and immediately returns the results asynchronously but does not store data in Cumulocity’s database. This mode saves storage and processing costs and is useful for example when tracking devices in real time without requiring data to be stored.|

    |QUIESCENT|Behaves similar to the persistent mode with the exception that no real-time notifications will be sent.|

    |CEP|Behaves like the transient mode with the exception that no real-time notifications are sent.|


    To explicitly control the processing mode of an update request, you can use the "X-Cumulocity-Processing-Mode" header with a value of either "PERSISTENT", "TRANSIENT", "QUIESCENT" or "CEP":


    ```markup

    X-Cumulocity-Processing-Mode: PERSISTENT

    ```


    > **ⓘ Info:** Events are always delivered to CEP/Apama for all processing modes. This is independent from real-time notifications. ### Authorization


    All requests issued to Cumulocity are subject to authorization. To determine the required permissions, see the "Required role" entries for the individual requests. To learn more about the different permissions and the concept of ownership in Cumulocity, see Getting started > Technical concepts > Security aspects > Access control > Managing roles and assigning permissions in the Cumulocity user documentation. > **⚠️ Important:** In the Cumulocity API, each granular permission is identified by a unique “permission” string, which is prefixed with ROLE_ (for example, ROLE_ALARM_READ, ROLE_INVENTORY_ADMIN). Therefore, permissions are frequently referred to as “roles” throughout the API as well as in the configuration files. For example, the microservice manifest includes a requiredRoles field, which actually expects a permission string. See also the Glossary of the Cumulocity user documentation for the usage of the terms “permission” and “role” in the Cumulocity context. ### Media types


    Each type of data is associated with an own media type. The general format of media types is:


    ```markup

    application/vnd.com.nsn.cumulocity.+json;ver=;charset=UTF-8

    ```


    Each media type contains a parameter `ver` indicating the version of the type.'
servers:
- description: Cumulocity tenant
  url: https://<TENANT_DOMAIN>
security:
- Basic: []
- OAI-Secure: []
- SSO: []
- JWT-IAM: []
tags:
- name: Device enrollment
  description: 'Device enroll API to be used by a device to issue an X509 certificate signed by tenant''s certificate authority. The identifier and enrollment OTP for a device must be first shared as a pre-shared-key (PSK) with Cumulocity using the bulkNewDeviceRequests endpoint or NewDeviceRequests endpoint for certificate provisioning. Internally, ID and ENROLLMENT_OTP fields will be added to the NewDeviceRegistration list with a status of Accepted, serving as temporary device credentials for device authentication.


    Device re-enroll API to be used by a device to renew its certificate or replace its certificate with its current credentials (being a password or a JWT token).'
paths:
  /.well-known/est/simpleenroll:
    post:
      operationId: postSimpleReEnrollDeviceResource
      x-codegen-resource-name: simpleEnrollDevice
      tags:
      - Device enrollment
      security:
      - Basic: []
      summary: Create Device certificate which is signed by tenant's Certificate Authority(CA)
      description: 'A device already registered for certificate provisioning by sharing `PSK`(as mentioned above) can request for a new X509 certificate

        using the PSK as basic auth realm, along with a Certificate Sigining Request (CSR) using enroll API. Upon successfull validation and

        certificate generation, a certificate in `PKCS#7` will be returned.


        > **⚠️ Important:** CSR must be a valid `PKCS#10` with deviceID as Common Name (CN).


        > **ⓘ Info:** CSR request with `CA:TRUE` constraint is not supported.'
      x-code-samples:
      - lang: cURL
        source: 'curl --location --request POST "https://<TENANT_DOMAIN>/.well-known/est/simplereenroll" \

          --header "Authorization: Basic <AUTHORIZATION>" \

          --header "Content-Transfer-Encoding: base64" \

          --header "Content-Type: application/pkcs10" \

          --data-raw ''<Payload>''

          '
      - lang: C#
        source: 'var client = new RestClient("https://<TENANT_DOMAIN>/.well-known/est/simplereenroll");

          client.Timeout = -1;


          var request = new RestRequest(Method.POST);

          request.AddHeader("Authorization", "Basic <AUTHORIZATION>");

          request.AddHeader("Content-Transfer-Encoding", "base64");

          request.AddParameter("application/pkcs10", "<Payload>",  ParameterType.RequestBody);


          IRestResponse response = client.Execute(request);

          Console.WriteLine(response.Content);

          '
      - lang: Java
        source: "Unirest.setTimeouts(0, 0);\nHttpResponse<String> response = Unirest.post(\"https://<TENANT_DOMAIN>/.well-known/est/simplereenroll\")\n    .header(\"Authorization\", \"Basic <AUTHORIZATION>\")\n    .header(\"Content-Type\", \"application/pkcs10\")\n    .header(\"Content-Transfer-Encoding\", \"base64\")\n    .body(\"<Payload>\")\n    .asString();\nSystem.out.println(response);\n"
      - lang: Node.js
        source: "var unirest = require(\"unirest\");\nvar req = unirest(\"POST\", \"https://<TENANT_DOMAIN>/.well-known/est/simplereenroll\")\n    .headers({\n        \"Authorization\": \"Basic <AUTHORIZATION>\",\n        \"Content-Type\": \"application/pkcs10\",\n        \"Content-Transfer-Encoding\": \"base64\"\n    })\n    .send(JSON.stringify( <Payload> ))\n    .end(function (res) {\n        if (res.error) throw new Error(res.error);\n        console.log(res.raw_body);\n    });\n"
      - lang: Python
        source: "import requests\nimport json\n\nurl = \"https://<TENANT_DOMAIN>/.well-known/est/simplereenroll\"\nheaders = {\n  \"Authorization\": \"Basic <AUTHORIZATION>\",\n  \"Content-Transfer-Encoding\": \"base64\",\n  \"Content-Type\": \"application/pkcs10\"\n}\nresponse = requests.request(\"POST\", url, headers=headers, json.dumps(<Payload>))\nprint(response.text.encode(\"utf8\"))\n"
      requestBody:
        required: true
        content:
          application/pkcs10:
            schema:
              type: string
              format: binary
              example: MIICVjCCAT4CAQAwETEPMA0GA1UEAwwGSWRfMTA0MIIBIjANBgkqhkiG9w0BAQEF AAOCAQ8AMIIBCgKCAQEAtz41ucrtb28Hk4FDkGK19DRHD6Z3oyZ6CtS1xycWkf9h za+6DI6ugBLRsxgRQi+VcBSQ8BRgPQTj3eEKi6s+7ySLpzuA4HlihPWo7dWhioXM 3lZ4jiyPlCAZALYHNWbgk6Pehk6eNKMz8998Kq2GnzUQ65grAjjr4Q+HQJGOUYx/ gsEQoCdhKRjG0xcI75OE+CW9Wg/VU4RMboMke5LUNHwnHIDy8Ie2C3VozVS6mRgE 1VIBXWDm9fjaGEzYf25yWk0fzo/d/osLxReJgBq3FOz1TM4m9c3CtJUiedVXmeuf OPwNlTjGDOWgQfeMmXaPC0jHp0YNfV+txdWwEPev6QIDAQABoAAwDQYJKoZIhvcN AQELBQADggEBAHIZu0WR6hfiIsPxhBrdo5w0bt/2X6gy+tHdTI017rf1FUww6OLs wKtpPC0km4BS20hxbD9NLb3FNQEUCf80YQFSGbi0ziY0okVN7gaes6XiNofZbYx9 TQF0oo+QWTa+otjoXpw8lLY9Ak6T9MppYh2GlRIiio2VzFu4Vg+FEoyNw9jvQwLj LP0eYTIQ/2SX1DnxMBzCm4MzieXJ7DJPHAdqADUfKbFNuaVjdxG9uRZdP3LRL90g 6YxfFb8c+RcOL/lAKdSP5/rIUI05z0agzGMajsEnqxRXSk+CwlZo2D02++STStY9 pELozQsItNjEVrfWta6353kOguYYqjB1rNY=
      responses:
        '201':
          description: A device certificate was created.
          content:
            application/pkcs7-mime;smime-type=certs-only:
              schema:
                type: string
                example: '-----BEGIN CERTIFICATE----- MIIEGjCCAwKgAwIBAgIEEgEgJDANBgkqhkiG9w0BAQsFADBSMQswCQYDVQQGEwJF VTELMAkGA1UECAwCUEwxGzAZBgNVBAoMEklvdCBEZXZpY2UgRmFjdG9yeTEZMBcG A1UEAwwQSW90RGV2RmFjdG9yeUludDAeFw0yNDA5MDIxMjA1MDlaFw0yNTA5MTIx MjA1MDlaME8xCzAJBgNVBAYTAkVVMQswCQYDVQQIDAJQTDEbMBkGA1UECgwSSW90 IERldmljZSBGYWN0b3J5MRYwFAYDVQQDDA1Jb3REZXZpY2UyMDAwMIIBIjANBgkq hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAumzj99zMfC9wyTHun3dEIsL/wk3VyWTw dtgdFx/lt5uPfvTAJ62GLWzYsCe2Q54G13IG/S1SJTfsNURlvUrPvXed97/yhe/o g0IjLz5VGNfsNUw+51KI7Tcc1SunHvUKD7TtgZ4rVga5q1DFxmzZ/dFXJpG5VAgu pwojACMv+T6qKGlUsF5F/1coOVrUo26aby4mg7C6ZsbwzXj2PbIvNXHCcrBrUU7S L2EI89RTgFZCVnZtW1SozDBn8S+WafKFBSgD0GwNtAkkffNWji1fW645gDc80u7w bQuA/xtPXK6+giGB8jN3daVjp6pzbzrYzDTYoC2vyL2A4F4zUedBhwIDAQABo4H6 MIH3MAkGA1UdEwQCMAAwEQYJYIZIAYb4QgEBBAQDAgWgMDMGCWCGSAGG+EIBDQQm FiRPcGVuU1NMIEdlbmVyYXRlZCBDbGllbnQgQ2VydGlmaWNhdGUwHQYDVR0OBBYE FONhE6IdItEwn95lmf7uKjVLYpJ1MB8GA1UdIwQYMBaAFFSopCQWaJLzT3DYQi8n +nA1S86RMA4GA1UdDwEB/wQEAwIF4DAdBgNVHSUEFjAUBggrBgEFBQcDAgYIKwYB BQUHAwEwMwYDVR0fBCwwKjAooCagJIYiaHR0cDovL2xvY2FsaG9zdDoxNTAwMC9v bmxpbmUtY3JsczANBgkqhkiG9w0BAQsFAAOCAQEAJmPPKVSR4nAf8TZG3dPeGRX4 V6a8mT52HKQYTilicq0cwec1zSyjayX6lsvqbENkA/L8fN64fpOSmb/+HUbSWP7Y F3ZYKalZVS9XlDUz6TWSA1LiWiDx1E28W2ubCOzUBRg7ux+59hoSGldtGrpxZ1Ox +H9kemart76xC+l85EYys7YARL5vk5Jwyr/f1/FpXasaGBFbC4aJ+2fNJkn1LJal II8Fl3GElheLpYM20VNw2J0PoD8I17htLfT+j7IwPyJ+uZcNxl60GiqDoBafRWuq oTL1SYqewv/dTU98aZUXG9yFLPgldQ2YfMli6vOC2gcjW2vun+IP7T/5ZU/xtA== -----END CERTIFICATE-----'
        '401':
          $ref: '#/components/responses/unauthorizedError'
        '403':
          $ref: '#/components/responses/accessDenied'
  /.well-known/est/simplereenroll:
    post:
      operationId: postWellKnownEstSimplereenroll
      x-codegen-resource-name: simpleReEnrollDevice
      tags:
      - Device enrollment
      security:
      - Basic: []
      - OAI-Secure: []
      - SSO: []
      - JWT-IAM: []
      summary: Re-Issue certificates to Devices which is signed by tenant's Certificate…
      description: 'Required roles


        ROLE_DEVICE


        A device using existing authentication mechanism (Basic or JWT) along with a Certificate Sigining Request, can request re-issue using reenroll API.

        Upon successfull validation and certificate generation, a certificate in `PKCS#7` will be returned.


        > **⚠️ Important:** CSR must be a valid `PKCS#10` with deviceID as Common Name (CN).


        > **ⓘ Info:** CSR request with `CA:TRUE` constraint is not supported.'
      x-code-samples:
        $ref: '#/paths/~1.well-known~1est~1simpleenroll/post/x-code-samples'
      requestBody:
        required: true
        content:
          application/pkcs10:
            schema:
              type: string
              format: binary
              example: MIICVjCCAT4CAQAwETEPMA0GA1UEAwwGSWRfMTA0MIIBIjANBgkqhkiG9w0BAQEF AAOCAQ8AMIIBCgKCAQEAtz41ucrtb28Hk4FDkGK19DRHD6Z3oyZ6CtS1xycWkf9h za+6DI6ugBLRsxgRQi+VcBSQ8BRgPQTj3eEKi6s+7ySLpzuA4HlihPWo7dWhioXM 3lZ4jiyPlCAZALYHNWbgk6Pehk6eNKMz8998Kq2GnzUQ65grAjjr4Q+HQJGOUYx/ gsEQoCdhKRjG0xcI75OE+CW9Wg/VU4RMboMke5LUNHwnHIDy8Ie2C3VozVS6mRgE 1VIBXWDm9fjaGEzYf25yWk0fzo/d/osLxReJgBq3FOz1TM4m9c3CtJUiedVXmeuf OPwNlTjGDOWgQfeMmXaPC0jHp0YNfV+txdWwEPev6QIDAQABoAAwDQYJKoZIhvcN AQELBQADggEBAHIZu0WR6hfiIsPxhBrdo5w0bt/2X6gy+tHdTI017rf1FUww6OLs wKtpPC0km4BS20hxbD9NLb3FNQEUCf80YQFSGbi0ziY0okVN7gaes6XiNofZbYx9 TQF0oo+QWTa+otjoXpw8lLY9Ak6T9MppYh2GlRIiio2VzFu4Vg+FEoyNw9jvQwLj LP0eYTIQ/2SX1DnxMBzCm4MzieXJ7DJPHAdqADUfKbFNuaVjdxG9uRZdP3LRL90g 6YxfFb8c+RcOL/lAKdSP5/rIUI05z0agzGMajsEnqxRXSk+CwlZo2D02++STStY9 pELozQsItNjEVrfWta6353kOguYYqjB1rNY=
      responses:
        '201':
          description: A device certificate was created.
          content:
            application/pkcs7-mime;smime-type=certs-only:
              schema:
                type: string
                format: binary
                example: '-----BEGIN CERTIFICATE----- MIIEGjCCAwKgAwIBAgIEEgEgJDANBgkqhkiG9w0BAQsFADBSMQswCQYDVQQGEwJF VTELMAkGA1UECAwCUEwxGzAZBgNVBAoMEklvdCBEZXZpY2UgRmFjdG9yeTEZMBcG A1UEAwwQSW90RGV2RmFjdG9yeUludDAeFw0yNDA5MDIxMjA1MDlaFw0yNTA5MTIx MjA1MDlaME8xCzAJBgNVBAYTAkVVMQswCQYDVQQIDAJQTDEbMBkGA1UECgwSSW90 IERldmljZSBGYWN0b3J5MRYwFAYDVQQDDA1Jb3REZXZpY2UyMDAwMIIBIjANBgkq hkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAumzj99zMfC9wyTHun3dEIsL/wk3VyWTw dtgdFx/lt5uPfvTAJ62GLWzYsCe2Q54G13IG/S1SJTfsNURlvUrPvXed97/yhe/o g0IjLz5VGNfsNUw+51KI7Tcc1SunHvUKD7TtgZ4rVga5q1DFxmzZ/dFXJpG5VAgu pwojACMv+T6qKGlUsF5F/1coOVrUo26aby4mg7C6ZsbwzXj2PbIvNXHCcrBrUU7S L2EI89RTgFZCVnZtW1SozDBn8S+WafKFBSgD0GwNtAkkffNWji1fW645gDc80u7w bQuA/xtPXK6+giGB8jN3daVjp6pzbzrYzDTYoC2vyL2A4F4zUedBhwIDAQABo4H6 MIH3MAkGA1UdEwQCMAAwEQYJYIZIAYb4QgEBBAQDAgWgMDMGCWCGSAGG+EIBDQQm FiRPcGVuU1NMIEdlbmVyYXRlZCBDbGllbnQgQ2VydGlmaWNhdGUwHQYDVR0OBBYE FONhE6IdItEwn95lmf7uKjVLYpJ1MB8GA1UdIwQYMBaAFFSopCQWaJLzT3DYQi8n +nA1S86RMA4GA1UdDwEB/wQEAwIF4DAdBgNVHSUEFjAUBggrBgEFBQcDAgYIKwYB BQUHAwEwMwYDVR0fBCwwKjAooCagJIYiaHR0cDovL2xvY2FsaG9zdDoxNTAwMC9v bmxpbmUtY3JsczANBgkqhkiG9w0BAQsFAAOCAQEAJmPPKVSR4nAf8TZG3dPeGRX4 V6a8mT52HKQYTilicq0cwec1zSyjayX6lsvqbENkA/L8fN64fpOSmb/+HUbSWP7Y F3ZYKalZVS9XlDUz6TWSA1LiWiDx1E28W2ubCOzUBRg7ux+59hoSGldtGrpxZ1Ox +H9kemart76xC+l85EYys7YARL5vk5Jwyr/f1/FpXasaGBFbC4aJ+2fNJkn1LJal II8Fl3GElheLpYM20VNw2J0PoD8I17htLfT+j7IwPyJ+uZcNxl60GiqDoBafRWuq oTL1SYqewv/dTU98aZUXG9yFLPgldQ2YfMli6vOC2gcjW2vun+IP7T/5ZU/xtA== -----END CERTIFICATE-----'
        '401':
          $ref: '#/components/responses/unauthorizedError'
        '403':
          $ref: '#/components/responses/accessDenied'
      x-operation-id-source: normalized
      x-operation-id-original: postSimpleReEnrollDeviceResource
components:
  schemas:
    error:
      type: object
      properties:
        error:
          description: The type of error returned.
          type: string
        message:
          description: A human-readable message providing more details about the error.
          type: string
        info:
          description: A URI reference [[RFC3986](https://tools.ietf.org/html/rfc3986)] that identifies the error code reported.
          type: string
  responses:
    unauthorizedError:
      description: Authentication information is missing or invalid.
      content:
        application/vnd.com.nsn.cumulocity.error+json:
          schema:
            $ref: '#/components/schemas/error'
          example:
            error: security/Unauthorized
            message: 'Invalid credentials! : Bad credentials'
            info: https://www.cumulocity.com/guides/reference-guide/#error_reporting
    accessDenied:
      description: Not enough permissions/roles to perform this operation.
      content:
        application/vnd.com.nsn.cumulocity.error+json:
          schema:
            $ref: '#/components/schemas/error'
          example:
            error: security/Forbidden
            message: Access is denied.
            info: https://www.cumulocity.com/guides/reference-guide/#error_reporting
  securitySchemes:
    Basic:
      type: http
      scheme: basic
      description: 'The authorization header is formed as `Basic <Base64(<tenantID>/<c8yuser>:<password>)>`. For instance, if your tenantID, username and password are **t0071234**, **testuser** and **secret123** respectively, you can generate the Base64 string with the following command:


        ```shell

        $ echo -n t0071234/testuser:secret123 | base64

        ```


        and your authorization header would look like this:


        ```

        "Authorization": "Basic dDAwNzEyMzQvdGVzdHVzZXI6c2VjcmV0MTIz"

        ```

        '
    OAI-Secure:
      type: http
      scheme: bearer
      description: 'This is the recommended authorization method because it provides high security using authorization tokens to prove the identity of the user, and it is the default login mode on creating new tenants. This mode is an enhancement of the previous OAuth Internal authentication (available prior to 10.13.0).


        For more details about OAI-Secure authentication, see [Platform administration > Authentication > Basic settings > Login settings](https://www.cumulocity.com/docs/authentication/basic-settings/#login-settings) in the Cumulocity user documentation.

        '
    SSO:
      type: oauth2
      description: "The login with SSO requires a correct configuration on the [Cumulocity side](https://www.cumulocity.com/docs/authentication/sso/). With the configuration, an additional button is available on the Login page. After clicking the button, the user is redirected to authenticate with the configured authorization server. On successful login, the user is redirected to Cumulocity.\n\nAuthentication details are exchanged using cookies. There are two parts to it, the first is the authentication cookie that is handled automatically by the Cumulocity platform. The second is the XSRF-TOKEN cookie. When a client receives the cookie, it should take the value and put it in the X-XSRF-TOKEN request header in all subsequent requests.\n\nThe flow of authenticating with authentication code grant is as follows:\n\n![Authentication flow](images/oauth-simple-flow.png)\n\nThe first request executed by the browser is:\n\n```http\nGET /tenant/loginOptions\nHost: https://<TENANT_DOMAIN>\nAccept: application/vnd.com.nsn.cumulocity.loginoptioncollection+json\n```\n\nResponse sample:\n\n```json\n{\n    \"loginOptions\": [\n        {\n            \"buttonName\": \"Login with oauth\",\n            \"grantType\": \"<AUTHORIZATION_CODE>\",\n            \"initRequest\": \"https://<TENANT_DOMAIN>/tenant/oauth?response_type=code&tenant_id=<TENANT_ID>\",\n            \"self\": \"https://<TENANT_DOMAIN>/tenant/loginOptions/oauth2\",\n            \"type\": \"oauth2\"\n        },\n        ...\n    ],\n    \"self\": \"http://<TENANT_DOMAIN>/tenant/loginOptions/\"\n}\n```\n\nThe browser must invoke the request provided in the initRequest parameter.\n\nThe initRequest initiates the redirect, in which the user is prompted for credentials. After successful login, the user is redirected back to the browser, where it must capture the code request parameter. Then the request to exchange the code for the token is as follows:\n\n```http\nPOST /tenant/oauth?grant_type=authorization_code&code=<CODE>\nHost: https://<TENANT_DOMAIN>\n```\n\nA successful response will have no body but the following response headers:\n\n```\nSet-Cookie: authorization=<TOKEN>;\nSet-Cookie: XSRF-TOKEN=<XSRF-TOKEN>;\n```\n\nThe authorization cookie is valid for two weeks.\n"
      flows:
        clientCredentials:
          tokenUrl: /tenant/oauth?grant_type=authorization_code&code=<CODE>
          scopes: {}
    JWT-IAM:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'This kind of authentication substitutes the JWT authentication with OAuth2 access tokens from your Identity and Access Management (IAM).

        You can enable this in the [SSO configuration](https://www.cumulocity.com/docs/authentication/sso/).


        The HTTP header must include:


        ```

        "Authorization": "Bearer <Access token>"

        ```


        When a request with a bearer token in the header is received, Cumulocity checks if the access token is from your IAM (that is, if authentication is enabled in your SSO configuration), and verifies the authenticity of

        the token remotely against the IAM.

        '
x-tagGroups:
- name: Platform
  tags:
  - Platform API
- name: Alarms
  tags:
  - Alarm API
  - Alarm notification API
  - Alarms
- name: Applications
  tags:
  - Application API
  - Applications
  - Application versions
  - Application binaries
  - Bootstrap user
  - Current application
- name: Audits
  tags:
  - Audit API
  - Audits
- name: Device control
  tags:
  - Device control API
  - Device control notification API
  - Operations
  - Bulk operations
  - Device credentials
  - New device requests
  - Device control via SMS
- name: Events
  tags:
  - Event API
  - Event notification API
  - Events
  - Attachments
- name: Feature toggles
  tags:
  - Feature toggles API
- name: Identity
  tags:
  - Identity API
  - External IDs
- name: Inventory
  tags:
  - Inventory API
  - Inventory notification API
  - Managed objects
  - Binaries
  - Child operations
  - Query language
- name: Measurements
  tags:
  - Measurement API
  - Measurement notification API
  - Measurements
  - Measurements specifics
- name: Notifications 2.0
  tags:
  - About notifications 2.0
  - Notification 2.0 API
  - Subscriptions
  - Tokens
- name: Real-time notifications
  tags:
  - Real-time notification API
- name: Retentions
  tags:
  - Retention rules
- name: Tenants
  tags:
  - Tenant API
  - Tenants
  - Tenant applications
  - Trusted certificates
  - Device statistics
  - Usage statistics
  - Options
  - Login options
  - Login tokens
  - System options
- name: Users
  tags:
  - User API
  - Current User
  - Users
  - Groups
  - Roles
  - Inventory Roles
  - Device Permissions
- name: Certificate
  tags:
  - Certificate authority
  - Device enrollment
x-provenance:
  method: harvested
  publisher: Cumulocity
  source: https://cumulocity.com/api/core/dist/c8y-oas.yml
  note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json);
    stamped by stamp-openapi-provenance.py (roadmap#793)