New Project Provisioning and PostgreSQL

Petr Kolencik

There are several changes to the project provisioning API that will impact developers and customers in the coming weeks. In this blog post, we will cover several questions and issues that may come-up during the transition period to use the updated API with mandatory authorization token field.

If you don’t have any authorization token, you can become GoodData registered Developer and we will give you your own authorization token.

First, let’s go through the key dates. The authorization token will be required from Dec 1 and enforced from R83.1 (scheduled for ~Dec 5). Both existing and new GoodData customers will be provided the authorization token(s) to be able to provision new projects. Second change consists of switching the default database engine from MySQL to PostgreSQL. This will happen as part of R83 release scheduled for ~Dec 1.

Creating blank projects with authorization token

The following parameters are part of the project provisioning API when creating new empty projects: title, summary, authorization token and database engine. Till R83 (scheduled for Dec 1), the default DB engine is MySQL. Due to planned switch to PostgreSQL as a default engine, most of the customer tokens are already allocated on PostgreSQL warehouses.

There are several possible scenarios with respect to the database engine parameter and provided token:

  • Database engine: Default, MySQL, or PostgreSQL
  • Authorization token: associated with MySQL vs PostgreSQL database engine

To be able to successfully create new projects, the database engine (default or explicitly selected) have to match the database engine associated with the authorization token. Please, keep this in mind when using the new functionality and changing the on boarding process during the transition period towards default PostgreSQL engine. If you are still on MySQL, it may be necessary to explicitly fill-in the DB engine parameter for project provisioning API calls before migrating to PostgreSQL. In case you need to change database engine associated with your authorization token, please, contact support (support@gooddata.com).

Here are two examples of project provisioning requests and related issues that you may encounter (recommended resolution is included with each case).

Example: Filling-in authorization token for new project provisioning

  • API URI: secure.gooddata.com/gdc/projects
  • JSON payload
{"project": {
    "content": {"authorizationToken": "xxxxxxxxxxxxxxx", "guidedNavigation": 1},
    "meta": {"title": "Project title", "summary": "Project description", "projectTemplate": ""}
}}     
  • Possible error message: “Project group ‘xxxxxxxxxxxxxxx’ not found”
  • Recommended action: Please, check if you are using the correct token as a 15 characters long combination of letters and digits (make sure spaces or any other characters are excluded).

Example: Selecting database engine for project provisioning

  • API URI: /gdc/projects
  • JSON payload:
{"project": {
    "content": {"authorizationToken": "xxxxxxxxxxxxxxx", "driver": "mysql", "guidedNavigation": 1},
    "meta": {"title": "Project title", "summary": "", "projectTemplate": ""}
}}     
  • Possible error message: The requested DWH host is not associated with the project group ‘xxxxxxxxxxxxxxx’
  • Recommended action: Change requested or default engine or contact support to change token/warehouse association.

Creating template projects with authorization token

To create projects based on a template, additional template parameter needs to be filled in addition to the database driver and token. Since templates are being created specifically for individual databases (in our case MySQL or PostgreSQL), they need to be compatible with the rest of the parameters. Again, as in the case of blank projects, if you are still on MySQL - it may be necessary to explicitly set default DB driver to make sure project provisioning will work seamlessly after the planned switch to PostgreSQL as default DB driver in R83.

Example: Project provisioning using templates

  • API URI: /gdc/projects
  • JSON payload:
{"project": {
    "content": {"authorizationToken": "xxxxxxxxxxxxxxx", "driver": "mysql", "guidedNavigation": 1},
    "meta": {"title": "Project title", "summary": "", "projectTemplate": "/projectTemplates/TEMPLATE_NAME/VERSION"}
}}     
  • Possible error: Attempted to create project using template incompatible with the requested DB engine.
  • Recommended action: Making sure token, database engine, and template are all compatible.

After migrating to PostgreSQL (including migration and switch to PostgreSQL templates), you may experience that generating new projects will take longer. This may be due to the fact that project provisioning optimizations for PostgreSQL are still in progress. Please, contact us if this issue is critical for your use case.

References

Please, refer to the following post and documentation for further details regarding the new functionality and planned changes:

Upcoming changes for developers
API documentation

Dev's Newsletter

Subscribe Now