Change Date Format

By default, GoodData displays the date attributes in the en-US format.

You can enable a different date format for your organization, workspace, or even for individual users. Date attributes are then displayed in the format that you select.

You can select from the following predefined date formats based on the ICU standard:

  • Chinese
  • Chinese (Cantonese)
  • Chinese (Traditional)
  • Czech
  • Dutch
  • English (Australia)
  • English (Great Britain)
  • English (USA)
  • Finnish
  • French
  • French (Canada)
  • German
  • Italian
  • Japanese
  • Portuguese (Brazil)
  • Portuguese (Portugal)
  • Russian
  • Spanish
  • Spanish (Latin America)

Settings Hierarchy

Unless you set a specific date format or first day of the week for a workspace or a user, the settings are inherited from their parents:

  • Workspaces inherit the settings from their parent entity, i.e. parent workspace or organization.
  • Users inherit the date format settings from their workspaces.

Change the Date Format

To change the date format:

  1. Create the formatLocale setting.
  2. Enable the format that you want to use.

The following table shows the IDs that you can use to enable the date formats:

FormatFormat ID
Chinesezh-Hans
Czechcs-CZ
Dutchnl-NL
English GBen-GB
English US (default)en-US
Frenchfr-FR
French (Canada)fr-CA
Germande-DE
Italianit-IT
Japaneseja-JP
Portuguese (Brazil)pt-BR
Portuguese (Portugal)pt-PT
Russianru-RU
Spanishes-ES
Spanish (Latin America)es-419

Organization

To change the date format for the whole organization, use one of the following methods:

UI
API (Bash)
API (Powershell)

Steps:

  1. Go to Settings.

  2. Under Localization > Date Format, click Change.

    date format settings in ui
  3. Select one of the supported date formats and click Apply.

To create the formatLocale organization settings, send the following POST request /api/v1/entities/organizationSettings:

curl $HOST_URL/api/v1/entities/organizationSettings \
  -H "Content-Type: application/vnd.gooddata.api+json" \
  -H "Accept: application/vnd.gooddata.api+json" \
  -H "Authorization: Bearer {API_TOKEN}" \
  -X POST \
  -d '{
    "data":
    {
        "type": "organizationSetting",
        "id": "{some-id}",
        "attributes": {
            "content": {"value": "{FORMAT_ID}"},
            "type": "FORMAT_LOCALE"
        }
    }
}' | jq .

To enable a different date format, send the following PUT request /api/v1/entities/organizationSettings/formatLocale:

curl $HOST_URL/api/v1/entities/organizationSettings/formatLocale \
  -H "Content-Type: application/vnd.gooddata.api+json" \
  -H "Accept: application/vnd.gooddata.api+json" \
  -H "Authorization: Bearer {API_TOKEN}" \
  -X PUT \
  -d '{
    "data":
    {
        "type": "organizationSetting",
        "id": "{some-id}",
        "attributes": {
            "content": {"value": "{FORMAT_ID}"},
            "type": "FORMAT_LOCALE"
        }
    }
}' | jq .

To create the formatLocale organization settings, send the following POST request /api/v1/entities/organizationSettings:

Invoke-RestMethod -Method Post -Uri '$HOST_URL/api/v1/entities/organizationSettings' `
-ContentType 'application/vnd.gooddata.api+json' `
-H @{ 
    'Accept' = 'application/vnd.gooddata.api+json'
    'Authorization' = 'Bearer {API_TOKEN}' 
} `
-Body '{
    "data":
    {
        "type": "organizationSetting",
        "id": "{some-id}",
        "attributes": {
            "content": {"value": "{FORMAT_ID}"},
            "type": "FORMAT_LOCALE"
        }
    }
}' | ConvertTo-Json

To enable a different date format, send the following PUT request /api/v1/entities/organizationSettings/formatLocale:

Invoke-RestMethod -Method Put -Uri '$HOST_URL/api/v1/entities/organizationSettings/formatLocale' `
-ContentType 'application/vnd.gooddata.api+json' `
-H @{ 
    'Accept' = 'application/vnd.gooddata.api+json'
    'Authorization' = 'Bearer {API_TOKEN}' 
} `
-Body '{
    "data":
    {
        "type": "organizationSetting",
        "id": "{some-id}",
        "attributes": {
            "content": {"value": "{FORMAT_ID}"},
            "type": "FORMAT_LOCALE"
        }
    }
}' | ConvertTo-Json

