Skip to main content
Skip table of contents

How can I get the Goals in project using Rest API

1. Get goal project id

GET https://app.userstorymap.io/smb/goal

Return list goals in a project or in list project.

* Only returns goals in projects which user can browse

Request

QUERY PARAMETERS

projectId string : The project ID goals

projectIds Array<string> : List project IDS. The parameter accepts a comma-separated list. Get all goals in this list projects

Ex: projectIds=10000,10001

Example

CODE
curl --location --request GET 'https://app.userstorymap.io/smb/goal?projectId=10001' \
--header 'Authorization: JWT <PLUGIN_TOKEN>'

2. Get JWT for plugin api

POST https://your-domain.atlassian.net/plugins/servlet/ac/com.devsamurai.plugin.jira.story-mapping/main

Get plugin token api

First, you need to create and get Jira token api: Atlassian guide

Example: Get plugin token by calling api with Jira token

BASH

curl --location --request POST 'https://your-domain.atlassian.net/plugins/servlet/ac/com.devsamurai.plugin.jira.story-mapping/main' \
--header 'content-type: application/x-www-form-urlencoded; charset=UTF-8' \ 
--user 'email@example.com:<api_token>' \
--data-urlencode 'plugin-key=com.devsamurai.plugin.jira.story-mapping' \
--data-urlencode 'product-context={}' \
--data-urlencode 'classifier=json'

Responses

JSON
{
    "addon_key": "com.devsamurai.plugin.jira.story-mapping",
    "uniqueKey": "com.devsamurai.plugin.jira.story-mapping__main",
    "key": "main",
    "moduleType": "generalPages",
    "moduleLocation": "system.top.navigation.bar",
    "title": "Story Mapping Boards",
    "cp": "",
    "general": "1",
    "w": "",
    "h": "",
    "url": "https://www.story-mapping.atlas.devsamurai.com/index.htm?xdm_e=https%3A%2F%2Fdevsamurai-stg.atlassian.net&xdm_c=channel-com.devsamurai.plugin.jira.story-mapping__main&cp=&xdm_deprecated_addon_key_do_not_use=com.devsamurai.plugin.jira.story-mapping&lic=active&cv=1001.0.0-SNAPSHOT&jwt=eyJ0eX...",
    "contextJwt": "eyJ0eX...",
    "structuredContext": "{\"license\":{\"active\":true}}",
    "contentClassifier": "",
    "productCtx": "{}",
    "timeZone": "Asia/Saigon",
    "origin": "https://www.story-mapping.atlas.devsamurai.com",
    "hostOrigin": "https://your-domain.atlassian.net",
    "sandbox": "allow-downloads allow-forms allow-modals allow-popups allow-scripts allow-same-origin allow-top-navigation-by-user-activation allow-storage-access-by-user-activation",
    "apiMigrations": {
        "gdpr": true
    }
}

Get plugin token in contextJwt property

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.