GithubHelp home page GithubHelp logo

pim-api's Introduction

PIM Samples

Getting Started

To use the PIM API samples in this project, credentials (AppKey and AppSecret) must first be obtained by contacting Optimizely support at [email protected].

IMPORTANT Credentials provided will be readonly and limited to Http GET operations!

Once credentials have been obtained, create a document in the solution root folder called ConnectionInformation.json from the following sample code

{
  "AppKey": "Enter the App Key",
  "AppSecret": "Enter the App Secret"
}

Then simply start the console application to run the example test queries by entering their query number or name using Visual Studio or the .NET cli command in the checkout out code folder

dotnet run

Requirements

Any applications using this PIM API codebase must support at least one of the following

Important Notes

  • API uses OData
  • Queryies that specify a $top will never include a next link.
  • Queries that do not specify $top will return at most 1,000 results. If more are available a next link will be provided for pagination in the response.
  • The console application does not demonstrate iterating a full product set, but sample code is available in the EntityIteratorTests.cs class in the test project.
  • JSON Serialization can be done with either Newtonsoft.Json or System.Text.Json implemented using a custom IJsonSerializer interface in the Pim API Project.

Entities

The following PIM entities are available in this API:

  • Assets
  • CategoryTree
  • Product OData Open Type
  • Property
  • PropertyGroup
  • Template
  • Website

Serializers

Both Newtonsoft.Json and System.Text.Json are supported. Basic serialization and deserialization is available in the PimApi.Serialization namespace. Entities do not utilize any special attributes that each serializer provides to allow for choice. If a different serializer is desired an IJsonSerializer interface is provided for customization, but will not be supported.

Known Issues

 // example of request with nested $expand that should work but does not
 // the workaround is to not use nested $expands and do a second request to get extra data
 var shouldWorkButFails = '/products?$expand=categorytrees($expand=categorytree($select=name,id))';

Useful Resources

pim-api's People

Contributors

bmcdavidepi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.