Appearance
Session Cookie (via Browser)
When interacting with the API manually (e.g., via SwaggerUI, Postman, curl) as a logged-in user, authentication relies on the HttpOnly session cookie (cmp-access-token) saved in your browser upon successful manual login to the main portal.
This access token can only retreived manually after a successful login via a browser and cannot be retrieved via an API call.
Why HttpOnly?
Tokens in HttpOnly cookies can’t be retrieved via API or JavaScript because they’re protected from access by client-side code. This prevents attackers from stealing them through XSS, making it a more secure way to store authentication data compared to localStorage or regular cookies.
Option 1: Using SwaggerUI Directly
This method is the most straightforward for users already logged into the main portal. It allows you to interact with the API without needing to extract and manually set cookies.
- Log In: Ensure you have an active, authenticated session in the main portal at https://private.cloud.swisscom.ch within your current browser. This sets the required
cmp-access-tokencookie. - Access SwaggerUI: Navigate to the appropriate SwaggerUI interface in the same browser session:
- Orchestration API: https://api.private.cloud.swisscom.ch/orchestration
- Tenancy API: https://api.private.cloud.swisscom.ch/tenancy
- Execute Requests: Authentication should occur automatically as the browser sends the cookie. Select an endpoint, click "Try it out," provide parameters, and "Execute." You generally do not need to use the "Authorize" button within SwaggerUI itself.

Option 2: Manual Cookie Extraction
Use this method for external tools (Postman, curl, ...) or if experiencing issues with automatic cookie sending in SwaggerUI. Since the cmp-access-token cookie is HttpOnly, it cannot be accessed by JavaScript, requiring manual extraction from a browser's DevTools.
- Log In: Ensure you are logged into the main portal (https://private.cloud.swisscom.ch) in your web browser.
- Open DevTools: Open your browser's Developer Tools (usually F12).
- Capture Request: Go to the Applications > Storage > Cookies (for Chrome) view and look for the entry called
cmp-access-token(orcmp-access-token-stageon the stage environment) and copy its value.
- Use in Postman:
- In your Postman request (targeting an API endpoint like
https://api.private.cloud.swisscom.ch/...), go to the "Headers" tab. - Add a new header:
- Key:
Cookie - Value:
cmp-access-token=[paste copied value here]
- Key:
- In your Postman request (targeting an API endpoint like
- Use in curl:
- Add the cookie header using the
-Hor--headeroption when calling an API endpoint (e.g.,https://api.private.cloud.swisscom.ch/orchestration/[endpoint]):
bash# Example for Orchestration API curl -H "Cookie: cmp-access-token=[paste copied value here]" \ [other curl options] \ https://api.private.cloud.swisscom.ch/orchestration/[endpoint] - Add the cookie header using the
Note
The cmp-access-token value is tied to your browser session established on https://private.cloud.swisscom.ch. It will expire based on the application's session timeout policy. You will need to retrieve a fresh value if your session ends or the token expires.
