Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make organizations websocket client to use JSON RPC #8327

Closed
mshaposhnik opened this issue Jan 17, 2018 · 0 comments
Closed

Make organizations websocket client to use JSON RPC #8327

mshaposhnik opened this issue Jan 17, 2018 · 0 comments
Assignees
Labels
kind/task Internal things, technical debt, and to-do tasks to be performed.

Comments

@mshaposhnik
Copy link
Contributor

mshaposhnik commented Jan 17, 2018

Description

Since we're removing support of the everrest websockets (#5357), all clients should use json rpc now.
The new protocol for organization events and membership events is following:

  • Organization events (renamed, removed):

Subscription request:

{  
    "jsonrpc":"2.0",
    "method":"subscribe",
    "params":{  
        "method":"organization/statusChanged",
        "scope":{  
            "organizationId":"organizationl5oqb2ybtkjwdo64"
        }
    }
}

Event notification (organization removed):

{  
    "jsonrpc":"2.0",
    "method":"organization/statusChanged",
    "params":{  
        "members":[  
            "b07e3a58-ed50-4a6e-be17-fcf49ff8b242"
        ],
        "type":"ORGANIZATION_REMOVED",
        "organization":{  
            "qualifiedName":"awetwertwerqwerwe",
            "name":"awetwertwerqwerwe",
            "id":"organizationryrfleadd2so7d45",
            "links":[]
        },
        "initiator":"admin"
    }
}

Event notification (organization renamed):

{  
    "jsonrpc":"2.0",
    "method":"organization/statusChanged",
    "params":{  
        "newName":"awetwertwerqwerwe",
        "oldName":"awetwert",
        "type":"ORGANIZATION_RENAMED",
        "organization":{  
            "qualifiedName":"awetwertwerqwerwe",
            "name":"awetwertwerqwerwe",
            "id":"organizationryrfleadd2so7d45",
            "links":[]
        },
        "initiator":"admin"
    }
}
  • Membership events (member added, member removed):

Subscription request:

{  
    "jsonrpc":"2.0",
    "method":"subscribe",
    "params":{  
        "method":"organization/membershipChanged",
        "scope":{  
            "userId":"d802c8b9-5b81-4a23-9d60-a1b056bc7050"
        }
    }
}

Event notification (member added):

{  
    "jsonrpc":"2.0",
    "method":"organization/membershipChanged",
    "params":{  
        "member":{  
            "aliases":[],
            "links":[],
            "name":"uy7c",
            "email":"test1@yahoo.com",
            "id":"d802c8b9-5b81-4a23-9d60-a1b056bc7050"
        },
        "type":"MEMBER_ADDED",
        "organization":{  
            "qualifiedName":"weweffwf",
            "name":"weweffwf",
            "id":"organizationf23fpsyo5b17k38j",
            "links":[]
        },
        "initiator":"admin"
    }
}

Event notification (member removed):

{  
    "jsonrpc":"2.0",
    "method":"organization/membershipChanged",
    "params":{  
        "member":{  
            "aliases":[],
            "links":[],
            "name":"uy7c",
            "email":"test1@yahoo.com",
            "id":"d802c8b9-5b81-4a23-9d60-a1b056bc7050"
        },
        "type":"MEMBER_REMOVED",
        "organization":{  
            "qualifiedName":"weweffwf",
            "name":"weweffwf",
            "id":"organizationf23fpsyo5b17k38j",
            "links":[]
        },
        "initiator":"admin"
    }
}
@ashumilova ashumilova self-assigned this Jan 17, 2018
@ashumilova ashumilova added status/in-progress This issue has been taken by an engineer and is under active development. kind/task Internal things, technical debt, and to-do tasks to be performed. sprint/current team/plugin labels Jan 17, 2018
@ashumilova ashumilova removed sprint/current status/in-progress This issue has been taken by an engineer and is under active development. labels Aug 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/task Internal things, technical debt, and to-do tasks to be performed.
Projects
None yet
Development

No branches or pull requests

2 participants