Page tree

 

 

 

 

 

 

 

Document Management API
Conformance Profile

 

Document Number TMF667B

March 2017

 

 

 

 

 

 

 

Release: Frameworx Release 17.0

Status: Member Evaluation

Version: 0.1.0

IPR Mode: RAND

NOTICE

Copyright © TM Forum 2017. 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

Table of Contents

NOTICE

Table of Contents

List of Tables

Introduction

API DESCRIPTION

RESOURCE MODEL CONFORMANCE

Document Management API MANDATORY AND OPTIONAL RESOURCES

Document resource MANDATORY AND OPTIONAL ATTRIBUTES

API OPERATIONS CONFORMANCE

Document MANDATORY AND OPTIONAL OPERATIONS

API GET FILTERING OPERATION CONFORMANCE

Filtering in Document resource

GET /documentMamagement/document

API POST OPERATION CONFORMANCE

POST to /documentManagement /document/

API PATCH OPERATION CONFORMANCE

API DELETE OPERATION CONFORMANCE

API CONFORMANCE TEST SCENARIOS

Document resource TEST CASES

List of Tables

N/A

 

 

Introduction

The following document is the REST API Conformance for the Document Management API.

API DESCRIPTION

The intent of the Document Management API is to provide a consistent/standardized mechanism to create new documents, delete existing documents, retrieving information about uploaded documents.

Examples of Documents handled by the Document service include scanned passport details or other identification documents, Agreement documents, Customer Bill, etc

The query capabilities provided by this service will serve links (location references) as well as retrieve documents as binary objects.

Type of files that will be supported as binary objects are:

-           Images ( e.g TIFF, PNG, GIF..)

-           Document types: PDF, TXT, PPT, DOC and PS

-           Archive : ZIP, TAR

-           Data formats:NC (netCDF)

 

RESOURCE MODEL CONFORMANCE

Document Management API MANDATORY AND OPTIONAL RESOURCES

Resource Name

Mandatory or Optional

Comments

Document

M

 

Document resource MANDATORY AND OPTIONAL ATTRIBUTES

Attribute Name

Mandatory or Optional

Comments

Id

M (in response messages)

O (otherwise)

Generated by the server and provided in the response

href

M (in response messages)

O (otherwise)

 

name

O

 

description

M

 

version

M (in response messages)

O (otherwise)

 

type

M

 

lifecycleState

M/O

Required in response messages from the server (responses to read-GET the entity)

lastUpdate

O

Generated by the server

creationDate

M (in response messages)

O (otherwise)

 

documentRelationship

O

 

 

type

M (if documentRelationship is included)

 

 

DocumentRef

M( if documentRelationship is included)

 

relatedObject

O

 

 

involvement

M (if relatedObject is included)

 

 

reference

M( if relatedObject is included)

 

categoryRef

O

 

 

id

M (if category is included)

 

 

href

M( if category is included)

 

 

version

O

 

 

name

O

 

documentCharacteristic

O

 

 

name

M (if documentCharacteristic is included)

 

 

value

M (if documentCharacteristic is included)

 

documentSpecification

O

 

 

Id

M (if documentSpecification is included)

 

 

href

M (if documentSpecification is included)

 

 

name

O

 

 

version

O

 

attachment

M

 

 

id

M (in response messages)

O (otherwise)

 

 

href

M (in response messages)

O (otherwise)

 

 

name

O

 

 

type

O

 

 

description

O

 

 

sizeUnit

M

 

 

size

M

 

 

mimeType

M

 

 

URL

O

 

 

validFor

O

 

API OPERATIONS CONFORMANCE

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

Document MANDATORY AND OPTIONAL OPERATIONS

Uniform API Operation

Mandatory/Optional

Comments

GET

M

GET must be used to retrieve a representation of a resource

 

POST

M

POST bust be used to create a new resource

DELETE

O

DELETE must be used to delete an existing resource

PATCH (JSON-MERGE)

O

PATCH must be used to partially update a resource

 

API GET FILTERING OPERATION CONFORMANCE

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.:?type=<value> &lifecycleState=<value>)

 

Filtered Data (Attribute selection): 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=customerRank,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

 

Filtering in Document resource

