# 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://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2F0QhN51BSdszteQYFEqjs%2F1-CP-Server-API-Path.png?alt=media\&token=6f2ab64b-7d8a-47b1-ac11-8aa0e8ac68cf)

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

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FQPawH9wJrAbUgZ7p0RwN%2F2-CP-Server-Path-Copy.png?alt=media\&token=27fd007c-09da-4fb6-a91c-77ddf58c3e7a)

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

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FepWd6waBO5NMN1tQbsq8%2F3-Successfully-Copied.png?alt=media\&token=5f43dfa4-18db-43c8-818f-6fb7f9edc9a7)

### Importing APIs in Astera

3. Click the *Import API* option in the 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://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FcbBF2MFi2VMdU8VHvw5r%2F4-URL.png?alt=media\&token=0de34ef0-c448-4c54-bc36-80e0cc508385)

4. 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://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FLpjv9OgH16RM8v1G40jl%2F5-Sact-file.png?alt=media\&token=4d571566-6c1c-4fac-9705-301e0cde91fe)

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

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2Fixgj6uztHbwZElPpxlfG%2F6-REST-API-Browser-Panel.png?alt=media\&token=c6d0d24a-d419-4f7f-b73d-1c74e62a3cbb)

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

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2F16iI11mvk7QvB6dmnYTr%2F9-properties.png?alt=media\&token=79214e3d-9ba7-45da-a147-aa8e1bc2a77b)

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

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FfCC8XDPWStwlTStAT2EF%2F7-Bearer-Token.png?alt=media\&token=4f24f288-2ad7-4323-887d-29ca77c2ab65)

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://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FFg2ZpnBm8hVi5rbaUTcl%2F8-token-generated.png?alt=media\&token=c9e63c9b-95fe-4b6f-93a7-6be54fcc4e2e)

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

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FVD3bUakeNSLuEjvviDPJ%2Fserver-info.png?alt=media\&token=6008c7e5-a626-4469-82db-d506779f6d25)

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

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FGKKxErz9pvD2tUfwZOlS%2Fpreview-get-output.png?alt=media\&token=6fe366c0-7ada-4758-8808-aaa7e257b75d)

This is how your output would look like:

![](https://3083465318-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsR50Wa7EwZGlmPSAMkkf%2Fuploads%2FUxfPwUWS3ihCPjTgiqTo%2Foutput-preview-get.png?alt=media\&token=e53a470c-159a-4ed3-bcf8-b18c88569a4e)

This concludes working with Astera’s Server API.

<br>