Workspace

To change the date format for individual workspaces, you need to use the API:

API (Bash)
API (Powershell)

To create the formatLocale workspace settings, send the following POST request /api/v1/entities/workspaceSettings:

curl $HOST_URL/api/v1/entities/workspaces/{WORKSPACE_ID}/workspaceSettings \
  -H "Content-Type: application/vnd.gooddata.api+json" \
  -H "Accept: application/vnd.gooddata.api+json" \
  -H "Authorization: Bearer {API_TOKEN}" \
  -X POST \
  -d '{
    "data":
    {
        "type": "workspaceSetting",
        "id": "{some-id}",
        "attributes": {
            "content": {"value": "{FORMAT_ID}"},
            "type": "FORMAT_LOCALE"
        }
    }
}' | jq .

To enable a different date format, send the following PUT request /api/v1/entities/workspaceSettings/formatLocale:

curl $HOST_URL/api/v1/entities/workspaces/{WORKSPACE_ID}/workspaceSettings/formatLocale \
  -H "Content-Type: application/vnd.gooddata.api+json" \
  -H "Accept: application/vnd.gooddata.api+json" \
  -H "Authorization: Bearer {API_TOKEN}" \
  -X PUT \
  -d '{
    "data":
    {
        "type": "workspaceSetting",
        "id": "{some-id}",
        "attributes": {
            "content": {"value": "{FORMAT_ID}"},
            "type": "FORMAT_LOCALE"
        }
    }
}' | jq .

To create the formatLocale workspace settings, send the following POST request /api/v1/entities/workspaceSettings:

Invoke-RestMethod -Method Post -Uri '$HOST_URL/api/v1/entities/workspaces/{WORKSPACE_ID}/workspaceSettings' `
-ContentType 'application/vnd.gooddata.api+json' `
-H @{ 
    'Accept' = 'application/vnd.gooddata.api+json'
    'Authorization' = 'Bearer {API_TOKEN}' 
} `
-Body '{
    "data":
    {
        "type": "workspaceSetting",
        "id": "{some-id}",
        "attributes": {
            "content": {"value": "{FORMAT_ID}"},
            "type": "FORMAT_LOCALE"
        }
    }
}' | ConvertTo-Json

To enable a different date format, send the following PUT request /api/v1/entities/workspaceSettings/formatLocale:

Invoke-RestMethod -Method Put -Uri '$HOST_URL/api/v1/entities/workspaces/{WORKSPACE_ID}/workspaceSettings/formatLocale' `
-ContentType 'application/vnd.gooddata.api+json' `
-H @{ 
    'Accept' = 'application/vnd.gooddata.api+json'
    'Authorization' = 'Bearer {API_TOKEN}' 
} `
-Body '{
    "data":
    {
        "type": "workspaceSetting",
        "id": "{some-id}",
        "attributes": {
            "content": {"value": "{FORMAT_ID}"},
            "type": "FORMAT_LOCALE"
        }
    }
}' | ConvertTo-Json

User

To change the date format for individual users, you need to use the API:

API (Bash)
API (Powershell)

To create the formatLocale user settings, send the following POST request /api/v1/entities/userSettings:

curl $HOST_URL/api/v1/entities/users/{USER_ID}/userSettings \
  -H "Content-Type: application/vnd.gooddata.api+json" \
  -H "Accept: application/vnd.gooddata.api+json" \
  -H "Authorization: Bearer {API_TOKEN}" \
  -X POST \
  -d '{
    "data":
    {
        "type": "userSetting",
        "id": "{some-id}",
        "attributes": {
            "content": {"value": "{FORMAT_ID}"},
            "type": "FORMAT_LOCALE"
        }
    }
}' | jq .

To enable a different date format, send the following PUT request /api/v1/entities/userSettings/formatLocale:

