Open Source PM Tools
  • Welcome
  • User guide
    • User management
    • Initiatives
    • Backlogs
    • Bugs
  • API Reference
    • API overview
    • /account
    • /org
    • /user
    • /backlogs
    • /items
    • /initiatives
    • /bugs
    • /comments
    • /subscribers
    • /connections
    • /search
    • /other
  • Install and Operate
    • Ubuntu 18.04
    • Kubernetes
  • Contributing
    • Pull Requests
Powered by GitBook
On this page
  • Create an org
  • Get org info
  • Switch orgs
  • Update an org
  • Delete an org
  • Get users
  • Validate an user invite token
  • Generate an invite link
  • Remove users
  • Grant admin
  • Revoke admin
  • Reset password

Was this helpful?

  1. API Reference

/org

These methods allow you to create, delete and switch orgs. Other org methods allow you to invite and remove users from orgs.

Create an org

POST https://pm415.com/api/org

Creates an organization.

Headers

Name
Type
Description

Authentication

string

Authorization: Bearer 50ca9ba0f7b1444fa55d5

Request Body

Name
Type
Description

object

{"name" : "myOrg"}

{
    "success": true,
    "organization": {
        "name": "myOrg",
        "updated_at": "2019-04-20T19:22:13.740Z",
        "created_at": "2019-04-20T19:22:13.740Z",
        "id": 15
    },
    "user": {
        "id": 4,
        "email": "mattreider@tmail.com",
        "password": "f115e42cc1a509ed5a03879574e71",
        "firstName": "Matthew",
        "lastName": "Reider",
        "isActive": 1,
        "confirmedAt": "2019-04-08T02:38:54.000Z",
        "createdAt": "2019-04-08T02:38:34.000Z",
        "updatedAt": "2019-04-08T02:38:54.000Z",
        "apiKey": "50ca9ba0f7b14f1932a1f81",
        "organizations": [
            {
                "id": 6,
                "name": "foo",
                "createdAt": "2019-04-08T02:38:34.000Z",
                "updatedAt": "2019-04-08T02:38:34.000Z",
                "roles": [
                    {
                        "id": 1,
                        "role": "Admin",
                        "createdAt": "2019-04-08T02:30:37.000Z",
                        "updatedAt": "2019-04-08T02:30:37.000Z"
                    }
                ]
            }
        ]
    }
}
{
    "statusCode": 400,
    "error": "Bad Request",
    "message": "\"Name\" is required",
    "success": false
}

Get org info

GET https://pm415.com/api/org

Gets info about all of the orgs. There are no request parameters - only a response.

Headers

Name
Type
Description

Authentication

string

Authorization: Bearer 50ca9ba0f7b1444fa55d5

{
    "success": true,
    "organizations": [
        {
            "id": 6,
            "name": "foo",
            "createdAt": "2019-04-08T02:38:34.000Z",
            "updatedAt": "2019-04-08T02:38:34.000Z",
            "roles": [
                {
                    "id": 1,
                    "role": "Admin",
                    "createdAt": "2019-04-08T02:30:37.000Z",
                    "updatedAt": "2019-04-08T02:30:37.000Z"
                }
            ]
        },
        {
            "id": 15,
            "name": "myOrg",
            "createdAt": "2019-04-20T19:22:13.000Z",
            "updatedAt": "2019-04-20T19:22:13.000Z",
            "roles": [
                {
                    "id": 1,
                    "role": "Admin",
                    "createdAt": "2019-04-08T02:30:37.000Z",
                    "updatedAt": "2019-04-08T02:30:37.000Z"
                }
            ]
        }
    ],
    "current": {
        "id": 6,
        "name": "foo",
        "createdAt": "2019-04-08T02:38:34.000Z",
        "updatedAt": "2019-04-08T02:38:34.000Z",
        "roles": [
            {
                "id": 1,
                "role": "Admin",
                "createdAt": "2019-04-08T02:30:37.000Z",
                "updatedAt": "2019-04-08T02:30:37.000Z"
            }
        ]
    }
}

Switch orgs

POST https://pm415.com/api/org/switch/:orgid

Switches orgs and generates a new token. This is useful if you are building a user interface, or CLI tool, and want to operate on one org at a time. The org you operate on is encapsulated in the token. Switching orgs, and tokens, allows you to operate on different orgs without having to save sessions artifacts (cookies, web storage, files, etc) on the client.

Path Parameters

Name
Type
Description

:orgid

number

The ID of the org you want to switch to

Headers

Name
Type
Description

Authentication

