Page tree

 

PARTY ROLE MANAGEMENT API CONFORMANCE PROFILE

 

Document Number:  TMF669

Document Version: : V0.101

Date:  March, 2017

Document Status: Draft

NOTICE

Copyright © TeleManagement Forum 2013. All Rights Reserved.

 

This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwise explain it or assist in its implementation may be prepared, copied, published, and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this section are included on all such copies and derivative works. However, this document itself may not be modified in any way, including by removing the copyright notice or references to TM FORUM, except as needed for the purpose of developing any document or deliverable produced by a TM FORUM Collaboration Project Team (in which case the rules applicable to copyrights, as set forth in the TM FORUM IPR Policy , must be followed) or as required to translate it into languages other than English.

The limited permissions granted above are perpetual and will not be revoked by TM FORUM or its successors or assigns.

This document and the information contained herein is provided on an "AS IS" basis and TM FORUM DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY OWNERSHIP RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.

 

Direct inquiries to the TM Forum office:

4 Century Drive
Suite 100
Parsippany, NJ 07054
USA

Tel No.   +1 973 944 5100

Fax No.   +1 973 944 5110

TM Forum Web Page: www.tmforum.org

TM Forum Web Page: www.tmforum.org

Table of Contents

NOTICE

Table of Contents

Introduction - API DESCRIPTION

RESOURCE MODEL CONFORMANCE

API MANDATORY AND OPTIONAL RESOURCES

ResourceXYZ  MANDATORY AND OPTIONAL ATTRIBUTES

NOTIFICATION MODEL CONFORMANCE

API  MANDATORY AND OPTIONAL NOTIFICATIONS

<Notification Name>  MANDATORY AND OPTIONAL ATTRIBUTES

API OPERATIONS CONFORMANCE

API MANDATORY AND OPTIONAL OPERATIONS

API GET OPERATION CONFORMANCE

GET /RESOURCEXYZ          [for instance /troubleTicket]

API POST OPERATION CONFORMANCE

POST /ResourceXYZ               [for instance POST /troubleTicket]

API PUT OPERATION CONFORMANCE

PUT RESOURCEXYZ     [for instance /troubleTicket/{ID}]

API PATCH OPERATION CONFORMANCE

PATCH RESOURCEXYZ      [for instance /troubleTicket/{ID}]

API DELETE OPERATION CONFORMANCE

DELETE /RESOURCEXYZ      [for instance /troubleTicket/{ID}]

API CONFORMANCE TEST SCENARIOS

RESOURCEXYZ resource TEST CASES

Release History

 

Introduction - API DESCRIPTION

The Party Role Management API provides a standardized mechanism for general party roles and includes operations such as creation, update, retrieval, deletion and notification of events. Notice that for the management of customers there is a specific Customer Management API.

Party Role management API manages the following data resources:

-           PartyRole

  • A PartyRole is a part played by a party in a given context. .

 

The party role management API performs the following operation on customer:

-           Retrieval, creation, full or partial update and deletion of customers.

 

RESOURCE MODEL CONFORMANCE

API MANDATORY AND OPTIONAL RESOURCES

For the resources defined by the API fill the following table and indicate which ones are mandatory and which ones are optional.

 

Resource Name

Mandatory or Optional

Comments

PartyRole

M

 

 

 

Party Role MANDATORY AND OPTIONAL ATTRIBUTES

The table below summarizes mandatory and optional attributes for resource "PartyRole"

 

Attribute Name

 

Mandatory or Optional

 

Comments

href

M (in response messages)
O (otherwise)

Url for the created resource

id

M (in response messages)
O (otherwise)

Generated by the server

name

M (for resource creation)
O (otherwise)

 

status

O

 

statusReason

O

 

validFor

O

 

engagedParty

O

 

type

M (for resource creation)
O (otherwise)

 

account

O

 

paymentMethod

O

 

contactMedium

O

 

characteristic

O

 

creditProfile

O

 

agreement

O

 

relatedParty

O

 

NOTIFICATION MODEL CONFORMANCE

The Pub/Sub models are common and described in the TMF REST Design Guidelines. Use the following templates to describe the Hub Mandatory and Optional attributes and filtering support.

 

API  MANDATORY AND OPTIONAL NOTIFICATIONS

For the Notifications defined by the API the following table indicates which ones are mandatory and which ones are optional.

 

Notification Name

Mandatory or Optional

Comments

PartyRoleCreationNotification

M

 

PartyRoleAttributeValueChangeNotification

M

 

PartyRoleStateChangeNotification

M

 

PartyRoleRemoveNotification

M

 

 

 

All attributes of the resource associated with the notification are mandatory

 

 

  API OPERATIONS CONFORMANCE

For every single resource use the following templates and define what operations are optional and what operations are mandatory.

API MANDATORY AND OPTIONAL OPERATIONS

The following table indicates which ones are mandatory and which ones are optional for each one of the resources in the API (default is for all resources).

 

Uniform API Operation

Mandatory/Optional