curl $HOST_URL/api/v1/entities/users/{USER_ID}/userSettings/formatLocale \
  -H "Content-Type: application/vnd.gooddata.api+json" \
  -H "Accept: application/vnd.gooddata.api+json" \
  -H "Authorization: Bearer {API_TOKEN}" \
  -X PUT \
  -d '{
    "data":
    {
        "type": "userSetting",
        "id": "{some-id}",
        "attributes": {
            "content": {"value": "{FORMAT_ID}"},
            "type": "FORMAT_LOCALE"
        }
    }
}' | jq .

To create the formatLocale user settings, send the following POST request /api/v1/entities/userSettings:

Invoke-RestMethod -Method Post -Uri '$HOST_URL/api/v1/entities/users/{USER_ID}/userSettings' `
-ContentType 'application/vnd.gooddata.api+json' `
-H @{ 
    'Accept' = 'application/vnd.gooddata.api+json'
    'Authorization' = 'Bearer {API_TOKEN}' 
} `
-Body '{
    "data":
    {
        "type": "userSetting",
        "id": "{some-id}",
        "attributes": {
            "content": {"value": "{FORMAT_ID}"},
            "type": "FORMAT_LOCALE"
        }
    }
}' | ConvertTo-Json

To enable a different date format, send the following PUT request /api/v1/entities/userSettings/formatLocale:

Invoke-RestMethod -Method Put -Uri '$HOST_URL/api/v1/entities/users/{USER_ID}/userSettings/formatLocale' `
-ContentType 'application/vnd.gooddata.api+json' `
-H @{ 
    'Accept' = 'application/vnd.gooddata.api+json'
    'Authorization' = 'Bearer {API_TOKEN}' 
} `
-Body '{
    "data":
    {
        "type": "userSetting",
        "id": "{some-id}",
        "attributes": {
            "content": {"value": "{FORMAT_ID}"},
            "type": "FORMAT_LOCALE"
        }
    }
}' | ConvertTo-Json

Examples

