Skip to content

Document for local testing of UAS API#13913

Open
jinidev wants to merge 4 commits intolatestfrom
doc-UAS-api-test-local
Open

Document for local testing of UAS API#13913
jinidev wants to merge 4 commits intolatestfrom
doc-UAS-api-test-local

Conversation

@jinidev
Copy link
Copy Markdown
Contributor

@jinidev jinidev commented Apr 15, 2026

Resolves JIRA:

Summary

A Guide that provides instructions for developers to test User Activity Service (UAS) endpoints locally

Testing UAS endpoints locally requires several setup steps to handle authentication, CORS issues, and session management.
This document outlines all necessary configurations.
Included some Troubleshooting steps as well

Copilot AI review requested due to automatic review settings April 15, 2026 11:59
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a developer guide describing how to locally test User Activity Service (UAS) endpoints in Simorgh, covering auth/session handling and CORS constraints commonly encountered in local environments.

Changes:

  • Introduces new MDX documentation for local UAS endpoint testing
  • Describes local-only workarounds for token refresh, cookie/token handling, and CORS
  • Adds a troubleshooting section and resource links for further reading

Comment thread docs/Testing-UAS-Endpoints-Locally.mdx
Comment thread docs/Testing-UAS-Endpoints-Locally.mdx Outdated
Comment thread docs/Testing-UAS-Endpoints-Locally.mdx Outdated
Comment thread docs/Testing-UAS-Endpoints-Locally.mdx Outdated
Comment thread docs/Testing-UAS-Endpoints-Locally.mdx Outdated
Comment thread docs/Testing-UAS-Endpoints-Locally.mdx
Comment thread docs/Testing-UAS-Endpoints-Locally.mdx
Comment thread docs/Testing-UAS-Endpoints-Locally.mdx
Comment thread docs/Testing-UAS-Endpoints-Locally.mdx Outdated
jinidev and others added 2 commits April 15, 2026 15:51
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Member

@elvinasv elvinasv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could probably also mention that ckns_id is needed, otherwise we'll hide the UAS button (at least for now)

});
```

### Local Development Workaround: Authorization Bearer Header
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this part needed? I think it will work locally if we follow Step 3: Obtain and Store Authentication Token steps, therefore Authorization header shouldn't be needed?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, these are required.
Simply copying and pasting the ckns_atkn cookie won’t be enough to trigger UAS locally.
We also need to include the Authorization header steps, as this won’t work locally.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you referring to the token refresh or UAS GET/CREATE requests? I was able to run it locally without adding Authorization header 🤔 #13890 (review)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants