HTTP

Versia uses the HTTP protocol for all communications between instances. HTTP requests must conform to certain standards to ensure compatibility between different implementations, as well as to ensure the security and integrity of the data being exchanged.

ALL kinds of HTTP requests/responses between instances MUST include a Signature, signed with either the relevant User's private key or the instance's private key.

Requests

  • Name
    Accept
    Required
    Required
    Type
    string
    Description

    Must include application/json.

  • Name
    Content-Type
    Required
    Required
    Type
    string
    Description

    Must include application/json; charset=utf-8, if the request has a body.

  • Name
    X-Signature
    Type
    string
    Description

    See Signatures for more information.

  • Name
    X-Signed-By
    Type
    URI
    Description

    See Signatures.

  • Name
    X-Nonce
    Type
    string
    Description

    See Signatures.

  • Name
    User-Agent
    Type
    string
    Description

    A string identifying the software making the request.

Example Request

POST https://bob.com/users/1/inbox HTTP/1.1
Accept: application/json
User-Agent: CoolServer/1.0 (https://coolserver.com)
X-Signature: post /users/1/inbox a2ebc29eb6762a9164fbcffc9271e8a53562a5e725e7187ea7d88d03cbe59341 n4bQgYhMfWWaL+qgxVrQFaO/TxsrC4Is0V1sFbDwCgg=
X-Signed-By: https://example.com/users/1
X-Nonce: a2ebc29eb6762a9164fbcffc9271e8a53562a5e725e7187ea7d88d03cbe59341

Responses

  • Name
    Content-Type
    Required
    Required
    Type
    string
    Description

    Must include application/json; charset=utf-8.

  • Name
    X-Signature
    Type
    string
    Description

    See Signatures for more information.

  • Name
    X-Signed-By
    Type
    URI
    Description

    See Signatures.

  • Name
    X-Nonce
    Type
    string
    Description

    See Signatures.

Example Response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
X-Signature: get /users/1/followers 8f872d4609d26819d03a7d60ce3db68f5b0dd5a80d5930260294f237e670ab76 YDA64iuZiGG847KPM+7BvnWKITyGyTwHbb6fVYwRx1I
X-Signed-By: https://example.com/users/1
X-Nonce: 8f872d4609d26819d03a7d60ce3db68f5b0dd5a80d5930260294f237e670ab76