Chinese (zh-Hans)
Date AttributeFormatExample
Dayy/M/d2022/10/17
Day of Monthd日17日
Day of Weekccc周一
Day of YearD290
Houry/M/d H时2022/10/17 13时
Hour of DayH时13时
Minutey/M/d HH:mm2022/10/17 13:10
Minute of Hourm10
Monthy年M月2022年10月
Month of YearLLL10月
Quartery年第Q季度2022年第4季度
Quarter of Yearqqq第四季
Weekw/Y42/2022
Week of Yearw42
Yeary年2022年
Chinese, Cantonese (zh-HK)
Date AttributeFormatExample
Dayy/M/d2022/10/17
Day of Monthd日17日
Day of Weekccc周一
Day of YearD290
Hourd/M/y 上午H時3/6/2023 上午12時
Hour of Day上午H時上午12時
Minuted/M/Y 上午HH:mm3/6/2023 上午12:00
Minute of Hourm10
Monthy年M月2022年10月
Month of YearLLL10月
Quartery年第Q季2023年第三季
Quarter of Yearqqq第一季
Weekw/Y42/2022
Week of Yearw42
Yeary2023
Chinese, Traditional (zh-Hant)
Date AttributeFormatExample
Dayy/M/d2022/10/17
Day of Monthd日17日
Day of Weekccc周一
Day of YearD290
Hourd/M/y 上午H時3/6/2023 上午12時
Hour of Day上午H時上午12時
Minuted/M/y 上午HH:mm3/6/2023 上午12:00
Minute of Hourm10
Monthy年M月2022年10月
Month of YearLLL10月
Quartery年第Q季2023年第三季
Quarter of Yearqqq第一季
Weekw/Y42/2022
Week of Yearw42
Yeary2023
Czech (cs-CZ)
Date AttributeFormatExample
Dayd. M. y17. 10. 2022
Day of Monthd.17.
Day of Weekccccccpo
Day of YearD290
Hourd. M. y H17. 10. 2022 13
Hour of DayH13
Minuted. M. y H:mm17. 10. 2022 13:10
Minute of Hourm10
MonthMMM yříj 2022
Month of YearLLLříj
Quarter'Q'Q yQ4 2022
Quarter of Year'Q'qQ4
Weekw/Y42/2022
Week of Yearw42
Yeary2022
Dutch (nl-NL)
Date AttributeFormatExample
Dayd-M-y17-10-2022
Day of Monthd17
Day of Weekccccccma
Day of YearD290
Hourd-M-y HH17-10-2022 13
Hour of DayHH13
Minuted-M-y HH:mm17-10-2022 13:10
Minute of Hourm10
MonthMMM yokt. 2022
Month of YearLLLokt.
QuarterQQQ yK4 2022
Quarter of YearqqqK4
Weekw/Y42/2022
Week of Yearw42
Yeary2022
English, Australia (en-AU)
Date AttributeFormatExample
Daydd/MM/y17/10/2022
Day of Monthd17
Day of WeekcccMon
Day of YearD290
Hourdd/MM/y, HH a3/6/2007 14 AM
Hour of Dayh a12:00 AM
Minutedd/MM/y, HH:mm a06/06/2023, 12:00 AM
Minute of Hourm10
MonthMMM yJul 2023
Month of YearLLLOct
QuarterQQQ yQ4 2022
Quarter of YearqqqQ4
Weekw/Y42/2022
Week of Yearw42
Yeary2022
English GB (en-GB)
Date AttributeFormatExample
Daydd/MM/y17/10/2022
Day of Monthd17
Day of WeekcccMon
Day of YearD290
Hourdd/MM/y, HH17/10/2022, 13
Hour of DayHH13
Minutedd/MM/y, HH:mm17/10/2022, 13:10
Minute of Hourm10
MonthMMM yOct 2022
Month of YearLLLOct
QuarterQQQ yQ4 2022
Quarter of YearqqqQ4
Weekw/Y42/2022
Week of Yearw42
Yeary2022
English US (en-US)
Date AttributeFormatExample
DayM/d/y10/17/2022
Day of Monthd17
Day of WeekcccMon
Day of YearD290
HourM/d/y, h a10/17/2022, 1 PM
Hour of Dayh a1 PM
MinuteM/d/y, h:mm a10/17/2022, 1:10 PM
Minute of Hourm10
MonthMMM yOct 2022
Month of YearLLLOct
QuarterQQQ yQ4 2022
Quarter of YearqqqQ4
Weekw/Y42/2022
Week of Yearw42
Yeary2022
Finnish (fi-FI)
Date AttributeFormatExample
Dayd.M.y17.10.2022
Day of Monthd17
Day of Weekccccccke
Day of Yeard290
Hourd.M.y HH7.10.2022 13
Hour of DayH2
Minuted.M.y H.mm17.10.2022 1.10
Minute of Hourm10
MonthMMM ykesä 2010
Month of YearLLLkesä
QuarterQQQ yQ2 2013
Quarter of YearqqqQ1
Weekw/Y42/2023
Week of Yearw42
Yeary2023
French (fr-FR)
Date AttributeFormatExample
Daydd/MM/y17/10/2022
Day of Monthd17
Day of Weekccclun.
Day of YearD290
Hourdd/MM/y HH 'h'17/10/2022 13 h
Hour of DayHH 'h'13 h
Minutedd/MM/y HH:mm17/10/2022 13:10
Minute of Hourm10
MonthMMM yoct. 2022
Month of YearLLLoct.
Quarter'T'Q yT4 2022
Quarter of Year'T'qT4
Weekw/Y42/2022
Week of Yearw42
Yeary2022
French, Canada (fr-CA)
Date AttributeFormatExample
Daydd/MM/y17/10/2022
Day of Monthd17
Day of Weekccclun.
Day of YearD290
Hourdd/MM/y HH 'h'17/10/2022 13 h
Hour of DayHH 'h'13 h
Minutedd/MM/y HH:mm17/10/2022 13:10
Minute of Hourm10
MonthMMM yoct. 2022
Month of YearLLLoct.
Quarter'T'Q yT4 2022
Quarter of Year'T'qT4
Weekw/Y42/2022
Week of Yearw42
Yeary2022
German (de-DE)
Date AttributeFormatExample
Dayd.M.y17.10.2022
Day of Monthd17.
Day of WeekccccccMo
Day of YearD290
Hourd.M.y, HH 'Uhr'17.10.2022, 13 Uhr
Hour of DayHH 'Uhr'13 Uhr
Minuted.M.y, HH:mm17.10.2022, 13:10
Minute of Hourm10
MonthMMM yOkt. 2022
Month of YearLLLOkt
QuarterQQQ yQ4 2022
Quarter of YearqqqQ4
Weekw/Y42/2022
Week of Yearw42
Yeary2022
Italian (it-IT)
Date AttributeFormatExample
Daydd/MM/y17/10/2022
Day of Monthd17
Day of Weekccclun.
Day of YearD290
Hourdd/MM/y HH 'h'17/10/2022 13 h
Hour of DayHH 'h'13 h
Minutedd/MM/y HH:mm17/10/2022 13:10
Minute of Hourm10
MonthMMM yoct. 2022
Month of YearLLLoct.
Quarter'T'Q yT4 2022
Quarter of Year'T'qT4
Weekw/Y42/2022
Week of Yearw42
Yeary2022
Japanese (ja-JP)
Date AttributeFormatExample
Dayy/M/d2022/10/17
Day of Monthd日17日
Day of Weekcccccc
Day of YearD290
Houry/M/d H時2022/10/17 13時
Hour of DayH時13時
Minutey/M/d H:mm2022/10/17 13:10
Minute of Hourm10
Monthy年M月2022年10月
Month of YearM月10月
Quartery/QQQ2022/Q4
Quarter of YearqqqQ4
Weekw/Y42/2022
Week of Yearw42
Yeary年2022年
Portuguese, Brazil (pr-BR)
Date AttributeFormatExample
Daydd/MM/y17/10/2022
Day of Monthd17
Day of Weekccccccseg
Day of YearD290
Hourdd/MM/y HH17/10/2022 13
Hour of DayHH13
Minutedd/MM/y HH:mm17/10/2022 13:10
Minute of Hourm10
MonthMMM yout 2022
Month of YearLLLout
QuarterQQQ yT4 2022
Quarter of YearqqqT4
Quarter of YearqqqQ4
Weekw/Y42/2022
Week of Yearw42
Yeary2022
Portuguese, Portugal (pt-PT)
Date AttributeFormatExample
Daydd/MM/y17/10/2022
Day of Monthd17
Day of Weekccccccseg
Day of YearD290
Hourdd/MM/y, HH17/10/2022, 13
Hour of DayHH13
Minutedd/MM/y, HH:mm17/10/2022, 13:10
Minute of Hourm10
MonthMMM yout 2022
Month of YearLLLout
QuarterQQQ yT4 2022
Quarter of YearqqqT4
Quarter of YearqqqQ4
Weekw/Y42/2022
Week of Yearw42
Yeary2022
Russian (ru-RU)
Date AttributeFormatExample
Daydd.MM.y17.10.2022
Day of Monthd17
Day of Weekccccccпн
Day of YearD290
Hourdd.MM.y, HH17.10.2022, 13
Hour of DayHH13
Minutedd.MM.y, HH:mm17.10.2022, 13:10
Minute of Hourm10
MonthLLL yокт. 2022
Month of YearLLLокт.
QuarterQQQ y4-й кв. 2022
Quarter of Yearqqq4-й кв.
Weekw/Y42/2022
Week of Yearw42
Yeary2022
Spanish (es-ES)
Date AttributeFormatExample
Dayd/M/y17/10/2022
Day of Monthd17
Day of Weekccclun
Day of YearD290
Hourd/M/y, H17/10/2022, 13
Hour of DayH13
Minuted/M/y, H:mm17/10/2022, 13:10
Minute of Hourm10
MonthMMM yoct 2022
Month of YearLLLoct
QuarterQQQ yT4 2022
Quarter of YearqqqT4
Weekw/Y42/2022
Week of Yearw42
Yeary2022
Spanish, Latin America (es-419)
Date AttributeFormatExample
Dayd/M/y17/10/2022
Day of Monthd17
Day of Weekccclun
Day of YearD290
Hourd/M/y, H17/10/2022, 13
Hour of DayH13
Minuted/M/y, H:mm17/10/2022, 13:10
Minute of Hourm10
MonthMMM yoct 2022
Month of YearLLLoct
QuarterQQQ yT4 2022
Quarter of YearqqqT4
Weekw/Y42/2022
Week of Yearw42
Yeary2022

