code: @Path("/new")
      @POST
      public Response addRelationship(
              @PathParam(RestParam.PID)
              String pid,
              @QueryParam(RestParam.SUBJECT)
              String subject,
              @QueryParam(RestParam.PREDICATE)
              String predicate,
              @QueryParam(RestParam.OBJECT)
              String object,
              @QueryParam(RestParam.IS_LITERAL)
              boolean isLiteral,
              @QueryParam(RestParam.DATATYPE)
              String datatype,
              @QueryParam(RestParam.FLASH)
              @DefaultValue("false")
              boolean flash) {
          Context context = getContext();
          try {
              if (subject == null) {
                  // assume the subject is the object as denoted by the pid
                  subject = PID.toURI(pid);
              }
              boolean result = m_management.addRelationship(context, subject, predicate, object, isLiteral, datatype);
              return Response.ok(Boolean.toString(result)).build(); // needs an entity to not be overridden with a 204
          } catch (ServerException e) {
              return handleException(e, flash);
          }
      }
docs: Add a relationship.
  <br>
  POST /objects/{pid}/relationships/new ? subject predicate object isLiteral datatype
  <br>
  Successful Response:
  Status: 200 OK