LookupTableRevision

Update LookupTableRevision

Changed on

Update a Lookup Table Revision for the given UUID.

NOTE: If you've already added data to a Lookup Table Revision - see the following Lookup Table Revision Data section - then you won't be able to change the Revision's field schema and you'll receive an error if you try do this. Create a new Revision instead, or delete the data items first.

put/organizations/{orgId}/lookuptables/{lookupTableId}/revisions/{id}

Request

Path parameters

orgIdstring required

UUID of the Organization. The Organization represents your company as a direct customer of the m3ter service.

idstring required

The UUID of the Lookup Table Revision to update.

lookupTableIdstring required

The UUID of the Lookup Table the Revision belongs to.

Request body

namestring required

Descriptive name for the Lookup Table Revision.

startDatestring date-time

The start date of the Lookup Table Revision.

keysstring[] required

The ordered keys of the Lookup Table Revision.

versioninteger

The version number of the entity:

  • Create entity: Not valid for initial insertion of new entity - do not use for Create. On initial Create, version is set at 1 and listed in the response.
  • Update Entity: On Update, version is required and must match the existing version because a check is performed to ensure sequential versioning is preserved. Version is incremented by 1 and listed in the response.
customFieldsobject

User defined fields enabling you to attach custom data. The value for a custom field can be either a string or a number.

If customFields can also be defined for this entity at the Organizational level, customField values defined at individual level override values of customFields with the same name defined at Organization level.

See Working with Custom Fields in the m3ter documentation for more information.

Example request

{
  "fields": [
    {
      "name": "lookuptablerevisionfieldkey"
    }
  ],
  "keys": [
    "foo",
    "bar"
  ]
}

Response

Returns the updated LookupTableRevision

namestring

The name of the Lookup Table Revision.

status'DRAFT' | 'PUBLISHED' | 'ARCHIVED'

Status of a Lookup Table Revision

startDatestring date-time

The start date of the Lookup Table Revision

keysstring[]

The ordered keys of the Lookup Table Revision

dtCreatedstring date-time

The DateTime when the Lookup Table Revision was created.

dtLastModifiedstring date-time

The DateTime when the Lookup Table Revision was last modified.

createdBystring

The id of the user who created the Lookup Table Revision.

lastModifiedBystring

The id of the user who last modified the Lookup Table Revision.

itemCountinteger
lookupTableIdstring

The lookup table id associated with this revision

idstring required

The UUID of the entity.

versioninteger

The version number:

  • Create: On initial Create to insert a new entity, the version is set at 1 in the response.
  • Update: On successful Update, the version is incremented by 1 in the response.
customFieldsobject

User defined fields enabling you to attach custom data. The value for a custom field can be either a string or a number.

If customFields can also be defined for this entity at the Organizational level,customField values defined at individual level override values of customFields with the same name defined at Organization level.

See Working with Custom Fields in the m3ter documentation for more information.

Example response

{
  "fields": [
    {
      "name": "lookuptablerevisionfieldkey"
    }
  ]
}

Changes

    • breaking

      added subschema #1 subschema #2 to the ///// request property allOf list

    • breaking

      the //// request property type changed from no type to object

    • breaking

      the //// response's property type changed from no type to object for status

    • warning

      removed subschema #2 from the // request property allOf list

    • info

      added the optional property to the response with the status

    • info

      removed subschema #2 from the // response property allOf list for the response status

    • info

      removed subschema #2 from the response property allOf list for the response status

    • info

      endpoint added