Configuring REST Observer jobs
Use the REST Observer for obtaining topology data via REST endpoints. This observer is a counterpart to the File Observer.
Before you begin
The REST (or RESTful) Observer is installed as part of the core installation procedure.
About this task
The REST Observer passes topology data to Agile Service Manager using a RESTful set of
interfaces, which provide REST APIs that enable the following functionality:
- Management of Listen and bulk-replace job types.
- The insert-update (HTTP POST) of resources.
- The insert-update (HTTP POST) of relationships.
- The insert-replacement (HTTP PUT) of resources.
- The deletion (HTTP DELETE) of resources.
- A REST API that supports the deletion (HTTP DELETE) of all relationships of a given type from a specified resource.
- A REST API that supports the deletion (HTTP DELETE) of a specific relationship.Restriction: Resources created via REST can have a provider, but not an observer.
- Benefits
- Using the REST Observer rather than the File Observer or Topology Service APIs includes the
following benefits:
- The ability to provide data to Agile Service Manager via HTTP REST Endpoints instead of files.
- The processing performed by all observers in their framework ensures that meta-data about observations from observers is managed correctly.
- A simple way of deleting all edges of a given type on a resource or a specific edge instance.
To use the REST Observer, a job request must be issued (HTTP POST) to the observer instance job management APIs before sending data to the Resource and Relationship APIs.
- Listen
- A long-running listen job capable of consuming topology data over a long period of time.
- Synchronize (bulk replace)
- A long-running job with the same resource replace semantics as the File Observer.
Note: In both cases, a provider job parameter is required to identify the origin of the data being
provided to the Observer job.
Once a job request has been successfully submitted, you can start to provide data to the Resource and Relationship APIs on behalf of a given job instance.
The Resource and Relationship APIs may respond with an HTTP 503 Service
Unavailable response with a Retry-After: 10 seconds in
the header. This indicates that even though the request against those APIs is valid, the observer
has not been able to ascertain that meta-data about the job is held in Agile Service Manager yet;
this may be due to, for example, any prevailing conditions in the network that support the Agile
Service Manager micro-services.
Tip: If such a response is received, try the request
again later.
Important: Ensure that the body is
structured correctly. When posting the body, information included in the body after the closing
} that matches an opening { is ignored, and no error is recorded.
Tip: For sample code, see the 'Defining REST Observer jobs' topic: