Sources

Name a source

Sets or clears a source's name and mark, and returns the source. A field left out keeps its value. You can change your own source and those you claim; any other needs keys.manage.

PATCH
/source

Authorization

headerAuthorizationBearer <token>

Authenticate with an API key (marfa_k1_…) or an OAuth access token (marfa_at_…).

Query parameters

source*string

The source code. It's a query parameter because a code such as .. or one holding / can't travel safely in a path.

Header parameters

X-Marfa-Instance-Id?string

The ID of the instance you expect, as GET / returns it. If another instance answers at this address, Marfa returns 409 instance_changed and doesn't write. Leave it out to send the request to whichever instance answers.

Match^[0-9a-f]{8}-[0-9a-f]{4}-7[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$

Request body

application/json
  1. body
name?|

The name to show for the source, or null to clear it. Marfa trims spaces from each end.

Length1 <= length <= 200
mark?|

An icon ID from the same sets as a type's icon, or null to clear it.

Response body

Returns the source as it now reads.

application/json
  1. response

A source code with the name and mark it's shown by.

source*string

The source code, as items carry it in source.

name*string

The name to show for the source.

name_from*string

Where name comes from: set on the source, the app signed in under it, the label of the key that holds it, or the code itself.

Value in"set""app""key""code"
mark?string

The icon ID set for the source, from the same sets as a type's icon. Absent until someone sets one.

curl -X PATCH 'http://localhost:8600/source?source=string' \  -H 'Content-Type: application/json' \  -d '{}'
{  "source": "string",  "name": "string",  "name_from": "set",  "mark": "string"}