Comments

GET

M for all resources

GET must be used to retrieve a representation of a resource

 

POST

M for resources:
PartyRole

POST must be used to create a new resource

PATCH

M for resources:
PartyRole

PATCH must be used to partially update a resource

DELETE

M for resources:
PartyRole

DELETE must be used to remove a resource

 

 

 

 

API GET OPERATION CONFORMANCE

For every single resource use the following template to specify the mandatory and optional features supported by the GET operation.

Definitions

 

Filtered Search: A filtered search can be applied using query parameters in order to obtain only the resource entities that meet the criteria defined by the filtering parameters included in the query request. Several elements can be applied to the filtered search. In that case logic, a logical AND is applied to combine the criteria (e.g.:?severity=<value> &status=<value>)

 

Attribute selection (Filtered Response Data): In order to apply a filter and limit the number of attributes included in the response, the GET request can include the  “ ?fields=” query parameter. Several elements can be applied to the filter. In that case, a logical AND is applied to combine the values (e.g.:?fields=severity,status) will provide in the response only the values assigned to attributes category and channel. Attribute selection capabilities are the same for collections retrieval and individual resource queries

 

All the GET operations in this API share the same status code pattern.

GET

M

 

Response Status Code 200

M

 

Other Status Codes

NA

 

/partyRole?fields=...&{filtering}

This operation list party role entities.
Attribute selection is mandatory for all first level attributes.
Filtering is mandatory for first compliance level (L1) and optional otherwise.

/partyRole/{id}?fields=...&{filtering}

This operation retrieves a party role entity.
Attribute selection is mandatory for all first level attributes.
Filtering on sub-resources is optional for all compliance levels.

 

API POST OPERATION CONFORMANCE

 

All the POST operations in this API share the same status code pattern.

POST

M

 

Status Code 201

M

 

Other Status Codes

NA

 

/partyRole

This operation creates a party role entity.

Mandatory and Non Mandatory Attributes

The following tables provides the list of mandatory and non mandatory attributes when creating a PartyRole, including any possible rule conditions and applicable default values. Notice that it is up to an implementer to add additional mandatory attributes.

Mandatory Attributes

Rule

name

 

type

 

 

Non Mandatory Attributes

Default Value

Rule

status

 

 

statusReason

 

 

validFor

 

 

engagedParty

Automatically generated

 

account

 

 

paymentMethod

 

 

contactMedium

 

 

characteristic

 

 

creditProfile

 

 

agreement

 

 

relatedParty

 

 

 

Additional Rules

The following table provides additional rules indicating mandatory fields in sub-resources or relationships when creating a PartyRole resource.

Context

Mandatory Sub-Attributes

engagedParty

id

characteristic

name, value

contactMedium

type, medium

partyAccount

id, name, status

creditProfile

creditProfileDate, validFor

paymentMean

id, href

 

Default Values Summary

When creating the resource, the following table summarizes the default values applicable to optional attributes of the resource (or sub-resources).

Attributes

Default Value

id

Automatically generated

engagedParty

Automatically generated

 

The response from the server must include a BODY with the contents of the new resource created, filled with at least the same information elements that were included in the request and are supported by the server. Notice that the value stored by the server may be different than the one set in the request (e.g.: status may be differently set by the server after processing than the one requested by the requestor)

If the POST request includes optional parameters (as per the model resource definition) that are not supported by the server, then the server must reject the request (replying with a 4xx error response) indicating the parameter not supported.

 

 

 

 

 

 

API PATCH OPERATION CONFORMANCE

 

All the PATCH operations in this API share the same status code pattern.

PATCH

O

 

Status Code 201

M

 

Other Status Codes

NA

 

/partyRole/{id}

