API test script