This documentation supports the 18.02 version of BMC Digital Workplace. To view the latest version, select the version from the Product version menu.

Getting started with the BMC Digital Workplace REST API

The API follows the REST architectural style, so resources, HTTP verbs, and status codes are used. JSON is used for request and response bodies.

Transport scheme

Access to the BMC Digital Workplace Catalog REST API is over the transport scheme configured for your application server, either HTTP or HTTPS. You can call API endpoints from any scripting or programming language that supports the configured transport scheme.

The default configuration supports an HTTP connection. For information on configuring the HTTPS connection, see Configuring access to the BMC Digital Workplace Catalog server over SSL.

Base URI

The following base URI is used for calling the BMC Digital Workplace Catalog server: /api/myit-sb/

Call the API endpoint from the full application host URL. If the host URL includes a port number, include the port number in your requests. Preface the URL with the correct scheme (HTTP/HTTPS).

Following are examples of the base URI:

Base URI format typeExample
Local machine
http://localhost:8008/api/myit-sb
HTTPS connection
https://calbroservices.com:8008/api/myit-sb
HTTP connection
http://calbroservices.com:8008/api/myit-sb
A server without a port assigned to it
http://calbroservices.com/api/myit-sb

Default header 

Unless an API endpoint requires a different header, the following header is required for all requests:

default-bundle-scope: myit-sb
Content-Type: application/json
X-Requested-By: <any_value>

Authentication

To be able to make REST API calls, you need to log in to the application by using the users/login endpoint to be granted a session token, which is valid for about 30 minutes. The system-generated token must be included in all subsequent calls for the system to trust requests from the application or script that has been granted that token. This token is typically sent back and forth as a AR-JWT cookie, although it can also be included inside the header.

Was this page helpful? Yes No Submitting... Thank you

Comments

  1. Roland Bruegger

    Question concerning the last chapter "Authentication" on this page. Last sentence: "… although it can also be included inside the header."

    Would this be the format for the Authorization key - I mean with or without prefix AR-JWT? (I guess with prefix)

    AR-JWT {{token}}

    Adding an example would make it clear - Thanks.

    Nov 29, 2018 01:39
    1. Olga Kutetska

      Hello!

      Here is an example of the header format:

      .header("Cookie", "AR-JWT=eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ0QU9EN2xSbEppMVVxUGxFTFZFamVXR3VTd0NVcUZxaG43c0xLUk9meFpjaHpkYWJcL1ZqdHJoMnVyc1JSOUlWeEZ3QkpqbDZRR2lJZjhNUmFLY0kycDBaaUtDK0daaDZnSElYNGlJMnJFZjBuRFwvSm9FQTV3bFE9PSIsIm5iZiI6MTU0MzU4MjU0")

      You can also read about the Cokkies format in the online Microsoft documentation:

      https://msdn.microsoft.com/en-us/library/ms909371.aspx

      Nov 30, 2018 07:26