API Integration

TMDB GET /search API enables search of movie by name and release year.

curl --request GET \
     --url 'https://api.themoviedb.org/3/search/movie?query=Atlas&include_adult=false&language=en-US&page=1&year=2024-05-23' \
     --header 'Authorization: Bearer api_read_access_token' \
     --header 'accept: application/json'

Allow Domain

Click on Gear / Cog-wheel icon.

Add Allowed domains https://api.themoviedb.org. Click Save

We now granted permission for CRM to interact with TMDB Service APIs.

Add API

Click on + Add API.

Choose Rest Api.

Publish

You can copy-and-paste the VADL code below.

<?xml version="1.0"?>
<api method="get">
    <rest method="get">
        <url>https://api.themoviedb.org/3/search/movie</url>
        <headers>
            <header name="Authorization" value="Bearer eyJhbGciOiJIUzI1NiJ9.eyJhdWQiOiIwM2ZjNDdkNDIzNjFjMDc5MmQ1ZWQ0Y2NmNmFkMTQzMSIsInN1YiI6IjY2NWQ3NjU5ZTI2MDUxMTA5ODkwNmQ5ZCIsInNjb3BlcyI6WyJhcGlfcmVhZCJdLCJ2ZXJzaW9uIjoxfQ.ZCr_HrIWH-PMlvq5bcZ8hh5TTsIKCKXgHwAwZB0iBm0"></header>
        </headers>
        <parameters>
            <parameter name="query" value="@moviename"></parameter>
            <parameter name="year" value="@releasedon" presence="optional"></parameter>
            <parameter name="include_adult" value="false"></parameter>
        </parameters>
    </rest>
</api>

Validate

Open Playground to validate with sample input.

It worked.