Change First Day of the Week

By default GoodData assumes the week begins on Sunday. Consequently, all user interface date pickers are designed to display weeks from Sunday to Saturday, and any data analysis performed at the week level considers Sunday as the first day of the week. This can be changed in the settings so that the week starts on a Monday instead.

The setting can be changed for the entire organization, or for individual workspaces or users.

Organization

To change the first day of the week for the whole organization, use one of the following methods:

UI
API (Bash)
API (Powershell)

Steps:

  1. Go to Settings.

  2. Under Localization > First day of the week, click Change.

    first day of the week settings
  3. Select the day you want your weeks to start on and click Apply.

Make the following API call:

curl $HOST_URL/api/v1/entities/organizationSettings \
-H "Content-Type: application/vnd.gooddata.api+json" \
-H "Accept: application/vnd.gooddata.api+json" \
-H "Authorization: Bearer $API_TOKEN" \
-X POST \
-d '{
  "data": {
    "attributes": {
      "content": {
        "value": "Monday"
      },
      "type": "WEEK_START"
    },
    "id": "weekStart",
    "type": "organizationSetting"
  }
}'|jq .

The first day of the week should now be set to Monday for the entire organization.

To check what your current settings for the first day of the week is, you can make the following API call:

curl $HOST_URL/api/v1/entities/organizationSettings/weekStart \
-H "Accept: application/vnd.gooddata.api+json" \
-H "Authorization: Bearer $API_TOKEN" \
-X GET|jq .