Attribute name

Filtered search

First Level

Filtered search

N Level

Attribute Selection First Level

Attribute Selection N Level

Id

M

NA

M

NA

href

NA

NA

M

NA

type

M

NA

M

NA

name

O

NA

M

NA

description

M

NA

M

NA

lifecycleState

M

NA

M

NA

lastUpdate

O

NA

M

NA

creationDate

O

NA

M

NA

 

GET /documentMamagement/document

 

Filtered Search: A filtered search can be applied using the following filtering criteria

 

 

  • Document.id : to obtain the details of a given document id

 

  • relatedParty.id and relatedPartyRole : to obtain  the documents of a given related party playing a given role

 

  • other optional attributes as defined in the table above

 

Filtered Data: A filtered response can be requested for the following attributes using the “?fields=” query parameter

-           Any of the attributes in the first level of Document resource definition

 

API POST OPERATION CONFORMANCE

POST to /documentManagement /document/

This Uniform Contract operation is used to create a Document resource in the server.

The response to this operation must include a Location header set to /documentManagement /document /{ID} where {ID} indicates the identifier assigned by the server to the new Document resource created

POST

M

 

Response Status Code 201

M

 

Other Status Codes

NA

 

 

 

The following table indicates attributes that are required to be sent when creating a new Document resource as well as attributes with special considerations. All other attributes defining the resource are not required to be sent as aprt of the BODY of the POST request message:

Attribute name

Mandatory

Default

Rule

id

N

 

Accepted in entity-creation requests if the server supports the incoming identifier as the reference to create new resources

name

N

 

 

description

Y

 

 

type

Y

 

 

attachment.size

Y

 

 

attachment.sizeUnit

Y

 

 

attachment.mimeTye

Y

 

 

relatedParty.href

N

 

Mandatory if relatedParty included

The consumer must indicate the identifier for every relatedParty assigned to the document

documentRelationship

N

 

Mandatory if documentRelationship included

 

documentSpecification

N

 

Mandatory if documentSpecification included

documentCharacteristic

N

 

 

relatedObject.href

N

 

Mandatory if relatedObject included

categoryRef.href

N

 

Mandatory if categoryRef included

 

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.

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.

The following parameters must be supported by the server when included in the request to create a new resource

  • description
  • type
  • lifecycleStatus
  • version
  • creationDate
  • attachment.size
  • attachment.sizeUnit
  • attachment.mimeType
  • attachment.URL

 

The BODY of the response from the server must include attribute “href” set to the same value as the one in the Location header.

The server must include in the BODY of the response, even if they are not included in the request, the following attributes that are mandatory in the definition of a Document as per the resource model defined

  • id
  • href
  • type
  • description
  • lifecycleStatus
  • creationDate
  • attachment.size
  • attachment.sizeUnit
  • attachment.mimeType
  • attachment.URL

 

The BODY of the response from the server must include attribute “href” (or “reference”) under each one of the entities within the Document model that can be addressed individually and were included in the response. This applies to any of the following entities

  • relatedParty
  • documentSpecification
  • relatedObject
  • categoryRef

 

API PATCH OPERATION CONFORMANCE

This section defines which attributes are patchable.

Since PATCH operation is optional and not included in the basic CONNECT certification this is not applicable in this conformance document.

API DELETE OPERATION CONFORMANCE

This section defines what operations can be used to delete a Document resource.

 

Since DELETE operation is optional and not included in the basic CONNECT certification this is not applicable in this conformance document

 

API CONFORMANCE TEST SCENARIOS

This section describes the test scenarios required for the basic CONNECT certification of Document Management 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}/documentManagement/v1 , being {serverRoot} defines the certification endpoint.

Document resource TEST CASES

Nominal Scenarios

TC_DocMng_N1 – Search for documents with specific characteristics

 

TC_ DocMng _N2 – Filtered retrieval of documents

 

TC_ DocMng _N3 – Filtered Search and Filtered data response

 

Error Scenarios

TC_ DocMng _E1 – Unknown Document identifier

 

TC_ DocMng _E2 – Invalid Request – Missing mandatory parameter

 

TC_ DocMng _E3 – Invalid Request – Missing parameter mandatory in context