Home > Open API > Development Guide

Development Guide

How to Use Open API

1. Choose the Open API to use

Check the service information in the [Open API List] menu.

2. Download the Spec

[Download Spec] includes instructions for using the Open API.

Open API Specification
3. Issue API Key

The Open API provided by ZANSIS is a RESTful web service. RESTful web services use an HTTP-based interface and operate through GET or POST URIs, so parameter values are included in the URL when loading the page.
You must log in to obtain an API key.

Issue Open API Key
4. Register URL
URL Information
  1. ① Open API URL The Open API URL of OCGS is http://zansis.ocgs.go.tz/uportal/openapi/
  2. ② Open API Name The Open API services of ZANSIS have unique names. The request URL is listed in the downloaded specification.
  3. ③ Default Parameters If default parameters are omitted, the results will be displayed using the default values in the specification.
    The API key (KEY) must be added after it has been issued.
    If there is no API key, the default value will be treated as "sample" and only 5 records will be returned, so an API key must be entered.
    The request document (Type) specifies the output format such as XML or JSON. The default value is XML.
    Data Count (pSize) refers to the number of records returned by the API query.
  4. ④ Request Parameters These are parameter values specifically defined for each ZANSIS service. These request parameters are only available for services that provide them.
5. Request Open API from Application

You can now develop a new application using the Open API. The requested data will be displayed within your application.

Sample Screen of the Application