Skip to main content

Get Started with APIs

What Is an API?

An API, or application programming interface, allows you to programmatically interact with an application. Programs can use an API talk to each other to expose functionality and exchange data across the internet.

What Can I Use an API For?

An API enables you to create a script that performs the same actions you can take through a user interface. You can use an API to automate repetitive tasks or introduce business logic into your use of an application. For example, when you add a user to a given department within your organization, you can script a program that adds them as a user in Alteryx with the necessary permissions and access.

How Does a REST API Work?

REST stands for Representational State Transfer. REST is the pattern for making requests to and getting responses from a set of URIs over the web. Let’s cover a few terms that you need to know to get started with a REST API.

Resources

The term REST API refers to an API that you access via the HTTP protocol at a set of URIs (uniform resource identifiers). These URIs represent the various resources with which a program can interact. A resource is the component of the API you want to manage. A REST API is made up of one or more resources. Some common Alteryx resources are users, workflows, and schedules. The URIs for resources are often referred to as endpoints and resemble URLs used to navigate to web pages. Resources typically have multiple actions, also known as methods, that you can perform.

Methods

  • GET: The GET method allows you to read or view a resource. For example, the GET method on a users resource allows you to read or view a list of users.

  • POST: The POST method allows you to create a resource. For example, the POST method on a users resource allows you to create a new user.

  • PUT: The PUT method allows you to update a resource. Specifically, the PUT method replaces the existing resource. For example, the PUT method on a users resource allows you to update by replacing existing user details with the user information you provide.

  • PATCH: The PATCH method allows you to update a resource. Specifically, the PATCH method makes partial changes to an existing resource. For example, the PATCH method on a users resource allows you to update specific details for an existing user with the user information you provide.

  • DELETE: The DELETE method allows you to delete a resource. For example, the DELETE method on a users resource allows you to delete an existing user.

What's Next?