afs:uri - AFS

AFS Integration Guide

Product
AFS
AFS_Version
7.9
Category
Reference Guide

Role

The parameter sets the URI of the document to retrieve.

Status

When afs:uri is unset, the afs:docId parameter must be specified.

Example

afs:uri=urn:my_ids:42

From AFS v7.9.9.11, it is possible to retrieve several documents with a unique call to the web service by repeating the afs:uri parameter, as many times as needed, as follows:

...afs:uri=my_first_uri&afs:uri=my_second_uri...

The response is an HTTP multipart response.

Each subpart corresponds to a required document, mentioning its URI in the Content-ID header. The HTTP status code can be displayed in the Status header of the body of each message when HTTP status is not 200. When the HTTP status code is 200, meaning OK, it is not displayed in the response.

  • The following query allows to retrieve the USER_3 layer of the documents:

    http://localhost:70/content?afs:service=4&afs:feed=FluidTopics&afs:uri=urn%3Aft%3A~gXiZ1i3oE~ayxUEuahfhQ&afs:uri=urn:ft:pDAuIyDLShhpZJlQTi4Ucg

    As no layer is specified, by default the CONTENTS layer is retrieved.

    The corresponding output is as follows:

    --afs-multipart-boundary
    Content-Type: application/json; charset="UTF-8"
    Content-encoding: gzip
    Content-ID: urn:ft:~gXiZ1i3oE~ayxUEuahfhQ

    {"version": "2", "pub": {"baseId": "map_a", "id": "map_a", "metadata": [{"values": ["Map A"],...}

    --afs-multipart-boundary
    Content-Type: application/json; charset="UTF-8"
    Content-encoding: gzip
    Content-ID: urn:ft:pDAuIyDLShhpZJlQTi4Ucg

    {"pub": {"rights": {"accessLevel": "PUBLIC", "groups": []}, "baseId": "map_b", "id": "map_b",...}
    --afs-multipart-boundary--

  • The following query allows to retrieve the USER_3 layer of the documents:

    http://localhost:70/content?afs:service=4&afs:feed=FluidTopics&afs:uri=urn%3Aft%3A~gXiZ1i3oE~ayxUEuahfhQ&afs:uri=urn:ft:pDAuIyDLShhpZJlQTi4Ucg&afs:layer=USER_3

    The corresponding output is as follows:

    --afs-multipart-boundary
    Content-Type: application/json; charset="UTF-8"
    Content-encoding: gzip
    Content-ID: urn:ft:~gXiZ1i3oE~ayxUEuahfhQ

    {"technicalFacets": [{"key": "ft:openMode", "hierarchicalValues": [["fluidtopics"]]},...}

    --afs-multipart-boundary
    Content-Type: application/json; charset="UTF-8"
    Content-encoding: gzip
    Content-ID: urn:ft:pDAuIyDLShhpZJlQTi4Ucg

    {"lastPublicationTimestamp": "1559570657029", "editorialType": "BOOK",...}
    --afs-multipart-boundary--

  • The following example shows a query where one of the URIs was not found:

    --afs-multipart-boundary
    Content-Type: application/json; charset="UTF-8"
    Content-encoding: gzip
    Content-ID: urn:ft:~gXiZ1i3oE~ayxUEuahfhQ

    {"version": "2", "pub": {"baseId": "map_a", "id": "map_a", "metadata": [{"values": ["Map A"],...}

    --afs-multipart-boundary
    Status: 404 Not Found
    Content-encoding: gzip
    Content-ID: urn:ft:pDAuIyDLShhpZJlQTi4UcP
    --afs-multipart-boundary--