# Authorizing Astera's Server APIs

Follow the steps below to learn how to authenticate Astera's Server APIs.

1. Right-click on the server name in *Server Explorer > Server Connections > DEFAULT > HTTPS://(ServerName):9260*.

![](https://3891069449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F28dJIkGHacXhBlux3efx%2Fuploads%2F5st8h2mjdYEEajmKswFW%2F0.png?alt=media)

2. A wizard will appear with the Astera *Server API Path*. Click on the copy icon located at the bottom-left of the wizard to copy it.

![](https://3891069449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F28dJIkGHacXhBlux3efx%2Fuploads%2FnpdwutixqvbVHzSqjQ5N%2F1.png?alt=media)

A message will appear to confirm that the text has been copied successfully. Click *OK*.

![](https://3891069449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F28dJIkGHacXhBlux3efx%2Fuploads%2FMIOxp9P3H6KhtxO5k65k%2F2.png?alt=media)

## **Importing APIs in Astera**

1. Click the *Import API* option in the REST API Browser and paste the Astera Server API path in the *URL* box. Then click *OK*.

{% hint style="info" %}
**Note:** Check the “*Ignore certificate errors over HTTP/SSL*” option to avoid any certification barriers.
{% endhint %}

![](https://3891069449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F28dJIkGHacXhBlux3efx%2Fuploads%2FhhKA5IaKlRhvppprUGzM%2F3.png?alt=media)

2. A wizard will appear, notifying you about the created shared action file. Click *Yes* to set it up.

You can also click on the .sact file in Project Explorer to configure the authentication settings.

![](https://3891069449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F28dJIkGHacXhBlux3efx%2Fuploads%2FbGymwFbt7Su5f1HtEBrp%2F4.png?alt=media)

The *REST API Browser* will be populated with Astera's Server APIs, which you can use in your dataflow.

![](https://3891069449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F28dJIkGHacXhBlux3efx%2Fuploads%2FfX5wz0uOLEVZAFp9xuvY%2F5.png?alt=media)

3. Right-click on the *Centerprise\_Server* object and select *Properties*.

![](https://3891069449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F28dJIkGHacXhBlux3efx%2Fuploads%2FPuz2lgmzDy5bz2HLppgY%2F6.png?alt=media)

This will open the *REST Connection* screen. Select the *Security Type* as *Bearer Token*, as Astera Server APIs use *Bearer Token* authentication.

![](https://3891069449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F28dJIkGHacXhBlux3efx%2Fuploads%2Fx9UOi5AIUwaHhVxP3V12%2F7.png?alt=media)

Provide the *User Name*, *Password*, and *Token URL* for Bearer Token. Then click *Request Token* to generate a token, and click *OK*. Press Ctrl+S to save changes in the shared action file.

{% hint style="info" %}
**Note:** You will have to regenerate the token if the validity period has expired.
{% endhint %}

![](https://3891069449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F28dJIkGHacXhBlux3efx%2Fuploads%2FIpvh7SslacaVxMCnQFJ3%2F8.png?alt=media)

4. Now, drag-and-drop the */api/ServerInfo* from the REST API Browser to make a GET request.

![](https://3891069449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F28dJIkGHacXhBlux3efx%2Fuploads%2FFeqdsl2PY0sHODnJmGqa%2F9.png?alt=media)

5. Right-click on the object’s header and select *Preview Output*.

![](https://3891069449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F28dJIkGHacXhBlux3efx%2Fuploads%2FTS93IlvyfapDYbrsAs5r%2F10.png?alt=media)

This is how your output would look like:

![](https://3891069449-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F28dJIkGHacXhBlux3efx%2Fuploads%2FIBjOZy1ZxaM4usEFmvqW%2F11.png?alt=media)

This concludes working with Astera's Server API in Astera.