To delete the setting, you can make the following API call:

curl $HOST_URL/api/v1/entities/organizationSettings/weekStart \
-H "Authorization: Bearer $API_TOKEN" \
-X DELETE

Make the following API call:

Invoke-RestMethod -Method Post -Uri "$HOST_URL/api/v1/entities/organizationSettings"`
-ContentType "application/vnd.gooddata.api+json" `
-H @{ 
    'Accept' = "application/vnd.gooddata.api+json"
    'Authorization' = "Bearer $API_TOKEN" 
} `
-Body '{
    "data": {
      "attributes": {
        "content": {
          "value": "Monday"
        },
        "type": "WEEK_START"
      },
      "id": "weekStart",
      "type": "organizationSetting"
    }
}' | ConvertTo-Json

The first day of the week should now be set to Monday for the entire organization.

To check what your current settings for the first day of the week is, you can make the following API call:

Invoke-RestMethod -Method Get -Uri "$HOST_URL/api/v1/entities/organizationSettings/weekStart"`
-H @{ 
    'Accept' = "application/vnd.gooddata.api+json"
    'Authorization' = "Bearer $API_TOKEN" 
} | ConvertTo-Json

To delete the setting, you can make the following API call:

Invoke-RestMethod -Method Delete -Uri "$HOST_URL/api/v1/entities/organizationSettings/weekStart"`
-H @{ 
    'Authorization' = "Bearer $API_TOKEN" 
}

Workspace

To change the first day of the week for individual workspaces, you need to use the API:

API (Bash)
API (Powershell)

Subtitute your <workspace_id> and make the following API call:

curl $HOST_URL/api/v1/entities/workspaces/<workspace_id>/workspaceSettings \
-H "Content-Type: application/vnd.gooddata.api+json" \
-H "Accept: application/vnd.gooddata.api+json" \
-H "Authorization: Bearer $API_TOKEN" \
-X POST \
-d '{
  "data": {
    "attributes": {
      "content": {
        "value": "Monday"
      },
      "type": "WEEK_START"
    },
    "id": "weekStart",
    "type": "workspaceSetting"
  }
}'| jq .

The first day of the week should now be set to Monday.

To check what your current settings for the first day of the week is, you can make the following API call:

curl $HOST_URL/api/v1/entities/workspaces/<workspace_id>/workspaceSettings/weekStart \
-H "Accept: application/vnd.gooddata.api+json" \
-H "Authorization: Bearer $API_TOKEN" \
-X GET \
|jq .

To delete the setting, you can make the following API call:

curl $HOST_URL/api/v1/entities/workspaces/<workspace_id>/workspaceSettings/weekStart \
-H "Authorization: Bearer $API_TOKEN" \
-X DELETE

Subtitute your <workspace_id> and make the following API call:

Invoke-RestMethod -Method Post -Uri "$HOST_URL/api/v1/entities/workspaces/<workspace_id>/workspaceSettings"`
-ContentType "application/vnd.gooddata.api+json" `
-H @{ 
    'Accept' = "application/vnd.gooddata.api+json"
    'Authorization' = "Bearer $API_TOKEN" 
} `
-Body '{
    "data": {
      "attributes": {
        "content": {
          "value": "Monday"
        },
        "type": "WEEK_START"
      },
      "id": "weekStart",
      "type": "workspaceSetting"
    }
}' | ConvertTo-Json

