Term API

From TeamServer ER/Studio
Jump to: navigation, search

Go Up to API Reference

This part of the Team Server API lets you work with terms.

GET v1/businessterms

Obtains a list of terms.

If successful, the response from the server provides a list of terms with details about each one of them.

GET v1/businessglossaries/<glossary id>/businessterms

Obtains a list of terms related to the glossary with the specified ID. See Glossary API.

If successful, the response from the server provides a list of terms with details about each one of them.

GET v1/businessterms/<id>

Obtains information about the term with the specified ID.

POST v1/businessterms

Creates a term. Your request must provide the following fields:

  • name
  • description (optional)
  • status (optional)
  • abbreviations (optional)
  • aliases (optional)
  • userData (optional)
  • stewards (optional)
    Note: You only need to specify either the ID or the name of each steward. For example: { "name": "jane" }

If successful, the response from the server provides all the details about your new term.

PUT v1/businessterms/<id>

Updates the information of a term. Your request can provide any combination of the following fields:

  • name
  • description
  • status
  • abbreviations
  • aliases
  • userData
  • stewards
    Note: You only need to specify either the ID or the name of each steward. For example: { "name": "jane" }

If successful, the response from the server provides all the details about your modified term.

DELETE v1/businessterms/<id>

Deletes the term with the specified ID. If successful, the response is {"message":"OK","status":"200"}.

Term Fields

Term resources in Term API requests and responses can include any combination of the following fields:

Item Example Description

"id"

16

An integer that uniquely identifies the term.

"status"

"In progress"

A string that defines the status of the term using nomenclature you decide upon.

"description"

"Application protocol for distributed, collaborative hypermedia information systems."

A description of the term.

"createdAt"

1372150068

The date when the term was created, in Unix time (seconds since 1970).

"link"

"/term/view.spg?termKey=16"

Path relative to the Team Server root URL that points to the page of the term.

For example, if the Team Server root URL is http://teamserver.example.com , the example value here determines that you can access the page of the term at http://teamserver.example.com/term/view.spg?termKey=16 .

"name"

"Hypertext Transfer Protocol"

The name of the term.

"userData"

"You can write anything here."

Additional information about the business object.

"type"

"Term"

The type of the resource. Its value is always "Term" for term resources.

"aliases"

A list of aliases and synonyms of the term.

"abbreviations"

"HTTP"

A list of abbreviations of the term.

"stewards"

[ { "id": "2", "name": "jane", "type": "person", "url": "/v1/people/2" }, // … ]

A list of people that are stewards of the term.

Each person entry provides the following fields:

  • id
  • name
  • type
  • url

"url"

"/v1/businessterms/16"

Path relative to the Team Server root API URL that points to the entry of the term resource.

For example, if the Team Server root API URL is http://teamserver.example.com/api , the example value here determines that you can access the term resource at http://teamserver.example.com/api/v1/businessterms/16 .

Example Response

This is an example response from a GET v1/businessterms call:

{
    "metadata_": {
        "limit": 25,
        "totalCount": 2,
        "offset": 0
    },
    "businessterms": [
        {
            "id": 13,
            "status": "Final",
            "description": "Network protocol to transfer files between computers over a TCP-based network.",
            "createdAt": 1372151100,
            "link": "/term/view.spg?termKey=13",
            "name": "File Transfer Protocol",
            "userData": "",
            "type": "Term",
            "aliases": "",
            "abbreviations": "FTP",
            "stewards": [
                {
                    "id": "2",
                    "name": "jane",
                    "type": "person",
                    "url": "/v1/people/2"
                }
            ],
            "url": "/v1/businessterms/13"
        },
        {
            "id": 12,
            "status": "Final",
            "description": "Application protocol for distributed, collaborative hypermedia information systems.",
            "createdAt": 1372150068,
            "link": "/term/view.spg?termKey=12",
            "name": "Hypertext Transfer Protocol",
            "userData": "",
            "type": "Term",
            "aliases": "",
            "abbreviations": "HTTP",
            "stewards": [
                {
                    "id": "2",
                    "name": "jane",
                    "type": "person",
                    "url": "/v1/people/2"
                }
            ],
            "url": "/v1/businessterms/12"
        }
    ]
}

This is from a GET v1/businessterms/<id> call:

{
    "businessterm": {
        "id": 13,
        "status": "Final",
        "description": "Network protocol to transfer files between computers over a TCP-based network.",
        "createdAt": 1372151100,
        "link": "/term/view.spg?termKey=13",
        "name": "File Transfer Protocol",
        "userData": "",
        "type": "Term",
        "aliases": "",
        "abbreviations": "FTP",
        "stewards": [
            {
                "id": "2",
                "name": "jane",
                "type": "person",
                "url": "/v1/people/2"
            }
        ],
        "url": "/v1/businessterms/13"
    }
}

See Also