string

Authorization: Bearer 50ca9ba0f7b1444fa55d5

{
    "success": true,
    "organization": 1,
    "token": "00jf9w4dog73jfosdfu"
}

Update an org

PUT https://pm415.com/api/org/:orgid

Update an org's name

Path Parameters

Name
Type
Description

:orgid

number

The ID of the org you want to update

Headers

Name
Type
Description

Authentication

string

Authorization: Bearer 50ca9ba0f7b1444fa55d5

Request Body

Name
Type
Description

object

{"name": "updatedOrgName"}

Delete an org

DELETE https://pm415.com/api/org/:orgid

Path Parameters

Name
Type
Description

:orgid

number

The ID of the org you want to delete

Headers

Name
Type
Description

Authentication

string

Authorization: Bearer 50ca9ba0f7b1444fa55d5

{
    "success": true
}

Get users

GET https://pm415.com/api/org/:orgid/users

Gets information about an organization's users

Path Parameters

Name
Type
Description

:orgid

number

The ID of the org you want to query

Headers

Name
Type
Description

Authentication

string

Authorization: Bearer 50ca9ba0f7b1444fa55d5

{
    "success": true,
    "users": [
        {
            "userId": 4,
            "email": "mattr@tmail.com",
            "firstName": "Matthew",
            "lastName": "Reider",
            "isActive": 1,
            "role": "Admin"
        },
        {
            "userId": 6,
            "email": "suziereider@tmail.com",
            "firstName": "Suzie",
            "lastName": "Reider",
            "isActive": 1,
            "role": "Admin"
        }
    ]
}

Validate an user invite token

GET https://pm415.com/api/org/invite/?token=8s80f934kf94

Checks an invite token to see if it is valid and who it belongs to.This method is used by the PM415 user interface and may not have any other practical use case.

Query Parameters

Name
Type
Description

token

string

Invitation token sent to a user.

Headers

Name
Type
Description

Authentication

string

Authorization: Bearer 50ca9ba0f7b1444fa55d5

{
    success: true,
    "email": "mattreider@tmail.com",
    "organization": "my-org"
}

Generate an invite link

POST https://pm415.com/api/org/:orgid/invitelink

Creates an invite link for a new user.

Path Parameters

Name
Type
Description

:orgid

number

The ID of the org you want to work with

Headers

Name
Type
Description

Authentication

string

Authorization: Bearer 50ca9ba0f7b1444fa55d5

Request Body

Name
Type
Description

object

{email: “suziereider@tmail.com”}

{
   "success": true,
   "confirmUrl": "https://pm415.com/account/invite/?token=eyJh
}

Remove users

POST https://pm415.com//api/org/:orgid/users/remove

Removes users from an organization. This does not delete the user's profile - just the link between the org and the user. To add them back, you must re-invite them.

Path Parameters

Name
Type
Description

:orgid

number

The ID of the org you want to work with

Headers

Name
Type
Description

Authentication

string

Authorization: Bearer 50ca9ba0f7b1444fa55d5

Request Body

Name
Type
Description

object

{"usersId": ["4", "6"]}

{
   "success": true
}

Grant admin

PUT https://pm415.com/api/org/:orgid/admin/grant

Gives a user admin privileges. Admins can perform all operations on an org and its users.

Path Parameters

Name
Type
Description

:orgid

number

The ID of the org you want to work with

Headers

Name
Type
Description

Authentication

string

Authorization: Bearer 50ca9ba0f7b1444fa55d5

Request Body

Name
Type
Description

object

{"usersId": ["4", "6"]}

{
   "success": true
}

Revoke admin

PUT https://pm415.com/api/org/:orgid/admin/revoke

Revokes a user's admin privileges.

Path Parameters

Name
Type
Description

:orgid

number

The ID of the org you want to work with

Headers

Name
Type
Description

Authentication

string

Authorization: Bearer 50ca9ba0f7b1444fa55d5

Request Body

Name
Type
Description

object

{"usersId": ["4", "6"]}

{
   "success": true
}

Reset password

PUT https://pm415.com/api/org/:orgid/admin/resetpassword

Resets user passwords and sends emails with reset links.

Path Parameters

Name
Type
Description

:orgid

number

The ID of the org you want to work with

Headers

Name
Type
Description

Authentication

string

Authorization: Bearer 50ca9ba0f7b1444fa55d5

Request Body

Name
Type
Description

object

{"usersId": ["4", "6"]}

{
   "success": true
}
Previous/accountNext/user

Last updated 6 years ago

Was this helpful?