The first day of the week should now be set to Monday.

To check what your current settings for the first day of the week is, you can make the following API call:

Invoke-RestMethod -Method Get -Uri "$HOST_URL/api/v1/entities/workspaces/<workspace_id>/workspaceSettings/weekStart"`
-H @{ 
    'Accept' = "application/vnd.gooddata.api+json"
    'Authorization' = "Bearer $API_TOKEN" 
} | ConvertTo-Json

To delete the setting, you can make the following API call:

Invoke-RestMethod -Method Delete -Uri "$HOST_URL/api/v1/entities/workspaces/<workspace_id>/workspaceSettings/weekStart"`
-H @{ 
    'Authorization' = "Bearer $API_TOKEN" 
}

User

To change the first day of the week for individual users, you need to use the API:

API (Bash)
API (Powershell)

Subtitute your <user_id> and make the following API call:

curl $HOST_URL/api/v1/entities/users/<user_id>/userSettings \
-H "Content-Type: application/vnd.gooddata.api+json" \
-H "Accept: application/vnd.gooddata.api+json" \
-H "Authorization: Bearer $API_TOKEN" \
-X POST \
-d '{
  "data": {
    "attributes": {
      "content": {
        "value": "Monday"
      },
      "type": "WEEK_START"
    },
    "id": "weekStart",
    "type": "userSetting"
  }
}'|jq .

The first day of the week should now be set to Monday.

To check what your current settings for the first day of the week is, you can make the following API call:

curl $HOST_URL/api/v1/entities/users/<user_id>/userSettings/weekStart \
-H "Accept: application/vnd.gooddata.api+json" \
-H "Authorization: Bearer $API_TOKEN" \
-X GET \
|jq .

To delete the setting, you can make the following API call:

curl $HOST_URL/api/v1/entities/users/<user_id>/userSettings/weekStart \
-H "Authorization: Bearer $API_TOKEN" \
-X DELETE

Subtitute your <user_id> and make the following API call:

Invoke-RestMethod -Method Post -Uri "$HOST_URL/api/v1/entities/users/<user_id>/userSettings"`
-ContentType "application/vnd.gooddata.api+json" `
-H @{ 
    'Accept' = "application/vnd.gooddata.api+json"
    'Authorization' = "Bearer $API_TOKEN" 
} `
-Body '{
    "data": {
      "attributes": {
        "content": {
          "value": "Monday"
        },
        "type": "WEEK_START"
      },
      "id": "weekStart",
      "type": "userSetting"
    }

The first day of the week should now be set to Monday.

To check what your current settings for the first day of the week is, you can make the following API call:

Invoke-RestMethod -Method Get -Uri "$HOST_URL/api/v1/entities/users/<user_id>/userSettings/weekStart"`
-H @{ 
    'Accept' = "application/vnd.gooddata.api+json"
    'Authorization' = "Bearer $API_TOKEN" 
} | ConvertTo-Json

To delete the setting, you can make the following API call:

Invoke-RestMethod -Method Delete -Uri "$HOST_URL/api/v1/entities/users/<user_id>/userSettings/weekStart"`
-H @{ 
    'Accept' = "application/vnd.gooddata.api+json"
    'Authorization' = "Bearer $API_TOKEN" 
}