This operation allows partial updates of a party role entity. Support of json/merge (https://tools.ietf.org/html/rfc7386) is mandatory, support of json/patch (http://tools.ietf.org/html/rfc5789) is optional.

Note: If the update operation yields to the creation of sub-resources or relationships, the same rules concerning mandatory sub-resource attributes and default value settings in the POST operation applies to the PATCH operation.  Hence these tables are not repeated here.

Patchable and Non Patchable Attributes

The tables below provide the list of patchable and non patchable attributes, including constraint rules on their usage.

Attribute Name

Patchable (YES/NO)

Rule

id

NO

 

href

NO

 

name

YES

 

status

YES

 

statusReason

YES

 

validFor

YES

 

engagedParty

YES

 

type

YES

 

account

YES

 

paymentMethod

YES

 

contactMedium

YES

 

characteristic

YES

 

creditProfile

YES

 

agreement

YES

 

relatedParty

YES

 

 

API DELETE OPERATION CONFORMANCE

All the DELETE operations in this API share the same status code pattern.

DELETE

O

 

Status Code 200

M

 

Other Status Codes

NA

 

/partyRole/{id}

This operation deletes a party role entity.

 

 

 

API CONFORMANCE TEST SCENARIOS

This section describes the test scenarios required for the basic CONNECT certification of the API.

Test Cases must be executed in the order defined for each resource because the result from one of the scenarios will be input for the next one.

Requests must be addressed to the endpoint provided for certification, specifically they must be addressed to the URI defined by the concatenation of the {apiRoot} and the specific resource, where the {apiRoot} is defined as {serverRoot}/roleParty/v1 , where {serverRoot} defines the certification endpoint

RESOURCEXYZ resource TEST CASES

Nominal Scenarios

TC_Trou_N1 – Create new Ticket with minimum required information

  • Send a POST message to {apiRoot}/roleParty/ with the following contents in the BODY

{

    "name": "John Lee",

    “type” : {“id”:”999”,”name”:”Developer”,

               “href”=”http://xxx/roleTypes/999”

             },

}

  • Wait for a response from the server with the following characteristics

 

-           Response Code 201-Created

 

-           Include a location header in the body set to /{apiRoot}/roleParty/{IDtt1} where {IDtt1} indicates the identifier assigned by the server to the new ticket resource

 

-           The response message includes all mandatory parameters (including description, severity and type that were not sent in the original request)

 

-           The body of the response matches the values set in the original request

 

  • Send a GET message to /{apiRoot}/roleParty/

 

  • Wait for a response from the server with the following characteristics

 

-           Response Code 200-OK

 

-           The body of the response includes one RoleParty resource with ID set to {IDtt1}, the same identifier as assigned by the server to the new resource created

 

-           The response message includes all mandatory parameters

 

-           The body of the response for the resource with identifier {IDtt1} matches the values set in the original request

 

  • Send a GET message to /{apiRoot}/roleParty/{IDtt1}

 

  • Wait for a response from the server with the following characteristics

 

-           Response Code 200-OK

 

-           The response message includes all mandatory parameters

 

-           The body of the response includes a RoleParty resource structure that matches the values in the original request

 

 

TC_Trou_N2 – Search for Party Roles with specific characteristics

  • Send a GET message to /{apiRoot}/roleParty

 

  • Wait for a response from the server with the following characteristics

-           Response Code 200-OK

 

-           The body of the response includes at least two ticket resources referring to {IDtt1} and {IDtt2}

 

-           The body of the response for the resource with each identifier matches the values in the corresponding original request

 

  • Send a GET message to /{apiRoot}/roleParty?type.name=Developer

 

  • Wait for a response from the server with the following characteristics

 

-           Response Code 200-OK

 

-           The body of the response includes one RoleParty resource referring to {IDtt1} and there is no reference to RoleParty resource {IDtt2}

 

-           The response message includes all mandatory parameters

 

-           The body of the response for the resource with identifier {IDtt1} matches the values in the original request

 

 

TC_Trou_N3 – Filtered retrieval of Tickets

  • Send a GET message to /{apiRoot}/roleParty/{IDtt1}?fields=name

 

  • Wait for a response from the server with the following characteristics

 

-           Response Code 200-OK

 

-           The body of the response includes one RoleParty resource referring to {IDtt1} and including only attributes name and status, matching the values in the original request

 

  • Send a GET message to /{apiRoot}/roleParty /{IDtt2}?fields=name,type

 

  • Wait for a response from the server with the following characteristics

 

-           Response Code 200-OK

 

-           The body of the response includes one RoleParty resource referring to {IDtt2} and including only attributes severity and status, matching the values in the original request

Notice that this test case is using parameters ”name” and  ”type”  to filter the data included in the response  but any other parameter could be used

 

TC_Trou_N4 – Filtered Search and Filtered data response

  • Send a GET message to /{apiRoot}/roleParty?status=Active&fields=name

 

  • Wait for a response from the server with the following characteristics

 

-           Response Code 200-OK

 

-           The body of the response includes one RoleParty resource referring to {IDtt1} and there is no reference to RoleParty resource {IDtt2}

 

-           The body of the response for the resource with each identifier includes only attribute description, matching the values in the corresponding original request

Notice that this test case is using the parameter ”name” to filter the data included in the response  but any other parameter could be used

 

Error Scenarios

TC_Trou_E1 – Unknown Trouble Ticket identifier

  • Send a GET message to /{apiRoot}/roleParty/{IDtt3}, where {IDtt3} does not match any of the identifiers previously creted in the server

 

  • Wait for a response from the server with the following characteristics

 

  • Response Code 404-Not Found

 

TC_Trou_E2 – Invalid Request – Missing mandatory parameter

  • Send a POST message to {apiRoot}/roleParty/ with the following contents in the BODY.

{

}

 

Notice that this request is missing mandatory parameter ”type” but any other mandatory parameter could be used

 

  • Wait for an error response from the server indicating the mandatory parameter is missing in the request

 


 

Release History

 

Release Number

Date

Release led by:

Description

Release 1.0

07/15/2015

Pierre Gauthier

TM Forum

pgauthier@tmforum.orf

 

First Release of Draft Version of the Document.

Release 1.1

03/15/2017

 

Updated version including Test scenarios