You can use the v2 REST API to access resources in your Optimizely X projects. This API closely mirrors the functionality of the Optimizely UI; its endpoints have predictable, resource-oriented URLs.
The REST API supports both Optimizely Web and Full Stack. Both products share many of the same data models, so endpoints like Experiments and Projects can be used for both. Some fields are shared between Web and Full Stack while others are specific to one product. See the field's description for the applicable product or products.
The v2 API is intended for use with Optimizely X. It can also be used to read data from Optimizely Classic, but to write data to Classic you must use the v1 API.
For information on how to migrate from Optimizely Classic to Optimizely X, see the REST API migration guide.
The v2 API endpoints are defined using the OpenAPI Specification. This enables you to create API clients in any programming language using the Swagger Generator, or use any off-the-shelf HTTP client to compose and send requests. See OpenAPI / Swagger for more information.
The API returns JSON in the body of responses. If a value isn't set for a field (meaning, the value is null), the field won't appear in the JSON response.
The preferred method of authenticating with the API is using OAuth 2.0. However, to make our API easily explorable, we have implemented Personal tokens. Personal tokens have replaced the tokens used by our v1 API.
Review the API Conventions in our documentation. If you have any questions, you can ask the developer community, or you can submit a ticket to the developer support team. We'll be happy to assist you.
This link accesses the Optimizely REST API Reference.
Updated almost 2 years ago